mcpField
P
Pyth Pro Mcp

Pyth Pro Mcp

Remote
docs.pyth.networkFinance249Updated today

About Pyth Pro Mcp

Pyth Pro MCP is an MCP server that lets AI assistants query real-time and historical market data from Pyth, with over 500 price feeds across crypto, equities, FX and commodities. It suits developers and analysts who need market data, and each user supplies their own Pyth Pro access token.

Key features

  1. 01Real-time price queries
  2. 02Historical price snapshots and price range queries
  3. 03OHLC candlestick data
  4. 04Price feed search and filtering
  5. 05Optional token authentication with entitlement flags

Use cases

  1. 01Asking an AI assistant for current crypto or stock prices
  2. 02Retrieving historical price series for a given time window
  3. 03Discovering available derivatives feeds such as VIX futures

MCP support

This is a hosted remote MCP server at https://mcp.pyth.network/mcp that exposes price, candlestick and symbol search tools to MCP clients.

Configuration

Remote servers need no local install. Pick your client, then copy the config or install in one click.

Endpointhttps://mcp.pyth.network/mcp
Copy install command
Claude CodeTerminal
Cursor.cursor/mcp.json
VS Code.vscode/mcp.json
Claude Desktopclaude_desktop_config.json
Windsurf~/.codeium/windsurf/mcp_config.json

Run commands in a terminal; paste JSON into the client’s MCP config and restart. Servers that need sign-in will prompt on first connect.

Tools

5
ParameterTypeRequiredDescription
asset_typeenumNoFilter by asset type: crypto, fx, equity, metal, rates, commodity, funding-ratecrypto | fx | equity | metal | rates | commodity | funding-rate
limitintegerNoResults per page (default 50, max 200)
offsetintegerNoPagination offset (default 0)
querystringNoText filter (e.g. 'BTC', 'gold', 'AAPL')

Details

From the project README

Pyth Pro MCP Server

MCP server that gives AI assistants access to real-time and historical market data from Pyth — 500+ price feeds across crypto, equities, FX, commodities, and more.

Hosted at https://mcp.pyth.network/mcp

Quick Start

Each snippet sends your own Pyth Pro API key as an Authorization: Bearer header, so you set it once (see Access Token).

Claude Code
claude mcp add --transport http pyth https://mcp.pyth.network/mcp --header "Authorization: Bearer YOUR_TOKEN"

This adds Pyth only to the folder you run the command in. To use it in every project, add --scope user; any project you open can then call the price tools with your key.

Claude Desktop

Claude Desktop connects to remote servers as custom connectors, which can send your key as a header only where Anthropic's request-headers beta is enabled. To set the key once on any plan, bridge with mcp-remote (needs Node.js) in claude_desktop_config.json (Claude menu bar → Settings… → Developer → Edit Config):

{
  "mcpServers": {
    "pyth": {
      "command": "npx",
      "args": ["-y", "[email protected]", "https://mcp.pyth.network/mcp", "--header", "Authorization:${PYTH_AUTH_HEADER}"],
      "env": { "PYTH_AUTH_HEADER": "Bearer YOUR_TOKEN" }
    }
  }
}

mcp-remote is a community package, not maintained by Pyth, and it handles your key; the snippet pins the version we tested.

Or add https://mcp.pyth.network/mcp as a custom connector: on Free, Pro or Max under Customize → Connectors → Add custom connector; on Team or Enterprise an Owner adds it under Organization settings → Connectors → Add → Custom, and members click Connect under Customize → Connectors. With the request-headers beta, choose No sign-in and add an authorization header Bearer YOUR_TOKEN (on Team and Enterprise plans the Owner sets it for the whole organization, so everyone shares that key); otherwise pass the key per call.

Cursor

Add to ~/.cursor/mcp.json (global, so the key stays out of your repo):

{
  "mcpServers": {
    "pyth": {
      "url": "https://mcp.pyth.network/mcp",
      "headers": { "Authorization": "Bearer YOUR_TOKEN" }
    }
  }
}

To keep the key out of the file, write "Bearer ${env:PYTH_PRO_ACCESS_TOKEN}" and set that variable in your shell profile or system environment.

VS Code

Add to ~/.copilot/mcp-config.json, a user-level file that VS Code's chat and its Agent Host sessions both read. It holds your key in plain text, so never copy it into a repository. (VS Code's ${input:...} prompt avoids that, but Agent Host sessions do not receive .vscode/mcp.json servers that use it.)

{
  "mcpServers": {
    "pyth": {
      "type": "http",
      "url": "https://mcp.pyth.network/mcp",
      "headers": { "Authorization": "Bearer YOUR_TOKEN" },
      "tools": ["*"]
    }
  }
}
Other Clients

Any MCP client that supports Streamable HTTP: connect to https://mcp.pyth.network/mcp with the header Authorization: Bearer YOUR_TOKEN.

Tools

ToolDescriptionAuth Required
get_symbolsSearch and list price feeds; filter by asset type, instrument type or futures chainOptional (adds Pro-only feeds and an entitled flag per feed)
get_latest_priceReal-time prices for one or more feedsYes (access token)
get_historical_pricePoint-in-time price snapshotsYes (access token)
get_price_rangeEvery price update within a window of up to 60 secondsYes (access token)
get_candlestick_dataOHLC candlestick bars for charting and analysisYes (access token)
convert_date_to_timestampConvert date strings to Unix timestampsNo

Tip: Use get_symbols first to discover available feeds. Price tools accept full symbols (Crypto.BTC/USD) or bare pairs (BTC/USD). A bare pair resolves to the live spot feed when there is one, otherwise to the only remaining match (e.g. BTC/USDT → the Binance funding-rate feed); if several remain, the error lists them.

Access Token

Every user brings their own Pyth Pro access token. It is required for get_latest_price, get_historical_price, get_price_range and get_candlestick_data. get_symbols works without one, but with a token it also lists feeds visible only to Pro keys and marks each feed entitled: true/false (whether your token can query it right now). convert_date_to_timestamp never needs one.

  • Get a token: Acquire an API key
  • Give the server your token in one of three ways. A token passed on a call wins over a configured one.
    • Configure it once for the hosted server: send it as an Authorization: Bearer header from your MCP client (see Quick Start), so your assistant does not handle it on every call.
    • Configure it once for a local stdio server: set PYTH_PRO_ACCESS_TOKEN in the server's env block in your client config (see Local stdio config).
    • Per call: the access_token tool parameter. Your assistant asks for it when no token is configured. Clients that cannot send headers (e.g. Claude Desktop custom connectors without the request-headers beta) use this.
  • The server never has a key of its own: the hosted server ignores PYTH_PRO_ACCESS_TOKEN in its own environment and only uses the key each user sends.
  • A 401 means the token is invalid or expired. A 403 means the token is valid but your plan is not entitled to that feed; the error names the entitlement group required.
  • Only feeds in state stable return prices. Requested feeds that come back without a price (e.g. beta or coming_soon feeds, or a channel faster than the feed's min_channel) are listed in missing_feed_ids.

Example Queries

Try these with any connected AI assistant:

  • "What's the current price of Bitcoin?"
  • "Show me the ETH/USD price history for the last 24 hours"
  • "Compare the prices of gold and silver right now"
  • "Get daily candlestick data for AAPL over the past week"
  • "What crypto price feeds are available on Pyth?"
  • "Show every BTC/USD price update in the 30 seconds after 14:30 UTC today"
  • "Which VIX futures contracts does Pyth have?"

Local Development

For contributors working on the MCP server itself.

Build
pnpm --filter @pythnetwork/mcp build
MCP Inspector

Run the inspector to interactively test tools:

npx @modelcontextprotocol/inspector --cli -- pnpm --filter @pythnetwork/mcp start:stdio:dev
Local stdio config

To connect a client to a local build via stdio:

{
  "mcpServers": {
    "pyth-mcp": {
      "command": "node",
      "args": ["<path-to-repo>/apps/mcp/dist/index.js"],
      "env": { "PYTH_PRO_ACCESS_TOKEN": "YOUR_TOKEN" }
    }
  }
}
Environment Variables
VariableDefaultDescription
PYTH_CHANNELfixed_rate@200msDefault price channel: real_time, fixed_rate@50ms, fixed_rate@200ms or fixed_rate@1000ms
PYTH_LOG_LEVELinfoLog level (debug/info/warn/error)
PYTH_REQUEST_TIMEOUT_MS10000HTTP request timeout
PYTH_PRO_ACCESS_TOKEN—Your own token, stdio only. Ignored by the HTTP server.

Links

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.