OpenCode can connect to InfraBeacon through MCP, short for Model Context Protocol. This lets OpenCode read your InfraBeacon monitoring reports while you work.
InfraBeacon MCP access is read-only. OpenCode can view monitoring data, but it cannot create, edit, pause, reset, or delete your monitors.
Step 1: Create an InfraBeacon MCP token
- Sign in to InfraBeacon.
- Open Profile.
- Find AI tool access.
- Enter a token name, such as "OpenCode".
- Select Create read-only token.
- Copy the token straight away. It is only shown once.
Step 2: Open your OpenCode config
OpenCode reads MCP servers from its config file. Use your existing opencode.json or opencode.jsonc file, or create one if you do not have one yet.
For a workspace-only setup, place the file in your project. For a global setup, use your OpenCode user config.
Step 3: Add InfraBeacon as a remote MCP server
Add this mcp entry to your OpenCode config:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"infrabeacon": {
"type": "remote",
"url": "https://infrabeacon.io/mcp",
"enabled": true,
"headers": {
"Authorization": "Bearer YOUR_INFRA_BEACON_TOKEN"
}
}
}
}
Replace YOUR_INFRA_BEACON_TOKEN with the token you copied from InfraBeacon.
If your config already has other settings, only add the infrabeacon entry inside the existing mcp object.
Step 4: Restart OpenCode
Restart OpenCode so it reloads the config and discovers the InfraBeacon MCP tools.
You can then ask OpenCode questions such as:
- "Use InfraBeacon to show which monitors need attention."
- "Use InfraBeacon to summarise uptime for my main website."
- "Use InfraBeacon to check recent server pressure."
Troubleshooting
- If OpenCode cannot connect, check that the endpoint is exactly
https://infrabeacon.io/mcp.
- If authentication fails, revoke the old token in InfraBeacon, create a new read-only token, and update the
Authorizationheader.
- If tools do not appear, restart OpenCode after saving the config.
- Keep the token private. Anyone with the token can read the InfraBeacon monitoring data available to your account.