# MCP servers

> Connect any MCP server to your isotope, and connect Claude Code or any MCP client to your isotope's tools.

## Add an MCP server

In **Settings → Connections**, under **Third-party MCPs**, choose **Add MCP**, paste the server’s link into **MCP link** and press **Connect**. The isotope discovers whether the server wants OAuth, opens the provider’s sign-in page for you and returns you to Connections when it is done; a server that needs no sign-in connects directly. Then run **Test connection** to check the sign-in and count its tools, and open **Review tools** to see them.

- The link must be an HTTP or HTTPS URL to a Streamable HTTP endpoint, or a legacy SSE endpoint on a path ending in `/sse`.
- Use HTTPS for remote links. HTTP sends OAuth access tokens without encryption, exposing them to anyone who can observe the network traffic.
- Providers must support dynamic client registration or client ID metadata documents; a server that requires a hand-registered OAuth app is not supported.
- Local stdio servers, custom headers, MCP resources and prompts are not supported. An isotope holds up to 32 MCP connections.

## After connecting

The server’s tools enter the isotope’s catalog named after the connection and the tool, `mcp_<server>_<tool>`; a tool name that is long, contains an underscore or is not a plain identifier is sanitized and given a short hash. Chat attributes each call to the server it came from. The row reads _Connected_, _Sign-in required_ or _Disabled_, and its menu offers **Test connection**, **Change link** and **Disconnect**, plus **Sign in** or **Sign in again** for a server that uses OAuth.

- The row’s switch disables a server without dropping its sign-in: its tools leave the catalog, old bindings refuse new calls, and calls already sent finish.
- **Disconnect** removes the saved connection and its tokens. It does not revoke the grant on the provider’s side; do that in the provider’s account settings.
- **Settings → Keys** can sign a server out while keeping its link, so an administrator can sign in again from Connections.

## Use your isotope from Claude Code or any MCP client

Every isotope serves Broom, the model registry and the tools of its joined built-in connections (such as TAK, Foundry and Weather) over MCP at `/mcp`, defined as its own agent finds them. MCP servers you add above are not served there. Add it to Claude Code with the isotope's public address, the one you open the console at (for a hosted workspace, its workspace address, not app.drkm.com):

```bash
claude mcp add --transport http drkm https://isotope.example/mcp
```

Then run `/mcp` in Claude Code and choose **Authenticate**. Your browser opens the isotope’s sign-in, through whatever your isotope signs people in with, and asks **Connect an agent**; choose **Sign in** and return to Claude Code. Every call runs as you, with your role, in the organization you were working in, and stops working when you lose access. Any client that supports MCP authorization with client ID metadata documents signs in the same way.

- A call in an MCP session runs in a conversation of its own, which keeps the Broom runs and TAK geofences it starts. A call with no session, as Claude Code makes on the current MCP version, runs in no conversation unless it sends a `Drkm-Conversation` header naming one; send that header to keep one conversation across calls and sessions.
- A connection's tools are listed while it is joined for your organization, and Claude Code is told when that changes. A file a tool saves comes back in its result, up to 8 MiB.
- Your code runs on the fleet: `broom_run` runs your Python over rows as a sweep, and the `models_*` tools register, compare and promote what it trains. See [Model registry](https://docs.drkm.com/model-registry).
- Each machine you sign in on keeps its own sign-in, which lasts 30 days from the last time the client renewed it.

**Settings → Connections → Agents** shows this isotope's MCP address with the setup for Claude Code, Codex, Cursor or another client, filled in with that address; connecting an agent needs the Member role or above. It also lists the agents using the isotope's tools: which client, as whom, in which named conversation, how many calls they have made and which tool they called last. A client acting as the same person or key, in the same conversation or session, is one row, even from two machines. You see your own agents; an administrator sees everyone's in the organization. An agent is listed from its first request until it ends its session or has been idle for an hour, and an isotope that restarts lists it again at its next request.

## Bring your own agent or program

To let a program reach the isotope without a person signing in, an administrator creates a key under **Settings → Keys → API keys** with a name, the lowest role it needs and an expiry; the secret is shown once. Send it as a bearer token to the isotope’s HTTPS API or its `/mcp`, or give it to the Python SDK. Another isotope’s agent reaches yours over the agent-to-agent API once both are enrolled in the same mesh, with no key at all.

```python An external program
import drkm

drkm.connect("https://isotope.example", token="drkm_ak_...")
print(drkm.isotopes())

# Or from any HTTP client:
# curl -H "Authorization: Bearer drkm_ak_..." https://isotope.example/users/me
```

```bash An MCP client with a key
claude mcp add --transport http drkm https://isotope.example/mcp \
  --header "Authorization: Bearer drkm_ak_..."
```
