Data access · 8 min read

Connect Claude or Cursor to onchain data: the Portal MCP server

Most blockchain entries in an MCP directory are documentation search or an account console. SQD's Portal MCP server is different: it is a live data-query endpoint, so an agent can read raw onchain data across several virtual machines and answer questions from the actual rows. This guide wires it into Claude Code, Cursor, and VS Code, then runs three real queries and shows what comes back. For the conceptual background on why agents need this kind of access, see the companion guide on AI agents and onchain data.

Updated 2026-06-18 · By the SQD team

1. A data-query server, not a docs search

The Model Context Protocol (MCP) is a standard way to hand an AI agent a set of callable tools. Search a directory for blockchain MCP servers and most of what you find is one of two kinds: a server that searches a protocol's documentation, or a console that manages your account, nodes, or API keys. Useful, but neither one lets the model read the chain.

SQD's Portal MCP server is a data-query server. It exposes the Portal, SQD's read layer over raw onchain data, as roughly two dozen tools (28 at the time of writing) covering discovery, EVM, Solana, Bitcoin, Hyperliquid, and Substrate. The endpoint is https://portal.sqd.dev/mcp, it is documented at docs.sqd.dev, and it is keyless. The agent asks a question in English, the model picks a tool, and the answer is built from real rows rather than from prose.

One keyless endpoint, raw data across virtual machines
Claude Code
claude mcp add
Cursor
mcp.json
VS Code
.vscode/mcp.json
MCP
portal.sqd.dev/mcp
  • EVM logs, transactions, traces, state diffs
  • Solana instructions, balances, token balances
  • Bitcoin transactions, inputs, outputs
  • Hyperliquid fills
The agent calls tools over one HTTP endpoint. The Portal serves raw, decoded data types per virtual machine. A recent discovery call returned 32 networks with a real-time head; the full historical archive spans the 225+ networks listed on the chains page.

2. Wire it into your editor

Each client adds the server the same way: one HTTP URL, no key. Claude Code takes a single command:

claude mcp add --transport http sqd-portal https://portal.sqd.dev/mcp

Cursor reads an mcp.json:

{
"mcpServers": {
"sqd-portal": { "url": "https://portal.sqd.dev/mcp" }
}
}

VS Code uses .vscode/mcp.json with an explicit transport type:

{
"servers": {
"sqd-portal": { "type": "http", "url": "https://portal.sqd.dev/mcp" }
}
}

Reload the client and the Portal tools appear. The current commands and config blocks are kept in the MCP server docs, which is the page to check if a client changes its config format.

3. Three questions, real rows

With the server connected, you ask in plain language and the model calls a tool. Three questions show the shape of what comes back. Every value below is from a real call made while writing this guide.

"Which networks can you query?" calls portal_list_networks. It returns each network with its virtual machine and the tables it carries, so the agent knows what is queryable before it tries:

DatasetVMTables
  • base-mainnetevmblocks, transactions, logs, traces, state_diffs
  • solana-mainnetsolanainstructions, transactions, balances, token_balances, rewards, logs
  • bitcoin-mainnetbitcoinblocks, transactions, inputs, outputs
  • hyperliquid-fillshyperliquidblocks, fills

"What is the USDC contract on Base?" calls portal_resolve_entity. This is the anti-hallucination step: the address is not a constant the model remembers, it is resolved from an open token list and returned with its source.

{
"symbol": "USDC",
"network": "base-mainnet",
"address": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"decimals": 6,
"source": "coingecko_token_list"
}

"Show me recent USDC transfers on Base" calls portal_evm_query_logs with that address, the Transfer event, and decode: true. The rows come back decoded, with named fields, not raw topic hashes:

{
"block_number": 28000000,
"decoded_log": {
"event_name": "Transfer",
"decoded": {
"from": "0x802b65b5d9016621e66003aed0b16615093f328b",
"to": "0xf8f0c4e9df216123d54e8f2194e5941f1b9764d5",
"value": "20668440"
}
}
}

The value is in the token's base units; with 6 decimals that is 20.66844 USDC. The same three-step pattern, resolve an entity then query a typed data set, works for Solana instructions, Bitcoin inputs and outputs, and Hyperliquid fills, which is the subject of the one query shape, every VM guide.

And it is genuinely keyless. The MCP wraps the same public Stream API you can hit directly, with no auth header at all:

your terminal
curl -s https://portal.sqd.dev/datasets/base-mainnet/metadata
live response · portal.sqd.dev
{ "dataset": "base-mainnet", "aliases": [], "real_time": true, "start_block": 0 }

No key, no account, no header. That is what makes it quick to wire into an agent: the model can reach the data the moment you add the endpoint.

4. The response-size cap, and the fix

One thing to know before you let an agent loose on it. The MCP server never dumps an unbounded result into the model's context: it returns a bounded preview page with a cursor, and when a query is heavy it attaches a soft notice rather than the full firehose. Data-dense chains make this concrete. An under-filtered Jupiter query over roughly an hour of Solana activity (about nine thousand slots) still returns data, capped to a page, carrying a notice that says so:

live response · _notices
"_notices": [
"Large Solana range (9,065 slots). Results are capped by limit=5, but the query may still be heavy.",
"Older results are available via _pagination.next_cursor."
]

This is a feature, not a wall. The fix is to bound the query: a narrow from_block and to_block window, specific filters like a program ID or an Anchor discriminator, and a small row limit, then follow _pagination.next_cursor for the rest. The same Jupiter query over a handful of slots returns a clean page immediately. Telling an agent this up front, scope first and page through, is the difference between a tool that answers and one that floods its own context.

5. Why this is harder elsewhere

The hard part is not running an MCP server. It is having complete, raw, queryable data to put behind one. Giving an agent decoded logs, transactions, traces, UTXO inputs and outputs, and exchange fills across several virtual machines, through a single keyless endpoint, means first indexing all of that into a uniform read layer. Concretely, the three-step walk above (resolve USDC, read its decoded Transfers, then the same shape over Solana instructions and Bitcoin inputs and outputs) would otherwise be a token-list service, a subgraph or custom indexer per chain, and a node or archive per virtual machine, each with its own auth and query language.

Many blockchain MCP servers wrap documentation search or an account console, and the data-backed ones tend to wrap a curated, enhanced-API surface for one chain family rather than serving the raw data types directly. The breadth of complete data underneath is the thing that is expensive to build, and it is what the Portal already does.

6. Where to go next

From here, three directions. To understand why this access pattern matters for autonomous systems, read AI agents and onchain data. To see the same query model run identically across EVM, Solana, and Bitcoin, read one query shape, every VM. To place the Portal in the wider picture of nodes, indexers, and warehouses, read the blockchain data stack in 2026.

When an agent needs to read the chain rather than guess at it, the read layer is the dependency. For how that feeds full agent products, see the AI agents solution page.

Frequently asked questions

What is the SQD Portal MCP server?
It is a Model Context Protocol server that exposes SQD's Portal, a read layer over raw onchain data, as a set of tools an AI agent can call. The endpoint is https://portal.sqd.dev/mcp, it needs no API key, and it lets a model run blockchain data queries (logs, transactions, traces, state diffs, Solana instructions, Bitcoin inputs and outputs, Hyperliquid fills) directly from a chat. It is a live data-query server, not a documentation search and not an account or infrastructure console.
How do I add the Portal MCP server to Claude Code, Cursor, or VS Code?
In Claude Code run claude mcp add --transport http sqd-portal https://portal.sqd.dev/mcp. In Cursor add { "mcpServers": { "sqd-portal": { "url": "https://portal.sqd.dev/mcp" } } } to mcp.json. In VS Code add { "servers": { "sqd-portal": { "type": "http", "url": "https://portal.sqd.dev/mcp" } } } to .vscode/mcp.json. There is no key to paste. The current setup is documented at docs.sqd.dev/en/ai/mcp-server.
Does the Portal MCP server need an API key?
No. The server is free and keyless. You add one HTTP endpoint and the tools are available. That is what makes it quick to wire into an agent and quick to remove if you are only testing.
Why does a blockchain MCP query sometimes fail with a response-size error?
An unbounded query, or one scoped only by a time range against a busy contract or program, comes back as a bounded preview page rather than the full result, with a soft notice when the range is heavy. The fix is to bound the query: pass a narrow from_block and to_block window, request a minimal field set, keep the row limit small, and follow _pagination.next_cursor for more. A Jupiter query over a full hour on Solana returns one capped page with a notice; the same query over a handful of slots returns a clean page immediately.
Can the agent move funds or sign transactions through this server?
No. The Portal MCP server is read-only. It returns historical and recent onchain data for analysis. It does not hold keys, submit transactions, or reconstruct account balances. An agent uses it to read what happened onchain, then decides what to do with that information elsewhere.

Building an agent that reads the chain?

See how the Portal feeds autonomous agents on the AI agents solution page.