TA

Tatum Blockchain MCP Server for LLMs

Unlock instant blockchain access for your AI agents with Tatum's MCP server and connect to any LLM in seconds.

Quick Install
npx -y @tatumio/blockchain-mcp

Overview

Tatum’s Blockchain MCP Server provides a lightweight, MCP-compatible HTTP server that exposes blockchain operations as tools for large language models (LLMs) and AI agents. By packaging common blockchain workflows (balance queries, transaction broadcasting, smart contract calls, event subscriptions) into a manifest that LLMs can fetch and invoke, the server makes it straightforward to give agents safe, auditable access to on‑chain capabilities without embedding secret keys inside the model.

For developers building autonomous agents, chatbots, or workflows that need real-time blockchain data, the MCP server reduces integration friction: it standardizes tool metadata and endpoints so any MCP-aware LLM can discover and call blockchain operations in seconds. The server uses Tatum’s APIs under the hood, so you can support dozens of chains using a single interface.

Features

  • MCP-compliant tool manifest that LLMs can fetch and use at runtime
  • Prebuilt tools for common blockchain tasks: get balance, send transaction, call contract, get transaction details, create wallet, subscribe to events
  • Configurable via environment variables (Tatum API key, target chain, network)
  • Docker-friendly and runnable locally for development
  • Audit-friendly: requests and responses are HTTP-based, making logs and access control straightforward
  • Can be proxied behind an API gateway or secured with authentication for production use

Installation / Configuration

Requirements: Node.js (16+), Docker (optional), a Tatum API key.

Clone and install:

git clone https://github.com/tatumio/blockchain-mcp.git
cd blockchain-mcp
npm install

Create a .env file (example):

PORT=8080
TATUM_API_KEY=your_tatum_api_key_here
CHAIN=ethereum                  # example: ethereum, bitcoin, polygon, etc.
NETWORK=mainnet                 # mainnet | testnet
LOG_LEVEL=info

Start locally:

npm start
# or
node index.js

Run with Docker:

docker build -t tatum-mcp .
docker run -e TATUM_API_KEY=your_tatum_api_key_here -p 8080:8080 tatum-mcp

If you use docker-compose, a minimal service block looks like:

version: "3.8"
services:
  mcp:
    image: tatum-mcp:latest
    build: .
    ports:
      - "8080:8080"
    environment:
      - TATUM_API_KEY=${TATUM_API_KEY}
      - CHAIN=ethereum
      - NETWORK=testnet

After startup, the server exposes a machine-readable manifest (MCP) that LLMs can fetch to discover available tools.

Available Tools / Resources

The server exposes a set of tools (example endpoints below). Exact routes and parameter names may vary by release — consult the running server manifest.

Tool nameEndpointDescription
getBalancePOST /tools/get-balanceReturns on‑chain balance for an address
sendTransactionPOST /tools/send-transactionBroadcasts a signed transaction or builds+signs using configured keys
callContractPOST /tools/call-contractPerforms a read-only smart contract call
getTransactionGET /tools/tx/{txid}Fetches transaction details by hash
createWalletPOST /tools/create-walletGenerates a new wallet (mnemonic/private key)
subscribeEventsPOST /tools/eventsRegisters webhook callbacks for contract events

Example manifest (LLM fetches JSON to learn tools):

{
  "schema_version": "0.1.0",
  "name": "tatum-blockchain",
  "tools": [
    {
      "name": "getBalance",
      "description": "Get balance for an address on the configured chain",
      "method": "POST",
      "url": "https://your-server.example/tools/get-balance",
      "input_schema": {"type": "object", "properties": {"address": {"type": "string"}}}
    }
  ]
}

Use Cases

  1. Pre-transaction checks in autonomous trading

    • Agent fetches wallet balance via getBalance before constructing a trade or swap. If balance is insufficient, the agent abstains or requests funds.
    • Example: curl POST to /tools/get-balance with JSON { “address”: “0x…” } and use result in decision logic.
  2. On-demand NFT minting

    • A conversational assistant mints NFTs when users request it. The assistant uses callContract to prepare mint data and sendTransaction to broadcast the minting operation, while the server logs the action for auditability.
  3. Compliance and auditing pipelines

    • A backend process periodically calls getTransaction and subscribeEvents to reconcile on‑chain activity with internal records. The server centralizes API credentials and reduces blast radius.
  4. Oracles and data pipelines

    • Agents collect off‑chain data, then use sendTransaction to write verified results on chain via a smart contract call provided in the manifest.

Example: request balance via curl

curl -X POST http://localhost:8080/tools/get-balance \
  -H "Content-Type: application/json" \
  -d '{"address":"0x1234..."}'

Example: broadcast transaction (signed payload)

curl -X POST http://localhost:8080/tools/send-transaction \
  -H "Content-Type: application/json" \
  -d '{"signedTx":"0xdeadbeef..."}'

Additional Resources

  • Source code and issues: https://github.com/tatumio/blockchain-mcp
  • Tatum API docs (protocol specifics, supported chains): https://tatum.io/docs
  • Model Context Protocol (MCP) — consult your LLM provider for