> For the complete documentation index, see [llms.txt](https://docs.nansen.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.nansen.ai/mcp/connecting.md).

# Connecting to Nansen MCP

The Nansen MCP server provides AI assistants with access to comprehensive blockchain analytics through a secure API. This guide covers how to connect to Nansen MCP.

### Prerequisites

Before connecting, you'll need:

1. **Nansen API Key**: Get yours at <https://app.nansen.ai/api?tab=api>
2. **npx**: Required for remote connections (`npm install -g npx`)

### Installation Guide

#### 1. Claude Desktop (One-Click Install; Claude Desktop Required)

The easiest way to get started with Nansen MCP. Double-click the downloaded .dxt file to configure automatically.

[**Quick Install Link**](https://github.com/nansen-ai/nansen-mcp-dxt/raw/refs/heads/main/nansen.dxt)

#### 2. Claude Code (Terminal Integration)

Connect Nansen MCP through your terminal:

{% code overflow="wrap" %}

```bash
claude mcp add --transport http nansen https://mcp.nansen.ai/ra/mcp --header "NANSEN-API-KEY: YOUR_API_KEY_HERE"
```

{% endcode %}

#### 3. Cursor IDE

**One-click install via Cursor deep link:**

1. Copy the deep link below (right-click > copy)
2. Paste into any Cursor text/chat field
3. Ctrl+Click (or Cmd+Click on Mac) inside Cursor to install

{% code overflow="wrap" fullWidth="true" %}

```
cursor://anysphere.cursor-deeplink/mcp/install?name=nansen-mcp&config=eyJlbnYiOnsiTkFOU0VOX0FQSV9LRVkiOiJSRVBMQUNFX1RISVMifSwiY29tbWFuZCI6Im5weCIsImFyZ3MiOlsiLXkiLCJtY3AtcmVtb3RlIiwiaHR0cHM6Ly9tY3AubmFuc2VuLmFpL3JhL21jcC8iLCItLWhlYWRlciIsIk5BTlNFTi1BUEktS0VZOiR7TkFOU0VOX0FQSV9LRVl9IiwiLS1hbGxvdy1odHRwIl19Cg==
```

{% endcode %}

#### 4. Other MCP Clients

Integration example for various other tools supporting MCPs

**Server configuration:**

* Server: `https://mcp.nansen.ai/ra/mcp`
* Header: `NANSEN-API-KEY: your_api_key`
* Transport: `mcp-remote --allow-http`

```jsx
{
  "mcpServers": {
    "nansen-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://mcp.nansen.ai/ra/mcp",
        "--header",
        "NANSEN-API-KEY: ",
        "--allow-http"
      ]
    }
  }
}
```

**NPX example:**

```bash
npx -y mcp-remote https://mcp.nansen.ai/ra/mcp \\
  --header "NANSEN-API-KEY:YOUR_API_KEY_HERE" \\
  --allow-http

```

### Authentication

⚠️ Nansen MCP uses the same API as your regular API keys. Ensure you have sufficient credits for your usage.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.nansen.ai/mcp/connecting.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
