Mercury402: Treasury/FRED financial data over x402
Treasury/FRED financial data over x402: pay-per-call US yields, macro and forex in USDC on Base
التثبيت
أضف هذا إلى إعدادات MCP في عميلك (Claude Desktop: claude_desktop_config.json، وCursor: .cursor/mcp.json، ويستخدم VS Code وغيره الصيغة نفسها «mcpServers»).
claude mcp add --transport http mercury402-treasury-fred-financial-data- 'https://mcp.mercury402.com/mcp'
{
"mcpServers": {
"mercury402-treasury-fred-financial-data-": {
"type": "http",
"url": "https://mcp.mercury402.com/mcp"
}
}
}
mercury402-mcpclaude mcp add mercury402-treasury-fred-financial-data- -e 'MERCURY402_PAYER_PRIVATE_KEY=<your mercury402_payer_private_key>' -e 'MERCURY402_MAX_PRICE_USD=0.5' -- npx -y mercury402-mcp@0.1.4
{
"mcpServers": {
"mercury402-treasury-fred-financial-data-": {
"command": "npx",
"args": [
"-y",
"mercury402-mcp@0.1.4"
],
"env": {
"MERCURY402_PAYER_PRIVATE_KEY": "<your mercury402_payer_private_key>",
"MERCURY402_MAX_PRICE_USD": "0.5"
}
}
}
}
متغيرات البيئة
MERCURY402_PAYER_PRIVATE_KEYسري Opt-in paid mode: private key of a dedicated low-balance wallet holding USDC on Base. Leave unset for free discovery mode.MERCURY402_MAX_PRICE_USDPer-call spending cap in USD for paid mode.
التوثيق
مأخوذ من ملف README للمشروع على GitHub ويُحدَّث أسبوعيًا. تفتح الروابط على GitHub.
المحتويات
Mercury402
Deterministic Finance Data for Autonomous Agents
Mercury402 provides pay-per-call economic data APIs for AI agents and autonomous systems. No API keys, no accounts, no rate limits—just pay in USDC on Base via the x402 protocol and get instant access to Federal Reserve data, Treasury yields, and macro indicators with cryptographic provenance.
Live at: https://api.mercury402.com
Endpoints
| Endpoint | Data | Price (USDC) |
|---|---|---|
GET /v1/fred/{series_id} | Any FRED economic series | $0.05 |
GET /v1/treasury/yield-curve/daily-snapshot | Current Treasury yield curve (11 maturities) | $0.05 |
GET /v1/macro/snapshot/all | Complete macro snapshot (GDP, CPI, unemployment, rates, VIX, dollar index, sentiment) | $0.05 |
POST /v1/treasury/yield-curve/historical | Historical yield curves (max 90-day range) | $0.05 |
GET /v1/treasury/auction-results/recent | Recent auction results (HQM proxy) | $0.05 |
GET /v1/treasury/tips-rates/current | Current TIPS rates (5, 7, 10, 20, 30-year) | $0.05 |
GET /v1/composite/economic-dashboard | Economic overview (GDP, CPI, unemployment) | $0.50 |
GET /v1/composite/inflation-tracker | Inflation metrics (CPI, PCE, Core CPI) | $0.40 |
GET /v1/composite/labor-market | Labor market data (unemployment, claims, payrolls) | $0.40 |
GET /v1/ai/briefing | Macro briefing (AI) | $0.10 |
POST /v1/ai/ask | Macro Q&A (AI) | $0.15 |
GET /.well-known/x402 | x402 discovery document | Free |
GET /health | Health check | Free |
GET /metrics | Revenue and usage stats | Free |
GET /openapi.json | OpenAPI 3.1 spec | Free |
GET /docs/api | Interactive Swagger UI | Free |
78 priced routes in /.well-known/x402 / src/pricing.js (FRED aliases, forex, spreads, breakeven, macro, composites, AI) plus free discovery/health/docs.
Discovery
Every document below is generated from src/pricing.js (what is charged) and the route modules, so they list the same 78 paid endpoints at the same prices.
| URL | Format | For |
|---|---|---|
/.well-known/x402 | x402 v2 JSON | Payment descriptors (payTo, asset, amount) per endpoint: the payment source of truth |
/openapi.json | OpenAPI 3.1 | Code generators, API gateways, ChatGPT/agent tool importers |
/llms.txt | Plain text | LLM crawlers and agent frameworks that read the llms.txt convention |
/meta.json (or GET / with a non-HTML Accept) | JSON | Full endpoint catalog with methods, params and prices |
npx -y mercury402-mcp | MCP (stdio) | Claude Desktop, Claude Code, Cursor and other MCP clients (mcp-server/) |
curl -s https://api.mercury402.com/llms.txt
curl -s https://api.mercury402.com/meta.json | jq '.count, .endpoints[0]'
Quick Start
# 1. Try a free health check
curl https://api.mercury402.com/health
# 2. Attempt to access data (returns 402 Payment Required)
curl https://api.mercury402.com/v1/fred/UNRATE
# 3. Pay via an x402-compatible client and retry with payment-signature
curl -H "payment-signature: <base64_x402_payment_payload>" \
https://api.mercury402.com/v1/fred/UNRATE
See examples/ for agent integration code.
Use with MCP
The mercury402-mcp server exposes two tools, list_endpoints and get_endpoint_data, over the same 78 endpoints.
npx -y mercury402-mcp
Claude Code:
claude mcp add mercury402 -- npx -y mercury402-mcp
Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json on macOS, %APPDATA%\Claude\claude_desktop_config.json on Windows):
{
"mcpServers": {
"mercury402": {
"command": "npx",
"args": ["-y", "mercury402-mcp"]
}
}
}
Hosted endpoint (free discovery mode: lists endpoints and returns 402 quotes, never pays): https://mcp.mercury402.com/mcp
Other MCP clients can run the same npx -y mercury402-mcp command over stdio. Paid mode and all configuration options: mcp-server/README.md.
x402 Payment Flow
- Request data → Server returns
402 Payment RequiredwithPayment-Requireddetails - Pay in USDC → Use an x402-compatible client on Base to build a signed payment payload
- Retry request → Include
payment-signature: <base64_x402_payment_payload> - Receive data → Server verifies and redeems the payment, then returns signed data
Marketplace listing: https://www.x402scan.com/server/mercury402
Documentation
- Swagger UI: https://api.mercury402.com/docs/api
- OpenAPI Spec: https://api.mercury402.com/openapi.json
- x402scan Listing: https://www.x402scan.com/server/mercury402
- Examples:
examples/README.md
Features
✅ No API keys or accounts — Pay-per-call via USDC on Base
✅ Deterministic data — All responses include FRED series metadata and provenance signatures
✅ Cryptographic provenance — ECDSA signatures verify data authenticity
✅ Rate-limited free tier — Health and discovery endpoints always available
✅ Agent-friendly — Designed for autonomous systems and AI agents
Tech Stack
- Runtime: Node.js + Express
- Data source: Federal Reserve Economic Data (FRED) API
- Payment: x402 protocol (USDC on Base)
- Signing: ethers.js + ECDSA
Self-Hosting
# Clone and install
git clone https://github.com/dudman1/mercury402.git
cd mercury402
npm install
# Configure environment
cp .env.example .env
# Add your FRED_API_KEY and SERVER_PRIVATE_KEY
# Start server
npm start
Server runs on http://localhost:4020
See deployment docs for production setup.
Support
Issues: GitHub Issues
Funding: https://api.mercury402.com
License
MIT
Last updated: 2026-10-08 ET | Updated by: Hermes
الأسئلة الشائعة
ما هو Mercury402: Treasury/FRED financial data over x402؟
Treasury/FRED financial data over x402: pay-per-call US yields, macro and forex in USDC on Base
كيف أثبّت Mercury402: Treasury/FRED financial data over x402؟
يعمل كخادم بعيد. في Claude Code: claude mcp add --transport http mercury402-treasury-fred-financial-data- 'https://mcp.mercury402.com/mcp'. وفي العملاء الآخرين، الصق إعداد JSON من هذه الصفحة في إعدادات MCP الخاصة بهم.
هل يحتاج Mercury402: Treasury/FRED financial data over x402 إلى مفتاح API؟
نعم. يتطلب MERCURY402_PAYER_PRIVATE_KEY، وتضبطها في إعداداته.
هل Mercury402: Treasury/FRED financial data over x402 مفتوح المصدر؟
نعم. شيفرته متاحة على GitHub بترخيص MIT.
من يصون Mercury402: Treasury/FRED financial data over x402؟
ينشره dudman1. يدرجه AI.tn لكنه لا يصونه ولا يوصي به.
من سجل MCP الرسمي. الإدراج ليس توصية: راجع شيفرة الخادم وصلاحياته قبل منحه الوصول إلى بياناتك.