Anomaly·opencode.json

OpenCode + Mackerel

Open-source coding agent supporting remote MCP servers and local skills across 75+ models.

  1. 1

    Configure opencode.json

    Add Mackerel as a remote MCP server in your project root.

    opencode.json

    {
      "$schema": "https://opencode.ai/config.json",
      "mcp": {
        "mackerel": {
          "type": "remote",
          "url": "https://api.runmackerel.com/mcp",
          "headers": {
            "Authorization": "Bearer {env:MACKEREL_API_KEY}"
          }
        }
      }
    }
  2. 2

    Install the skill

    Makes Mackerel conventions available on demand.

    mkdir -p .opencode/skills/mackerel
    curl -fsSL https://runmackerel.com/skill.md -o .opencode/skills/mackerel/SKILL.md

What your agent gets

Served over Streamable HTTP at https://api.runmackerel.com/mcp.

mackerel_search

Search demo_sops or custom corpora with ACL groups, override chains, and abstention.

mackerel_list_corpora

List available corpora and rule counts in the authenticated workspace.

mackerel_upsert_rule

Add or update rule nodes, ACL groups, overrides, and supersession edges.

Example build prompt
Create a custom corpus called acme_security via mackerel_upsert_rule with a base SSH rule and a FedRAMP override restricted to group security.