> 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

The Solscan MCP server provides a standardized interface for AI models (like Claude or Codex) to connect AI agents with live and decoded Solana on-chain data.

### 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.

### Choose your server

Solscan offers two hosted MCP servers. Both authenticate with a Solscan API key — the difference is which key tier they accept and which tools they expose.

| Server            | Endpoint                            | Details                                                                                                                                                                                             |
| ----------------- | ----------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Public / Free** | `https://public-mcp.solscan.io/mcp` | Works with a **free (Level 1) API key**. Free network & analytics endpoints, plus a live-demo set of core tools under tight limits. Best for first-time setup, testing, and experimentation.        |
| **Pro**           | `https://mcp.solscan.io/mcp`        | Requires a **paid API key**. Full set of 54 tools at production rate limits — account intelligence, decoded transactions, DeFi, market, OHLCV, and more. For production agents and heavy workloads. |

> Both servers require an API key — Solscan MCP is not keyless. The Public server simply accepts a free-tier key, so anyone with a Solscan account can start without a paid plan.

Authenticate by passing your API key as a 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="https://3408068746-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M2WGem6IdHOZpBD3zJX%2Fuploads%2F2h81Hscl6oruXE8aCVBp%2Fimage.png?alt=media&amp;token=8ffec2fa-8789-4f18-8bb2-efaf0260318e" 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="https://3408068746-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M2WGem6IdHOZpBD3zJX%2Fuploads%2FbO7WqZCVC04KFa8993hF%2Fimage.png?alt=media&amp;token=aa96123d-f8c7-4b83-92fb-ce81f0c64fbf" 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 %}

### FAQ

1. **Do I need an API key to use Solscan MCP?** Yes. Both servers require a Solscan API key — Solscan MCP is not keyless. The difference is the tier: the Public server works with a free Level 1 key, while the Pro server needs a paid key. Register for a key on the [Solscan API page](https://solscan.io/apis).
2. **What can the Public / Free MCP do?** It gives you two groups of tools on a free Level 1 key: the **free network & analytics endpoints** (chain overview plus daily transaction, fee, stake, slot, compute-unit, and DEX-activity analytics), and a **live-demo set** of eight core tools — account transfers, account DeFi activity, enhanced transactions, portfolio, token transfers, token DeFi activity, token metadata, and transaction decoding. It's built for first-time setup, testing, and experimentation.
3. **What can the Pro MCP do?** It exposes the full set of 54 tools at production rate limits — covering account intelligence, decoded transactions, full DeFi and market data, OHLCV, NFT, block, program, and user-label tools. This is the server for production agents and anything beyond light testing.
4. **What's the difference between the two servers?** Three things: the API key tier (free vs paid), the number of tools (a sample vs all 54), and the rate limits (tight caps vs production limits). The free network & analytics endpoints return the same data on both. The live-demo tools on the Public server return real on-chain data too, but under much stricter rate limits and request caps.
5. **When should I use the Public / Free MCP?** Use it when you're trying Solscan MCP for the first time, building a prototype, running light or occasional queries, or you only need network-level analytics. No paid plan required.
6. **When should I use the Pro MCP?** Use it when you're shipping an agent to production, need any tool outside the live-demo set (exports, OHLCV, user labels, full account/token tooling), or you're hitting the rate limits of the free tier.
7. **Are the Public server's live-demo tools good enough for production?** No. They return real data but are capped tightly on rate and request count — they exist so you can experience the tools and see the data shape before upgrading. For production traffic, use the Pro server.
