Your MCP servers
Add MCP servers once in Patterm and every agent you launch can use them, without editing each CLI's own configuration.
Patterm already gives every agent its own tools, listed in the MCP tool reference. This page is about the servers you add yourself, such as an issue tracker or a database.
Patterm never edits an agent CLI's own configuration. It hands your servers to each agent when it launches, and your CLI keeps any servers it already has.
Add a server##
- Open Settings › MCP servers and choose Add server.
- Give it a Name. Agents see the server under this name, so tool names and permission rules keep matching.
- Choose a Type and fill in the fields below.
- Under Give to, tick the harnesses that should get it: Claude Code, Codex or OpenCode. All three are ticked by default.
- Choose Add server.
The name uses 1 to 64 letters, digits, hyphens or underscores, and must be unique. patterm is reserved for Patterm's own server.
Remote URL##
For a server you reach over HTTP.
| Field | Notes |
|---|---|
| URL | An http or https address, such as https://mcp.example.com/mcp. |
| Authentication | OAuth sign-in (default) or None. |
| Headers | Fixed headers to send, such as an API key. Choose Add header. |
| Advanced | With OAuth only: Client ID, Client secret and Scopes. Use these only for services that do not let Patterm register itself, such as GitHub and Slack. |
Local command##
For a server that runs as a process on the host.
| Field | Notes |
|---|---|
| Command | The program to run, such as npx. |
| Arguments | One argument per line. |
| Environment | Variables to set, such as a token. Choose Add variable. |
The command runs on the machine that runs the agent, with that machine's PATH. On a server, install it there.
Import what you already use##
Choose Import from agents to copy servers from your CLIs' configuration into Patterm. It reads these files and changes none of them:
- Claude Code:
~/.claude.json - Codex:
config.tomlinCODEX_HOME, or~/.codex - OpenCode:
opencode.jsonc,opencode.jsonorconfig.jsonin~/.config/opencode
A summary lists what was imported and what was skipped, with reasons. Patterm skips a server that is already in Patterm, one that a CLI configured for a single project only (Patterm servers are global), and a duplicate whose definition differs from the one it imported.
Sign in##
For a remote server that uses OAuth, Patterm is the sign-in client. You sign in once, and every harness uses that one sign-in.
- Choose Sign in on the server's row.
- Finish signing in on the page that opens.
- If your browser cannot reach the address the service sends you back to, copy that page's full address and paste it into the box in Patterm, then choose Submit.
The row shows Signed in, Not signed in or Signing in…. Choose Sign out to remove the sign-in. Changing a server's URL, client or authentication clears its sign-in.
Choose Test on a row to connect to the server and list its tools. It shows how many tools it found, or the error.
Turn a server on or off, or remove it##
- The switch on a row turns a server off for new agents without deleting it. A disabled server shows Disabled.
- Edit changes it. Delete removes it.
Changes apply to agents started afterwards. Running agents keep what they launched with until they restart. In an Integrated conversation, /restart stops the agent and resumes the same conversation in a new process, so it picks up your changes.
Who gets a server##
Servers are global. Every project's agents get the servers that are on and ticked for their harness, and nothing else. A server you give only to Codex is never given to Claude Code agents.
This scope is separate from Patterm's own tools. A project's agents can read and change only their own project's records, whatever servers you add.
How secrets are kept out of arguments##
Anyone on the machine can see a process's command line with ps, and Patterm records launch commands. So Patterm keeps your tokens, headers and OAuth sign-ins out of the arguments it passes to agent CLIs.
| Your server | What the agent is given |
|---|---|
| Remote, with headers or OAuth | A small helper, patterm-mcp --mcp-headers, for Claude Code and Codex. The CLI runs it when it needs headers, and it fetches the current headers from Patterm over a local socket. OpenCode gets patterm-mcp --mcp-bridge, a local bridge that does the same. |
| Remote, with neither | The URL only. |
| Local, with environment variables | For Codex, patterm-mcp --mcp-exec, which fetches the command and variables from Patterm when it starts. Claude Code reads the variables from a per-launch configuration file that only your account can read. |
| Local, with none | The command and arguments. |
These helpers talk only to Patterm on the same machine. They answer only for agents Patterm started, and only for servers given to that agent's harness.
Patterm stores your servers, including header and environment values and OAuth sign-ins, in its database in the data directory, which only your account can read. See Data and privacy.
Note
Arguments are not protected. Do not put a secret in Arguments. Use Environment or Headers instead.
If a server does not connect##
Choose Test first. See Troubleshooting for the common causes.