Hedwig

Call Hedwig

Add Hedwig to the agent you already use. It runs on your computer.

Paste this into your agent

Help me install Hedwig. Open this exact link and follow its instructions: https://usehedwig.xyz/agents.md

You need Git, Node.js 22 or newer, and Yarn.

What your agent does

  1. It asks for your OK. Then it asks for your limits: who it may pay, and how much.
  2. It builds Hedwig on your computer.
  3. You save your limits in a file your agent never edits. Hedwig joins as a local MCP server named hedwig.
  4. Before each payment, your agent calls consult. Hedwig answers with its reasons, and your agent tells you.

Set it up by hand

Check the commit first. Open the releases and find the one that lists the commit below. Then run:

mkdir hedwig && cd ./hedwig && git init &&
git fetch --depth 1 https://github.com/gabchess/hedwig.git 31d6d4f0033d98589228a44ad15f1da1865d450e &&
git checkout FETCH_HEAD &&
test "$(git rev-parse HEAD)" = 31d6d4f0033d98589228a44ad15f1da1865d450e &&
yarn install --frozen-lockfile --ignore-scripts && npm ci --ignore-scripts --prefix mcp && yarn consult:build && yarn mcp:build

JSON config

Save this as .mcp.json in your project. Use absolute paths. Your agent may ask you to approve the server.

{
  "mcpServers": {
    "hedwig": {
      "command": "node",
      "args": ["/path/to/hedwig/mcp/dist/server.js"],
      "env": { "HEDWIG_POLICY_FILE": "/path/to/policy.json" }
    }
  }
}

TOML config

For an agent that reads MCP servers from a TOML file, add this.

[mcp_servers.hedwig]
command = "node"
args = ["/abs/hedwig/mcp/dist/server.js"]

[mcp_servers.hedwig.env]
HEDWIG_POLICY_FILE = "/abs/policy.json"

Swap each path for your own. Your limits file goes where HEDWIG_POLICY_FILE points. agents.md lists every field.

For agents

Your agent follows agents.md and reads agentskill.md to know when to call Hedwig. llms.txt lists every page.