Skip to content

fix(mcp): link the live API key page and fix client setup in the README - #4061

Merged
aditya520 merged 10 commits into
mainfrom
fix/mcp-api-key-link
Oct 9, 2026
Merged

aditya520 merged 10 commits into
mainfrom
fix/mcp-api-key-link

Conversation

@aditya520

@aditya520 aditya520 commented Oct 9, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Dead link fixed: the missing-token error and the access_token description linked /price-feeds/pro/acquire-access-token, which returns 404. They now link acquire-api-key.
  • README client setup fixed, checked against each client's current docs. Every snippet now sends the key as an Authorization: Bearer header:
    • Claude Desktop: the old snippet put a "url" entry in claude_desktop_config.json, but Claude's docs use that file for local servers and connect remote ones as custom connectors. Now: mcp-remote@0.14.3 (pinned, third-party note), or a custom connector with Anthropic's request-headers beta
    • Cursor: ~/.cursor/mcp.json, with ${env:...} as an option to keep the key out of the file
    • VS Code: the user-level ~/.copilot/mcp-config.json, since Agent Host sessions skip .vscode/mcp.json servers that use ${input:...}; the README notes the file holds the key in plain text
  • PLAN.md: matches the code again.
    • Auth: keys come from the client configuration or per call (it said per-call only); current error texts and token link.
    • Tool reference: current parameters, limits and response shapes for all six tools, including the missing convert_date_to_timestamp.
    • Package and setup: the private @pythnetwork/mcp (not an npm package), hosted at mcp.pyth.network; real env vars, run commands and project tree; resources and prompts marked built or planned.
  • Version: 0.3.1.
  • Greenlight: apps/mcp/** joins the auto_approve_paths allowlist, so future MCP PRs can be self-authorized. The MCP server only reads prices with each caller's own key, holds none itself, and is off the price path. Greenlight reads its config from main, and .github/greenlight.yml always needs a human, so this PR still needs a review.

Related docs update and redirect for the old path: pyth-network/pyth-lazer#4014. Once the docs deploy, the redirect also fixes the link for 0.3.0.

Testing

  • pnpm --filter @pythnetwork/mcp build and test:unit (304/304)
  • Claude Desktop snippet: ran mcp-remote@0.14.3 with this config against mcp.pyth.network. Price tools work without access_token; without the header, the server returns the missing-token error.

🤖 Generated with Claude Code


Devin Review

aditya520 and others added 2 commits October 9, 2026 11:56
The missing-token error and the access_token description linked
/price-feeds/pro/acquire-access-token, which returns 404; link
acquire-api-key instead.

The README's Claude Desktop snippet put a "url" entry in
claude_desktop_config.json, which Claude Desktop ignores. Each client
snippet now sends the key as an Authorization header; Claude Desktop
does so through a pinned mcp-remote.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@aditya520
aditya520 requested a review from a team as a code owner October 9, 2026 16:24
@dourolabs-greenlight

Copy link
Copy Markdown

Greenlight — 🚫 Blocked — see reasons below (a8e3e4b)

Blocking reasons:

  • path not auto-approvable: apps/mcp/package.json (+2 more)

Open in Greenlight →

@dourolabs-greenlight

dourolabs-greenlight Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

Greenlight — 🚫 Blocked — see reasons below (ad8b991)

Blocking reasons:

  • path matches hard default .github/greenlight.yml
  • path not auto-approvable: .github/greenlight.yml

Open in Greenlight →

@vercel

vercel Bot commented Oct 9, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
api-reference Ready Ready Preview Oct 9, 2026 5:26pm UTC
component-library Ready Ready Preview Oct 9, 2026 5:26pm UTC
entropy-explorer Ready Ready Preview Oct 9, 2026 5:26pm UTC
proposals Ready Ready Preview Oct 9, 2026 5:26pm UTC
staking Ready Ready Preview Oct 9, 2026 5:26pm UTC

Request Review

devin-ai-integration[bot]

This comment was marked as resolved.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a8e3e4bf5a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/mcp/README.md Outdated
### VS Code

Any MCP client that supports StreamableHTTP can connect using the URL:
Add to `.vscode/mcp.json`. VS Code prompts for the key once and stores it securely:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Provide a config that works in VS Code Agent Host sessions

For users running current VS Code Agent Host sessions, this quick-start configuration does not expose the server: the official MCP configuration reference states that VS Code does not forward .vscode/mcp.json servers requiring interactive ${input:...} variables. Since this snippet combines both, setup can appear successful while no Pyth tools are available; use an Agent Host-compatible portable configuration and secret mechanism, or explicitly limit these instructions to extension-host sessions.

Useful? React with 👍 / 👎.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-09T16:27:16.762587Z a8e3e4b PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

PLAN.md still said keys are per-call only, quoted the old error texts
and token link, and listed CLI flags, PYTH_LOG_FILE and an npx package
that never existed. It now matches the code: the key comes from the
client configuration or per call, the configuration table lists the
real env vars, and the smoke test uses the hosted server or a local
build.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel
vercel Bot temporarily deployed to Preview – entropy-explorer October 9, 2026 16:29 Inactive
@vercel
vercel Bot temporarily deployed to Preview – staking October 9, 2026 16:29 Inactive
@vercel
vercel Bot temporarily deployed to Preview – api-reference October 9, 2026 16:29 Inactive
@vercel
vercel Bot temporarily deployed to Preview – component-library October 9, 2026 16:29 Inactive
@vercel
vercel Bot temporarily deployed to Preview – proposals October 9, 2026 16:29 Inactive
The tool tables predated the 2026-10 API update, and convert_date_to_timestamp
had no section. Each tool now lists its current parameters, limits and
response shape, taken from src/tools/.

The package is the private @pythnetwork/mcp, not @pyth-network/mcp-server
on npm, and the server is hosted at mcp.pyth.network. The project tree now
shows the real files, and the resources and prompts sections say what is
built (two feed resources) and what is still planned.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel
vercel Bot temporarily deployed to Preview – staking October 9, 2026 16:32 Inactive
@vercel
vercel Bot temporarily deployed to Preview – entropy-explorer October 9, 2026 16:32 Inactive
@vercel
vercel Bot temporarily deployed to Preview – api-reference October 9, 2026 16:32 Inactive
@vercel
vercel Bot temporarily deployed to Preview – component-library October 9, 2026 16:32 Inactive
@vercel
vercel Bot temporarily deployed to Preview – proposals October 9, 2026 16:32 Inactive

@devin-ai-integration devin-ai-integration Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note

Newer findings are available below. Devin Review posted a newer report on this PR, in addition to the findings presented here.

Devin Review found 2 new potential issues.

Devin Review

Comment thread apps/mcp/docs/PLAN.md Outdated
- `symbols` accept full symbols (`Crypto.BTC/USD`) or bare pairs (`BTC/USD`). A bare pair resolves to the live spot feed, otherwise to the only remaining live match; an ambiguous input returns an error listing the candidates. `resolved_symbols` in the response shows each mapping.
- If both `price_feed_ids` and `symbols` are given, only the IDs are used.
- `channel`: `real_time`, `fixed_rate@50ms`, `fixed_rate@200ms` or `fixed_rate@1000ms`; default `fixed_rate@200ms` (`PYTH_CHANNEL`). A channel faster than the feed's `min_channel` returns no price.
- Requested feeds that return no price (e.g. `beta` or `coming_soon` feeds) are listed in `missing_feed_ids`.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 Missing-feed metadata is not shared by every price tool

The shared summary promises missing_feed_ids, but get_price_range omits it and get_candlestick_data reports no data differently.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

Comment thread apps/mcp/docs/PLAN.md
**Returns:** Array of `{ pyth_lazer_id, name, symbol, description, asset_type, exponent, min_channel, state, hermes_id, quote_currency }`

**LLM description:** *"List available Pyth Pro price feeds. Use this to discover what feeds exist before fetching prices. You can filter by asset type (crypto, equity, fx, metal, rates, commodity) or search by name/symbol."*
**Returns:** `{ feeds, count, total_available, offset, has_more, next_offset, note? }`. Each feed is compact by default: `pyth_lazer_id`, `symbol`, `name`, `description`, `asset_type`, `instrument_type`, `state`, `exponent`, `min_channel`, `quote_currency`, plus `groups`, `expiration_time` and `symbol_chain_id` where set. With a token, each feed has `entitled`, and `not_entitled_reason` when it is `false` (not live yet, or the plan lacks an entitlement group).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 Entitlement flags can be absent with a token

If the entitlement request fails, get_symbols returns feeds without entitled and includes an explanatory note. The summary currently promises the flag for every token-backed feed.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

aditya520 and others added 2 commits October 9, 2026 12:44
PLAN.md listed missing_feed_ids, ID precedence and display_* as shared by
every price tool. Only get_latest_price and get_historical_price return
missing_feed_ids, get_candlestick_data takes one symbol and returns
display-unit candles, and get_price_range also returns its channel.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Checked against each client's current docs:
- VS Code: Agent Host sessions skip .vscode/mcp.json servers that use
  ${input:...}, so use the user-level ~/.copilot/mcp-config.json, and
  say that it holds the key in plain text.
- Claude Desktop: custom connectors live under Customize > Connectors
  and can send a header with Anthropic's request-headers beta.
- Cursor: headers accept ${env:...}, which keeps the key out of the file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel
vercel Bot temporarily deployed to Preview – entropy-explorer October 9, 2026 16:45 Inactive
@vercel
vercel Bot temporarily deployed to Preview – staking October 9, 2026 16:45 Inactive
@vercel
vercel Bot temporarily deployed to Preview – component-library October 9, 2026 16:45 Inactive
@vercel
vercel Bot temporarily deployed to Preview – api-reference October 9, 2026 16:45 Inactive
@vercel
vercel Bot temporarily deployed to Preview – proposals October 9, 2026 16:45 Inactive

@devin-ai-integration devin-ai-integration Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note

Newer findings are available below. Devin Review posted a newer report on this PR, in addition to the findings presented here.

Devin Review found 1 new potential issue.

Devin Review

Comment thread apps/mcp/README.md
"pyth": {
"type": "http",
"url": "https://mcp.pyth.network/mcp",
"headers": { "Authorization": "Bearer YOUR_TOKEN" },

@devin-ai-integration devin-ai-integration Bot Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟨 API key persisted in plain text

The VS Code setup writes YOUR_TOKEN into a persistent user file instead of using the previous password prompt. Backups or local tools with file access can expose the user's Pyth Pro key.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

Without it, claude mcp add writes to local scope, so the Pyth tools load
only in the folder where the command ran. User scope loads them in every
project and keeps the key private to the user (both live in
~/.claude.json).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel
vercel Bot temporarily deployed to Preview – staking October 9, 2026 16:50 Inactive
@vercel
vercel Bot temporarily deployed to Preview – entropy-explorer October 9, 2026 16:50 Inactive
@vercel
vercel Bot temporarily deployed to Preview – component-library October 9, 2026 16:50 Inactive
@vercel
vercel Bot temporarily deployed to Preview – api-reference October 9, 2026 16:50 Inactive
@vercel
vercel Bot temporarily deployed to Preview – proposals October 9, 2026 16:50 Inactive
Owners add organization custom connectors under Organization settings >
Connectors; members then connect from Customize > Connectors.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel
vercel Bot temporarily deployed to Preview – proposals October 9, 2026 16:57 Inactive
@vercel
vercel Bot temporarily deployed to Preview – staking October 9, 2026 16:57 Inactive
@vercel
vercel Bot temporarily deployed to Preview – api-reference October 9, 2026 16:57 Inactive
@vercel
vercel Bot temporarily deployed to Preview – entropy-explorer October 9, 2026 16:57 Inactive
@vercel
vercel Bot temporarily deployed to Preview – component-library October 9, 2026 16:57 Inactive
User scope lets any project, including one with untrusted instructions,
call the price tools with the configured key. Keep the default local
scope and mention --scope user as an opt-in.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel
vercel Bot temporarily deployed to Preview – proposals October 9, 2026 16:59 Inactive
@vercel
vercel Bot temporarily deployed to Preview – entropy-explorer October 9, 2026 16:59 Inactive
@vercel
vercel Bot temporarily deployed to Preview – component-library October 9, 2026 16:59 Inactive
@vercel
vercel Bot temporarily deployed to Preview – staking October 9, 2026 16:59 Inactive
@vercel
vercel Bot temporarily deployed to Preview – api-reference October 9, 2026 16:59 Inactive
apps/mcp is a read-only service: it fetches prices with each caller's
own Pyth Pro key, never holds one itself, and is off the price path.
Like the other consumer apps, its changes can be self-authorized.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@aditya520
aditya520 requested a review from a team as a code owner October 9, 2026 17:22
@aditya520
aditya520 merged commit 709e742 into main Oct 9, 2026
7 of 13 checks passed
@aditya520
aditya520 deleted the fix/mcp-api-key-link branch October 9, 2026 17:23

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 1 new potential issue.

Devin Review

Comment thread .github/greenlight.yml
- "apps/entropy-explorer/**"
# MCP server: reads prices with each caller's own key and serves them to AI
# clients; read-only, off the price path, and holds no key of its own
- "apps/mcp/**"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔍 Auto-approval covers MCP runtime changes

The apps/mcp/** entry also covers future changes to server code and configuration. Confirm that both belong in the self-authorized merge category.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

This branch was successfully deployed

5 active deployments
Preview – api-reference — ad8b9917 Deployed Oct 9, 2026 by vercel[bot]
Preview – proposals — ad8b9917 Deployed Oct 9, 2026 by vercel[bot]
Preview – staking — ad8b9917 Deployed Oct 9, 2026 by vercel[bot]
Preview – component-library — ad8b9917 Deployed Oct 9, 2026 by vercel[bot]
Preview – entropy-explorer — ad8b9917 Deployed Oct 9, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants