Skip to main content
Glama
telegraph-mcp

telegraph-mcp

Official

Telegraph MCP server

Just want your agent to use Anjoman for outside intelligence? Install the anjoman skill instead: npx skills add telegraphprotocol/telegraph-mcp --skill anjoman, then set ANJOMAN_API_KEY. No MCP server or wallet, and it supports follow-ups, a spend cap, progress, traces and receipts. This MCP server is for direct specialist access.

Gives any MCP agent (Claude Desktop, Claude Code, Cursor, Continue, Goose, OpenClaw, LangChain, ElizaOS, ...) the Telegraph network, on your own computer. Ask a question and the best-ranked miner answers. Payment comes from your Telegraph escrow automatically: no keys, signatures or blockchain steps for you or your agent.

Start in three steps

You need Node 20 or later.

1. Set up once. In a terminal:

npx -y @telegraphprotocol/telegraph-protocol-mcp setup

It checks the network and creates a wallet just for Telegraph. You can import a key instead. The wallet is saved to ~/.telegraph/wallet.json, readable only by you. Setup then shows the address and balances, moves the USDC you choose into escrow after you confirm, and offers to add Telegraph to your agent app.

2. Restart your agent app.

3. Ask it something: "What is the BTC price? Use Telegraph." Every ask after that is paid from escrow on its own.

Top up any time with npx -y @telegraphprotocol/telegraph-protocol-mcp fund. Check balances with ... status. Take USDC back out with ... withdraw: it requests the amount, and you run it again to collect once a ledger root covers the request.

Back up ~/.telegraph/wallet.json. It is the only copy of the key, and the escrow balance goes with it.

Related MCP server: x402engine-mcp

Adding it to an app by hand

No setting or key is needed: the server uses the wallet from setup. setup and install <app> write these for you where they can.

App

How

Claude Code

claude mcp add --scope user telegraph -- npx -y @telegraphprotocol/telegraph-protocol-mcp

Claude Desktop, Cursor, any other MCP client

Add to mcpServers: {"telegraph": {"command": "npx", "args": ["-y", "@telegraphprotocol/telegraph-protocol-mcp"]}}

OpenClaw

openclaw mcp add telegraph --command npx --arg=-y --arg @telegraphprotocol/telegraph-protocol-mcp

Continue, Goose, LangChain, ElizaOS

Ready files in examples/

How paying works

  • The MCP server is your wallet. It runs on your machine, loads the key from ~/.telegraph/wallet.json (or TELEGRAPH_PRIVATE_KEY), and calls the node's /engine/v1/ask itself. When the node asks for payment, the server signs the escrow authorization with that key and sends the ask again. The agent never sees the key or the signature.

  • Escrow, always, by default. You deposit USDC once. The escrow signature proves you asked, but it can't move funds. Asks are charged in the epoch's ledger root, and a failed ask is never billed.

  • Multi-miner asks. telegraph_ask sends max_budget_usdc (default 260000 μUSDC, $0.26, the most the testnet node takes). When the first miner's answer misses part of the question, the node asks the next ranked miners for the rest within that budget. Escrow holds the budget while the ask runs; only the miners whose answers are used are billed, and the rest is released. The reply's fulfillment says whether the answer is complete, who gave each field, and the payments.

  • When escrow runs low, the ask is refused with a message saying how much is left and how to top up. Nothing is charged, and the wallet is never paid from silently.

  • No double charges. Repeating the same ask within a minute, or while it's still running, returns that answer, not a second charge.

  • Limits. The server won't pay more than $0.50 for one ask or $5 a day. Change them with the settings below.

  • x402 (paying each ask straight from the wallet's USDC) is still there, but only if you turn it on: TELEGRAPH_PAYMENT=auto for escrow then x402, or x402 for x402 only.

Details and withdrawing: guides/2-payments.md.

Settings

All optional.

Variable

Default

What it is

TELEGRAPH_PAYMENT

escrow

escrow; auto (escrow, then x402); x402

TELEGRAPH_MAX_ASK_USD

0.5

The most one ask may cost. 0 means no limit

TELEGRAPH_DAILY_LIMIT_USD

5

The most all asks may cost in a UTC day. 0 means no limit

TELEGRAPH_MAX_BUDGET_USDC

260000

max_budget_usdc for each telegraph_ask, in μUSDC, the first call included (never above TELEGRAPH_MAX_ASK_USD). 0 sends none: one miner, nothing recovered

TELEGRAPH_HOME

~/.telegraph

Where the wallet and the day's spending are kept

TELEGRAPH_PRIVATE_KEY

none

Use this key instead of the wallet file. For servers and CI. (TELEGRAPH_EVM_PRIVATE_KEY, the v1 name, also works.)

TELEGRAPH_API_KEY

none

An Anjoman API key (anjoman_…). Switches to key mode: no wallet is used

TELEGRAPH_API_URL

https://backend.telegraphprotocol.com

Where the API key is used

TELEGRAPH_ALLOW_AGENT_DEPOSIT

off

Also give the agent a telegraph_deposit tool

TELEGRAPH_URL

https://devnode.telegraphprotocol.com

The node (the Telegraph testnet)

TELEGRAPH_RPC_URL, TELEGRAPH_DIAMOND, TELEGRAPH_CHAIN_ID

the testnet's (diamond 0x72a70e949362670Bf8bceAd24eFC5b8f950aa08b)

The chain and the contract that holds escrow

Using an API key instead of a wallet

If you have an Anjoman account, you can skip the wallet. Create a key on the API keys page (https://anjoman.ai/dashboard/api-keys), deposit into your account there, and set it in your agent's settings:

{"mcpServers": {"telegraph": {"command": "npx", "args": ["-y", "@telegraphprotocol/telegraph-protocol-mcp"], "env": {"TELEGRAPH_API_KEY": "anjoman_your_key_here"}}}}

No setup is needed. In key mode:

  • telegraph_ask is a multi-miner call through your Anjoman account's agent: it splits the request across intents and miners, combines their answers and writes one reply. A question can take up to a minute.

  • telegraph_ask_auto is the node's auto-routed ask, without the agent: the node picks the top live miner and asks the next ones for what it missed. It holds a budget of $0.26 while it runs and is billed only for the miners whose answers are used.

  • telegraph_ask_miner is a miner call: one miner you choose, with a question or one of its endpoints, at that miner's price.

  • All three are paid from the account's escrow balance.

  • telegraph_account shows the account's escrow balance and what its last jobs cost. Top up in Anjoman: this server cannot deposit.

  • telegraph_deposit is not offered: a key cannot move funds.

  • The free tools (telegraph_find_intents, telegraph_intent, telegraph_find_miners, telegraph_ranking, telegraph_docs) work as before.

  • The wallet, TELEGRAPH_PAYMENT and the per-ask and daily limits do not apply. The account's balance and the key's own limits (30 requests a minute, an optional expiry) do. Revoke the key in Anjoman to cut off an agent at once.

Treat the key like a password: it can spend your balance. Keep it in an agent's settings, not in a repository.

Tools

Tool

Cost

What it does

telegraph_ask

~$0.01 per miner used

Ask a question, optionally with an exact intent and params. The node routes it to the top live miner, and asks the next ones for what it missed

telegraph_ask_miner

the miner's price

Miner call: ask one miner you choose, or call one of its endpoints directly

telegraph_ask_auto

~$0.01 per miner used

API key only: the node's auto-routed ask, without Anjoman's agent

telegraph_find_intents

free

Search the 130+ intents (kinds of question)

telegraph_intent

free

One intent's kind, params, answer fields and top miners

telegraph_find_miners

free

An intent's miners with rank, score, price and endpoints, or a word search over all miners

telegraph_ranking

free

The latest epoch's ranking, per intent

telegraph_account

free

Address, network, wallet and escrow balances, limits, spending today, and how to top up

telegraph_docs

free

Built-in guides, also served as MCP resources (telegraph://docs/...)

telegraph_deposit

gas

Only with TELEGRAPH_ALLOW_AGENT_DEPOSIT: move wallet USDC into escrow

Test funds (testnet)

The testnet runs on Ethereum Sepolia, so there's no real money. Its USDC (0xcc194e1a843B658526D0D5C431f670028582Ae17) is Telegraph's own test token, not Circle's: the escrow takes that one and no other, and telegraph_account names it. Claim it at anjoman.ai/dashboard/faucet (sign in) and send it to your Telegraph wallet, or mint it directly (mint(address,uint256), anyone can). fund points you there. Gas needs a little Sepolia ETH from a public faucet. Balances in the previous diamond (0x3624…b99b) do not carry over.

Security

  • The key lives in ~/.telegraph/wallet.json (mode 0600), or in TELEGRAPH_PRIVATE_KEY if you set one. It's never in an agent's config, a tool result or a log, so the agent and its model never see it through MCP.

  • Use a wallet made for this, holding only what you plan to spend. The limits cap what the agent can spend.

  • By default the agent gets no tool that moves funds: deposits and withdrawals happen in your terminal, after you confirm.

  • That holds for the tools. An agent that can also run shell commands (Claude Code, Cursor, Goose) can read the wallet file or run fund itself, so the real protection is the dedicated wallet and the limits, not the tool list.

  • The server runs locally over stdio and opens no port.

Development

npm install && npm run build && npm test
node scripts/smoke.mjs                                       # free tools against the node
node scripts/smoke.mjs paid                                  # plus three asks (~$0.03), using the setup wallet
node scripts/smoke.mjs call telegraph_intent '{"intent":"CRYPTO_PRICE_USD"}'
npx @modelcontextprotocol/inspector dist/index.js            # browse the tools

Architecture: docs/architecture.md. Problems: docs/troubleshooting.md.

Available Tools

8 tools
telegraph_accountAccountA
Read-only

This server's wallet (or any address): its address and network, wallet USDC and ETH, the Telegraph escrow balance that pays for asks (spendable, deposited, not yet charged, pending withdrawal), the spending limits, and how to top up. Free.

Inputs: address.

telegraph_askAsk TelegraphA

Ask the Telegraph network a question: live prices, FX, weather, web and academic search, security, code review, compliance and 100+ other intents. The node routes it to the best-ranked live miner and returns its answer in the intent's fields. When that answer misses part of the question, the next ranked miners are asked for the rest, within a budget (TELEGRAPH_MAX_BUDGET_USDC). Each miner whose answer is used costs its price, about $0.01, paid automatically from the Telegraph escrow balance (a failed ask is never billed; repeating the same ask within a minute is not paid twice). fulfillment says whether the answer is complete, which miner gave each field, and the payments.

Inputs: intent, params, question.

telegraph_ask_minerMiner callA

Ask one specific miner (by id or slug from telegraph_find_miners) instead of letting the node pick. Send a question (with intent when the miner serves several), or call one of its endpoints directly with endpoint, method and payload (the raw answer comes back). No fallback miner is tried. Paid at that miner's price, like telegraph_ask.

Inputs: miner (required), intent, method, params, +3 more.

telegraph_docsTelegraph docsC
Read-only

How Telegraph works: getting started, payments, intents and ranking, errors. Free.

Inputs: topic, search.

telegraph_find_intentsFind intentsA
Read-only

Search the intents (kinds of question) the network answers, with how many miners serve each. Free. Without search, lists every intent name.

Inputs: limit, search.

telegraph_find_minersFind minersA
Read-only

Miners for an intent, best-ranked first, with status, price and rank; or miners whose name or description match some words. Free.

Inputs: limit, intent, search.

telegraph_intentIntent detailsA
Read-only

One intent: its kind (deterministic, hybrid or judgment), the params an ask can send, the fields the answer comes back in, and its top-ranked miners. Free.

Inputs: intent (required).

telegraph_rankingMiner rankingA
Read-only

The latest epoch's miner ranking (scores from the network's own checks), for one intent or the top few of every intent. Asks go to the top live miner. Free.

Inputs: limit, intent.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 8 tools

    Disambiguation4/5

    telegraph_ask vs telegraph_ask_miner is explicitly delineated (network routing with fallback vs a single named miner), and the discovery tools partition cleanly into search (find_intents/find_miners) vs detail (intent/ranking). The only mild friction is find_intents vs intent and find_miners vs ranking, where an agent must infer 'search/list' vs 'single resource or scores', but the descriptions make that distinction clear enough.

    Naming Consistency4/5

    All tools share a telegraph_ prefix and snake_case, with verb_noun forms for discovery (find_intents, find_miners) and actions (ask, ask_miner). The deviation is that several tools are bare nouns (account, docs, intent, ranking) used as getters, which is readable but not a single uniform pattern.

    Tool Count5/5

    Eight tools is well within a healthy range for a paid Q&A/escrow network client. Each tool earns its place: account/balance, four free discovery tools, docs, and the two paid ask variants, with no filler.

    Completeness4/5

    Coverage spans the full client lifecycle: account/escrow status, intent and miner discovery, ranking, documentation, and both broad and targeted paid asks with per-field fulfillment and payment reporting. The main gaps are no explicit deposit/withdraw or top-up action (only instructions via telegraph_account) and no way to list past asks or payments outside a single response, which agents must work around.

    Maintenance

    ActivityMaintained
    ResponsivenessOutdated data

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      MCP server for the x402 protocol that lets AI agents discover and call payment-gated HTTP APIs automatically.
      Apache 2.0
    • A
      license
      B
      quality
      D
      maintenance
      An MCP server providing 22 pay-per-call utility tools for AI agents (scrape, validate, embed, store, moderate, notify, convert, prevent loops) without accounts or API keys, using USDC payments via the x402 protocol.
      17
      56 npm
      1
      MIT