Telegraph MCP Server
@telegraph/mcp-server
MCP 服务器,将 Telegraph Protocol AI 推理 API 作为工具暴露,并支持自动 x402 微支付。
连接任何兼容 MCP 的代理(Claude Desktop、Cursor、ElizaOS、LangChain、OpenClaw、Goose 等)到 Telegraph 的 AI 矿工网络——天气预报、深度伪造检测、LLM 推理、AI 文本检测、信号监控——代理中无需任何加密代码。MCP 服务器内部处理私钥托管、支付签名和交易结算。
矿工可以是 Bittensor 子网、托管模型或通过 YAML 集成的任何私有 API。某些工具和字段名称因历史原因仍使用
subnet——请将其理解为“矿工”。
文档
快速开始
选项 A — npx(无需克隆,发布后推荐)
TELEGRAPH_NODE_URL=http://13.237.89.59:7044 \
TELEGRAPH_ENGINE_URL=http://13.237.89.59:8080 \
TELEGRAPH_DAEMON_URL=http://13.237.89.59:8081 \
TELEGRAPH_EVM_PRIVATE_KEY=0xyour_key_here \
npx -y telegraph-protocol-mcp选项 B — 从源码构建
# 1. Clone and enter
git clone https://github.com/telegraphprotocol/telegraph-mcp
cd telegraph-mcp
# 2. Copy and edit .env
cp .env.example .env
# Edit: set TELEGRAPH_EVM_PRIVATE_KEY=0xyour_key_here
# 3. Install and build
npm install && npm run build
# 4. Run
npm start已发布到 npm 为
telegraph-protocol-mcp,并在 MCP 注册表 上列为io.github.telegraphprotocol/telegraph。维护者请参阅 PUBLISHING.md。
架构
Agent (Claude / Cursor / Eliza / etc.)
│
│ MCP protocol (JSON-RPC over stdio)
│
┌──────▼─────────────────────────────────────────┐
│ Telegraph MCP Server (runs locally) │
│ │
│ ┌─────────┐ ┌──────────┐ ┌───────────────┐ │
│ │ Node │ │ Engine │ │ Daemon │ │
│ │ :7044 │ │ :8080 │ │ :8081 │ │
│ ├─────────┤ ├──────────┤ ├───────────────┤ │
│ │ Status │ │ Subnets │ │ Health │ │
│ │ Health │ │ Ask │ │ Categories │ │
│ │ Subnets │ │ Direct │ │ Questions │ │
│ │ Dynamic │ │ │ │ │ │
│ └─────────┘ └──────────┘ └───────────────┘ │
│ │
│ X402 payment handled transparently: │
│ request → 402 → sign EIP-3009 → retry │
└─────────────────────────────────────────────────┘配置
全部通过环境变量(.env 文件或内联方式):
变量 | 必需 | 默认值 | 描述 |
| 是 |
| Telegraph 节点 URL |
| 是 |
| 引擎服务器 URL |
| 是 |
| 守护进程 API URL |
| 是* | — | EVM 私钥( |
| 否* | — | Solana 私钥(base58) |
| 否 |
| EVM CAIP-2 网络 |
| 否 |
| Solana CAIP-2 网络 |
| 否 |
| 矿工工具刷新间隔(毫秒)。设为 0 禁用。 |
*至少需要一个私钥。
可用工具
节点工具(无需支付)
工具 | 描述 |
| 节点状态、公钥、链信息 |
| 矿工集成健康检查 |
| 完整矿工目录,包含元数据、模式、端点 |
引擎工具
工具 | 支付 | 描述 |
| 免费 | 列出引擎可路由到的矿工 |
| x402 | 自动路由推理(LLM 为你的查询选择最佳矿工) |
| x402 | 通过指定矿工 ID 直接推理 |
守护进程工具(无需支付)
工具 | 描述 |
| 守护进程健康检查 |
| 信号类别(POLITICS、ECONOMICS、TECHNOLOGY、CLIMATE、HEALTH、CRYPTO、SPORTS 等) |
| 使用过滤器(类别、来源、时间、兴趣)查询收集的信号 |
动态矿工工具(自动发现,x402 支付)
每个矿工端点的工具从 Telegraph 节点的实时集成注册表中自动生成。实时集合在链上变化,因此请将其视为快照,而非权威来源(调用 tg_node_list_subnets 获取当前目录):
矿工 | 工具 |
Zeus (18) — 天气 |
|
ItsAI (32) — AI 文本检测 |
|
Sapling (33) — AI 内容检测 |
|
BitMind (34) — 深度伪造 |
|
OpenAI (102) — LLM / 图像 |
|
这些会自动更新。 链上新注册的矿工将在 5 分钟内出现。已注销的矿工将被清理。代理始终只看到当前有效的工具。
某些工具和字段名称包含
subnet是历史原因——Telegraph 最初集成的是 Bittensor 子网。如今,矿工 是通过 YAML 集成的任何提供者,无论是否为子网。
x402 支付如何工作
当代理调用付费工具(例如 tg_engine_ask)时:
MCP 服务器向 Telegraph 发送请求
Telegraph 返回 HTTP 402,响应头中包含支付要求
@x402/fetch拦截 402,使用你的私钥签署 EIP-3009TransferWithAuthorization,将签名附加为PAYMENT头,然后重试Telegraph 通过 PayAI 协调器在链上验证支付,并返回结果
代理和 LLM 永远不会看到支付流程、私钥或区块链交易。 完全透明——代理只看到一个返回结果的工具。
集成指南
Claude Desktop
编辑 ~/Library/Application Support/Claude/claude_desktop_config.json(macOS)或 %APPDATA%\Claude\claude_desktop_config.json(Windows)。
使用 npx(最简单——无需克隆或构建):
{
"mcpServers": {
"telegraph": {
"command": "npx",
"args": ["-y", "telegraph-protocol-mcp"],
"env": {
"TELEGRAPH_NODE_URL": "http://13.237.89.59:7044",
"TELEGRAPH_ENGINE_URL": "http://13.237.89.59:8080",
"TELEGRAPH_DAEMON_URL": "http://13.237.89.59:8081",
"TELEGRAPH_EVM_PRIVATE_KEY": "0xyour_key_here"
}
}
}
}或指向本地构建:
{
"mcpServers": {
"telegraph": {
"command": "node",
"args": ["/path/to/telegraph-mcp/dist/index.js"],
"env": {
"TELEGRAPH_NODE_URL": "http://13.237.89.59:7044",
"TELEGRAPH_ENGINE_URL": "http://13.237.89.59:8080",
"TELEGRAPH_DAEMON_URL": "http://13.237.89.59:8081",
"TELEGRAPH_EVM_PRIVATE_KEY": "0xyour_key_here"
}
}
}
}重启 Claude Desktop。Telegraph 工具将出现在工具列表中。尝试询问 “拉合尔的天气怎么样?” 或 “使用 Telegraph 引擎解释什么是比特币。”
Cursor
添加到 Cursor 设置 → MCP → 添加新的 MCP 服务器:
{
"mcpServers": {
"telegraph": {
"command": "node",
"args": ["/path/to/telegraph-mcp/dist/index.js"],
"env": {
"TELEGRAPH_NODE_URL": "http://13.237.89.59:7044",
"TELEGRAPH_ENGINE_URL": "http://13.237.89.59:8080",
"TELEGRAPH_DAEMON_URL": "http://13.237.89.59:8081",
"TELEGRAPH_EVM_PRIVATE_KEY": "0xyour_key_here"
}
}
}
}ElizaOS
在你的 Eliza 角色文件或 MCP 插件配置中:
{
"mcp": {
"telegraph": {
"command": "node",
"args": ["/path/to/telegraph-mcp/dist/index.js"],
"env": {
"TELEGRAPH_NODE_URL": "http://13.237.89.59:7044",
"TELEGRAPH_ENGINE_URL": "http://13.237.89.59:8080",
"TELEGRAPH_DAEMON_URL": "http://13.237.89.59:8081",
"TELEGRAPH_EVM_PRIVATE_KEY": "0xyour_key_here"
}
}
}
}ElizaOS v0.25+ 通过 @elizaos/plugin-mcp 包支持 MCP。在你的角色插件列表中启用它:
{
"plugins": ["@elizaos/plugin-mcp"]
}LangChain / LangGraph
LangChain 通过 langchain-mcp-adapters 支持 MCP:
pip install langchain-mcp-adaptersfrom langchain_mcp_adapters.client import MultiServerMCPClient
client = MultiServerMCPClient({
"telegraph": {
"command": "node",
"args": ["/path/to/telegraph-mcp/dist/index.js"],
"env": {
"TELEGRAPH_NODE_URL": "http://13.237.89.59:7044",
"TELEGRAPH_ENGINE_URL": "http://13.237.89.59:8080",
"TELEGRAPH_DAEMON_URL": "http://13.237.89.59:8081",
"TELEGRAPH_EVM_PRIVATE_KEY": "0xyour_key_here",
},
"transport": "stdio",
}
})
tools = client.get_tools()
# Use tools with your LangChain agentTypeScript/Node.js:
npm install @langchain/mcp-adaptersimport { MultiServerMCPClient } from "@langchain/mcp-adapters";
const client = new MultiServerMCPClient({
telegraph: {
command: "node",
args: ["/path/to/telegraph-mcp/dist/index.js"],
env: {
TELEGRAPH_NODE_URL: "http://13.237.89.59:7044",
TELEGRAPH_ENGINE_URL: "http://13.237.89.59:8080",
TELEGRAPH_DAEMON_URL: "http://13.237.89.59:8081",
TELEGRAPH_EVM_PRIVATE_KEY: "0xyour_key_here",
},
transport: "stdio",
},
});
const tools = await client.getTools();OpenClaw
OpenClaw 原生支持 MCP 配置。添加到 openclaw.config.json:
{
"mcpServers": {
"telegraph": {
"type": "stdio",
"command": "node",
"args": ["/path/to/telegraph-mcp/dist/index.js"],
"env": {
"TELEGRAPH_NODE_URL": "http://13.237.89.59:7044",
"TELEGRAPH_ENGINE_URL": "http://13.237.89.59:8080",
"TELEGRAPH_DAEMON_URL": "http://13.237.89.59:8081",
"TELEGRAPH_EVM_PRIVATE_KEY": "0xyour_key_here"
}
}
}
}Goose
Goose 通过其扩展系统支持 MCP 服务器。配置在 ~/.config/goose/config.yaml:
extensions:
telegraph:
type: mcp
command: node
args:
- /path/to/telegraph-mcp/dist/index.js
env:
TELEGRAPH_NODE_URL: http://13.237.89.59:7044
TELEGRAPH_ENGINE_URL: http://13.237.89.59:8080
TELEGRAPH_DAEMON_URL: http://13.237.89.59:8081
TELEGRAPH_EVM_PRIVATE_KEY: 0xyour_key_hereVS Code / Continue
在 Continue 的 config.json 中:
{
"experimental": {
"modelContextProtocolServers": [
{
"transport": {
"type": "stdio",
"command": "node",
"args": ["/path/to/telegraph-mcp/dist/index.js"],
"env": {
"TELEGRAPH_NODE_URL": "http://13.237.89.59:7044",
"TELEGRAPH_ENGINE_URL": "http://13.237.89.59:8080",
"TELEGRAPH_DAEMON_URL": "http://13.237.89.59:8081",
"TELEGRAPH_EVM_PRIVATE_KEY": "0xyour_key_here"
}
}
}
]
}
}通用 / 任何 MCP 客户端
该服务器使用 MCP stdio 传输——本地 MCP 服务器的标准方式。任何支持通过 stdio 的 MCP 协议的客户端都可以使用它:
{
"mcpServers": {
"telegraph": {
"command": "node",
"args": ["/path/to/telegraph-mcp/dist/index.js"],
"env": {
"TELEGRAPH_NODE_URL": "http://13.237.89.59:7044",
"TELEGRAPH_ENGINE_URL": "http://13.237.89.59:8080",
"TELEGRAPH_DAEMON_URL": "http://13.237.89.59:8081",
"TELEGRAPH_EVM_PRIVATE_KEY": "0xyour_key_here"
}
}
}
}动态工具发现
子网工具不是硬编码的。在启动时以及每 5 分钟:
从 Telegraph 节点的
GET /miner-dispatcher/integrations获取实时集成与当前注册的工具进行差异比较
添加新子网 → 自动注册工具
移除过时子网 → 删除工具
向连接的客户端发送
notifications/tools/list_changed通知
这意味着:
新子网 在链上注册后 5 分钟内自动出现——无需重启 MCP
已移除的子网 被清理——代理不会调用不存在的工具
代理始终拥有网络可用工具的准确视图
安全性
使用临时钱包。 切勿使用你的主钱包。仅存入推理所需的 USDC。
私钥保留在 MCP 进程中。 绝不暴露给代理或 LLM。
MCP 服务器本地运行 通过 stdio——无网络暴露。
支付按次计费:通常每次推理请求 $0.01。
开发
npm install # Install deps
npm run build # Compile TypeScript
npm run dev # Dev mode with tsx (hot reload)
npx @modelcontextprotocol/inspector dist/index.js # Inspect toolsThis server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Telegram bridge for your MCP-compatible agent. Bidirectional, no LLM in our stack.
Monetize any MCP server: x402 paywall, pay-per-call billing in USDC on Base, agent marketplace.
Connect AI agents to Replynodes over the Model Context Protocol.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ashishwarkhade/Telegraph-MCP'
If you have feedback or need assistance with the MCP directory API, please join our Discord server