Mercury402: Treasury/FRED financial data over x402

Official registry Finance and payments

Treasury/FRED financial data over x402: pay-per-call US yields, macro and forex in USDC on Base

Install

Add this to your client's MCP configuration (Claude Desktop: claude_desktop_config.json; Cursor: .cursor/mcp.json; VS Code and others use the same "mcpServers" shape).

Remote (streamable-http)
Claude Code
claude mcp add --transport http mercury402-treasury-fred-financial-data- 'https://mcp.mercury402.com/mcp'
JSON configuration (Claude Desktop, Cursor, VS Code)
{
    "mcpServers": {
        "mercury402-treasury-fred-financial-data-": {
            "type": "http",
            "url": "https://mcp.mercury402.com/mcp"
        }
    }
}
NPM package mercury402-mcp
Claude Code
claude 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
JSON configuration (Claude Desktop, Cursor, VS Code)
{
    "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"
            }
        }
    }
}

Environment variables

  • MERCURY402_PAYER_PRIVATE_KEY secret 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_USD Per-call spending cap in USD for paid mode.

Documentation

From the project's README on GitHub, refreshed weekly. Links open on GitHub.

Contents
  1. Mercury402
  2. Deterministic Finance Data for Autonomous Agents
  3. Endpoints
  4. Discovery
  5. Quick Start
  6. Use with MCP
  7. x402 Payment Flow
  8. Documentation
  9. Features
  10. Tech Stack
  11. Self-Hosting
  12. Support
  13. License

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

EndpointDataPrice (USDC)
GET /v1/fred/{series_id}Any FRED economic series$0.05
GET /v1/treasury/yield-curve/daily-snapshotCurrent Treasury yield curve (11 maturities)$0.05
GET /v1/macro/snapshot/allComplete macro snapshot (GDP, CPI, unemployment, rates, VIX, dollar index, sentiment)$0.05
POST /v1/treasury/yield-curve/historicalHistorical yield curves (max 90-day range)$0.05
GET /v1/treasury/auction-results/recentRecent auction results (HQM proxy)$0.05
GET /v1/treasury/tips-rates/currentCurrent TIPS rates (5, 7, 10, 20, 30-year)$0.05
GET /v1/composite/economic-dashboardEconomic overview (GDP, CPI, unemployment)$0.50
GET /v1/composite/inflation-trackerInflation metrics (CPI, PCE, Core CPI)$0.40
GET /v1/composite/labor-marketLabor market data (unemployment, claims, payrolls)$0.40
GET /v1/ai/briefingMacro briefing (AI)$0.10
POST /v1/ai/askMacro Q&A (AI)$0.15
GET /.well-known/x402x402 discovery documentFree
GET /healthHealth checkFree
GET /metricsRevenue and usage statsFree
GET /openapi.jsonOpenAPI 3.1 specFree
GET /docs/apiInteractive Swagger UIFree

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.

URLFormatFor
/.well-known/x402x402 v2 JSONPayment descriptors (payTo, asset, amount) per endpoint: the payment source of truth
/openapi.jsonOpenAPI 3.1Code generators, API gateways, ChatGPT/agent tool importers
/llms.txtPlain textLLM crawlers and agent frameworks that read the llms.txt convention
/meta.json (or GET / with a non-HTML Accept)JSONFull endpoint catalog with methods, params and prices
npx -y mercury402-mcpMCP (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

  1. Request data → Server returns 402 Payment Required with Payment-Required details
  2. Pay in USDC → Use an x402-compatible client on Base to build a signed payment payload
  3. Retry request → Include payment-signature: <base64_x402_payment_payload>
  4. Receive data → Server verifies and redeems the payment, then returns signed data

Marketplace listing: https://www.x402scan.com/server/mercury402


Documentation


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

Frequently asked questions

What is 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

How do I install Mercury402: Treasury/FRED financial data over x402?

It runs as a remote server. In Claude Code: claude mcp add --transport http mercury402-treasury-fred-financial-data- 'https://mcp.mercury402.com/mcp'. For other clients, paste the JSON configuration from this page into their MCP settings.

Does Mercury402: Treasury/FRED financial data over x402 need an API key?

Yes. It expects MERCURY402_PAYER_PRIVATE_KEY, which you set in its configuration.

Is Mercury402: Treasury/FRED financial data over x402 open source?

Yes. Its code is on GitHub under the MIT license.

Who maintains Mercury402: Treasury/FRED financial data over x402?

It is published by dudman1. AI.tn lists it but does not maintain or endorse it.

From the official MCP Registry. Listing is not an endorsement: review a server's code and permissions before giving it access to your data.