> For the complete documentation index, see [llms.txt](https://celopg.gitbook.io/tokenmanager/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://celopg.gitbook.io/tokenmanager/for-developers-and-ai-agents/mcp-server.md).

# MCP Server

A Model Context Protocol server that lets AI agents create tokens, manage IPFS metadata, query tokens, and build transaction calldata on Celo and Ethereum.

**Endpoint:** `POST http://localhost:3001/mcp`

## Configuration

{% tabs %}
{% tab title="HTTP (Claude Desktop, Cursor, Cline)" %}

```json
{
  "mcpServers": {
    "token-minter": { "url": "http://localhost:3001/mcp", "transport": "http" }
  }
}
```

{% endtab %}

{% tab title="stdio (local dev)" %}

```json
{
  "mcpServers": {
    "token-minter": {
      "command": "npm", "args": ["run", "mcp"],
      "cwd": "/path/to/token-manager/backend"
    }
  }
}
```

{% endtab %}
{% endtabs %}

## Typical flow

1. `get_supported_chains` → 2. `get_wallet_balance` → 3. `pin_token_metadata` → 4. `build_create_token_transaction` → 5. sign & send → 6. `get_transaction_status` (returns the token address)

## Tools

| Category     | Tool                                  | Purpose                                  |
| ------------ | ------------------------------------- | ---------------------------------------- |
| Discovery    | `get_supported_chains`                | Chains, factory addresses, RPC URLs      |
|              | `get_token_creation_params`           | Parameters + ABI per chain               |
| Query        | `list_tokens`                         | Tokens on a chain (pagination, ordering) |
|              | `get_token_details`                   | Token info, holders, transfers           |
|              | `get_tokens_by_owner`                 | Tokens owned by an address               |
| Metadata     | `pin_token_metadata`                  | Pin ERC-7572 JSON (+ image) to IPFS      |
|              | `get_token_metadata`                  | Fetch from IPFS by URI/CID               |
| Logos        | `get_token_logo` / `list_token_logos` | Logo URLs                                |
| Transactions | `build_create_token_transaction`      | Ready-to-sign tx                         |
| Wallet       | `get_wallet_balance`                  | CELO/ETH balance check                   |
|              | `estimate_gas`                        | Gas estimate + 20% buffer                |
|              | `get_transaction_status`              | Receipt + created token address          |

**Common arguments:** `chainId` is 42220 (Celo) or 1 (Ethereum). `build_create_token_transaction` requires `chainId`, `owner`, `name`, `symbol`, `initialSupply`, `metadataURI`; `decimals` defaults to 18, `maxSupply` to "0" (unlimited).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://celopg.gitbook.io/tokenmanager/for-developers-and-ai-agents/mcp-server.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
