Skip to main content
Glama
erhnysr
by erhnysr

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 build

The 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_URL

https://rpc.alphanet.thru.org

Thru RPC endpoint

THRU_NAME_SERVICE_PROGRAM

taAAAA…UF

Name service program address

THRU_FAUCET_ACCOUNT

taxoImN8…In

Faucet account inspected by get_faucet_status

Claude Desktop

Add to claude_desktop_config.json:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

  • Windows: %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.js

Tools

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

address

string

ta… address (46 chars) or 64-char hex pubkey

includeData

boolean

false

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

signature

string

ts… signature or 128-char hex

statusOnly

boolean

false

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

name

string

root or subdomain.root

record

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.org is 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

eventId

string?

Fetch one event by id

account

string?

Recent transactions touching an account, with their emitted events

limit

number

20

Page size (1–100)

pageToken

string?

Continuation token from a previous call

includePayload

boolean

false

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

Covers 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 root and subdomain.root are supported, matching what the name service program itself derives.

  • License asymmetry. This server is MIT, but its dependency @thru/sdk is published under a proprietary license. Review Thru's terms before redistributing anything that bundles it.

License

MIT — see LICENSE.

Available Tools

6 tools
get_accountGet accountA
Read-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.

ParametersJSON Schema
NameRequiredDescriptionDefault
addressYesAccount public key: a `ta…` Thru address (46 chars) or a 64-character hex-encoded pubkey.
includeDataNoInclude the account's raw data blob as hex. Off by default because program accounts can be large.

TDQS

A4.3/5.0
Behavior4/5

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.

Conciseness5/5

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.

Completeness5/5

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.

Parameters3/5

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.

Purpose5/5

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.

Usage Guidelines4/5

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 statusA
Read-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).

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.9/5.0
Behavior5/5

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.

Conciseness5/5

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.

Completeness5/5

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.

Parameters4/5

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.

Purpose5/5

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.

Usage Guidelines5/5

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 statusA
Read-only

Check the health of the configured Thru RPC endpoint: node readiness, consensus state, chain id, current block heights and component versions.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.4/5.0
Behavior4/5

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.

Conciseness5/5

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.

Completeness4/5

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.

Parameters4/5

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.

Purpose5/5

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.

Usage Guidelines4/5

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 transactionA
Read-only

Fetch a Thru transaction by signature. Returns consensus status, execution result, fee payer, invoked program and resource consumption.

ParametersJSON Schema
NameRequiredDescriptionDefault
signatureYesTransaction signature: a `ts…` Thru signature string or 128-character hex.
statusOnlyNoReturn only the consensus/execution status instead of the full transaction body.

TDQS

A4/5.0
Behavior3/5

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.

Conciseness5/5

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.

Completeness4/5

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.

Parameters3/5

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.

Purpose5/5

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.

Usage Guidelines4/5

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 eventsA
Read-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.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of events (or transactions) to return.
accountNoReturn recent transactions touching this account, with the events each one emitted.
eventIdNoFetch a single event by its id (format `<signature>:<slot>:<...>`). Takes precedence over listing.
pageTokenNoContinuation token returned by a previous call.
includePayloadNoInclude each event's raw payload bytes as hex.

TDQS

A4/5.0
Behavior3/5

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.

Conciseness5/5

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.

Completeness4/5

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.

Parameters3/5

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.

Purpose5/5

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.

Usage Guidelines4/5

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 entryA
Read-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.

ParametersJSON Schema
NameRequiredDescriptionDefault
nameYesName to resolve. Either a root registrar (`megaelena`) or a subdomain (`wagmiolga.megaelena`).
recordNoOptional record key to read from a resolved domain (for example `address`). Ignored for root registrars.

TDQS

A4.2/5.0
Behavior4/5

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.

Conciseness5/5

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.

Completeness4/5

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.

Parameters3/5

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.

Purpose5/5

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.

Usage Guidelines4/5

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.

  1. 6 tool updatesv0.1.0
    • First observedget_account
    • First observedget_faucet_status
    • First observedget_network_status
    • First observedget_transaction
    • First observedquery_events
    • First observedresolve_name

TDQS

A4.3/5.0

Scored across 6 tools

Disambiguation5/5

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.

Naming Consistency4/5

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.

Tool Count5/5

Six tools is well-scoped for a blockchain read-only server. Each tool covers a distinct domain area without unnecessary redundancy.

Completeness4/5

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

ActivitySlowing
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • F
    license
    A
    quality
    D
    maintenance
    A 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.
    6
    3
    -
  • A
    license
    Not graded
    quality
    D
    maintenance
    A 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.
    13
    MIT