Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 29 additions & 1 deletion ai-assistance/mcp-server.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ This page is about connecting external agents to OpenOps. For the AI assistant b

## Prerequisites

* An OpenOps environment with the MCP server enabled.
* An OpenOps environment with the MCP server enabled. If you administer the environment, see [Enabling the MCP server](#enabling-the-mcp-server).
* A user account in that OpenOps environment.
* An AI agent that can connect to remote MCP servers and sign in through your browser, such as Claude Code, Codex, Cursor, Visual Studio Code, or the Claude app.

Expand Down Expand Up @@ -187,6 +187,34 @@ Every agent you authorize appears in OpenOps, where you can review and disconnec

Removing the server from your agent's configuration doesn't revoke the agent's access in OpenOps. The agent stays listed in **Connected apps** until you disconnect it there. To fully disconnect, do both.

## Enabling the MCP server

This section is for OpenOps administrators. In the Docker Compose deployment, the MCP server is disabled by default. Enabling it requires OpenOps 0.6.26 or later.

1. Enable TLS for your installation. Agents sign in through OAuth, which OpenOps serves only over HTTPS; plain `http` is accepted only when `OPS_PUBLIC_URL` is `http://localhost`. See [Enabling TLS](/getting-started/deployment/aws-ec2#enabling-tls) in the deployment guide.
2. Open the `.env` file in your OpenOps installation directory and set the following variables:
```shell
OPS_OAUTH_ENABLED=true
OPS_OAUTH_RS_CLIENT_SECRET=<random value of at least 32 characters>
COMPOSE_PROFILES=mcp
```
Generate the secret with `openssl rand -hex 32`. The MCP container doesn't start while the secret is empty. `COMPOSE_PROFILES=mcp` makes `docker compose up -d` start the MCP container; the line is present but commented out in `.env.defaults`.

<Note>
**Installations created before 0.6.26:** updates keep your existing `.env` file, so it doesn't contain the MCP settings. Copy the "MCP server for external agents" block from `.env.defaults` into `.env` first, then edit the values above.
</Note>
3. Restart the OpenOps containers:
```shell
sudo docker compose down
sudo docker compose up -d
```
4. Verify that the server is reachable. The following command returns a JSON document that names your host as the `resource`:
```shell
curl https://<YOUR_OPENOPS_HOST>/.well-known/oauth-protected-resource/mcp
```

To disable the MCP server, set `OPS_OAUTH_ENABLED=false`, remove the `COMPOSE_PROFILES=mcp` line, and run `sudo docker compose --profile mcp down` followed by `sudo docker compose up -d`. All connected agents lose access.

## Troubleshooting

* **The agent reports that the server needs authentication:** Run the agent's login step, such as `/mcp` in Claude Code or `codex mcp login openops`, and check that the server URL ends with `/mcp`.
Expand Down
2 changes: 1 addition & 1 deletion ai-assistance/overview.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ You can use it to ask a variety of questions about OpenOps, your cloud resources
* "What kind of data does a specific [OpenOps table](/reporting-analytics/tables/) contain, and what workflows use it?"
* "What are the recent trends in the FinOps community?"

To provide in-depth answers about your OpenOps installation, the AI assistant takes advantage of the OpenOps MCP server, which is enabled by default. OpenOps also lets you connect external AI agents such as Claude Code or Codex to your environment. See [MCP Server](/ai-assistance/mcp-server) for details.
To provide in-depth answers about your OpenOps installation, the AI assistant takes advantage of the built-in OpenOps MCP server, which is enabled by default. OpenOps also lets you connect external AI agents such as Claude Code or Codex to your environment. See [MCP Server](/ai-assistance/mcp-server) for details.

It can also work with Amazon MCP servers, namely AWS Cost Explorer MCP Server, AWS Pricing MCP Server, and AWS Billing and Cost Management MCP Server. Connecting to these servers enables you to ask questions about your AWS expenses like "How much did I spend on EC2 last month?". However, you need to explicitly enable OpenOps to access the MCP servers. See [LLM Connections](/ai-assistance/llm-connections) for how to connect.

Expand Down
Loading