# MCP servers

> Connect remote MCP servers so AI CodeOps agents can call their tools: add a server, keep its headers encrypted, and limit tools per agent and by policy.

Source: https://aicodeops.dev/docs/mcp-servers · Last updated: 2026-10-18

The Model Context Protocol (MCP) lets an AI agent call tools on another service, such as an issue tracker or a documentation search. In AI CodeOps, you connect MCP servers to your workspace and the agents in your sessions can use their tools.

Here AI CodeOps is the client: it connects **to** MCP servers you add. To use AI CodeOps from your own coding assistant instead, see [the AI CodeOps MCP server](https://aicodeops.dev/docs/mcp-server).

MCP support is in beta.

## Remote and local servers

| Type                      | What you enter                      | Used by sessions?                                  |
| ------------------------- | ----------------------------------- | -------------------------------------------------- |
| **Remote (HTTP/SSE URL)** | The server's URL and HTTP headers   | Yes                                                |
| **Local (stdio command)** | A command and environment variables | No. It is registered, but sessions don't start it. |

Sessions run on the platform, not on your computer, so they can't start a program on your machine. Use a remote server for anything your agents should call.

Remote servers must:

- be on a public HTTPS address (private networks and `localhost` are refused);
- speak the MCP **Streamable HTTP** transport (JSON-RPC over POST, with a JSON or event-stream response);
- accept authentication in static headers, such as a bearer token. Servers that need an OAuth sign-in aren't supported yet, and neither is the older SSE-only transport.

## Add a server

1. Open **Configure → MCP Servers** and choose **Add MCP server**.
2. Enter a **Name**, for example "GitHub". AI CodeOps makes the server's ID from it, in lower case with dashes: "GitHub" becomes `github`, "Docs Search" becomes `docs-search`. Tool names and policy rules use this ID.
3. Choose **Remote (HTTP/SSE URL)** and enter the **Server URL**.
4. Under **Headers**, add one `KEY=value` per line, for example:

   ```text
   Authorization=Bearer <your token>
   ```

5. Choose **Save MCP server**.

The server appears under **Servers** with **Disable** and **Remove**. There is no edit form yet: to change a server, remove it and add it again.

Managing MCP servers needs the MCP-manage permission: owners, admins and DevOps admins by default.

## How secrets are stored

Headers (remote) and environment variables (local) are encrypted at rest with AES-256-GCM. They are never sent back to the browser; the list shows only which keys are set, such as "1 header: Authorization". They are decrypted only when a session connects to the server. Server creation, changes and removal are recorded in the [audit log](https://aicodeops.dev/docs/audit-logs).

## How agents get the tools

When a session starts, AI CodeOps connects to each enabled remote server and lists its tools. A server that can't be reached is skipped, and the session runs without its tools.

- Tools are named `<server>__<tool>`, for example `github__create_issue`.
- A session can offer up to 32 MCP tools in total.
- In each agent step, an agent can make up to 6 rounds of tool calls.
- Each call times out after 30 seconds, and long results are shortened.

You can narrow which tools reach the agents in two ways.

### Per agent

On **Configure → Agents**, a custom agent has a field **MCP tools allowed**. Enter servers, tools or `server__tool` names, comma-separated. Leave it blank to allow all.

### By workspace policy

A [policy rule](https://aicodeops.dev/docs/policy-engine) on the `mcp.invoke` action matches `server/tool`. A tool the policy doesn't allow is never offered to the agents. For example, to keep every delete tool on the GitHub server away from your sessions:

```json
{ "id": "no-repo-deletes", "action": "mcp.invoke", "resource": "github/delete_*", "decision": "deny" }
```

`mcp.invoke` rules can use `allow` or `deny`, not `ask`. With the **None** trust posture, MCP tools are denied unless a rule allows them.

## Troubleshooting

If a session doesn't use a server's tools:

- Check the server is enabled and is a **Remote** server.
- Check the URL is public HTTPS and the server supports Streamable HTTP, not only SSE.
- Check the headers: an expired token makes the server refuse the connection.
- Check the custom agent's **MCP tools allowed** field and your workspace policy.

## Next steps

- [Agents and workflows](https://aicodeops.dev/docs/agents)
- [Policy rules reference](https://aicodeops.dev/docs/policy-engine)
- [Dependency audit](https://aicodeops.dev/docs/dependency-audit)

## Frequently asked questions

### Is AI CodeOps itself an MCP server?

Yes, separately from this page. Its MCP server lets Claude Code, Cursor or another MCP client use your workspace; see the AI CodeOps MCP server guide. This page is about the other direction, the servers your sessions connect to.

### Do sessions start local (stdio) MCP servers?

No. You can register a local server, but sessions only connect to remote servers over HTTPS.

### Can I see a header after saving it?

No. Headers and environment variables are encrypted at rest and never shown again. The list only shows which keys are set.
