Anthropic·~/.claude.json

Claude Code + Mackerel

Connects over Streamable HTTP MCP and loads the Mackerel skill on demand.

  1. 1

    Export your API key

    Create a key under dashboard.runmackerel.com/keys and export it in your shell.

    export MACKEREL_API_KEY="mk_live_..."
  2. 2

    Register the Mackerel MCP server

    Registers Streamable HTTP tools (mackerel_search, mackerel_list_corpora, mackerel_upsert_rule).

    claude mcp add --transport http mackerel https://api.runmackerel.com/mcp \
      --header "Authorization: Bearer ${MACKEREL_API_KEY}"
  3. 3

    Install the Mackerel skill

    Teaches Claude Code when to pass ACL groups, how to read overrides, and when to abstain.

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

    Verify in Claude Code

    Run claude in your repo and test against demo_sops.

    Use mackerel_search on demo_sops to check whether a German-entity contractor can expense a €140 client dinner with groups ["finance-emea"].

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
Wire Mackerel into our support bot using POST /v1/search. Pass the signed-in user's groups on every call and return an abstention message when abstained is true.