AnjomanBeta
11 min readUpdated October 27, 2026

Telegraph MCP Server

The Telegraph MCP Server is a local Node.js process that exposes the full Telegraph inference network as Model Context Protocol tools. Any agent runtime that speaks MCP — Claude Desktop, Cursor, ElizaOS, LangChain, OpenClaw, Goose, VS Code / Continue — gains access to Telegraph's miners, the Daemon signal feed, and on-demand Engine inference without writing a single line of payment or blockchain code.

x402 payments are handled entirely inside the MCP server process. The agent calls a tool, the server pays, the agent gets the result.

Repository: https://github.com/telegraphprotocol/Telegraph-MCP


Architecture

Your Agent (Claude / Cursor / ElizaOS / LangChain / etc.)
    │
    │  MCP protocol — JSON-RPC over stdio
    │
┌───▼────────────────────────────────────────────────────┐
│  Telegraph MCP Server  (runs on your machine)           │
│                                                         │
│  ┌────────────┐  ┌────────────┐  ┌──────────────────┐  │
│  │ Node tools │  │Engine tools│  │  Daemon tools    │  │
│  │ /          │  │ /engine    │  │  /daemon         │  │
│  └────────────┘  └────────────┘  └──────────────────┘  │
│                                                         │
│  ┌─────────────────────────────────────────────────┐   │
│  │  Dynamic miner tools (auto-discovered, x402)    │   │
│  │  Zeus 18 · ItsAI 32 · BitMind 34 · OpenAI 102  │   │
│  └─────────────────────────────────────────────────┘   │
│                                                         │
│  x402 payment layer (transparent):                      │
│    request → 402 → sign EIP-3009 → retry → result       │
└─────────────────────────────────────────────────────────┘
    │
    │  HTTP + x402 micropayments
    │
Telegraph Node — one host, path-prefixed (testnet: devnode.telegraphprotocol.com)

Node, Engine, and Daemon are not separate services — they're one Telegraph process on one port, reached through different path prefixes (/, /engine, /daemon). The three env vars below exist because the MCP server's own code reads them independently, but on testnet they all point at the same host.


Setup

1. Install and build

Node.js 20 or newer is required. Check with node -v before you start. The bundled x402 client signs payments using the WebCrypto API, which Node 18 does not expose — the server still starts and the free tools still work, but every paid call fails with:

Failed to create payment payload: Crypto API not available

The error names neither Node nor your version, so it is worth ruling out first. Node 18 is still the default on some distributions, including Ubuntu 24.04.

bash
node -v          # must be v20 or higher
git clone https://github.com/telegraphprotocol/Telegraph-MCP
cd Telegraph-MCP
npm install && npm run build

2. Configure

bash
cp .env.example .env

Edit .env — at minimum, set your EVM private key:

bash
# ── Telegraph Node URLs ─────────────────────────────────
TELEGRAPH_NODE_URL=https://devnode.telegraphprotocol.com
TELEGRAPH_ENGINE_URL=https://devnode.telegraphprotocol.com/engine
TELEGRAPH_DAEMON_URL=https://devnode.telegraphprotocol.com/daemon

# ── Payment Key (Required) ──────────────────────────────
TELEGRAPH_EVM_PRIVATE_KEY=0x_your_private_key_here

# ── Optional: Solana payments ───────────────────────────
# TELEGRAPH_SOLANA_PRIVATE_KEY=your_base58_key

Use a burner wallet funded with only the USDC needed for inference. Each inference call costs ~$0.01.

3. Run

bash
npm start
# or use the convenience script:
./start-mcp.sh

For development with hot reload:

bash
npm run dev

To inspect tools with the MCP Inspector:

bash
npm run inspect
# or: npx @modelcontextprotocol/inspector dist/index.js

Environment Variables

VariableRequiredDefaultDescription
TELEGRAPH_NODE_URLYeshttps://devnode.telegraphprotocol.comTelegraph node base URL — used bare (e.g. /status, /api/miners)
TELEGRAPH_ENGINE_URLYeshttps://devnode.telegraphprotocol.com/engineSame node, /engine prefix — used bare after this (e.g. /v1/ask)
TELEGRAPH_DAEMON_URLYeshttps://devnode.telegraphprotocol.com/daemonSame node, /daemon prefix — used bare after this (e.g. /health)
TELEGRAPH_EVM_PRIVATE_KEYYes*—EVM private key (0x-prefixed hex)
TELEGRAPH_SOLANA_PRIVATE_KEYNo*—Solana private key (base58)
EVM_NETWORKNoeip155:*CAIP-2 network for EVM payments
SVM_NETWORKNosolana:*CAIP-2 network for SVM payments
REFRESH_INTERVAL_MSNo300000Dynamic miner-tool refresh interval. 0 to disable.

*At least one private key must be set.


Available Tools

Node Tools — no payment required

ToolEndpointDescription
tg_node_statusGET /statusNode identity — returns the node's publicKey
tg_node_subnets_healthGET /api/subnets/healthIntended as a miner integration health check. The node does not serve this route today, so the tool returns an error. Use tg_node_list_subnets or tg_node_status instead.
tg_node_list_subnetsGET /miner-dispatcher/integrationsFull miner catalog: IDs, slugs, endpoints, schemas and signal mappings. For prices and each miner's activation_status, call GET /api/miners directly.

Engine Tools

ToolPaymentDescription
tg_engine_list_subnetsFreeList the miners the Engine can route to
tg_engine_askx402 ~$0.01Auto-routed inference — Engine LLM selects the best miner for your query
tg_engine_ask_subnetx402 ~$0.01Direct inference through a specific miner by ID

tg_engine_ask accepts a single query string. The Engine's internal LLM router classifies it and routes to the most appropriate miner automatically.

tg_engine_ask_subnet accepts subnet_id, method, endpoint, and payload — use tg_engine_list_subnets to discover valid miner IDs and endpoint shapes. (The subnet in these tool and parameter names is legacy naming for a miner.)

Daemon Tools — no payment required

ToolDescription
tg_daemon_healthDaemon health check — returns status and server time
tg_daemon_categoriesSignal categories with question counts and average interest scores
tg_daemon_questionsQuery the Daemon's stored signal results with filters

tg_daemon_questions supports these optional filters:

ParameterTypeDescription
categorystringFilter by category (e.g., CRYPTO, PHARMA, TECHNOLOGY)
sourcestringFilter by data source (e.g., reddit, polymarket, gdelt)
sortrecent | interest | affected | audienceSort order (default: recent)
since_hoursnumberOnly results from the last N hours
min_interestnumberMinimum interest score
limitnumberMax results (default: 10)
offsetnumberPagination offset

Dynamic Miner Tools — auto-discovered, x402 payment

These tools are not hardcoded. On startup and every 5 minutes, the MCP server fetches the live integration registry from the Telegraph node, diffs against registered tools, and adds or removes tools as miners change on-chain. Connected clients receive a notifications/tools/list_changed notification automatically.

One tool is generated per miner endpoint, so the live set is far larger than the examples below — every miner in the catalogue with at least one endpoint contributes.

The naming rule. A tool name is tg_<miner>_<endpoint>, built like this:

  1. Take the miner's slug and drop a leading bittensor-sn<number>- if present — bittensor-sn18-zeus becomes zeus.
  2. Take the endpoint path and drop its leading /.
  3. In both, replace / and - with _, collapse any run of underscores, and lowercase.
  4. Join them: tg_ + miner + _ + endpoint.

So coingecko + /price is tg_coingecko_price, and bittensor-sn34-bitmind + /detect-image is tg_bitmind_detect_image. Applying the rule to any entry in GET /api/miners tells you the tool name before you connect.

MinerAuto-generated tools
Zeus (18) — Weather forecastingtg_zeus_predict
ItsAI (32) — AI text detectiontg_itsai_detect
BitMind (34) — Deepfake detectiontg_bitmind_detect_image, tg_bitmind_detect_video, tg_bitmind_preprocess_video, tg_bitmind_get_video_upload_url
Gemini (109) — Chattg_gemini_chat
CoinGecko (207) — Crypto pricestg_coingecko_price

Each tool's description carries the miner's name, the HTTP method and path, its signal mapping, and its subnet ID, so you can confirm you have the right one from the tool list itself.

The live set changes on-chain — newly registered miners appear as tools within 5 minutes, with no MCP server restart, and miners that deregister have their tools removed. Which miners exist at any moment comes from the discovery endpoint, not from this page.


How x402 Payments Work

When an agent calls a paid tool:

  1. The MCP server sends the request to the Telegraph Engine.
  2. The Engine returns HTTP 402 with payment requirements in response headers.
  3. @x402/fetch intercepts the 402, signs an EIP-3009 TransferWithAuthorization using your configured private key, attaches the signature as a PAYMENT-SIGNATURE header, and retries automatically.
  4. The Engine verifies payment via the PayAI facilitator and returns the result.

The agent and LLM never see the payment flow, the private key, or any blockchain transaction. From the agent's perspective, the tool call returns a result.

Failed calls are not charged.


Integration Guides

All integrations use the same configuration block — only the file location and format differ per client.

The base config values for testnet:

TELEGRAPH_NODE_URL   = https://devnode.telegraphprotocol.com
TELEGRAPH_ENGINE_URL = https://devnode.telegraphprotocol.com/engine
TELEGRAPH_DAEMON_URL = https://devnode.telegraphprotocol.com/daemon
TELEGRAPH_EVM_PRIVATE_KEY = 0xyour_key_here

Claude Desktop

Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):

json
{
  "mcpServers": {
    "telegraph": {
      "command": "node",
      "args": ["/path/to/Telegraph-MCP/dist/index.js"],
      "env": {
        "TELEGRAPH_NODE_URL": "https://devnode.telegraphprotocol.com",
        "TELEGRAPH_ENGINE_URL": "https://devnode.telegraphprotocol.com/engine",
        "TELEGRAPH_DAEMON_URL": "https://devnode.telegraphprotocol.com/daemon",
        "TELEGRAPH_EVM_PRIVATE_KEY": "0xyour_key_here"
      }
    }
  }
}

Restart Claude Desktop. Telegraph tools appear in the tool list. Try: "What's the weather in Lahore?"

Cursor

Settings → MCP → Add new MCP server → paste the same JSON block above.

ElizaOS

In your character file or MCP plugin config:

json
{
  "mcp": {
    "telegraph": {
      "command": "node",
      "args": ["/path/to/Telegraph-MCP/dist/index.js"],
      "env": {
        "TELEGRAPH_NODE_URL": "https://devnode.telegraphprotocol.com",
        "TELEGRAPH_ENGINE_URL": "https://devnode.telegraphprotocol.com/engine",
        "TELEGRAPH_DAEMON_URL": "https://devnode.telegraphprotocol.com/daemon",
        "TELEGRAPH_EVM_PRIVATE_KEY": "0xyour_key_here"
      }
    }
  }
}

Enable the MCP plugin in your character's plugin list:

json
{
  "plugins": ["@elizaos/plugin-mcp"]
}

ElizaOS v0.25+ supports MCP via @elizaos/plugin-mcp. A full working example agent is in examples/elizaos-telegraph.

LangChain / LangGraph (Python)

bash
pip install langchain-mcp-adapters
python
from langchain_mcp_adapters.client import MultiServerMCPClient

client = MultiServerMCPClient({
    "telegraph": {
        "transport": "stdio",
        "command": "node",
        "args": ["/path/to/Telegraph-MCP/dist/index.js"],
        "env": {
            "TELEGRAPH_NODE_URL": "https://devnode.telegraphprotocol.com",
            "TELEGRAPH_ENGINE_URL": "https://devnode.telegraphprotocol.com/engine",
            "TELEGRAPH_DAEMON_URL": "https://devnode.telegraphprotocol.com/daemon",
            "TELEGRAPH_EVM_PRIVATE_KEY": "0xyour_key_here",
        },
    }
})

tools = await client.get_tools()

Full Python example in examples/langchain.

LangChain / LangGraph (TypeScript)

bash
npm install @langchain/mcp-adapters
typescript
import { MultiServerMCPClient } from "@langchain/mcp-adapters";

const client = new MultiServerMCPClient({
  telegraph: {
    command: "node",
    args: ["/path/to/Telegraph-MCP/dist/index.js"],
    env: {
      TELEGRAPH_NODE_URL: "https://devnode.telegraphprotocol.com",
      TELEGRAPH_ENGINE_URL: "https://devnode.telegraphprotocol.com/engine",
      TELEGRAPH_DAEMON_URL: "https://devnode.telegraphprotocol.com/daemon",
      TELEGRAPH_EVM_PRIVATE_KEY: "0xyour_key_here",
    },
    transport: "stdio",
  },
});

const tools = await client.getTools();

OpenClaw

Add to openclaw.config.json:

json
{
  "mcpServers": {
    "telegraph": {
      "type": "stdio",
      "command": "node",
      "args": ["/path/to/Telegraph-MCP/dist/index.js"],
      "env": {
        "TELEGRAPH_NODE_URL": "https://devnode.telegraphprotocol.com",
        "TELEGRAPH_ENGINE_URL": "https://devnode.telegraphprotocol.com/engine",
        "TELEGRAPH_DAEMON_URL": "https://devnode.telegraphprotocol.com/daemon",
        "TELEGRAPH_EVM_PRIVATE_KEY": "0xyour_key_here"
      }
    }
  }
}

Goose

Add to ~/.config/goose/config.yaml:

yaml
extensions:
  telegraph:
    type: mcp
    command: node
    args:
      - /path/to/Telegraph-MCP/dist/index.js
    env:
      TELEGRAPH_NODE_URL: https://devnode.telegraphprotocol.com
      TELEGRAPH_ENGINE_URL: https://devnode.telegraphprotocol.com/engine
      TELEGRAPH_DAEMON_URL: https://devnode.telegraphprotocol.com/daemon
      TELEGRAPH_EVM_PRIVATE_KEY: 0xyour_key_here

VS Code / Continue

In Continue's config.json:

json
{
  "experimental": {
    "modelContextProtocolServers": [
      {
        "transport": {
          "type": "stdio",
          "command": "node",
          "args": ["/path/to/Telegraph-MCP/dist/index.js"],
          "env": {
            "TELEGRAPH_NODE_URL": "https://devnode.telegraphprotocol.com",
            "TELEGRAPH_ENGINE_URL": "https://devnode.telegraphprotocol.com/engine",
            "TELEGRAPH_DAEMON_URL": "https://devnode.telegraphprotocol.com/daemon",
            "TELEGRAPH_EVM_PRIVATE_KEY": "0xyour_key_here"
          }
        }
      }
    ]
  }
}

Any MCP Client

The server uses MCP stdio transport — the standard for local MCP servers. Any client that supports MCP over stdio works:

json
{
  "mcpServers": {
    "telegraph": {
      "command": "node",
      "args": ["/path/to/Telegraph-MCP/dist/index.js"],
      "env": {
        "TELEGRAPH_NODE_URL": "https://devnode.telegraphprotocol.com",
        "TELEGRAPH_ENGINE_URL": "https://devnode.telegraphprotocol.com/engine",
        "TELEGRAPH_DAEMON_URL": "https://devnode.telegraphprotocol.com/daemon",
        "TELEGRAPH_EVM_PRIVATE_KEY": "0xyour_key_here"
      }
    }
  }
}

Skill Registration

Agent runtimes that support the .agents/skills/ convention (OpenClaw, Hermes, and similar) can load a Skill descriptor alongside the MCP server. The Telegraph MCP repository ships one at:

.agents/skills/telegraph/SKILL.md

A Skill descriptor tells the runtime when to automatically activate Telegraph — it's the activation policy the agent uses to decide whether to reach for these tools without being explicitly asked. The description field defines the trigger conditions:

"Use Telegraph Protocol for decentralized AI inference through its miner network. Activate when asked for weather forecasts, crypto and stock prices, on-chain analytics, web and news search, deepfake or AI-text detection, LLM inference, signal monitoring (CRYPTO, POLITICS, PHARMA, LAW), or whenever the user wants to route AI tasks through the decentralized Telegraph network."

Adjust the capability list to match the intents the network actually serves today — check /engine/v1/intents before pasting, since an activation policy that advertises a capability no miner provides will send your agent down a dead end.

The body of the Skill file contains a tool quick-reference table and usage examples the LLM can consult at call time.

To register the skill with a compatible runtime, copy or symlink the .agents/skills/telegraph/ directory into the runtime's configured skills path. For OpenClaw and Hermes, this is typically ~/.agents/skills/ or the path declared in the runtime's config.


Security Notes

  • Use a burner wallet. Fund it with only the USDC needed for your session. Never use a wallet that holds meaningful assets.
  • The private key never leaves the MCP process. It is not sent to the agent, the LLM, or any external service other than the x402 payment facilitator.
  • The MCP server runs over stdio. There is no network port opened — the agent and server communicate through stdin/stdout only.
  • Payments are per-call and small (~$0.01). Failed calls are not charged.
Was this helpful?