@telegraphprotocol/telegraph-protocol-mcp 1.0.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/skills/telegraph/SKILL.md +47 -129
- package/README.md +66 -366
- package/dist/chain.d.ts +60 -0
- package/dist/chain.d.ts.map +1 -0
- package/dist/chain.js +122 -0
- package/dist/chain.js.map +1 -0
- package/dist/cli.d.ts +2 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +264 -0
- package/dist/cli.js.map +1 -0
- package/dist/config.d.ts +14 -2
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +43 -20
- package/dist/config.js.map +1 -1
- package/dist/docs.d.ts +9 -0
- package/dist/docs.d.ts.map +1 -0
- package/dist/docs.js +35 -0
- package/dist/docs.js.map +1 -0
- package/dist/http.d.ts +3 -0
- package/dist/http.d.ts.map +1 -0
- package/dist/http.js +20 -0
- package/dist/http.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +20 -50
- package/dist/index.js.map +1 -1
- package/dist/limits.d.ts +20 -0
- package/dist/limits.d.ts.map +1 -0
- package/dist/limits.js +82 -0
- package/dist/limits.js.map +1 -0
- package/dist/pay.d.ts +27 -0
- package/dist/pay.d.ts.map +1 -0
- package/dist/pay.js +159 -0
- package/dist/pay.js.map +1 -0
- package/dist/tools.d.ts +10 -0
- package/dist/tools.d.ts.map +1 -0
- package/dist/tools.js +335 -0
- package/dist/tools.js.map +1 -0
- package/dist/wallet.d.ts +7 -0
- package/dist/wallet.d.ts.map +1 -0
- package/dist/wallet.js +38 -0
- package/dist/wallet.js.map +1 -0
- package/guides/1-getting-started.md +42 -0
- package/guides/2-payments.md +39 -0
- package/guides/3-intents-and-ranking.md +29 -0
- package/guides/4-troubleshooting.md +41 -0
- package/package.json +11 -14
- package/dist/client.d.ts +0 -6
- package/dist/client.d.ts.map +0 -1
- package/dist/client.js +0 -116
- package/dist/client.js.map +0 -1
- package/dist/discovery.d.ts +0 -3
- package/dist/discovery.d.ts.map +0 -1
- package/dist/discovery.js +0 -16
- package/dist/discovery.js.map +0 -1
- package/dist/schema.d.ts +0 -3
- package/dist/schema.d.ts.map +0 -1
- package/dist/schema.js +0 -84
- package/dist/schema.js.map +0 -1
- package/dist/tools/daemon.d.ts +0 -4
- package/dist/tools/daemon.d.ts.map +0 -1
- package/dist/tools/daemon.js +0 -82
- package/dist/tools/daemon.js.map +0 -1
- package/dist/tools/engine.d.ts +0 -5
- package/dist/tools/engine.d.ts.map +0 -1
- package/dist/tools/engine.js +0 -83
- package/dist/tools/engine.js.map +0 -1
- package/dist/tools/node.d.ts +0 -4
- package/dist/tools/node.d.ts.map +0 -1
- package/dist/tools/node.js +0 -88
- package/dist/tools/node.js.map +0 -1
- package/dist/tools/subnets.d.ts +0 -10
- package/dist/tools/subnets.d.ts.map +0 -1
- package/dist/tools/subnets.js +0 -114
- package/dist/tools/subnets.js.map +0 -1
- package/dist/transport.d.ts +0 -4
- package/dist/transport.d.ts.map +0 -1
- package/dist/transport.js +0 -17
- package/dist/transport.js.map +0 -1
- package/dist/types.d.ts +0 -71
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js +0 -2
- package/dist/types.js.map +0 -1
- package/dist/x402.d.ts +0 -3
- package/dist/x402.d.ts.map +0 -1
- package/dist/x402.js +0 -61
- package/dist/x402.js.map +0 -1
|
@@ -1,151 +1,69 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: telegraph
|
|
3
|
-
description: Use Telegraph
|
|
3
|
+
description: Use the Telegraph network through its MCP server. Activate when the user wants live facts (crypto or stock prices, FX rates, weather, gas prices, TVL), web, news or academic search, or a specialist answer (security or code review, vulnerability triage, sanctions or compliance checks, fact checks) from Telegraph's ranked miners; when they ask which Telegraph intents, miners or rankings exist; or when they ask about their Telegraph escrow balance or paying in USDC. Requires the Telegraph MCP server; paid asks need the wallet from its `setup` command.
|
|
4
4
|
license: MIT
|
|
5
|
+
homepage: https://github.com/telegraphprotocol/telegraph-mcp
|
|
5
6
|
metadata:
|
|
6
|
-
version:
|
|
7
|
+
version: 2.0.0
|
|
7
8
|
homepage: https://github.com/telegraphprotocol/telegraph-mcp
|
|
8
9
|
documentation: https://docs.telegraphprotocol.com
|
|
9
|
-
keywords: [
|
|
10
|
+
keywords: [mcp, x402, escrow, usdc, miners, ranking, ai-agents, web3, agent-payments]
|
|
11
|
+
openclaw:
|
|
12
|
+
emoji: "📡"
|
|
13
|
+
requires:
|
|
14
|
+
config: ["mcp.servers.telegraph"]
|
|
10
15
|
---
|
|
11
16
|
|
|
12
|
-
# Telegraph
|
|
17
|
+
# Telegraph
|
|
13
18
|
|
|
14
|
-
Telegraph is a
|
|
19
|
+
Telegraph is a network of miners (APIs and models run by different people) that answer questions by intent. Every epoch the network checks each intent's miners and ranks them, and an ask goes to the best-ranked live miner. Asks are paid in USDC, usually $0.01.
|
|
15
20
|
|
|
16
|
-
|
|
21
|
+
## Tools
|
|
17
22
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
|
25
|
-
|
|
26
|
-
| `
|
|
27
|
-
| `
|
|
28
|
-
| `tg_node_status` | Node identity, public key, chain info |
|
|
29
|
-
| `tg_engine_list_subnets` | Engine's view of available miners with capabilities and cost |
|
|
30
|
-
| `tg_daemon_categories` | Signal categories in the Daemon database (POLITICS, CLIMATE, TECHNOLOGY, …) |
|
|
31
|
-
| `tg_daemon_questions` | Query the Daemon's stored signals — filterable by category, source, time, interest |
|
|
32
|
-
| `tg_daemon_health` | Daemon health check |
|
|
33
|
-
|
|
34
|
-
> The `subnet` in some tool names is legacy — every provider is a **miner** today, whether a Bittensor subnet, a hosted model, or a private API.
|
|
35
|
-
|
|
36
|
-
### Paid tools (x402 USDC per call)
|
|
37
|
-
|
|
38
|
-
| Tool | Purpose |
|
|
39
|
-
|------|---------|
|
|
40
|
-
| `tg_engine_ask` | Auto-routed inference — Engine's LLM router selects the best miner for your query |
|
|
41
|
-
| `tg_engine_ask_subnet` | Direct inference to a specific miner by ID |
|
|
42
|
-
| Dynamic tools (auto-discovered) | Per-miner tools generated from the live integration registry (see below) |
|
|
43
|
-
|
|
44
|
-
---
|
|
23
|
+
| Tool | Cost | Use it to |
|
|
24
|
+
|---|---|---|
|
|
25
|
+
| `telegraph_ask` | ~$0.01 | Ask a question. Optional `intent` and `params` make it exact |
|
|
26
|
+
| `telegraph_ask_miner` | that miner's price | Ask one miner the user chose, or call one of its endpoints directly |
|
|
27
|
+
| `telegraph_find_intents` | free | Find the intent for a kind of question |
|
|
28
|
+
| `telegraph_intent` | free | See an intent's kind, params, answer fields and top miners |
|
|
29
|
+
| `telegraph_find_miners` | free | List an intent's miners with rank, score and price, or search miners by words |
|
|
30
|
+
| `telegraph_ranking` | free | The latest ranking for an intent, or for all |
|
|
31
|
+
| `telegraph_account` | free | Wallet USDC and ETH, and the escrow balance |
|
|
32
|
+
| `telegraph_docs` | free | How payments, intents, ranking and errors work |
|
|
45
33
|
|
|
46
|
-
##
|
|
47
|
-
|
|
48
|
-
### 1. Auto-routed inference (recommended)
|
|
49
|
-
The Engine classifies your natural language query into an Intent and routes to the highest-ranked miner for that task:
|
|
50
|
-
|
|
51
|
-
```
|
|
52
|
-
tg_engine_ask(query="7-day weather forecast for Dubai")
|
|
53
|
-
tg_engine_ask(query="Is this image AI-generated?")
|
|
54
|
-
tg_engine_ask(query="Summarize the latest clinical trial results for GLP-1 drugs")
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
The response includes `routing.reasoning` — which subnet was chosen and why.
|
|
58
|
-
|
|
59
|
-
### 2. Direct miner inference
|
|
60
|
-
Route to a specific miner when you know exactly what you want:
|
|
61
|
-
|
|
62
|
-
```
|
|
63
|
-
tg_engine_ask_subnet(subnet_id="18", method="GET", endpoint="/predict", payload={lat: 25.2, lon: 55.3, variable: "hourly"})
|
|
64
|
-
tg_engine_ask_subnet(subnet_id="34", method="POST", endpoint="/", payload={image_url: "https://..."})
|
|
65
|
-
tg_engine_ask_subnet(subnet_id="102", method="POST", endpoint="/chat", payload={model: "gpt-4o-mini", messages: [...]})
|
|
66
|
-
```
|
|
34
|
+
## How to use it
|
|
67
35
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
# → live list of categories with current counts
|
|
74
|
-
|
|
75
|
-
tg_daemon_questions(category="CLIMATE", limit=10)
|
|
76
|
-
tg_daemon_questions(category="TECHNOLOGY", sort="interest", min_interest=5)
|
|
77
|
-
tg_daemon_questions(source="polymarket", since_hours=24)
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
### 4. Dynamic miner tools (auto-discovered)
|
|
81
|
-
On startup, the MCP server fetches the live integration registry and generates per-endpoint tools for every active miner. These update every 5 minutes without restart. The live set changes on-chain — treat the table below as a snapshot, not the source of truth:
|
|
82
|
-
|
|
83
|
-
| Tool (auto-generated) | Miner | Capability |
|
|
84
|
-
|-----------------------|-------|-----------|
|
|
85
|
-
| `tg_zeus_predict` | Zeus (18) | Weather forecast |
|
|
86
|
-
| `tg_itsai_text_detector_detect` | ItsAI (32) | AI text detection |
|
|
87
|
-
| `tg_sapling_ai_detector_detect` | Sapling (33) | AI content detection |
|
|
88
|
-
| `tg_bitmind_detect_image` | BitMind (34) | Deepfake image detection |
|
|
89
|
-
| `tg_bitmind_detect_video` | BitMind (34) | Deepfake video detection |
|
|
90
|
-
| `tg_openai_chat` | OpenAI (102) | LLM chat |
|
|
91
|
-
| `tg_openai_images_generate` | OpenAI (102) | Image generation |
|
|
92
|
-
| `tg_openai_embed` | OpenAI (102) | Text embeddings |
|
|
93
|
-
| `tg_openai_moderate` | OpenAI (102) | Content moderation |
|
|
94
|
-
|
|
95
|
-
Use `tg_node_list_subnets` to see the current live catalog with full schemas.
|
|
96
|
-
|
|
97
|
-
---
|
|
98
|
-
|
|
99
|
-
## Active Intents
|
|
100
|
-
|
|
101
|
-
The Engine's LLM router maps queries to canonical Intents:
|
|
102
|
-
|
|
103
|
-
| Category | Intents |
|
|
104
|
-
|----------|---------|
|
|
105
|
-
| Language | `LANGUAGE_GENERATION`, `CHAT_COMPLETION`, `TEXT_GENERATION`, `HIGH_PERFORMANCE_INFERENCE`, `EMBEDDINGS`, `CONTENT_MODERATION` |
|
|
106
|
-
| Weather | `WEATHER_CHECK`, `WEATHER_FORECAST`, `STORM_ALERT`, `WEATHER_RISK_ASSESSMENT` |
|
|
107
|
-
| Vision | `MULTIMODAL_INFERENCE`, `IMAGE_GENERATION`, `TEXT_TO_IMAGE` |
|
|
108
|
-
| Search | `WEB_SEARCH`, `TWITTER_SEARCH`, `NEWS_SEARCH`, `RESEARCH_SYNTHESIS`, `FACT_CHECK` |
|
|
109
|
-
| Authenticity | `DEEPFAKE_DETECTION`, `MEDIA_AUTHENTICITY_CHECK`, `AI_TEXT_DETECTION`, `TEXT_AUTHENTICITY_CHECK`, `IMAGE_VERIFICATION`, `VIDEO_VERIFICATION` |
|
|
110
|
-
| Tasks | `TASK_COMPLETION`, `AGENT_TASK` |
|
|
111
|
-
|
|
112
|
-
---
|
|
36
|
+
- **A plain question is enough**: `telegraph_ask(question="What is the BTC price in USD?")`. The node finds the intent and the miner.
|
|
37
|
+
- **To be exact**, find the intent and its params first, then ask with them:
|
|
38
|
+
`telegraph_find_intents(search="weather")` → `telegraph_intent(intent="WEATHER_CHECK_TEMPERATURE")` → `telegraph_ask(intent="WEATHER_CHECK_TEMPERATURE", params={"location": "Lahore"})`.
|
|
39
|
+
- The answer comes back in the intent's fields (`answer`), with the miner that answered and the payment receipt. Tell the user which miner answered.
|
|
40
|
+
- An intent with no ranking yet is answered by one of the miners that declare it. `telegraph_intent` says when that is the case.
|
|
113
41
|
|
|
114
42
|
## Payments
|
|
115
43
|
|
|
116
|
-
|
|
44
|
+
- **Escrow first**: if the wallet has a Telegraph escrow balance, each ask is signed against it and deducted at the epoch close. A failed ask is never billed.
|
|
45
|
+
- When escrow is low, the ask is refused with the balances; nothing is paid from the wallet. Tell the user to run `npx -y @telegraphprotocol/telegraph-protocol-mcp fund` in a terminal.
|
|
46
|
+
- `telegraph_account` shows the balances, limits and how to top up. Never ask the user for a private key.
|
|
47
|
+
- The private key stays in the MCP server's process. It never appears in tool inputs, outputs or model context.
|
|
117
48
|
|
|
118
|
-
|
|
119
|
-
- **Typical cost**: $0.01 – $0.05 per inference call
|
|
120
|
-
- **Pricing**: miner's floor price × demand multiplier (rises with 24h request volume for the Intent)
|
|
121
|
-
- **Use a burner wallet** — fund with only the USDC you need; never use a main wallet
|
|
49
|
+
## Errors
|
|
122
50
|
|
|
123
|
-
|
|
51
|
+
- **503 "could not route" or `no_compatible_miner`**: nothing was charged. Retry, or ask without the intent.
|
|
52
|
+
- **400 `invalid_params`**: check the params with `telegraph_intent`.
|
|
53
|
+
- **402**: escrow and wallet are both short. Check `telegraph_account`.
|
|
54
|
+
- **"Paying needs a wallet"**: the user hasn't run `npx -y @telegraphprotocol/telegraph-protocol-mcp setup` yet. The free tools still work.
|
|
124
55
|
|
|
125
56
|
## Setup
|
|
126
57
|
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
"telegraph": {
|
|
138
|
-
"command": "node",
|
|
139
|
-
"args": ["/path/to/Telegraph-MCP/dist/index.js"],
|
|
140
|
-
"env": {
|
|
141
|
-
"TELEGRAPH_NODE_URL": "http://13.237.89.59:7044",
|
|
142
|
-
"TELEGRAPH_ENGINE_URL": "http://13.237.89.59:8080",
|
|
143
|
-
"TELEGRAPH_DAEMON_URL": "http://13.237.89.59:8081",
|
|
144
|
-
"TELEGRAPH_EVM_PRIVATE_KEY": "0xyour_burner_wallet_key"
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
```
|
|
58
|
+
```json
|
|
59
|
+
{
|
|
60
|
+
"mcpServers": {
|
|
61
|
+
"telegraph": {
|
|
62
|
+
"command": "npx",
|
|
63
|
+
"args": ["-y", "@telegraphprotocol/telegraph-protocol-mcp"]
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
```
|
|
150
68
|
|
|
151
|
-
|
|
69
|
+
The default network is Telegraph beta 2 on Ethereum Sepolia (test USDC). On OpenClaw this skill gates on the `mcpServers.telegraph` config entry, so it stays dormant until the server is configured. Client guides: [README](https://github.com/telegraphprotocol/telegraph-mcp#readme).
|