Skip to content

API-317: Fix the Cursor install flow — explicit key flows instead of the placeholder deep link - #505

Closed
gulshngill wants to merge 1 commit into
feat/api-285-mcp-verifyfrom
fix/api-317-cursor-install-docs
Closed

API-317: Fix the Cursor install flow — explicit key flows instead of the placeholder deep link#505
gulshngill wants to merge 1 commit into
feat/api-285-mcp-verifyfrom
fix/api-317-cursor-install-docs

Conversation

@gulshngill

Copy link
Copy Markdown
Contributor

Summary

The public Cursor instructions point at a deep link whose base64-encoded config embeds "NANSEN_API_KEY": "REPLACE_THIS" — the "one-click" install lands broken, and fixing it means decoding an opaque payload or hand-editing ~/.cursor/mcp.json. It also bridges through npx mcp-remote ... --allow-http even though the server is HTTPS and Cursor speaks streamable HTTP natively.

Decision: explicit key flows, no personalized deep link. A personalized link would put a live API key inside a URL (clipboard history, chat logs, link previews) and still be an opaque payload; and a static link can't collect a key at all — Cursor's deeplink install saves the decoded config as-is, so a placeholder is inherent to that design.

This PR adds a ### Cursor README subsection (stacked on #502, which provides nansen mcp install|verify):

  • Recommended: nansen login --api-key <key>nansen mcp install cursor → restart → nansen mcp verify cursor (one real authenticated data call).
  • Manual: plain-JSON ~/.cursor/mcp.json block with a visible YOUR_API_KEY slot (exact shape install writes, so verify accepts it with no drift warnings), merge guidance for existing configs, a macOS/Linux chmod 600 note, and an authenticated in-Cursor check (paid tool call — tools/list answers keyless, so visible tools prove nothing).
  • One sentence retiring the deep link.

Follow-up (docs site): https://docs.nansen.ai/mcp/connecting still hosts the deep link; this subsection is written to be adopted there verbatim.

Verification

From a clean HOME (no ~/.cursor/), with a real key:

  1. nansen mcp install cursor → file created 0600, real key written, zero placeholders.
  2. nansen mcp verify cursor → ✓ authenticated MCP data call succeeded.
  3. The README JSON block verbatim + key substitution → verify cursor ✓, no drift warnings.
  4. Raw tools/call (token_info, the request Cursor's agent sends) with the manually-configured key → real data returned.

Cursor's own docs confirm native url + headers support in mcp.json.

Checklist

  • Tests pass (npm test — 2010 passed, 2 skipped; npm run lint clean)
  • src/schema.json updated if new commands or flags were added — n/a, docs-only
  • README.md updated
  • Changeset added — n/a, docs-only

🤖 Generated with Claude Code

The public Cursor instructions relied on a deep link whose base64 config
embeds a placeholder API key, so the "one-click" install lands broken and
the user has to decode and hand-edit ~/.cursor/mcp.json. Document two
flows where the key is supplied explicitly instead: nansen mcp install
cursor (real key from login, verified with nansen mcp verify cursor) and
a plain-JSON copy-paste config with a visible YOUR_API_KEY slot, merge
guidance, permissions note, and an authenticated in-Cursor check.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@gulshngill gulshngill closed this Aug 20, 2026
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.

1 participant