> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gomaestro.org/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP

> Connect LLMs and AI agents to Bitcoin blockchain data through Maestro's MCP server — query blocks, transactions, mempool, and more via natural language.

# Model Context Protocol (MCP)

The [Maestro MCP Server](https://github.com/maestro-org/maestro-mcp-server) is a **Model Context Protocol** implementation that enables AI agents and LLMs to interact with Bitcoin blockchain data through the Maestro API. It acts as a bridge, translating natural language queries into blockchain API calls via a standardized streamable HTTP protocol.

***

## Available Services

The MCP server exposes five Maestro API service categories:

| Service                | Description                                           |
| :--------------------- | :---------------------------------------------------- |
| **Blockchain Indexer** | Query blocks, transactions, and historical chain data |
| **Mempool Monitoring** | Track pending and unconfirmed transactions            |
| **Market Price**       | Access real-time Bitcoin pricing information          |
| **Wallet**             | Address lookups, balance queries, and UTXO management |
| **Node RPC**           | Direct Bitcoin node interaction capabilities          |

***

## Setup

### Prerequisites

* [Bun](https://bun.sh/) v1.0 or higher
* A [Maestro API key](https://dashboard.gomaestro.org/signup)

### Installation

```bash theme={null}
git clone https://github.com/maestro-org/maestro-mcp-server.git
cd maestro-mcp-server
bun install
bun run build
```

### Configuration

```bash theme={null}
cp .env.example .env
```

Edit `.env` to add your Maestro API key and select a network:

| Network      | Base URL                                   |
| :----------- | :----------------------------------------- |
| **Mainnet**  | `https://xbt-mainnet.gomaestro-api.org/v0` |
| **Testnet4** | `https://xbt-testnet.gomaestro-api.org/v0` |

### Launch

```bash theme={null}
bun run start:http
```

The MCP endpoint is accessible at `http://localhost:3000/mcp`.

***

## Client Examples

The [maestro-mcp-client-examples](https://github.com/maestro-org/maestro-mcp-client-examples) repository provides working integration examples:

| Example                         | Description                                                        |
| :------------------------------ | :----------------------------------------------------------------- |
| **basic-streamablehttp-client** | Raw streamable HTTP transport connection to the MCP server         |
| **Claude**                      | Integration with Claude AI for natural language blockchain queries |
| **Cursor**                      | Configuration for using Maestro MCP in the Cursor editor           |

***

## Resources

<CardGroup cols={2}>
  <Card title="Maestro MCP Server" href="https://github.com/maestro-org/maestro-mcp-server">
    Source code, full documentation, and setup instructions.
  </Card>

  <Card title="Client Examples" href="https://github.com/maestro-org/maestro-mcp-client-examples">
    Working examples for Claude, Cursor, and raw HTTP clients.
  </Card>
</CardGroup>
