Pyth Pro MCP Server

io.github.pyth-networkPublished by GitHub account pyth-networkv0.3.2Updated Oct 24, 2026

Real-time and historical price feeds for 500+ crypto, equities, FX, and commodities assets.

VerifiedStreamable HTTPWeb executableFinanceData & Analytics

Overview

AI-generated overview

Hosted Pyth Pro MCP server that lets an assistant look up real-time and historical prices for 500+ crypto, equity, FX and commodity feeds.

What you can do
  • Discover and filter available price feeds by asset type, instrument type or futures chain
  • Fetch the latest real-time price for one or more feeds
  • Get point-in-time historical prices and every update within a window of up to 60 seconds
  • Retrieve OHLC candlestick bars for charting, technical analysis or backtesting
  • Convert ISO 8601 date strings into Unix timestamps for the price tools
When to use it
Useful when an assistant needs market data: current quotes, price history, intraday moves around an event, or candlestick series for analysis and backtesting across crypto, equities, FX and commodities.
Requirements
A remote Streamable HTTP endpoint; no local install needed, though Claude Desktop can bridge via mcp-remote with Node.js. A Pyth Pro access token is required for the price tools, sent as an Authorization Bearer header, as the PYTH_PRO_ACCESS_TOKEN environment variable for a local stdio build, or as the access_token parameter per call. Optional local variables set the price channel, log level and request timeout.
Before you install
The price tools need your own Pyth Pro access token; a token passed per call is handled by the assistant, and client config files may store it in plain text, so keep it out of repositories. A 403 means your plan is not entitled to that feed. The mcp-remote bridge is a community package that handles your key. On Team and Enterprise connectors an Owner-set header key is shared by the whole organization.

Installation

In SourceWeft

  1. Open Pyth Pro MCP Server in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Web executable via Streamable HTTP. Remote servers run from the web runtime once configured in a workspace.

Use with an agent

Paste this prompt into Claude Code, Codex, Cursor or another agent — or into SourceWeft chat. The agent reads this server's install guide, shows you its publisher, endpoint and sign-in, and adds it to your client once you agree. Keys never go into a command.

Read https://sourceweft.com/mcp/io.github.pyth-network%2Fmcp/install.md and connect the MCP server it describes to my client. Before changing any config, show me its publisher, endpoint and sign-in method and wait for my OK. Never put an API key in a command or in a file I would commit; ask me where it should come from.

Read the install guide the agent follows

Other MCP clients

Add this to your client's mcpServers config.

{
  "mcpServers": {
    "pyth-pro": {
      "type": "http",
      "url": "https://mcp.pyth.network/mcp"
    }
  }
}

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

sh
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):

json
{  "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):

json
{  "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.)

json
{  "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

sh
pnpm --filter @pythnetwork/mcp build

MCP Inspector

Run the inspector to interactively test tools:

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

Local stdio config

To connect a client to a local build via stdio:

json
{  "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

Source: apps/mcp/README.md at commit 709e742

Tools

6

get_symbols

List Pyth Price Feeds

List available Pyth Pro price feeds. Use this FIRST to discover what feeds exist before calling get_latest_price, get_historical_price, get_price_range or get_candlestick_data (those also accept bare pairs like BTC/USD). Filter by asset_type (e.g. crypto, equity, fx, metal, commodity, interest-rate, funding-rate, kalshi) or search by name/symbol. Narrow further with instrument_type (spot, future, ...) or symbol_chain_id (all contracts of one futures chain, e.g. VX). Retired (inactive) feeds are hidden unless include_inactive is true. Returns compact feed metadata: symbol, name, description, pyth_lazer_id, asset_type, instrument_type, state, exponent, min_channel (fastest channel the feed supports), quote_currency, and where set groups (entitlement groups that gate the feed), expiration_time and symbol_chain_id (futures). Pass verbose: true for every catalog field, e.g. market_sessions (trading-hours schedules) and corporate_actions (e.g. stock splits). With an access token, the list also includes feeds visible only to Pro keys, and each feed has `entitled`: true means this key can query the feed right now. When `entitled` is false, `not_entitled_reason` says why: `not_live (...)` means the feed is in beta, not live yet, or retired, so no key can query it (NOT a plan limitation), `requires one of entitlement groups: ...` means the user's plan lacks that entitlement.

Parameterslimitqueryoffsetverboseasset_typeaccess_tokeninstrument_typesymbol_chain_idinclude_inactive

convert_date_to_timestamp

Convert Date to Timestamp

Convert a date string to Unix timestamp for use with get_historical_price, get_price_range and get_candlestick_data. Use this tool when you need to compute timestamps — do not calculate Unix timestamps manually. Accepts ISO 8601 dates (e.g. '2026-01-01', '2026-01-01T12:00:00Z'). Returns seconds, microseconds, ISO 8601, and whether the date is within the available data range (April 2025 onward).

Parametersdate_stringrequired

get_candlestick_data

Get Candlestick Data

Fetch OHLC candlestick bars for one symbol, for charting, technical analysis or backtesting. OHLC values are already human-readable (no exponent). Requires the user's own Pyth Pro access token. If the user configured it in their MCP client, omit `access_token`; otherwise pass it as `access_token`, and if the tool reports it missing, ask the user for it. Symbols can be full names from get_symbols (e.g. 'Crypto.BTC/USD', 'Equity.US.AAPL/USD') or bare pairs like 'BTC/USD'. A bare pair resolves to the live spot feed when there is one, otherwise to the only remaining live match; `resolved_symbols` in the response shows what each input resolved to, and an ambiguous input returns an error listing the candidates. `from` and `to` are Unix seconds only. Resolutions: 1/5/15/30/60 minutes, 120/240/360/720 (multi-hour), D (daily), W (weekly), M (monthly). At most 500 candles are returned; `truncated: true` means narrow the range or use a larger resolution. Historical data is available from April 2025 onward; do not request times before that. Price tools: get_latest_price for now, get_historical_price for one past instant, get_price_range for every update within up to 60 seconds, get_candlestick_data for OHLC bars over longer periods. Timestamp reference (Unix seconds): 2025-04-01 (earliest available) = 1743465600 2026-01-01 = 1767225600 2026-06-01 = 1780272000 Always double-check your timestamp math (year-boundary errors are common), or use convert_date_to_timestamp.

Parameterstorequiredfromrequiredsymbolrequiredchannelresolutionrequiredaccess_token

get_historical_price

Get Historical Price

Get the price of one or more feeds at one past instant. Requires the user's own Pyth Pro access token. If the user configured it in their MCP client, omit `access_token`; otherwise pass it as `access_token`, and if the tool reports it missing, ask the user for it. Symbols can be full names from get_symbols (e.g. 'Crypto.BTC/USD', 'Equity.US.AAPL/USD') or bare pairs like 'BTC/USD'. A bare pair resolves to the live spot feed when there is one, otherwise to the only remaining live match; `resolved_symbols` in the response shows what each input resolved to, and an ambiguous input returns an error listing the candidates. If both price_feed_ids and symbols are provided, only price_feed_ids are used. The timestamp accepts Unix seconds, milliseconds or microseconds (auto-detected) and is rounded down to the channel rate (e.g. a multiple of 200 ms for fixed_rate@200ms). Historical data is available from April 2025 onward; do not request times before that. Requested feeds that return no price are listed in `missing_feed_ids` (e.g. beta or coming_soon feeds, or a channel faster than the feed's min_channel). Prices are integers with an exponent field: human-readable price = price * 10^exponent. Pre-computed display_* fields (display_price, display_bid, display_ask, display_confidence, display_ema_price, display_ema_confidence, display_funding_rate) apply the exponent for you. Price tools: get_latest_price for now, get_historical_price for one past instant, get_price_range for every update within up to 60 seconds, get_candlestick_data for OHLC bars over longer periods. Timestamp reference (Unix seconds): 2025-04-01 (earliest available) = 1743465600 2026-01-01 = 1767225600 2026-06-01 = 1780272000 Always double-check your timestamp math (year-boundary errors are common), or use convert_date_to_timestamp.

Parameterschannelsymbolstimestamprequiredaccess_tokenprice_feed_ids

get_latest_price

Get Latest Price

Get the most recent real-time price for one or more feeds. Requires the user's own Pyth Pro access token. If the user configured it in their MCP client, omit `access_token`; otherwise pass it as `access_token`, and if the tool reports it missing, ask the user for it. Symbols can be full names from get_symbols (e.g. 'Crypto.BTC/USD', 'Equity.US.AAPL/USD') or bare pairs like 'BTC/USD'. A bare pair resolves to the live spot feed when there is one, otherwise to the only remaining live match; `resolved_symbols` in the response shows what each input resolved to, and an ambiguous input returns an error listing the candidates. If both price_feed_ids and symbols are provided, only price_feed_ids are used. Requested feeds that return no price are listed in `missing_feed_ids` (e.g. beta or coming_soon feeds, or a channel faster than the feed's min_channel). Prices are integers with an exponent field: human-readable price = price * 10^exponent. Pre-computed display_* fields (display_price, display_bid, display_ask, display_confidence, display_ema_price, display_ema_confidence, display_funding_rate) apply the exponent for you. Price tools: get_latest_price for now, get_historical_price for one past instant, get_price_range for every update within up to 60 seconds, get_candlestick_data for OHLC bars over longer periods.

Parameterschannelsymbolspropertiesaccess_tokenprice_feed_ids

get_price_range

Get Price Range

Get every price update for one or more feeds within a short historical window (at most 60 seconds), e.g. to see exactly how a price moved around an event. Requires the user's own Pyth Pro access token. If the user configured it in their MCP client, omit `access_token`; otherwise pass it as `access_token`, and if the tool reports it missing, ask the user for it. Symbols can be full names from get_symbols (e.g. 'Crypto.BTC/USD', 'Equity.US.AAPL/USD') or bare pairs like 'BTC/USD'. A bare pair resolves to the live spot feed when there is one, otherwise to the only remaining live match; `resolved_symbols` in the response shows what each input resolved to, and an ambiguous input returns an error listing the candidates. If both price_feed_ids and symbols are provided, only price_feed_ids are used. Rows are ordered by time and interleaved across feeds; a fixed_rate@200ms channel yields 5 rows per feed per second. When `has_more` is true, call again with `after` set to `next_cursor` and the same feeds, window and channel. Historical data is available from April 2025 onward; do not request times before that. Prices are integers with an exponent field: human-readable price = price * 10^exponent. Pre-computed display_* fields (display_price, display_bid, display_ask, display_confidence, display_ema_price, display_ema_confidence, display_funding_rate) apply the exponent for you. Price tools: get_latest_price for now, get_historical_price for one past instant, get_price_range for every update within up to 60 seconds, get_candlestick_data for OHLC bars over longer periods.

Parametersendrequiredafterlimitstartrequiredchannelsymbolsaccess_tokenprice_feed_ids

Version history

4
  1. v0.3.2LatestOct 23, 2026
  2. v0.3.1Oct 9, 2026
  3. v0.3.0Oct 6, 2026
  4. v0.2.0Sep 16, 2026

Score

90% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 daysRequired25 pts
  • Auth declaredRequired10 pts
  • Tools listedRequired15 pts
  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts

    Declare a license in the repository or the registry entry.