Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@TezosX MCPcheck the balance of my spending wallet"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
TezosX MCP
A Model Context Protocol server for Tezos with x402 payment support.
Warning: This MCP is in alpha. Most things should work, but please be prepared for troubleshooting. Please report any problems on our issues page.
As always, verify the output of your LLM before approving any transactions. Set reasonable limits. Trust but verify.
Quick Deploy
Deploy the template (set
TEZOS_NETWORKtoshadownetbefore clicking deploy if desired)Click the deployed item and go to "Settings"
Scroll down to "Public Networking"
Your domain will be something like
tezosx-mcp-production-a12b.up.railway.appNavigate to your domain to open the frontend config, and set up your spending key and contract address
Back on Railway, navigate to the "Variables" tab and set
SPENDING_PRIVATE_KEYandSPENDING_CONTRACTto the values you receivedOptional: Enable the 'serverless' setting to reduce resource usage
Restart the deployment
Set up your AI Platform to use
[your domain]/mcpas the URL
Click the button above to deploy the template
Once deployed, under "Sync" click "View details"
Click the hyperlink to "tezosx-mcp"
Navigate to your onrender.com custom URL and set up your spending key and contract address
Back on Render, navigate to the "Environment" tab and set
SPENDING_PRIVATE_KEYandSPENDING_CONTRACTenvironment variablesClick "Manual deploy" at the top right and select "Restart service"
Set up your AI Platform to use
[your domain]/mcpas the URL
Note: Render spins down free plan services during inactivity. The next request can take up to a minute while the instance spins back up. Upgrade to a paid plan to avoid this.
Components
Component | Description | Deployment |
MCP Server | Tezos wallet tools for AI agents | Claude Desktop / Railway / Render |
Facilitator | Verifies & settles x402 payments | Cloudflare Worker |
Mint Worker | Mints NFT receipts via x402 | Cloudflare Worker |
NFT Contract | FA2 contract for collector cards | Tezos blockchain |
MCP Server
Installation
Or run directly:
Claude Desktop Configuration
Add to your Claude Desktop config (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
Or run from source:
Clone the TezosX-mcp repository
In the
/TezosX-mcp/mcpfolder runnpm i && npm run build
Environment Variables
Variable | Required | Description |
| Yes | Private key for the spending account (edsk/spsk/p2sk format) |
| Yes | Address of the spending-limited wallet contract (KT1...) |
| No |
|
| No |
|
| No | Frontend port (default: 13205) |
Available Tools
Tool | Description |
| Get the balance of the spending wallet |
| Get addresses associated with the spending contract |
| Get current spending limits and allowances |
| Get recent operations from the wallet |
| Open the web dashboard for wallet management |
| Send XTZ from the spending wallet |
| Reveal an unrevealed account on-chain |
| Create an x402 payment header |
| Fetch a URL with x402 payment |
| Parse x402 payment requirements from a response |
Web Dashboard
The MCP server includes a web dashboard for managing the spending wallet. It starts automatically on http://localhost:13205 (or your configured WEB_PORT).
Facilitator (Cloudflare Worker)
A Cloudflare Worker that verifies and settles x402 payments using the exact-tezos scheme.
Deploy
Configuration
Set TEZOS_RPC_URL in wrangler.jsonc:
API
Endpoint | Description |
| Returns service status and connected block |
| Validates a payment payload. Returns |
| Injects a verified payment to the network. Returns |
Notes:
In-memory double-spend protection resets on deployment
Only supports
exact-tezosscheme withXTZOperations must be verified before settlement
NFT Contract
Deploy the FA2 contract and authorize a minter:
Mint Worker (Cloudflare Worker)
A Cloudflare Worker that mints Tezos NFTs when users pay via the x402 protocol. Returns 402 Payment Required until a valid payment is received, then mints an NFT receipt to the payer.
Features
x402 payment protocol integration
FA2-compliant NFT minting via Taquito
Dynamic SVG receipt generation
IPFS metadata storage via Pinata
Prerequisites
LIGO compiler - For compiling the NFT contract
Cloudflare account - For deploying the worker
Pinata account - For IPFS uploads (pinata.cloud)
Tezos wallet - Funded account for minting operations
Deploy
Secrets
Configuration
Edit wrangler.jsonc:
The mint worker uses a service binding to call the facilitator directly (no public URL needed).
API
GET /mint - Mint an NFT after x402 payment
Query Parameters:
recipient(optional) - Address to receive the NFT (defaults to payer)
Without payment (returns 402):
With valid payment (returns 200):
GET / - Health check
Error Codes
Code | Description |
| No X-PAYMENT header provided |
| Payment verification failed |
| Payment network doesn't match |
| Failed to upload metadata to Pinata |
| NFT contract call failed |
| Payment settlement failed |
Architecture
License
Apache-2.0