Skip to main content

Overview

Connect any Model Context Protocol server, such as Grafana’s, AWS’s, or one your team runs, and OpenSRE can call its tools during an investigation. Each server tool becomes its own agent tool, named mcp__<server>__<tool>, with the server’s own description and argument schema. The agent calls it directly with typed arguments, with no listing step first. What a tool may do depends on the server’s readOnlyHint annotation:

Prerequisites

  • An MCP server reachable from where OpenSRE runs: a URL for HTTP servers (streamable-http or sse), or a command for local stdio servers.
  • Any credentials the server needs: an HTTP header for remote servers, or the command’s own environment for stdio servers.

Setup

Each server is one instance of the mcp integration. The instance name becomes the <server> part of the tool names, so give every server a short, distinct name using letters, digits, - and single _. If two servers share a name, only the first is used. A server or tool name with other characters still works, but its tool name gets a short hash suffix, e.g. mcp__my_server__read_1a2b3c4d; use the name shown in the tool list for --allowed-tool. Run this once per server:
In the interactive shell, /mcp connect does the same. Re-running setup with an existing server name updates that server, and its saved answers are the defaults. Settings the prompts don’t cover are kept: timeout_seconds always, and headers and an sse mode while the server still has a URL. A new bearer token replaces a saved Authorization header. Switching the server to a local command drops its headers. You choose how OpenSRE reaches the server, then answer: OpenSRE connects and lists the server’s tools before saving. If it can’t connect, or the server exposes no tools under your answers, nothing is saved. Run setup again with the same name to change a server; your other servers are kept. Check servers later with opensre integrations verify mcp. It checks the first configured server; each server is also checked when you set it up.
opensre integrations remove mcp (or /mcp disconnect mcp) removes every configured MCP server. To remove a single server, delete its entry from instances in ~/.opensre/integrations.json.

Server fields

Manual: local store

Add each server to ~/.opensre/integrations.json as an instance of an mcp record:
Keep any other records already in the file; add the mcp record beside them.

Manual: environment variable

Set MCP_INSTANCES to a JSON array, one object per server:
Environment integrations are read only when the local store has no integrations. If you already configured any integration with opensre integrations setup, add MCP servers with opensre integrations setup mcp instead.

How tools are discovered

  • OpenSRE lists each server’s tools when it builds a turn’s tool list, then reuses that list for 5 minutes.
  • A server that fails or doesn’t answer within 10 seconds contributes no tools, and isn’t retried for 1 minute. The rest of the turn carries on.
  • Large servers don’t flood the prompt: tools beyond the initial catalog are found through tool search when the agent needs them.

Security

  • readOnlyHint is declared by the server itself. Only connect servers you trust. For a server you don’t fully trust, set read_only: true so only its read-only tools are exposed, and use allowed_tools to narrow it further.
  • Credentials stay in the server config (headers, or the stdio command’s environment). They are never shown to the model or passed as tool arguments.
  • Store tokens in ~/.opensre/integrations.json or your secret manager, not in source control.

Troubleshooting