# Connect an MCP client

> Sign in to manage a Conto workspace, or connect one payment agent with an SDK key.

- Human URL: https://conto.finance/docs/mcp/install
- Raw Markdown: https://conto.finance/docs/mcp/install.md
- Terminal view: https://conto.finance/ai/docs/mcp/install

Documentation group: Integrate

## What is MCP?

MCP (Model Context Protocol) is an open protocol for connecting AI agents to external tools. Conto's MCP server gives Claude and other MCP clients tools to check balances, request payments, read transactions, and query analytics. Conto checks the agent's policies before any payment moves. The same `@conto_finance/mcp-server` package works in **Claude Desktop**, **Claude Code**, and other MCP clients.

When a user asks for a payment, the client calls a Conto tool. Conto approves the request, denies it, or sends it to a person for approval. Conto sends an approved payment from a managed wallet, and the client reports the receipt. Sandbox payments are simulated. External wallets use approve, your own transfer, then confirm. See [wallet custody](https://conto.finance/docs/guides/custody-modes).

See [MCP tools](https://conto.finance/docs/mcp/tools) for every tool.

## Sign in to manage your agents

Use the account connection to manage agents across a workspace with your own Conto permissions.
Add the hosted server, then sign in through the browser, complete MFA if enabled, select your
workspace, and review the requested access. No agent registration or SDK key is needed.

    ```bash
    codex mcp add conto-account --url https://conto.finance/api/mcp
    codex mcp login conto-account --scopes conto:read,conto:propose,offline_access
    ```

    ```bash
    claude mcp add --transport http conto-account https://conto.finance/api/mcp
    ```

    Open `/mcp` in Claude Code, select `conto-account`, and authenticate.

Try: “List my Conto agents,” “Show this agent’s spending limits,” or “Propose pausing this agent.”
Every agent-specific call names an `agent_id`. Changes return a Conto review link; the client
checks the result after an eligible person confirms the exact change in the browser.

The connection grants `conto:read` and optionally `conto:propose`. `offline_access` permits token
refresh without signing in on every session. Access tokens last one hour; a connection lasts
30 days. Your current membership and role are checked on every request. Removing a member,
suspending their account, resetting their password, or disconnecting the app stops access. A connection also stops working for an organization that later requires SSO or two-step verification, if the session that approved it did not meet that requirement. Approve it again from a session that does. Role changes take effect on the
next request. Disconnect at [Settings → Profile → Connected apps](https://conto.finance/settings?tab=profile).

Each connection selects one workspace. Connect another named server for another workspace.
This account connection reads agents, policies, approval queues and masked card reports, and
proposes supported control changes. It does not create SDK keys, execute purchases or payments,
or expose payment credentials. The agent SDK connection below remains available for an agent’s
own payment runtime. See [account tools](https://conto.finance/docs/mcp/tools#account-connection).

## MCP vs dashboard assistant vs Conto Pay

Conto provides these natural-language surfaces:

| Surface                                                   | Who acts                                                                    | Reach it via                      | Auth                              | Onchain execution                                                                 |
| --------------------------------------------------------- | --------------------------------------------------------------------------- | --------------------------------- | --------------------------------- | --------------------------------------------------------------------------------- |
| **MCP server**                                            | Your own external AI agent (Claude Desktop, Claude Code, other MCP clients) | An MCP client wired to your agent | Agent SDK key (`conto_agent_...`) | Yes, with custody-aware policy checks before execution                            |
| **[Dashboard assistant](https://conto.finance/docs/assistant/overview)** (Conto AI) | You, working in the dashboard                                               | Dashboard chat panel              | Dashboard login                   | Yes, when you confirm a final approval on a managed wallet or a Conto Pay payment |
| **[Conto Pay](https://conto.finance/docs/conto-pay/overview)**                      | A Conto-hosted payment agent                                                | Dashboard chat workspace          | Dashboard login                   | Yes, through the normal request, approval, and execution flow                     |

## Agent SDK connection prerequisites

- An MCP client, such as [Claude Desktop](https://claude.ai/download) or [Claude Code](https://docs.anthropic.com/en/docs/claude-code)
- A Conto agent SDK key (`conto_agent_...`). In the dashboard, open **Agents**, select the agent,
  open the **Connect** tab, and choose **Generate SDK key**.
- Node.js 20.19+, with Node.js 22 requiring 22.12+ and Node.js 23 requiring 23.2+, because the server runs through `npx`

  The local agent SDK connection below uses `CONTO_API_KEY=conto_agent_...`. Do not use an
  organization API key (`conto_...`) or `CONTO_ORG_API_KEY` here.

  Already ran the CLI wizard? Use `npx @conto_finance/create-conto-agent mcp` as the server command
  in the configs below and drop the `env` block. It reads the SDK key and base URL the wizard saved.

## Add the server

In each config below, replace `conto_agent_xxx...` with your SDK key.

    Add Conto as an MCP server in one command:

    ```bash
    claude mcp add conto \
      --env CONTO_API_KEY=conto_agent_xxx... \
      --env CONTO_BASE_URL=https://conto.finance \
      -- npx -y @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.

    ### Verify

    Start a new Claude Code session:

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

    Claude calls the `get_wallets` tool.

    ### Manage the server

    ```bash
    claude mcp list      # list configured MCP servers
    claude mcp remove conto
    ```

    Add Conto to your Claude Desktop config file:

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

    Config file: `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or
    `%APPDATA%\Claude\claude_desktop_config.json` (Windows).

    ### 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?"

## Configuration reference

| Env var                         | Default                 | Required                                                                         |
| ------------------------------- | ----------------------- | -------------------------------------------------------------------------------- |
| `CONTO_API_KEY`                 | none                    | Yes. Agent SDK key, format `conto_agent_...`.                                    |
| `CONTO_BASE_URL`                | `https://conto.finance` | No. API base URL.                                                                |
| `CONTO_BROWSER_RUNTIME_URL`     | none                    | No. HTTPS endpoint for a trusted guarded-browser runtime.                        |
| `CONTO_BROWSER_RUNTIME_TOKEN`   | none                    | Yes when the browser runtime URL is configured.                                  |
| `CONTO_BROWSER_OBSERVATION_URL` | none                    | No. Same-origin endpoint that enables `observe_browser_session`.                 |
| `CONTO_BROWSER_SESSIONS_URL`    | none                    | No. Same-origin endpoint that enables the session create and release tools.      |
| `CONTO_LINK_WALLET`             | none                    | No. Set to `link-cli` so `checkout_checkpoint_cancel` can cancel a Link request. |
| `CONTO_LINK_WALLET_TEST`        | none                    | No. Set to `1` for Link test mode.                                               |

From MCP server 0.7.2, without `CONTO_LINK_WALLET`, `checkout_checkpoint_cancel` keeps the spend held
for a Link request that may be open.

Leave the `CONTO_BROWSER_*` settings unset unless you run a guarded browser runtime. See
[guarded browser checkout](https://conto.finance/docs/mcp/tools#guarded-browser-checkout-optional) for the tools they add.

The `CONTO_LINK_*` settings turn on the [Stripe Link card integration](https://conto.finance/docs/guides/stripe-link-cards). The tool
appears only when `link-cli` is also on the server's PATH. Log it in on that machine with
`link-cli auth login`.

  `CONTO_BROWSER_RUNTIME_URL` and `CONTO_BROWSER_RUNTIME_TOKEN` enable `guarded_browser_checkout`.
  Set both or neither. With only one set, the server exits at startup. The token must contain at
  least 32 characters and be a dedicated service credential. Conto API keys are rejected. The
  observation and sessions URLs must be on the same origin as the runtime URL and distinct from it.
  The browser runtime must own the page and must be the agent's only route to payment-sensitive
  click or submit actions. Use `createGuardedPlaywrightCheckoutHttpHandler` from
  `@conto_finance/sdk/playwright` to mount the authenticated endpoint the MCP server calls around
  your guarded Playwright runtime.

## Next steps

### MCP tools
Link: https://conto.finance/docs/mcp/tools

    Full tool list, parameters, and responses

### Set up with the CLI
Link: https://conto.finance/docs/cli/commands

    Create an agent, wallet, and SDK key in one command
