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.
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.
- EVM logs, transactions, traces, state diffs
- Solana instructions, balances, token balances
- Bitcoin transactions, inputs, outputs
- Hyperliquid fills
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:
Cursor reads an mcp.json:
VS Code uses .vscode/mcp.json with an explicit transport type:
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:
- 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.
"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:
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:
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:
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?
How do I add the Portal MCP server to Claude Code, Cursor, or VS Code?
Does the Portal MCP server need an API key?
Why does a blockchain MCP query sometimes fail with a response-size error?
Can the agent move funds or sign transactions through this server?
Related guides
Building an agent that reads the chain?
See how the Portal feeds autonomous agents on the AI agents solution page.