Claude Code
Give Claude Code access to TON blockchain via MCP server. One command.
MCP server gives Claude real tools (
Skill file (optional) adds context — amount conversion, status meanings, best practices.
request_transfer, get_request_status, etc.) to interact with Agent Gateway. Without it, Claude has no way to call the API.Skill file (optional) adds context — amount conversion, status meanings, best practices.
Setup
1Add MCP server to Claude Code
Run this single command in your terminal:
claude mcp add-json tongateway '{
"command": "npx",
"args": ["-y", "@tongateway/mcp"],
"env": {
"AGENT_GATEWAY_API_URL": "https://api.tongateway.ai"
}
}' --scope user
No token needed. The agent authenticates automatically — it generates a link, you open it and connect your wallet once.
2Done — try it
Restart Claude Code and say:
Send 0.5 TON to EQD...abc
Claude will call request_transfer automatically. Approve it in your dashboard.
Available Tools
These tools become available to Claude after connecting the MCP server:
| Tool | Params | What it does |
|---|---|---|
request_transfer |
to, amountNano |
Queue a TON transfer. Owner approves in dashboard. |
get_request_status |
id |
Check if approved, rejected, pending, or expired. |
list_pending_requests |
— | List all pending transfer requests. |
Amount: 1 TON = 1,000,000,000 nanoTON. So 0.5 TON = "500000000"
Example Session
You: Send 0.5 TON to EQD...abc
Claude: I'll request that transfer for you.
[calls request_transfer → to="EQD...abc", amountNano="500000000"]
Transfer request created (ID: abc-123).
Please approve it in your Agent Gateway dashboard.
You: Is it confirmed?
Claude: [calls get_request_status → id="abc-123"]
Yes, the transfer was confirmed and signed by the wallet.
Optional
Skill File
The MCP server is enough for Claude to work. But if you want Claude to have extra context (amount conversion, status meanings, best practices), you can also add the skill file:
curl -o .claude/skills/agent-gateway.md \
https://tongateway.ai/agent-gateway.md
View skill file content
---
name: agent-gateway
description: Install and use Agent Gateway — lets your AI agent
request TON blockchain transfers that are approved by a human
wallet owner via TON Connect
---
# Agent Gateway Skill
Agent Gateway lets you request TON transfers from a human's wallet.
You submit transfer requests, the wallet owner approves them.
## Tools
| Tool | Description |
|------------------------|------------------------------------|
| request_transfer | Queue a TON transfer for approval |
| get_request_status | Check request status by ID |
| list_pending_requests | List all pending requests |
## Usage
request_transfer({ to: "EQD...addr", amountNano: "1000000000" })
1 TON = 1,000,000,000 nanoTON
## Direct HTTP (fallback)
POST https://api.tongateway.ai/v1/safe/tx/transfer
Authorization: Bearer TOKEN
{ "to": "0:dest...", "amountNano": "1000000000" }
## Important
- You cannot sign transactions, only request them
- Token = session, guard it like a password
- Requests expire in 5 minutes
- Tokens don't expire — revoke when no longer needed