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

# Solscan MCP

### Get started

First, get a Solscan API key from the [Solscan API page](https://solscan.io/apis) if you do not have one. Solscan offers two types of key, and both work with the MCP server:

* **Free API key** — no cost, with a lower rate limit and access to core endpoints. Good for trying the MCP server and light usage.
* **Paid (Pro) API key** — higher rate limits and access to the full v2.0 endpoint set, including advanced DeFi, market, and metadata tools.

Which tools return data depends on your plan. If a tool call fails with a plan or rate-limit error, that tool likely requires a paid tier — or you have hit your quota. See [Rate limits & pricing](https://solscan.io/apis).

Once you have a key, pick your client below and follow it end to end.

The server is a hosted Streamable HTTP endpoint:

```
https://mcp.solscan.io/mcp
```

Authenticate by passing your API key as a bearer token — the same value works whether it is a free or paid key

{% tabs %}
{% tab title="Claude Desktop" %}
[Claude Desktop](https://claude.ai/download) is Anthropic's desktop chat app.

**Step 1 — Add Solscan to your config**

In Claude Desktop, open **Settings > Developer > Edit Config** to open the `claude_desktop_config.json` file.

<figure><img src="/files/yyJsqCFKm8896DpliAkR" alt=""><figcaption></figcaption></figure>

In the file that opens, add the `solscan` server (replace `YourApiKey` with your key):

```json
{
  "mcpServers": {
    "solscan": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://mcp.solscan.io/mcp",
        "--header",
        "Authorization:${AUTH_TOKEN}"
      ],
      "env": {
        "AUTH_TOKEN": "Bearer YourApiKey"
      }
    }
  }
}
```

Requires [Node.js](https://nodejs.org).

**Step 2 — Confirm it's connected**

Save, then fully quit Claude Desktop and reopen it. Open **Settings > Developer** and look for `solscan` under Local MCP servers with a **running** badge.

**Step 3 — Ask your first question**

Ask in plain language and approve the tool calls when prompted:

```
What is the current price of SOL?
```

In this example, the agent calls `get_token_price_latest` and answers with the current price. This tool works on any paid Pro API plan.
{% endtab %}

{% tab title="Claude Code" %}
[Claude Code](https://code.claude.com/docs/en/quickstart) is Anthropic's coding assistant that runs in your terminal.

**Step 1 — Add the server**

Run this in your terminal, replacing `YourApiKey` with your key:

```bash
claude mcp add --transport http solscan \
  https://mcp.solscan.io/mcp \
  --header "Authorization: Bearer YourApiKey"
```

**Step 2 — Confirm it's connected**

Check the server's status and look for `Status: ✔ Connected`:

```bash
claude mcp get solscan
```

**Step 3 — Ask your first question**

Start a Claude Code session by running `claude`, then ask in plain language and let the agent pick the tools:

```
Extract all swap activity of JUP via Jupiter platform in the last 2 days
```

The agent calls `get_token_defi_activities`, filters by platform and time range, and summarizes the swaps.
{% endtab %}

{% tab title="Codex Desktop" %}
Codex Desktop is the ChatGPT desktop app running OpenAI's [Codex](https://developers.openai.com/codex) agent, which can connect to MCP servers.

**Step 1 — Add the server**

<figure><img src="/files/W0EfGUoFzQmgALlPviuq" alt=""><figcaption></figcaption></figure>

In Codex Desktop, open **Settings > Plugins > Add > Add MCP Server**. Enter the following server details (replace `YourApiKey` with your key):

* **Name:** Solscan MCP
* **Type:** Streamable HTTP
* **URL:** `https://mcp.solscan.io/mcp`
* **Headers:** `Key=AUTHORIZATION`, `Value=Bearer YourApiKey`

**Step 2 — Confirm it's connected**

Save, then fully quit Codex Desktop and reopen it. Run `/mcp` and confirm that `solscan` is listed as an enabled server.

**Step 3 — Ask your first question**

Ask in plain language:

text

```
Who is the largest holder of USDC on Solana? use Solscan mcp
```

The agent calls `get_token_holders` and returns the ranked holder list.
{% endtab %}

{% tab title="Codex CLI" %}
[Codex CLI](https://developers.openai.com/codex/cli) is OpenAI's coding agent in your terminal.

**Step 1 — Set your API key as an environment variable**

Run this in your terminal (replace `YourApiKey` with your key):

```bash
export SOLSCAN_API_KEY=YourApiKey
```

**Step 2 — Add the server**

```bash
codex mcp add solscan \
  --url https://mcp.solscan.io/mcp \
  --bearer-token-env-var SOLSCAN_API_KEY
```

**Step 3 — Confirm it's connected**

Check the server and look for `enabled: true`:

```bash
codex mcp get solscan
```

**Step 4 — Ask your first question**

Start a Codex session by running `codex`, then ask in plain language:

```
Who funded this wallet D27DgiipBR5dRdij2L6NQ27xwyiLK5Q2DsEM5ML5EuLK use Solscan mcp
```

The agent calls `get_account_metadata` / funding tools and traces the first funding source.
{% endtab %}
{% endtabs %}

***

#### Key Features

* **Balance & Portfolio Tracking:** Access real-time SOL and SPL token balances.
* **DeFi Intelligence:** Track swaps, liquidity movements, and yield farming activities.
* **Decoded Transactions:** View transaction actions (swaps, transfers, mints) in a human-readable format.
* **Global Market Data:** Retrieve token prices, trending lists, and holder distributions.

#### Solscan Pro API Endpoints in Categories

| **Category**           | **Description**                                                                   | **Tools (Functions)**                                                                                    |
| ---------------------- | --------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------- |
| **Account Data**       | Fetch comprehensive details and activity logs for specific Solana addresses.      | `get_account_detail`, `get_account_transactions`, `get_account_token_accounts`, `get_account_stake_info` |
| **Token Information**  | Retrieve metadata, supply, and holder distributions for SPL tokens.               | `get_token_meta`, `get_token_holders`, `get_token_list`, `get_token_price_latest`                        |
| **Trading Data**       | Track DEX trades, market volume, and historical performance across the ecosystem. | `get_market_info`, `get_dex_trades`, `get_token_defi_activities`, `get_market_volume`                    |
| **Account Metadata**   | Access identity-related data, labels, and leaderboard rankings.                   | `get_account_metadata`, `get_account_leaderboard`, `get_personal_labels`                                 |
| **Blockchain Data**    | Explore block-level details, program lists, and epoch information.                | `get_block_last`, `get_block_detail`, `get_program_list`, `get_block_transactions`                       |
| **Transaction Decode** | Convert complex program instructions into readable actions.                       | `get_transaction_actions`, `get_account_data_decoded`, `get_tx_actions_multi`                            |

#### Example questions to ask with Solcan MCP

{% prompt description="What is the current price of SOL? " %}

```markdown
// What is the current price of SOL using Solscan MCP? 
```

{% endprompt %}

{% prompt description="Who is the largest holder of USDC on Solana?" %}

```markdown
// Who is the largest holder of USDC on Solana using Solscan MCP?
```

{% endprompt %}

{% prompt description="Check total portfolio value of this wallet D27DgiipBR5dRdij2L6NQ27xwyiLK5Q2DsEM5ML5EuLK?" %}

```markdown
// Check total portfolio value of this wallet D27DgiipBR5dRdij2L6NQ27xwyiLK5Q2DsEM5ML5EuLK using Solscan MCP?
```

{% endprompt %}

{% prompt description="Extract all swap activity of JUP via Jupiter platform in the last 2 days" %}

```markdown
// Extract all swap activity of JUP via Jupiter platform in the last 2 days using Solscan MCP
```

{% endprompt %}

{% prompt description="Who funded this wallet D27DgiipBR5dRdij2L6NQ27xwyiLK5Q2DsEM5ML5EuLK?" %}

```markdown
// Who funded this wallet D27DgiipBR5dRdij2L6NQ27xwyiLK5Q2DsEM5ML5EuLK using Solscan MCP?
```

{% endprompt %}
