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

# Install MCP Server

> Add the Conto MCP server to Claude Desktop or Claude Code so the agent can use natural language for wallet and payment operations

# Install the Conto MCP server

The same `@conto_finance/mcp-server` package works in both **Claude Desktop** and
**Claude Code**.

<Tip>
  Already ran `npx @conto_finance/create-conto-agent`? Then `npx conto mcp` starts the MCP server
  with the SDK key and base URL from your generated config. No manual environment setup needed.
  The tabs below are for wiring the server into Claude Desktop or Claude Code directly.
</Tip>

## Prerequisites

* [Claude Desktop](https://claude.ai/download) or [Claude Code](https://docs.anthropic.com/en/docs/claude-code) installed
* A Conto agent SDK key. Format `conto_agent_...`. See the [Quickstart](/quickstart/setup) to generate one.

<Warning>
  The MCP server always uses `CONTO_API_KEY=conto_agent_...`. Do not use an organization API key
  (`conto_...`) or `CONTO_ORG_API_KEY` here.
</Warning>

<Tabs>
  <Tab title="Claude Code (CLI)">
    Add Conto as an MCP server in one command:

    ```bash theme={null}
    claude mcp add conto \
      --env CONTO_API_KEY=conto_agent_xxx... \
      --env CONTO_BASE_URL=https://conto.finance \
      -- npx @conto_finance/mcp-server
    ```

    Environment flags must come before the `--`. Everything after `--` is the command Claude Code runs for the server, so flags placed there would be passed to `npx` instead.

    Replace `conto_agent_xxx...` with your actual SDK key.

    ### Verify

    Start a new Claude Code session:

    ```
    > What are my wallet balances?
    ```

    Claude will invoke the `get_wallets` tool.

    ### Manage the server

    ```bash theme={null}
    claude mcp list      # list configured MCP servers
    claude mcp remove conto
    ```
  </Tab>

  <Tab title="Claude Desktop (macOS)">
    Edit `~/Library/Application Support/Claude/claude_desktop_config.json`:

    ```json theme={null}
    {
      "mcpServers": {
        "conto": {
          "command": "npx",
          "args": ["@conto_finance/mcp-server"],
          "env": {
            "CONTO_API_KEY": "conto_agent_xxx...",
            "CONTO_BASE_URL": "https://conto.finance"
          }
        }
      }
    }
    ```

    Replace `conto_agent_xxx...` with your actual SDK key.

    ### Verify

    1. Restart Claude Desktop.
    2. Look for the tools icon in the chat input. Conto's tools should appear in the list.
    3. Ask: "What are my wallet balances?"
  </Tab>

  <Tab title="Claude Desktop (Windows)">
    Edit `%APPDATA%\Claude\claude_desktop_config.json`:

    ```json theme={null}
    {
      "mcpServers": {
        "conto": {
          "command": "npx",
          "args": ["@conto_finance/mcp-server"],
          "env": {
            "CONTO_API_KEY": "conto_agent_xxx...",
            "CONTO_BASE_URL": "https://conto.finance"
          }
        }
      }
    }
    ```

    Replace `conto_agent_xxx...` with your actual SDK key.

    ### Verify

    1. Restart Claude Desktop.
    2. Look for the tools icon in the chat input.
    3. Ask: "What are my wallet balances?"
  </Tab>
</Tabs>

## Configuration reference

| Env var          | Default                 | Required                                                   |
| ---------------- | ----------------------- | ---------------------------------------------------------- |
| `CONTO_API_KEY`  | none                    | Yes. Agent SDK key, format `conto_agent_...`.              |
| `CONTO_BASE_URL` | `https://conto.finance` | No. Override for local dev (e.g. `http://localhost:3006`). |

If your backend also provisions agents or repairs ownership, do that separately with an
organization API key and `ContoAdmin`. The MCP runtime itself should still receive an agent SDK
key.

## Next steps

<CardGroup cols={2}>
  <Card title="MCP tool reference" icon="screwdriver-wrench" href="/mcp/tools">
    Full tool list, parameters, and responses
  </Card>

  <Card title="MCP overview" icon="circle-info" href="/mcp/overview">
    What MCP is and why Conto uses it
  </Card>
</CardGroup>
