thru-mcp-server
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@thru-mcp-serverWhat's the current network status?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
thru-mcp-server
A Model Context Protocol server for the Thru blockchain.
It gives an MCP client read-only access to Thru's alphanet: account balances, transaction status, program events, name service records and RPC health. All queries go through the official @thru/sdk over Thru's Connect/gRPC RPC — there is no mock data and no local chain state.
Installation
git clone https://github.com/erhnysr/thru-mcp-server.git
cd thru-mcp-server
npm install
npm run buildThe entry point is dist/index.js and speaks MCP over stdio.
Related MCP server: SOLANA-MCP-Server
Configuration
Every setting is optional and read from the environment:
Variable | Default | Purpose |
|
| Thru RPC endpoint |
|
| Name service program address |
|
| Faucet account inspected by |
Claude Desktop
Add to claude_desktop_config.json:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"thru": {
"command": "node",
"args": ["/absolute/path/to/thru-mcp-server/dist/index.js"],
"env": {
"THRU_RPC_URL": "https://rpc.alphanet.thru.org"
}
}
}
}Restart the app afterwards.
Claude Code
claude mcp add thru -- node /absolute/path/to/thru-mcp-server/dist/index.jsTools
All six tools are read-only and marked with readOnlyHint. Inputs are validated with Zod; numeric chain values are returned as strings so large u64/u128 values survive JSON.
get_account
Look up an account by public key.
Parameter | Type | Default | Description |
| string | — |
|
| boolean |
| Include the raw data blob as hex |
Returns balance, nonce, owner program, dataSize, sequence number, account flags, consensus status and the slot the read was taken at.
get_transaction
Fetch a transaction by signature.
Parameter | Type | Default | Description |
| string | — |
|
| boolean |
| Return only consensus/execution status |
Returns fee payer, invoked program, fee, nonce, start slot, requested compute/state/memory units, read-write and read-only account lists, and the execution result.
resolve_name
Resolve a name service entry to its on-chain account. The address is derived locally (root registrars key off the padded name; subdomains off sha256(parent ‖ label)), then the account is fetched and decoded.
Parameter | Type | Description |
| string |
|
| string? | Optional record key to read from a resolved domain |
Root registrars return the authority and subdomain count; domains return parent, owner, registration time and stored records. Unregistered names return an error that includes the derived address, so the caller can verify the derivation independently.
get_faucet_status
Reports the faucet account's balance and the per-transaction withdraw limit (10,000).
This tool cannot dispense tokens, by design. Thru exposes no HTTP faucet —
rpc.alphanet.thru.orgis a Connect/gRPC endpoint. Withdrawing is an on-chain transaction against the faucet program that must be signed by a funded fee payer. This server holds no keys and never signs anything. To actually withdraw, use the Thru CLI:thru faucet withdraw --account <address> --amount <amount>
get_network_status
RPC health check. Issues the height, node status, chain info and version queries concurrently so the reported values describe a single moment.
Returns node readiness, chain id, finalized/locally-executed/cluster-executed heights, consensus and repair state, and component versions.
query_events
Query events emitted by Thru programs. Three modes, in precedence order:
Parameter | Type | Default | Description |
| string? | — | Fetch one event by id |
| string? | — | Recent transactions touching an account, with their emitted events |
| number |
| Page size (1–100) |
| string? | — | Continuation token from a previous call |
| boolean |
| Include raw payload bytes as hex |
With neither eventId nor account, it pages through the most recent chain-wide events.
Note on
@thru/indexer: that package is a framework for building an indexer backend (Drizzle ORM + Postgres + a replay source), not a client for a hosted indexer API. There is no public indexer endpoint to query, so event history here comes from the RPC's own event and transaction services via@thru/sdk.
Testing
test/live.mjs starts the built server as a real stdio subprocess, connects with the MCP client SDK, and exercises every tool against live alphanet. Nothing is stubbed. The transaction and name-service cases are discovered from the chain at runtime rather than hardcoded, so the suite stays valid as alphanet advances.
npm run build
node test/live.mjsCovers all six tools plus two error paths (malformed address, unregistered name).
Limitations
Read-only. The server never signs or submits transactions and holds no key material.
Name service depth. Only
rootandsubdomain.rootare supported, matching what the name service program itself derives.License asymmetry. This server is MIT, but its dependency
@thru/sdkis published under a proprietary license. Review Thru's terms before redistributing anything that bundles it.
License
MIT — see LICENSE.
Available Tools
6 toolsget_accountGet accountARead-only
Look up a Thru account by public key and return its balance, nonce, owner program, size and flags. Balances are returned as raw integer strings.
| Name | Required | Description | Default |
|---|---|---|---|
| address | Yes | Account public key: a `ta…` Thru address (46 chars) or a 64-character hex-encoded pubkey. | |
| includeData | No | Include the account's raw data blob as hex. Off by default because program accounts can be large. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint, and the description adds a useful behavioral detail: balances are returned as raw integer strings, which is important for numeric handling. It doesn't describe error cases or includeData behavior, but the schema covers includeData, so this is an acceptable level of transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two concise sentences, front-loaded with the action and resource, no redundant wording. Every sentence earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's simplicity (2 params, no output schema), the description adequately covers what the tool does and what it returns. The annotations cover safety, and the schema covers parameter details, so combined with the description, it is complete for an agent to select and invoke correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100% for both parameters (address and includeData), so the description doesn't need to add extra semantics. The mention of 'public key' aligns with the schema's address description but adds no new information.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: looking up a Thru account by public key and returning specific fields (balance, nonce, owner program, size, flags). It distinguishes itself from sibling tools like get_transaction or get_network_status by focusing on account-level data.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Provides clear context for when to use: whenever you need account details by public key. It does not explicitly mention exclusions or alternatives, but the sibling list and specific wording make the usage context obvious.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_faucet_statusGet faucet statusARead-only
Report the on-chain Thru faucet account: its current balance and the per-transaction withdraw limit. This is read-only — Thru exposes no HTTP faucet, so actually withdrawing requires submitting a signed transaction to the faucet program with a funded fee payer (use the thru CLI: thru faucet withdraw).
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true and openWorldHint=true. The description adds valuable context beyond that: it explains that the faucet is on-chain rather than HTTP, and that withdrawals require a signed transaction with a funded fee payer. This discloses behavior not captured by annotations and helps the agent understand the operational context.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences: the first states what the tool does, the second clarifies read-only status and provides a path for the alternative action. Every sentence earns its place, with no filler or redundant wording.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With no parameters, no output schema, and annotations covering safety, the description provides complete information. It explains the expected output (balance and withdraw limit) and gives essential context about the on-chain nature and withdrawal process, making the tool fully usable.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has zero parameters, so baseline is 4. The description correctly avoids inventing parameters and instead focuses on what the tool reports. No parameter documentation is needed.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('Report') and identifies the exact resource ('on-chain Thru faucet account') with the precise data it returns ('current balance and the per-transaction withdraw limit'). This clearly distinguishes it from sibling tools like get_account or get_transaction, which are general-purpose.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It explicitly states the tool is read-only and contrasts it with the alternative for withdrawal: 'Thru exposes no HTTP faucet, so actually withdrawing requires submitting a signed transaction to the faucet program with a funded fee payer (use the `thru` CLI: `thru faucet withdraw`).' This gives clear when-to-use and when-not-to-use guidance, naming the exact alternative.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_network_statusGet network statusARead-only
Check the health of the configured Thru RPC endpoint: node readiness, consensus state, chain id, current block heights and component versions.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already mark it as readOnly and openWorld, so safety is established. The description adds value by detailing exactly what health metrics are checked (node readiness, consensus, chain id, block heights, versions), giving the agent a concrete expectation of behavior beyond the annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence, direct and information-dense. It front-loads the action and resource, then lists specific health aspects with no filler or redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a no-parameter read-only status check, the description covers the essential scope (what health includes). It doesn't detail the exact output structure, but given the simplicity and the absence of parameters, the description is sufficiently complete for an agent to invoke and interpret results.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, so the schema is empty. The description correctly avoids inventing parameters and the baseline of 4 applies since no parameter semantics are needed.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses the specific verb 'Check' and clearly identifies the resource ('the configured Thru RPC endpoint') followed by concrete sub-aspects (node readiness, consensus state, chain id, block heights, versions). This distinguishes it from sibling tools focused on accounts, transactions, or events.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The context of use is clear: call this when you need endpoint health or status information. It doesn't explicitly mention exclusions or alternative tools, but the scope is well-defined enough that an agent can infer when it's appropriate.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_transactionGet transactionARead-only
Fetch a Thru transaction by signature. Returns consensus status, execution result, fee payer, invoked program and resource consumption.
| Name | Required | Description | Default |
|---|---|---|---|
| signature | Yes | Transaction signature: a `ts…` Thru signature string or 128-character hex. | |
| statusOnly | No | Return only the consensus/execution status instead of the full transaction body. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true and openWorldHint=true, so the safety profile is known. The description adds value by listing the returned data fields but does not disclose any other behavioral aspects like error handling or rate limits. No contradictions with annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, direct sentence that immediately states the tool's function and output. No filler or redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple read-only tool with complete schema coverage and informative annotations, the description adequately summarizes the return content. Although there is no output schema, the listed return categories give a sufficient overview. It could be more explicit about the response format, but it is not necessary for this low-complexity tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, with both parameters (signature and statusOnly) well documented, including defaults and types. The tool description adds little beyond mentioning 'by signature', but the schema already carries the semantic weight.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool fetches a Thru transaction by signature, using a specific verb and resource. It distinguishes itself from siblings by focusing on transactions rather than accounts, names, or network status. The return fields are also listed.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description makes it clear when to use this tool: when you have a signature and need transaction details. It does not explicitly mention alternatives or exclusions, but the context is straightforward. Adding a note about using query_events for searching transactions would improve it.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
query_eventsQuery chain eventsARead-only
Query events emitted by Thru programs. Fetch one event by id, list an account's recent transaction history with its emitted events, or page through the most recent events chain-wide.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | Maximum number of events (or transactions) to return. | |
| account | No | Return recent transactions touching this account, with the events each one emitted. | |
| eventId | No | Fetch a single event by its id (format `<signature>:<slot>:<...>`). Takes precedence over listing. | |
| pageToken | No | Continuation token returned by a previous call. | |
| includePayload | No | Include each event's raw payload bytes as hex. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true and openWorldHint=true, which covers the safety profile. The description adds the scope of each query mode but does not disclose additional behavioral traits such as error conditions, response format, or exact pagination behavior, making it adequate but not enriched beyond annotations.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is two sentences, front-loaded with the main purpose, and efficiently enumerates the three usage modes without redundancy. Every clause contributes to understanding, making it highly concise and well-structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite lacking an output schema, the description covers all major functional aspects: fetching by id, listing account history, and chain-wide paging. It does not detail return values or error handling, but given the strong annotations and complete schema coverage, the description is sufficiently complete for a query tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has 100% description coverage, with each parameter (limit, account, eventId, pageToken, includePayload) already explained. The tool description adds high-level usage context (e.g., eventId for fetching one, account for history, pageToken implicitly for paging) but does not introduce meaning beyond what the schema provides, so the baseline of 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly identifies the tool as querying events emitted by Thru programs, with a specific verb and resource. It distinguishes from sibling tools by focusing on events and offering three concrete modes (by id, by account, chain-wide), which goes beyond a generic 'query events' phrasing.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context for when to use each mode: fetching a single event, listing an account's history, or paging through recent events chain-wide. However, it does not explicitly mention alternatives like get_transaction or state when not to use this tool, so it lacks explicit exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
resolve_nameResolve name service entryARead-only
Resolve a Thru name service entry to its on-chain account. Accepts a root registrar name or a subdomain.root pair, derives the program address and decodes the account, returning the owner and any stored records.
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Name to resolve. Either a root registrar (`megaelena`) or a subdomain (`wagmiolga.megaelena`). | |
| record | No | Optional record key to read from a resolved domain (for example `address`). Ignored for root registrars. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint and openWorldHint, so the description need not repeat safety. It adds behavioral detail: deriving the program address, decoding the account, and returning owner and records. This goes beyond the annotations, though it doesn't cover error cases.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, front-loaded with the main purpose, and every sentence provides essential information without fluff. Excellent structure.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple resolver with no output schema, the description adequately explains inputs and outputs. It lacks explicit error cases or detailed return format, but is sufficient given the tool's simplicity and rich schema.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, with detailed descriptions for both 'name' and 'record' including examples. The description's mention of the input forms is redundant. No additional meaning is provided beyond the schema, so baseline 3 applies.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the specific verb 'Resolve' and the resource 'Thru name service entry', and explains the transformation to an on-chain account with owner and records. This distinguishes it from siblings like get_account, which fetch by address.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The context is clear: use when you have a name to resolve. However, it does not explicitly mention when not to use it or provide alternatives (e.g., get_account for direct addresses), so it falls short of a full 5.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
6 tool updates
v0.1.0- First observed
get_account - First observed
get_faucet_status - First observed
get_network_status - First observed
get_transaction - First observed
query_events - First observed
resolve_name
TDQS
Scored across 6 tools
Each tool targets a distinct resource: name resolution, account, transaction, faucet, network, and events. No overlapping purposes; even the two status tools (faucet and network) are clearly separated by domain.
Five tools use the 'get_' prefix, but 'resolve_name' and 'query_events' deviate from that pattern. All follow a verb_noun structure with consistent lowercase styling, so the inconsistency is minor.
Six tools is well-scoped for a blockchain read-only server. Each tool covers a distinct domain area without unnecessary redundancy.
The set covers core read operations: accounts, transactions, names, network health, faucet state, and event queries. It lacks block-level queries and any transaction submission, but those may be intentionally excluded since withdrawal requires the CLI.
Maintenance
Related MCP Connectors
Hosted MCP server for live Bittensor chain reads and self-custodial on-chain writes.
Read-only MCP server for The Quiet Protocol's engines, benchmarks, proof, and business data.
Abstraxn: public Web3 MCP server for read-only chain data and pay-per-call relays.
USDC-gated Base JSON-RPC: free 10 req/min, $0.50 per 10k. Failover, cache, /mcp, ledger.
Related MCP Servers
- FlicenseAqualityDmaintenanceA Model Context Protocol server that connects Claude AI with SOON and other SVM-based blockchains, allowing users to check account balances, fetch recent transactions, and view token holdings on SOON's testnet and mainnet.63-
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol (MCP) server for interacting with the Solana blockchain. Provides tools to query balances, transactions, tokens, and network stats.121MIT
- AlicenseNot gradedqualityDmaintenanceA comprehensive Model Context Protocol (MCP) server providing 50+ tools for Algorand blockchain development, including account management, asset operations, smart contracts, API integration, swap functionality, and advanced transaction capabilities.13MIT
- AlicenseAqualityDmaintenanceAlgorand ecosystem MCP server that identifies applications, assets, protocols, and resolves .algo names, providing meaning rather than raw chain data.10MIT