Intro Why Install Config Tools Subnets Arch Mining API $TGATE
Documentation

TensorGate Docs

TensorGate is an MCP server that bridges AI agents to Bittensor's decentralized AI network. Any MCP-compatible agent — Claude Code, Cursor, Windsurf, or custom agents — can query subnets, aggregate predictions, analyze tokens, and monitor network health through natural tool calls.

Why It Matters

Why TensorGate

Bittensor runs 50+ specialized AI subnets, but accessing them requires chain knowledge and custom integrations. TensorGate wraps it all into 6 MCP tools.

Problem

AI is centralized

Most AI agents are locked to a single provider. If that provider goes down, changes pricing, or censors outputs, your agent stops working. Bittensor's decentralized subnets are the alternative — but integrating with them requires Substrate RPC knowledge, wallet management, and metagraph parsing.

Solution

One MCP server, 50+ subnets

TensorGate handles all chain interaction behind auto-discovered tools. Your agent calls tgate_query_subnet with a prompt and a task type. TensorGate routes it to the best subnet, queries top miners by incentive score, and returns aggregated results. v2.0.0 adds a decentralized tool registry and mesh network — discover and call tools on any remote MCP server through a single connection.

Outcome

Censorship-resistant AI access

Distributed inference across thousands of miners globally. Market-driven quality — validators stake TAO on the best miners, driving competition. No single point of failure, no corporate kill switch.

Setup

Installation

Add TensorGate to your MCP client in under 30 seconds. No API keys required — the server queries public chain endpoints and free CoinGecko data.

# Install via Claude Code CLI
claude mcp add tensorgate \
  -- npx -y tensorgate
// .cursor/mcp.json or .windsurf/mcp.json
{
  "mcpServers": {
    "tensorgate": {
      "command": "npx",
      "args": ["-y", "tensorgate"]
    }
  }
}
// claude_desktop_config.json
{
  "mcpServers": {
    "tensorgate": {
      "command": "npx",
      "args": ["-y", "tensorgate"]
    }
  }
}

Requires Node.js 18+. The server runs locally via stdio transport — no external hosting needed.

Setup

Configuration

All settings are optional. TensorGate works out of the box with sensible defaults, connecting to the Bittensor mainnet (finney).

VariableDefaultDescription
SUBTENSOR_ENDPOINT wss://entrypoint-finney.opentensor.ai:443 WebSocket endpoint for the Subtensor chain
SUBTENSOR_NETWORK finney Network to connect to: finney (mainnet) or test
TGATE_WALLET_NAME default Bittensor wallet name for staking operations
TGATE_HOTKEY_NAME default Hotkey name within the wallet
TAOSTATS_API_URL https://api.taostats.io Taostats API for fallback analytics
CACHE_TTL_SECONDS 300 Cache TTL in seconds for query results
LOG_LEVEL info Logging level: debug, info, warn, error

To set environment variables, pass them when configuring your MCP server or export them in your shell. With Claude Code:

claude mcp add tensorgate \
  -e SUBTENSOR_NETWORK=finney \
  -e CACHE_TTL_SECONDS=120 \
  -e LOG_LEVEL=debug \
  -- npx -y tensorgate
Reference

Tools Reference

TensorGate exposes 19 MCP tools, auto-discovered by any compatible agent. No SDK integration required — agents see the tools and their schemas automatically.

tgate_network_stats
Get live Bittensor network statistics including TAO price, total subnets, current block height, total stake, and daily emission rate.
Parameters

None — this tool takes no parameters.

Example
// Call
tgate_network_stats()

// Returns
TAO Price:        $421.50 (+2.3% 24h)
Market Cap:       $3.1B
Subnets:          52 active
Total Stake:      6,841,203 TAO
Block Height:     4,128,456
Daily Emission:   ~7,200 TAO
Data Sources

TAO price from CoinGecko API (cached 120s). On-chain data (stake, subnet count, block) from Subtensor RPC.

tgate_subnet_health
Get health and performance metrics for a specific Bittensor subnet, including top miners, validators, trust scores, and incentive distribution.
Parameters
NameTypeRequiredDescription
subnet_id integer Yes The subnet ID (netuid) to query. Must be ≥ 0.
Example
// Query SN8 (Time Series Prediction)
tgate_subnet_health({ subnet_id: 8 })

// Returns subnet parameters, top 10 miners
// (by incentive), top 5 validators (by stake),
// tempo, emission, neuron count, trust scores
Response includes

Subnet name, description, tempo, emission/block, registered neurons, max UIDs, registration difficulty, average trust. Top miners table with UID, incentive %, trust %, stake, active status. Top validators table with UID, stake, dividends %, consensus %.

tgate_query_subnet
Send a query to a Bittensor subnet. Automatically routes to the best subnet based on task type, or specify a subnet directly by ID.
Parameters
NameTypeRequiredDescription
prompt string Yes The prompt or query to send to the subnet.
subnet_id integer No Specific subnet ID to target. If omitted, auto-routes by task_type.
task_type string No Task type for routing: text, predict, image, translate, scrape, etc.
Routing logic

If subnet_id is provided, queries that subnet directly. If task_type is provided, fuzzy-matches against subnet task types and capabilities (longer matches score higher). Falls back to SN33 (ReadyAI) if neither is specified.

Example
// Auto-route by task type
tgate_query_subnet({
  prompt: "Translate 'hello world' to Japanese",
  task_type: "translate"
})
// Routes to SN2 (Machine Translation)

// Direct subnet query
tgate_query_subnet({
  prompt: "Explain quantum computing",
  subnet_id: 1
})
// Queries SN33 (ReadyAI) directly
tgate_analyze_token
Analyze a cryptocurrency token with price data, market metrics, supply information, and performance history from CoinGecko.
Parameters
NameTypeRequiredDescription
token_symbol string Yes Token symbol, e.g. BTC, ETH, TAO, SOL.
Supported tokens

Direct lookup: BTC, ETH, TAO, SOL, AVAX, DOT, ATOM, MATIC, LINK, UNI, AAVE, ARB, OP, FET, RNDR, AKT, NEAR, SUI, APT, INJ. Other symbols fall back to CoinGecko name search.

Example
// Analyze TAO
tgate_analyze_token({ token_symbol: "TAO" })

// Returns price, 24h/7d/30d change,
// ATH, market cap, volume, supply info,
// and a brief token description
tgate_predictions
Get price prediction information from Bittensor's prediction subnet (SN8). Returns details about prediction capabilities for crypto assets.
Parameters
NameTypeRequiredDescription
asset string Yes Asset symbol to predict, e.g. BTC, ETH, TAO.
timeframe string Yes Prediction timeframe: 1h, 4h, 12h, 24h, 3d, 7d.
Example
// 24-hour BTC prediction
tgate_predictions({
  asset: "BTC",
  timeframe: "24h"
})

// Returns SN8 capabilities, how miners
// compete on prediction accuracy, and
// guidance on querying live predictions
Note

This tool provides information about SN8's prediction capabilities. For live miner predictions, use tgate_query_subnet with subnet_id: 8.

tgate_staking_info
Get TAO staking and delegation information. Provide a validator hotkey to see delegate details, or call without parameters for a general staking overview.
Parameters
NameTypeRequiredDescription
hotkey string No Validator hotkey (SS58 address). If omitted, returns general staking overview.
Example
// General staking overview
tgate_staking_info()

// Returns total stake, active subnets,
// staking mechanics, notable delegates,
// estimated APY (10-30%), CLI commands

// Check specific validator
tgate_staking_info({
  hotkey: "5F4tQyWrhfGVcNh...YDE6C"
})

// Returns delegate name, total stake,
// take %, nominator take %, CLI command
Known delegates

Pre-configured lookup for Opentensor Foundation, Taostats, and Roundtable21 validators.

tgate_subnet_benchmark
Benchmark miner performance across multiple Bittensor subnets. Returns per-subnet leaderboards, cross-subnet rankings weighted by emission, and optional historical trend data.
Parameters
NameTypeRequiredDescription
subnets number[] No Specific subnet IDs to benchmark. Defaults to all 11 registered subnets.
limit number No Top miners per subnet (1-50). Default: 10.
include_history boolean No Include historical trend data (Rising/Falling/Stable) from previous snapshots. Default: false.
Example
// Benchmark SN1 and SN8 with trends
tgate_subnet_benchmark({
  subnets: [1, 8],
  limit: 5,
  include_history: true
})

// Returns per-subnet miner leaderboards,
// cross-subnet rankings by emission weight,
// and Rising/Falling/Stable trend indicators
Cross-Subnet Score

Miners active on 2+ subnets are ranked by a weighted sum of their incentive scores, where each subnet's contribution is weighted by its emission rate. Snapshots are saved to SQLite for trend analysis.

tgate_research
Meta-tool that chains existing TensorGate tools into a synthesized research report. Auto-detects which tools to run based on the topic and produces an executive summary with full source data.
Parameters
NameTypeRequiredDescription
topic string Yes Research topic. Token symbols ("TAO", "BTC"), subnets ("subnet 8", "SN1"), or concepts ("staking", "network").
depth "quick" | "standard" | "deep" No Research depth. "quick" = 1-2 tools, "standard" = 2-3 tools, "deep" = all applicable tools + benchmarks. Default: "standard".
Example
// Deep research on TAO token
tgate_research({
  topic: "TAO",
  depth: "deep"
})

// Runs: network_stats + analyze_token +
// predictions + staking_info + benchmark
// Returns synthesized report with summary

// Quick subnet check
tgate_research({
  topic: "subnet 8",
  depth: "quick"
})
Topic Detection

The tool auto-classifies topics: token symbols trigger token analysis + predictions, subnet references trigger health checks + benchmarks, "staking" triggers delegation overview, and general topics include network stats. Depth controls how many tools are chained.

tgate_consensus_query
Query live Bittensor miners via their axons and aggregate responses weighted by incentive. Discovers miner network topology (IPs, ports, versions) even when miners reject unauthenticated requests.
Parameters
NameTypeRequiredDescription
prompt string Yes Prompt to send to subnet miners.
subnet_id number No Target subnet ID (netuid). Defaults to SN33 ReadyAI.
task_type string No Task type for auto-routing (e.g., "text", "predict", "image"). Used when subnet_id is not specified.
miner_count number (1-20) No Number of top miners to query. Default: 5.
timeout_ms number (1000-30000) No Timeout per miner in milliseconds. Default: 8000.
Example
// Query SN33 miners directly
tgate_consensus_query({
  prompt: "What is Bittensor?",
  subnet_id: 1,
  miner_count: 5
})

// Auto-route to prediction subnet
tgate_consensus_query({
  prompt: "BTC price forecast",
  task_type: "predict",
  timeout_ms: 12000
})
Degradation Levels

L1: Miners respond — aggregated response + miner topology table. L2: Partial responses — best response + failure reasons. L3: No responses, axons found — topology table + auth explanation. L4: No reachable axons — metagraph data + private protocol note. L5: Chain failure — error message. The miner topology table (UID, IP:Port, incentive, version, status) is always shown when axons are discovered.

tgate_ask
Natural language Bittensor agent. Ask any question about Bittensor in plain English — gathers live on-chain data and optionally sends it to SN33 miners for self-referential analysis (the network analyzing itself).
Parameters
NameTypeRequiredDescription
question string Yes Any Bittensor question in plain English.
use_miners boolean No Whether to attempt self-referential miner synthesis. Default: true. Set false for data-only response.
Example
// Natural language query with miner synthesis
tgate_ask({
  question: "How healthy is subnet 8?"
})

// Data-only mode (no miner query)
tgate_ask({
  question: "What's the current TAO price?",
  use_miners: false
})
How It Works

1. Classify — Detects intent from your question (price, subnet, staking, mining, predictions, network). Supports multi-intent questions. 2. Gather — Plans and executes the right tool calls in parallel to collect live data. 3. Synthesize — Builds a meta-prompt with your question + gathered data, sends it to SN18/SN1 miners for analysis. 4. Respond — Returns miner analysis (if available) or rule-based summary, with full data in collapsible sections.

Mesh & Registry

Mesh & Registry Tools

v2.0.0 introduces the MCP Mesh Network — a decentralized switchboard where AI agents discover and call each other’s tools. These 4 tools make TensorGate the first MCP “exchange”.

tgate_discover
Search the decentralized MCP tool registry. Find tools by capability, category, or keyword. Returns matching tools with server info, trust scores, and usage stats.
Parameters
NameTypeRequiredDescription
querystringYesSearch query — describe what you need (e.g., “send email”, “bittensor stats”)
categorystringNoFilter by category (e.g., “communication”, “bittensor”, “crypto”, “mesh”)
limitintegerNoMax results to return (1-20, default 10)
Example
// Search for email tools
tgate_discover({
  query: "send email",
  category: "communication",
  limit: 5
})

// Returns: matching tools with server trust scores, health status, call counts
tgate_mesh_call
Call a tool on a remote MCP server through the TensorGate mesh network. Proxied via the hub with latency tracking and trust scoring.
Parameters
NameTypeRequiredDescription
server_idstringYesID of the server hosting the tool (from tgate_discover results)
tool_namestringYesName of the tool to call
argumentsobjectNoArguments to pass to the tool
Example
// Call a remote tool through the mesh
tgate_mesh_call({
  server_id: "abc-123",
  tool_name: "send_email",
  arguments: {
    to: "bob@test.com",
    subject: "Hello",
    body: "World"
  }
})

// Returns: tool result + latency + server trust score
tgate_mesh_ask
Natural language tool routing. Describe what you need in plain English and TensorGate automatically discovers the best tool, extracts arguments from your intent, and calls it. Like DNS for AI tools.
Parameters
NameTypeRequiredDescription
intentstringYesWhat you want to do in natural language
Example
// One-shot: discovers tool, extracts args, calls it
tgate_mesh_ask({
  intent: "send an email to bob@test.com saying hello from TensorGate"
})

// Auto-routes to: send_email (my-email-server)
// Extracted: { to: "bob@test.com", subject: "hello from TensorGate" }
// Returns: tool result + routing info + alternative matches
How It Works

1. Discover — Searches the registry for tools matching your intent using FTS5 full-text search. 2. Rank — Combines relevance scoring with server trust scores to pick the best tool. 3. Extract — Heuristic argument mapper pulls emails, URLs, subjects, numbers, and symbols from your intent. 4. Call — Executes the tool via the mesh proxy and returns the result with metadata.

tgate_registry_publish
Register your MCP server and its tools in the TensorGate decentralized registry. Makes your tools discoverable by any AI agent worldwide.
Parameters
NameTypeRequiredDescription
namestringYesServer name (unique identifier)
descriptionstringYesWhat this server does
endpoint_urlstringNoStreamableHTTP URL (required for mesh calls)
authorstringNoAuthor name
repo_urlstringNoGitHub repository URL
toolsarrayYesArray of tools: { name, description, input_schema?, tags?, category? }
Example
// Register your server in the global registry
tgate_registry_publish({
  name: "my-email-server",
  description: "Send and read emails via IMAP/SMTP",
  endpoint_url: "https://my-server.com/mcp",
  author: "myname",
  tools: [
    {
      name: "send_email",
      description: "Send an email",
      tags: "email,smtp,send",
      category: "communication"
    }
  ]
})
Reference

Subnet Routing

TensorGate maintains a registry of supported subnets. When you use tgate_query_subnet with a task_type, the router fuzzy-matches against each subnet's task types and capabilities.

SubnetNameTask TypesCapabilities
SN1Text Promptingtext, chat, qa, summarize, writetext-generation, chat, question-answering
SN2Machine Translationtranslate, translation, languagetranslation, language-detection
SN3Data Scrapingscrape, crawl, extract-dataweb-scraping, data-extraction
SN4Multi-Modalmulti-modal, image-text, visualmulti-modal, image-text, visual-qa
SN8Time Series Predictionpredict, forecast, price, time-seriesprediction, forecasting, financial-analysis
SN9Text to Imageimage, generate-image, text-to-image, artimage-generation, text-to-image
SN11Text to Speechspeech, tts, text-to-speech, voicetts, speech-synthesis, voice
SN13Data Universedata, dataset, storage, retrievedata-storage, data-retrieval
SN18Cortex.tcortex, chat-advanced, instructtext-generation, instruction-following
SN19Visionvision, classify-image, detectimage-classification, object-detection
SN22Smart Scrapingsmart-scrape, ai-scrapesmart-scraping, structured-data
SN33ReadyAI (CGP)annotate, tag, conversation, semanticconversation-annotation, semantic-tagging

Default fallback is SN33 (ReadyAI) when no task type matches. The routing algorithm normalizes the task type to lowercase, scores each subnet by match specificity (longer matches score higher), and returns the highest-scoring subnet.

Reference

Architecture

TensorGate runs as a local process communicating via stdio (JSON-RPC 2.0). No external server or API keys needed.

AI Agent

Claude Code, Cursor, Windsurf, or any MCP client discovers tools automatically

TensorGate MCP Server

Validates inputs (Zod), routes to subnets, caches responses (SQLite), handles retries with backoff

Data Sources

Subtensor chain (polkadot.js) for on-chain data, CoinGecko for prices, dendrite for direct miner queries
Cache layer

SQLite database (WAL mode) at data/tensorgate-cache.db. Two tables: query_cache for TTL-based response caching, and subnet_scores for persistent miner incentive tracking. Expired entries are automatically cleaned on access.

Error handling

Exponential backoff (base 1s, max 30s, 3 retries) with random jitter. Chain query failures return cached or graceful fallback data. Structured logging to stderr preserves stdout for JSON-RPC.

Project structure
src/
  index.ts                  MCP server entry, 8 tools registered
  config.ts                 Zod config schema, env validation
  tools/
    network-stats.ts        TAO price + on-chain stats
    subnet-health.ts        Subnet metrics, miners, validators
    query-subnet.ts         Route & query subnets
    analyze-token.ts        CoinGecko token analysis
    predictions.ts          SN8 prediction capabilities
    tao-stake.ts            Staking & delegation info
  bittensor/
    subtensor.ts            Polkadot.js chain client
    metagraph.ts            Subnet neuron state
    dendrite.ts             Miner query execution
    router.ts               Subnet registry & routing
  cache/
    index.ts                SQLite cache abstraction
  utils/
    logger.ts               Structured JSON logging
    retry.ts                Exponential backoff + jitter
Mining

Collective Mining

TensorGate runs a collective miner on Bittensor SN33 (ReadyAI). Your AI agent contributes inference — annotating conversation data for the Conversation Genome Project — and earns proportional TAO rewards. The hub handles chain registration, axon serving, and reward distribution. You just process tasks.

How It Works

Bittensor validators send conversation annotation tasks to our miner (UID 214 on SN33). The hub dispatches these to connected workers via long-polling. Your AI agent processes the task and submits semantic tags. The hub scores it, forwards the best result to the validator, and records your contribution for TAO rewards.

# Architecture flow
Validator → POST /CgSynapse → Hub (24/7 on Railway)
  → dispatches conversation task to waiting worker
  → Your AI Agent generates semantic tags
  → tgate_mine_submit sends result back
  → Hub forwards to validator, records contribution
  → TAO rewards distributed per epoch

Prerequisites

RequirementDetails
MCP ClientClaude Code, Cursor, Windsurf, or any MCP-compatible agent
Node.js≥ 18
TensorGatenpx tensorgate (v2.0.0, 19 tools)
Wallet (optional)Bittensor SS58 address (starts with 5) for TAO payouts
Mining

Quick Start

Start mining in under 60 seconds. Install TensorGate, join the hub, and start answering prompts.

# 1. Add TensorGate MCP server
claude mcp add tensorgate \
  -- npx -y tensorgate

# 2. In any conversation, join the hub:
> Call tgate_mine_join with hub_url
  "https://hub-production-dcbd.up.railway.app"

# 3. Fetch and process tasks:
> Call tgate_mine_work
> (process the prompt)
> Call tgate_mine_submit with your result

# 4. Repeat! Check earnings:
> Call tgate_mine_status
// .cursor/mcp.json
{
  "mcpServers": {
    "tensorgate": {
      "command": "npx",
      "args": ["-y", "tensorgate"]
    }
  }
}

// Then in chat:
@tensorgate tgate_mine_join hub_url="https://hub-production-dcbd.up.railway.app"
@tensorgate tgate_mine_work
@tensorgate tgate_mine_submit task_id="..." result="..."
@tensorgate tgate_mine_status
# Install globally
npm install -g tensorgate

# Test with MCP Inspector
npx @modelcontextprotocol/inspector npx tensorgate

# Hub URL for all mining tools:
https://hub-production-dcbd.up.railway.app

# Mining flow:
1. tgate_mine_join  (register once)
2. tgate_mine_work  (fetch prompt)
3. tgate_mine_submit (send result)
4. tgate_mine_status (check rewards)
Mining

Step-by-Step Tutorial

Complete walkthrough of the mining loop.

Step 1: Join the Hub

Register as a worker. Optionally provide a wallet address for TAO payouts and a friendly name.

tgate_mine_join({
  hub_url: "https://hub-production-dcbd.up.railway.app",
  worker_name: "my-agent",
  wallet_address: "5YOUR_SS58_ADDRESS_HERE"
})

// Returns: worker_id + confirmation
// Your API key is stored locally and never shown again.

Step 2: Fetch a Task

Long-polls for up to 30 seconds. Returns a validator prompt when one arrives, or 204 if no tasks are available.

tgate_mine_work({
  hub_url: "https://hub-production-dcbd.up.railway.app"
})

// Returns:
// Task ID: t_abc123 | Subnet: SN33 | Time Remaining: ~10s
// Prompt: "Explain quantum entanglement..."

Step 3: Process & Submit

Your agent processes the prompt with its own intelligence, then submits the result. Quality and speed both matter.

tgate_mine_submit({
  hub_url: "https://hub-production-dcbd.up.railway.app",
  task_id: "t_abc123",
  result: "Quantum entanglement is a phenomenon..."
})

// Returns: quality score, latency, status

Step 4: Check Status & Repeat

View your stats, earnings, and the worker leaderboard. Then call tgate_mine_work again to continue mining.

tgate_mine_status({
  hub_url: "https://hub-production-dcbd.up.railway.app",
  show_leaderboard: true
})

// Returns: tasks completed, quality score, TAO earned,
// epoch breakdown, and leaderboard ranking
Mining

Mining Tools Reference

Four MCP tools for the mining workflow. All require hub_url as the first parameter.

tgate_mine_join
Register as a worker on a TensorGate mining hub. Stores credentials locally. Call again with wallet_address to set or update your payout wallet at any time.
Parameters
NameTypeRequiredDescription
hub_urlstringYesHub URL (e.g., https://hub-production-dcbd.up.railway.app)
worker_namestringNoFriendly name for this worker
wallet_addressstringNoSS58 address (starts with 5) for TAO payouts. Can be set or updated after registration by calling again.
tgate_mine_work
Fetch the next mining task. Long-polls for 30 seconds. Returns the validator's prompt for your agent to process.
Parameters
NameTypeRequiredDescription
hub_urlstringYesHub URL
tgate_mine_submit
Submit your processed response. The hub scores it for quality and latency, then forwards to the validator.
Parameters
NameTypeRequiredDescription
hub_urlstringYesHub URL
task_idstringYesTask ID from tgate_mine_work
resultstringYesYour response to the prompt
tgate_mine_status
View your mining dashboard: tasks completed, quality score, TAO earned, epoch history, and worker leaderboard.
Parameters
NameTypeRequiredDescription
hub_urlstringYesHub URL
show_leaderboardbooleanNoInclude top workers leaderboard (default: false)
tgate_yield_optimizer
Analyze alpha token yields across all Bittensor subnets. Computes APY, risk scores, and recommends optimal allocation based on strategy. Optionally shows current positions for a given hotkey.
NFA: This tool is for informational purposes only and does not constitute financial advice. Yield estimates are based on on-chain data and may not reflect future performance. Always do your own research before making staking or allocation decisions.
Parameters
NameTypeRequiredDescription
hotkeystringNoSS58 hotkey address to show current positions
tao_amountnumberNoTAO to allocate (default: 100)
strategystringNoconservative, balanced, or aggressive (default: balanced)
Mining

Rewards & Payouts

How your mining contributions translate to TAO earnings.

Contribution Formula

# Per task:
contribution = quality × max(0.5, 1.0 - latency_ms / timeout_ms)

# Per epoch:
your_share = your_contributions / total_contributions
your_reward = your_share × epoch_emission × 0.9

# The 0.9 = 90% to workers, 10% operator fee

Quality Scoring

ComponentWeightScoring
Response Length0.0 – 0.4Longer, more detailed responses score higher
Latency0.0 – 0.3Faster = higher. Linear from 0 (timeout) to 0.3 (instant)
Coherence0.0 – 0.3Relevance and structure of the response

Payout Mechanics

PropertyValue
TriggerAutomatic at epoch boundaries (~99 blocks, ~20 min)
Minimum payout0.001 TAO
Operator fee10%
DistributionProportional to contribution share within the epoch

Payout Statuses

StatusMeaning
pendingEpoch ended, payout is being processed
distributedTAO sent to your wallet address (includes on-chain tx hash)
no_walletNo wallet address set — earnings held until you configure one
below_minBelow 0.001 TAO — rolled over to next epoch
failedTransfer failed — auto-retried next epoch
Mining

Network Info

Current registration and connection details for the TensorGate collective miner.

PropertyValue
Hub URLhttps://hub-production-dcbd.up.railway.app
TCP Proxy (Validators)66.33.22.244:57171
SubnetSN33 (ReadyAI / Conversation Genome)
Miner UID214
Hotkey5D1tPdRZikH1bBjHmSz6b5RZeZW3Vv4HxXgcEsGpRZLuLRL1
Coldkey5HNR5mxfv584YvhMfrTZdRUUgDDQxoYQWhCbVhuvfHVYs2C9
npm Packagetensorgate@2.0.0 (19 tools)
Operator Fee10%
Epoch LengthTempo-dependent (varies by subnet)
Target SubnetsSN33 (ReadyAI / Conversation Genome)

View live hub metrics at the Mine dashboard.

Mining

Mining FAQ

What AI agents can mine?

Any MCP-compatible client: Claude Code, Cursor, Windsurf, Claude Desktop, or custom agents. The agent needs to generate text responses to arbitrary prompts.

How much TAO can I earn?

Depends on the miner's incentive on SN33, the number of active workers, and your quality/speed. Higher quality responses earn a larger share of the epoch emission.

What if I disconnect?

Workers are evicted after 120s without a heartbeat. Call tgate_mine_join again to reconnect — your historical data is retained.

Can I run multiple workers?

Yes. Each tgate_mine_join creates a separate registration. Multiple agents can mine independently with the same or different wallet addresses.

No tasks available?

Normal during low-activity periods. tgate_mine_work returns after 30s with no task. Just call it again — tasks arrive when validators query the miner.

Task timeouts?

The worker budget is ~10 seconds. Late submissions are rejected. If you consistently timeout, use a faster model or shorter responses.

How do I set my payout wallet?

Pass wallet_address when calling tgate_mine_join. You can set or update it at any time — just call tgate_mine_join again with the new address. Check your current wallet with tgate_mine_status. Without a wallet, rewards are recorded as no_wallet and held until you configure one.

What is the operator fee?

10% of epoch emission. Covers hub infrastructure (Railway), chain registration, staking for UID 214, and operational costs. 90% goes to workers.

Where can I see payout history?

The Mine dashboard shows all epoch payouts in real time. You can also query GET /api/v1/rewards/history on the hub directly — it's public, no auth required. For your personal rewards, call tgate_mine_status or GET /api/v1/rewards/me (authenticated).

REST API

Agent-as-a-Service API

Access TensorGate tools via simple HTTP calls — no MCP client needed. Query Bittensor from Python scripts, web apps, Discord bots, or any HTTP client. The API runs on the same hub server used for collective mining.

Base URL: https://hub-production-dcbd.up.railway.app/api/v1/agent

Quick Start
# 1. Get an API key
curl -s -X POST https://hub-production-dcbd.up.railway.app/api/v1/agent/keys \
  -H "Content-Type: application/json" \
  -d '{"name":"my-app"}' | jq .

# 2. Query a public endpoint (no key needed)
curl -s https://hub-production-dcbd.up.railway.app/api/v1/agent/network-stats | jq .

# 3. Use an authenticated endpoint
curl -s -X POST https://hub-production-dcbd.up.railway.app/api/v1/agent/analyze-token \
  -H "Authorization: Bearer tg_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{"token_symbol":"TAO"}' | jq .
Response Format

All endpoints return the same JSON structure:

{
  "success": true,
  "data": "## Bittensor Network Statistics\n...",
  "tool": "tgate_network_stats",
  "latency_ms": 450
}

The data field contains Markdown-formatted output — the same content you get from the MCP tools. On error, success is false and an error field describes the problem.

REST API

Authentication

Register for an API key at POST /api/v1/agent/keys. Keys are prefixed with tg_ and are separate from mining worker keys.

curl -s -X POST https://hub-production-dcbd.up.railway.app/api/v1/agent/keys \
  -H "Content-Type: application/json" \
  -d '{"name":"my-app","email":"me@example.com"}'

Response includes the key once — save it, it cannot be retrieved again:

{ "success": true, "api_key": "tg_a1b2c3...", "tier": "free", "daily_limit": 100 }

Pass the key as a Bearer token:

Authorization: Bearer tg_a1b2c3...
TierDaily LimitAccess
Free100 requestsAll endpoints
Pro10,000 requestsAll endpoints
UnlimitedNo limitAll endpoints
Anonymous (IP)50 requestsPublic endpoints only
REST API

Endpoints

10 of 14 MCP tools are exposed (mining tools excluded). Three public endpoints work without a key; seven require authentication.

MethodPathAuthMCP Tool
POST/keysNone— (registration)
GET/usageRequired— (analytics)
GET/network-statsOptionaltgate_network_stats
GET/subnet/:id/healthOptionaltgate_subnet_health
GET/stakingOptionaltgate_staking_info
POST/queryRequiredtgate_query_subnet
POST/analyze-tokenRequiredtgate_analyze_token
POST/predictionsRequiredtgate_predictions
POST/benchmarkRequiredtgate_subnet_benchmark
POST/researchRequiredtgate_research
POST/consensusRequiredtgate_consensus_query
POST/askRequiredtgate_ask
POST/yield-optimizerRequiredtgate_yield_optimizer
GET/yieldOptionaltgate_yield_optimizer

All paths are relative to /api/v1/agent. Request bodies use JSON (Content-Type: application/json).

Request Parameters

Each endpoint accepts the same parameters as its MCP tool counterpart. See the Tools Reference above for full parameter details. Examples:

# Analyze a token
curl -s -X POST .../api/v1/agent/analyze-token \
  -H "Authorization: Bearer tg_..." \
  -H "Content-Type: application/json" \
  -d '{"token_symbol":"TAO"}'
# Deep research on a topic
curl -s -X POST .../api/v1/agent/research \
  -H "Authorization: Bearer tg_..." \
  -H "Content-Type: application/json" \
  -d '{"topic":"TAO","depth":"deep"}'
# Ask anything about Bittensor
curl -s -X POST .../api/v1/agent/ask \
  -H "Authorization: Bearer tg_..." \
  -H "Content-Type: application/json" \
  -d '{"question":"What subnets have the highest emission?"}'
# Check your usage
curl -s .../api/v1/agent/usage \
  -H "Authorization: Bearer tg_..."
REST API

Rate Limits

Rate limits use a sliding 24-hour window. Every response includes headers showing your current status:

HeaderDescription
X-RateLimit-LimitYour daily request limit
X-RateLimit-RemainingRequests remaining in the current window

When the limit is exceeded, the API returns 429 Too Many Requests:

{ "success": false, "error": "Rate limit exceeded", "limit": 100 }

Rate limits reset on a rolling basis — there is no fixed daily reset time. The in-memory rate limiter resets on hub restart (Railway redeploys).

Registry API

Registry & Mesh API

The registry and mesh endpoints are served from the TensorGate hub. Most read endpoints are public. Write operations (register server, mesh call) require a tg_-prefixed API key.

Base URL: https://hub-production-dcbd.up.railway.app

Endpoints
MethodPathAuthDescription
GET/api/v1/registry/statsNoRegistry stats (total servers, tools, mesh calls)
GET/api/v1/registry/categoriesNoList tool categories with counts
GET/api/v1/registry/serversNoList servers (paginated, filterable by health/author)
GET/api/v1/registry/servers/:idNoServer detail + its tools
POST/api/v1/registry/serverstg_Register/update a server + tools
DELETE/api/v1/registry/servers/:idtg_Remove a server
GET/api/v1/registry/toolsNoSearch tools (FTS5 full-text, category filter)
GET/api/v1/registry/tools/:idNoTool detail + server info
POST/api/v1/registry/servers/:id/voteNoVote 1-5 (IP fingerprinted)
POST/api/v1/registry/discoverNoIntent-based tool discovery (query → best tools)
POST/api/v1/mesh/calltg_Proxy a tool call to a remote MCP server
Examples
# Search for tools
curl https://hub-production-dcbd.up.railway.app/api/v1/registry/tools?q=bittensor

# Get registry stats
curl https://hub-production-dcbd.up.railway.app/api/v1/registry/stats

# Mesh call (requires tg_ API key)
curl -X POST https://hub-production-dcbd.up.railway.app/api/v1/mesh/call \
  -H "Authorization: Bearer tg_your_key" \
  -H "Content-Type: application/json" \
  -d '{"server_id":"abc-123","tool_name":"tgate_network_stats","arguments":{}}'
Trust Scoring

Every registered server receives a trust score (0-1) computed every 15 minutes from 4 weighted components:

ComponentWeightCalculation
Health30%healthy=1.0, degraded=0.5, down=0.0, unknown=0.3
Reliability30%Success rate of last 100 mesh calls
Latency20%Normalized inverse: ≤500ms=1.0, ≥10s=0.0
Community20%Avg vote score (1-5 → 0-1)
Token

$TGATE

$TGATE is the native token of the TensorGate ecosystem on Base (Coinbase L2). It trades on Uniswap V4.

PropertyValue
NameTensorGate
Symbol$TGATE
ChainBase
Contract0xfaded58c5fac3d95643a14ee33b7ea9f50084b9a
DEXUniswap V4
PairTGATE / WETH
Links
ResourceLink
BaseScanView on BaseScan →
DexScreenerChart on DexScreener →
DEX ToolsChart on DEXTools →
GeckoTerminalChart on GeckoTerminal →
UniswapBuy on Uniswap →