API-319: Reconcile MCP setup docs — canonical endpoint, API-key URL, and per-client paths - #506
Conversation
… paths (API-319) Add a canonical README MCP section (endpoint https://mcp.nansen.ai/ra/mcp, NANSEN-API-KEY auth) with tiered one-click / one-command / manual setup for Claude Desktop, Claude Code, Cursor, Claude Tag, and generic or stdio-only clients, including a corrected mcp-remote bridge snippet. Migrate the two remaining app.nansen.ai/api top-up links (credit warnings + README error table) to the canonical app.nansen.ai/auth/agent-setup URL, finishing the sweep from #313, and pin the canonical URL in the creditWarning tests. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
pr-reviewer Summary for #bbf2151✅ No issues found The code review completed successfully with no findings. Review effort: 1/5 (Trivial) SummaryThis PR makes three tightly scoped changes: adds a canonical MCP setup section to the README, corrects two credit-warning URLs in
No issues found. Token usage: 20 input, 2,453 output, 210,226 cache read, 28,054 cache write | Usage Guide New pushes are reviewed automatically with a 10-minute cooldown between reviews. To request a review at any time, comment |
There was a problem hiding this comment.
Auto-approved
This PR was automatically approved because:
- Claude recommends approval
- Claude assessed this as a minimal effort change
- The effort level is within the auto-approval threshold of 2
- No high or critical issues were detected
If you have any concerns, please request a manual review.
The out-of-credits and low-credit warnings pointed users at
app.nansen.ai/auth/agent-setup, which is where you get an API key — not
where you top up credits. Same for the README CREDITS_EXHAUSTED row.
Replace both with generic top-up wording ("Top up your credits in the
Nansen app"), matching the existing URL-free CREDITS_EXHAUSTED message in
api.js. The URL stays in the MCP setup and auth sections, where it is the
right destination.
Tests now pin the new wording and assert no app.nansen.ai link leaks back
into the warnings.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Auto-approved
This PR was automatically approved because:
- Claude recommends approval
- Claude assessed this as a minimal effort change
- The effort level is within the auto-approval threshold of 2
- No high or critical issues were detected
If you have any concerns, please request a manual review.
The out-of-credits and low-credit warnings link to the credit top-up page, https://app.nansen.ai/api?tab=api — not the API-key URL. Same for the README CREDITS_EXHAUSTED row. auth/agent-setup stays reserved for MCP setup and API-key instructions; the tests assert it does not leak into the credit warnings. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Auto-approved
This PR was automatically approved because:
- Claude recommends approval
- Claude assessed this as a minimal effort change
- The effort level is within the auto-approval threshold of 2
- No high or critical issues were detected
- Review comment contains non-blocking feedback
If you have any concerns, please request a manual review.
…eview) Both "one-click" entries pointed at docs.nansen.ai/mcp/connecting, which is a docs page, not a one-click install. Replaced with the actual artifacts from the live docs: - Claude Desktop: direct .dxt download from nansen-ai/nansen-mcp-dxt - Cursor: the cursor://anysphere.cursor-deeplink/mcp/install deep link, shown as a copyable code block because GitHub strips the cursor:// scheme from rendered link hrefs The docs page stays as a reference for screenshots and walkthroughs. Noted that the Cursor deep link installs the mcp-remote bridge with a placeholder key, and pointed users at the native JSON below for a bridge-free setup. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Drop the embedded .dxt download and cursor:// deep link. Both clients now point at docs.nansen.ai/mcp/connecting, which is the single place those instructions are maintained, and the wording no longer claims either is a one-click install from the README. Changeset reworded to match: per-client paths for Claude Code, Claude Tag, and generic/stdio clients, plus a docs pointer for Claude Desktop and Cursor. Credit-warning top-up links are unchanged (app.nansen.ai/api?tab=api). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The changeset called the old warning URL the API-key URL. main actually has the bare billing URL, https://app.nansen.ai/api — the change is to the credits tab of that same page, /api?tab=api. Reworded to say that. No behaviour change: credit warnings keep /api?tab=api, auth/agent-setup stays confined to MCP setup and API-key instructions. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
@kome12 addressed the comments could you have a final look? |
Why
MCP setup guidance is inconsistent across surfaces: the README had no MCP section at all, and the public MCP docs use a generic-client snippet that is awkward against the hosted endpoint (
--allow-httpon an HTTPS URL, and a--header "NANSEN-API-KEY: "form that mcp-remote mis-splits on the space).This PR establishes the canonical values in the repo and gives every client one unambiguous path.
Canonical values
https://mcp.nansen.ai/ra/mcp(streamable HTTP,NANSEN-API-KEYheader)https://app.nansen.ai/auth/agent-setuphttps://app.nansen.ai/api?tab=api— the credits tab of the billing pageWhat changed
## MCPsection with the canonical endpoint/auth/key URL and per-client paths:.dxtbundle and the Cursor install deep link are maintained. The README does not duplicate those install artifacts and does not claim either is one-click from here.claude mcp add --transport http nansen … --header "NANSEN-API-KEY: <your-key>"url+headersJSON for any streamable-HTTP client, and a correctedmcp-remotebridge for stdio-only clients (no--allow-http, header passed as a singleNANSEN-API-KEY:${NANSEN_API_KEY}arg with the key inenv).mcp.json+ host credential formcp.nansen.ai), with an explicit per-user fallback to Claude Code / Claude Desktopsrc/response-meta.js: the out-of-credits and low-credit warnings move from the bareapp.nansen.ai/apito the credits tab of that same billing page,app.nansen.ai/api?tab=api.auth/agent-setupis not used here — it stays confined to auth and MCP setup.creditWarningassertions pin the top-up URL and assertauth/agent-setupdoes not leak into either warningFollow-up for the docs site (not in this repo)
The Cursor deep link on docs.nansen.ai/mcp/connecting embeds
--allow-httpin its base64 config against an HTTPS endpoint. Harmless today (the header form inside it is correct — no space), but worth dropping so the deep link matches the corrected snippet in this README.Verification
npm test— 2033 passed, 2 skipped;npm run lintcleanhttps://mcp.nansen.ai/ra/mcp:tools/listresponds, and atools/callwith theNANSEN-API-KEYheader reaches the tool handlerclaude mcp add --transport httpsyntax verified against the current Claude Code CLInansen mcp install(API-285: One-step MCP install (nansen mcp install <client>) #487) so this stands alone on main; the client list and header forms here match that PR so the two compose either way🤖 Generated with Claude Code