Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/one-step-mcp-install.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"nansen-cli": minor
---

Add `nansen mcp install <client>` / `nansen mcp uninstall <client>` for one-step setup of the hosted Nansen MCP server (https://mcp.nansen.ai/ra/mcp) in Claude Code, Claude Desktop, and Cursor. Writes are merge-only and atomic (existing servers preserved, `.bak` backup on install and uninstall, refuses unparseable configs), use the API key from `nansen login` / `NANSEN_API_KEY`, never print the key, and support `--dry-run`.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ nansen agent "<question>" --expert # deeper analysis (750 credits, Pro)
nansen trade quote --chain solana --from SOL --to USDC --amount 1000000000
nansen trade execute --quote <quoteId>
nansen wallet <subcommand> [options]
nansen mcp install <client> # add the Nansen MCP server to Claude Code/Desktop or Cursor
nansen schema [command] [--pretty] # full command reference (no API key needed)
```

Expand All @@ -51,6 +52,20 @@ nansen schema [command] [--pretty] # full command reference (no API key neede

Run `nansen schema --pretty` for the full subcommand and field reference.

## MCP

One-step install of the hosted [Nansen MCP server](https://docs.nansen.ai/mcp/overview) (`https://mcp.nansen.ai/ra/mcp`) into a local MCP client:

```bash
nansen mcp install claude-code # ~/.claude.json (user scope)
nansen mcp install claude-desktop # macOS/Windows only; bridges via pinned mcp-remote
nansen mcp install cursor # ~/.cursor/mcp.json
nansen mcp install cursor --dry-run # print what would be written (key redacted)
nansen mcp uninstall <client> # remove the entry (add --dry-run to preview)
```

Uses the API key from `nansen login` / `NANSEN_API_KEY`; re-run `install` after rotating your key. Writes are merge-only and atomic: existing servers and settings are preserved, a `.bak` copy is written before every install or uninstall, and the CLI refuses to touch a config it can't parse. Note the client config stores the API key in plaintext — new files are created with `0600` permissions. Restart the client after installing. For other clients, see [docs.nansen.ai/mcp/connecting](https://docs.nansen.ai/mcp/connecting).

## Trading

DEX swaps on `solana` and `base`. Two-step: quote then execute.
Expand Down
Loading
Loading