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

# MCP server

> Let an agent read and manage your RedPill account, models, API keys, workspaces, and usage through the RedPill MCP server.

RedPill runs two MCP servers:

| Server        | URL                              | Sign-in                              |
| ------------- | -------------------------------- | ------------------------------------ |
| Account       | `https://service.redpill.ai/mcp` | Your RedPill account, in the browser |
| Documentation | `https://docs.redpill.ai/mcp`    | None                                 |

This is for managing your RedPill account from an agent, not for running inference through one;
for that, see [Use in agents](/get-started/use-in-agents). The account server lets an agent check
models, balance, billing history, API keys, workspaces, and usage, and make confirmed changes to
keys and workspaces. It never returns a key secret through
MCP, and it cannot spend money or change who is in your organization.

## Connect

Add the account URL as a remote HTTP server. On first use the client opens your browser: sign in,
choose the organization to authorize, and approve. No API key, client secret, or app registration
is needed.

<Tabs>
  <Tab title="Claude Code">
    ```bash theme={null}
    claude mcp add --transport http redpill https://service.redpill.ai/mcp
    ```

    Then run `/mcp` in Claude Code to sign in.
  </Tab>

  <Tab title="Codex">
    ```bash theme={null}
    codex mcp add redpill --url https://service.redpill.ai/mcp
    codex mcp login redpill
    ```
  </Tab>

  <Tab title="OpenCode">
    Add to `opencode.json`:

    ```json theme={null}
    {
      "mcp": {
        "redpill": {
          "type": "remote",
          "url": "https://service.redpill.ai/mcp"
        }
      }
    }
    ```
  </Tab>
</Tabs>

Any client that supports remote HTTP MCP servers with OAuth works the same way. The agent
documents at [`llms.txt`](https://service.redpill.ai/llms.txt),
[`agents.md`](https://service.redpill.ai/agents.md), and the
[RedPill skill](https://service.redpill.ai/skills/redpill/SKILL.md) tell an agent how to use both
servers.

## Tools

| Area     | Read                                                      | Write                                                       |
| -------- | --------------------------------------------------------- | ----------------------------------------------------------- |
| Account  | `get_account`, `list_workspaces`                          | `create_workspace`, `update_workspace`, `archive_workspace` |
| Models   | `list_models`, `get_model`, `get_model_uptime`            |                                                             |
| Billing  | `get_balance`, `list_billing_history`                     |                                                             |
| API keys | `list_api_keys`, `get_api_key`                            | `create_api_key`, `update_api_key`, `revoke_api_key`        |
| Usage    | `get_usage_summary`, `get_usage_logs`, `get_usage_facets` |                                                             |

Every call checks your current organization membership and the same permission the dashboard uses,
so an agent can do exactly what you can do there, and no more. Key listings show metadata and
limits only. Archiving a workspace revokes its keys.

## Changes need your confirmation

A write returns a preview first. Clients that support MCP forms show a confirmation; other clients
repeat the call with `confirm=true`.

Creating an API key finishes in the browser. The agent receives a short-lived link; you open it
signed in as the same user, click **Create**, and see the secret once. The secret never passes
through MCP or the model. Clients without URL elicitation support create keys in the
[dashboard](https://www.redpill.ai/keys) instead.

## Not available to agents

* Payments, top-ups, auto-recharge, and subscriptions.
* Organization membership, identity, and administrator operations.
* Receipt verification. Verification has to run in the client that sent the request; see
  [Verify a response](/guides/verify-a-response).
