Market Data (x402)

السجل الرسمي الإنتاجية

Paid-per-call market data for agents: trading calendars, futures, macro, contract specs (x402)

التثبيت

أضف هذا إلى إعدادات MCP في عميلك (Claude Desktop: claude_desktop_config.json، وCursor: ‏.cursor/mcp.json، ويستخدم VS Code وغيره الصيغة نفسها «mcpServers»).

PYPI package x402-market-data-mcp
Claude Code
claude mcp add market-data-x402 -e 'X402_KEY_FILE=<X402_KEY_FILE>' -e 'X402_PRIVATE_KEY=<your x402_private_key>' -e 'MAX_USDC_PER_CALL=0.01' -e 'MAX_USDC_PER_SESSION=0.10' -- uvx x402-market-data-mcp==0.2.1
إعداد JSON (Claude Desktop وCursor وVS Code)
{
    "mcpServers": {
        "market-data-x402": {
            "command": "uvx",
            "args": [
                "x402-market-data-mcp==0.2.1"
            ],
            "env": {
                "X402_KEY_FILE": "<X402_KEY_FILE>",
                "X402_PRIVATE_KEY": "<your x402_private_key>",
                "MAX_USDC_PER_CALL": "0.01",
                "MAX_USDC_PER_SESSION": "0.10"
            }
        }
    }
}

متغيرات البيئة

  • X402_KEY_FILE Path to a file with the private key of a small, dedicated payment wallet (plain text or JSON with private_key). Without it only free tools work.
  • X402_PRIVATE_KEY سري Alternative to X402_KEY_FILE: private key of a small, dedicated payment wallet.
  • MAX_USDC_PER_CALL Highest price per call in USDC
  • MAX_USDC_PER_SESSION Total budget per server start in USDC

التوثيق

مأخوذ من ملف README للمشروع على GitHub ويُحدَّث أسبوعيًا. تفتح الروابط على GitHub.

المحتويات
  1. Market Data MCP
  2. How payment works
  3. Install (Claude Desktop, Cursor, any MCP client)
  4. Direct HTTP use
  5. Disclaimer

Market Data MCP

An MCP server that gives AI assistants and agents 32 paid market-data tools plus 5 free helper tools:

AreaToolsPrice per call
Exchange hoursmarket_is_open, market_next_open_close, market_holidays0.01–0.02 USDC
Futuresfutures_front_month, futures_expirations, futures_roll_calendar0.01–0.02 USDC
Trading timesettlement_date, fx_sessions, dst_gaps, is_dst_gap, market_countdown0.01–0.02 USDC
Macrotreasury_yield_curve, treasury_spread, ecb_fx_rate, ecb_convert, cot_positioning0.01–0.02 USDC
Calendarsoptions_expiration_check, options_expiration_calendar, vix_expirations, economic_release_next, economic_releases, central_bank_next_meeting, central_bank_meetings, treasury_auctions, treasury_next_auction, is_banking_day, banking_holidays, index_rebalance_dates0.01–0.02 USDC
Briefingtrading_briefing – all market-moving events of the next days in one call0.03 USDC
Futures specscontract_spec, futures_tick_value, futures_position_size0.01 USDC
Freecatalog_list, payment_status, list_markets, list_futures_products, list_cot_marketsfree

Exchanges: NYSE, Nasdaq, LSE, Xetra, SIX, Tokyo, Hong Kong, Shanghai, ASX, CME equity futures. Futures: ES, MES, NQ, MNQ, YM, MYM, RTY, M2K, FDAX, FDXM, FESX, FSMI. Macro data comes from the U.S. Treasury (public domain), the ECB (euro reference rates; source: ECB statistics) and the CFTC Commitments of Traders report (public domain).

How payment works

Each paid tool calls an HTTP API protected by x402. The server pays automatically in USDC on Base, using a wallet key you provide, and only:

  • to the known wallets of these APIs (any other payee is refused),
  • in USDC on Base mainnet,
  • up to MAX_USDC_PER_CALL per call (default 0.05) and MAX_USDC_PER_SESSION per server start (default 1.00).

Without a key the free tools work and paid tools explain how to enable payment.

Use a separate, small wallet for X402_PRIVATE_KEY with only a few USDC on Base. Never use your main wallet. No ETH is needed for gas; the x402 facilitator pays it.

Install (Claude Desktop, Cursor, any MCP client)

Requires uv. Add this to your MCP client config (Claude Desktop: Settings → Developer → Edit Config):

{
  "mcpServers": {
    "market-data": {
      "command": "uvx",
      "args": ["--from", "x402-market-data-mcp", "market-data-mcp"],
      "env": {
        "X402_KEY_FILE": "C:\\path\\to\\wallet.json",
        "MAX_USDC_PER_SESSION": "1.00"
      }
    }
  }
}

X402_KEY_FILE points to a file with the key (plain text or JSON with private_key); alternatively set X402_PRIVATE_KEY directly. Without uv: pip install x402-market-data-mcp and use "command": "python", "args": ["-m", "market_data_mcp"].

Then ask for example: "Is the NYSE open on 27 November 2026 at 18:00 UTC?", "What is the ES roll date in December?" or "Show the current US yield curve and the 2s10s spread."

Direct HTTP use

The same data is available as x402 HTTP APIs, listed in the Coinbase x402 Bazaar:

Disclaimer

Data is provided as is, without warranty. Not investment advice. Always confirm critical dates with the exchange.

License: MIT

الأسئلة الشائعة

ما هو Market Data (x402)؟

Paid-per-call market data for agents: trading calendars, futures, macro, contract specs (x402)

كيف أثبّت Market Data (x402)؟

يعمل على جهازك. في Claude Code: claude mcp add market-data-x402 -e 'X402_KEY_FILE=<X402_KEY_FILE>' -e 'X402_PRIVATE_KEY=<your x402_private_key>' -e 'MAX_USDC_PER_CALL=0.01' -e 'MAX_USDC_PER_SESSION=0.10' -- uvx x402-market-data-mcp==0.2.1. وفي العملاء الآخرين، الصق إعداد JSON من هذه الصفحة في إعدادات MCP الخاصة بهم.

هل يحتاج Market Data (x402) إلى مفتاح API؟

نعم. يتطلب X402_PRIVATE_KEY، وتضبطها في إعداداته.

هل Market Data (x402) مفتوح المصدر؟

نعم. شيفرته متاحة على GitHub بترخيص MIT.

من يصون Market Data (x402)؟

ينشره r0dell. يدرجه AI.tn لكنه لا يصونه ولا يوصي به.

من سجل MCP الرسمي. الإدراج ليس توصية: راجع شيفرة الخادم وصلاحياته قبل منحه الوصول إلى بياناتك.