# How to Use CryptoAPIs with AI Agents (MCP)

Give an AI agent live blockchain access through the Model Context Protocol. Install the open-source per-product MCP servers in Claude Desktop or Cursor, point at the hosted MCP endpoint, or drop the n8n node into a workflow — and your agent can read balances and transactions, watch addresses and sign locally across 20+ chains.

## What is MCP, and why it matters here

The Model Context Protocol (MCP) is the open standard for giving AI assistants tools they can call. CryptoAPIs ships MCP servers that expose blockchain operations as tools — so an agent can answer "what's the balance of this address?" or "prepare and broadcast this payment" by actually calling the chain, not guessing.

Under the hood the MCP tools are a thin, open-source client over the same CryptoAPIs REST API — same endpoints, same `x-api-key` auth. The signer runs locally and makes zero network calls, so an agent can build and broadcast a transaction while the private key never leaves the machine.

## Three ways to connect

- **Claude Desktop & Cursor** — install the open-source per-product `@cryptoapis-io/mcp-*` servers (MIT, on npm), e.g. `@cryptoapis-io/mcp-address-latest`, `@cryptoapis-io/mcp-signer`, `@cryptoapis-io/mcp-broadcast`.
- **Hosted endpoint** — `https://ai.cryptoapis.io/mcp` exposes the full toolset with nothing to install, and `https://ai.cryptoapis.io/mcp/{product}` scopes it to a single product (e.g. `/mcp/blockchain-events`, `/mcp/utils`, `/mcp/market-data`, `/mcp/hd-wallet`).
- **n8n community node** — `@cryptoapis-io/n8n-nodes-cryptoapis` brings the same operations into n8n automations, including AI-agent workflows.

## Connect in three steps

1. **Get a CryptoAPIs API key.** The MCP tools authenticate with it and consume your normal API credits.
2. **Add the MCP server to your AI client.** Install the per-product packages locally and register them in your client's MCP config with your API key, or point the client at the hosted endpoint.
3. **Let the agent use blockchain tools.** Your agent can read balances, transactions and blocks, pull market data, create webhook subscriptions, and prepare → sign locally → broadcast transactions across 20+ chains, in natural language.

## FAQ

**How do I give an AI agent access to blockchain data?** Connect CryptoAPIs over MCP — install the open-source per-product `@cryptoapis-io/mcp-*` servers in Claude Desktop or Cursor, or use the hosted endpoint at `ai.cryptoapis.io/mcp`.

**What is the CryptoAPIs MCP server?** A set of open-source (MIT) MCP servers, published to npm as `@cryptoapis-io/mcp-*`, that expose the REST API as tools an AI agent can call. There's also a hosted HTTP/SSE endpoint at `ai.cryptoapis.io/mcp` that aggregates them.

**Can an AI agent sign and send transactions?** Yes, non-custodially. The prepare-transactions tool builds an unsigned transaction, the signer signs it locally with zero network calls, and broadcast submits it. The private key never leaves the machine.

**Can I connect just one product instead of all the tools?** Yes — use `ai.cryptoapis.io/mcp/{product}` on the hosted endpoint, or install just the matching per-product package locally.

[Get an API key](https://app.cryptoapis.io/auth/register) · [Read the docs](https://developers.cryptoapis.io/)
