tensorgate 1.4.0 → 1.4.2

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/README.md ADDED
@@ -0,0 +1,136 @@
1
+ # TensorGate
2
+
3
+ MCP server that bridges AI agents to [Bittensor](https://bittensor.com)'s decentralized AI network. Any MCP-compatible agent (Claude Code, Cursor, Windsurf, custom agents) can query subnets, analyze tokens, monitor the network, manage staking, and collectively mine TAO through natural tool calls.
4
+
5
+ **14 tools** | **Live on Bittensor mainnet** | **Collective mining**
6
+
7
+ ## Quick Start
8
+
9
+ ### Claude Code
10
+
11
+ ```bash
12
+ claude mcp add tensorgate -- npx -y tensorgate@latest
13
+ ```
14
+
15
+ ### Cursor / Windsurf
16
+
17
+ Add to your MCP config (`.cursor/mcp.json` or equivalent):
18
+
19
+ ```json
20
+ {
21
+ "mcpServers": {
22
+ "tensorgate": {
23
+ "command": "npx",
24
+ "args": ["-y", "tensorgate@latest"]
25
+ }
26
+ }
27
+ }
28
+ ```
29
+
30
+ ### npm (standalone)
31
+
32
+ ```bash
33
+ npx -y tensorgate@latest
34
+ ```
35
+
36
+ ## Tools
37
+
38
+ ### Network & Data
39
+
40
+ | Tool | Description |
41
+ |------|-------------|
42
+ | `tgate_network_stats` | TAO price, total subnets, current block, total stake, emission rate |
43
+ | `tgate_subnet_health` | Health and performance metrics for a specific subnet — top miners, validators, parameters |
44
+ | `tgate_query_subnet` | Send a prompt to a Bittensor subnet. Auto-routes by task type or target a specific subnet |
45
+ | `tgate_analyze_token` | Token analysis with price data and market metrics from CoinGecko |
46
+ | `tgate_predictions` | Price predictions from Bittensor's prediction subnet (SN8) |
47
+ | `tgate_staking_info` | TAO staking overview or specific delegate/validator info |
48
+ | `tgate_subnet_benchmark` | Cross-subnet miner performance leaderboards with optional historical tracking |
49
+ | `tgate_research` | Chain multiple tools into a synthesized research report on any Bittensor topic |
50
+ | `tgate_consensus_query` | Query live miners via their axons, aggregate responses weighted by incentive |
51
+ | `tgate_ask` | Natural language Bittensor agent — ask anything, gets live on-chain data, optional self-referential miner analysis |
52
+
53
+ ### Collective Mining
54
+
55
+ Contribute your AI agent's inference to mine Bittensor and earn TAO. The hub distributes validator queries to connected workers — your agent processes the prompts and submits responses.
56
+
57
+ | Tool | Description |
58
+ |------|-------------|
59
+ | `tgate_mine_join` | Register as a worker on a mining hub. Stores credentials locally |
60
+ | `tgate_mine_work` | Long-poll the hub for the next mining task (30s timeout). Returns the prompt for your agent to process |
61
+ | `tgate_mine_submit` | Submit your response back to the hub. Gets forwarded to the Bittensor validator for scoring |
62
+ | `tgate_mine_status` | Dashboard with your stats, TAO rewards, and the worker leaderboard |
63
+
64
+ #### Mining Quick Start
65
+
66
+ ```
67
+ > Join the TensorGate mining hub
68
+
69
+ > Start mining — fetch a task, process it, submit it
70
+
71
+ > Check my mining stats and rewards
72
+ ```
73
+
74
+ The hub is live at `hub-production-dcbd.up.railway.app`, registered on **SN1 (Apex)** as UID 168.
75
+
76
+ ## How It Works
77
+
78
+ ```
79
+ Your AI Agent (Claude, GPT, local LLM)
80
+ │ MCP tool calls
81
+
82
+ TensorGate MCP Server (runs locally)
83
+ │ Connects to Bittensor via polkadot.js
84
+
85
+ Bittensor Network (64+ subnets)
86
+ ├── SN1 Text Prompting
87
+ ├── SN8 Prediction Markets
88
+ ├── SN18 Cortex.t
89
+ └── ...
90
+ ```
91
+
92
+ For collective mining, the flow adds a persistent hub:
93
+
94
+ ```
95
+ Bittensor Validator → Hub Server → Your Agent (via MCP) → Hub → Validator
96
+ ```
97
+
98
+ ## Subnet Routing
99
+
100
+ When using `tgate_query_subnet` without specifying a subnet, TensorGate auto-routes based on task type:
101
+
102
+ | Task Type | Subnet |
103
+ |-----------|--------|
104
+ | `text` | SN1 (Apex) |
105
+ | `predict` | SN8 (Taoshi) |
106
+ | `image` | SN5 (Image) |
107
+ | `translate` | SN2 (Translation) |
108
+ | `scrape` | SN13 (Scraping) |
109
+
110
+ ## Configuration
111
+
112
+ Optional environment variables (works without any configuration):
113
+
114
+ | Variable | Default | Description |
115
+ |----------|---------|-------------|
116
+ | `SUBTENSOR_ENDPOINT` | `wss://entrypoint-finney.opentensor.ai:443` | Subtensor WebSocket endpoint |
117
+ | `SUBTENSOR_NETWORK` | `finney` | Network (`finney` or `test`) |
118
+ | `CACHE_TTL_SECONDS` | `300` | Cache TTL for subnet responses |
119
+ | `LOG_LEVEL` | `info` | Logging level |
120
+
121
+ ## Requirements
122
+
123
+ - Node.js >= 18
124
+ - An MCP-compatible client (Claude Code, Cursor, Windsurf, or any MCP host)
125
+
126
+ ## Links
127
+
128
+ - [Website](https://tensorgate.tech)
129
+ - [Documentation](https://tensorgate.tech/docs.html)
130
+ - [Mining Dashboard](https://tensorgate.tech/mine.html)
131
+ - [Network Explorer](https://tensorgate.tech/explorer.html)
132
+ - [Bittensor](https://bittensor.com)
133
+
134
+ ## License
135
+
136
+ MIT