iri docs

Local stdio

The wrapper at mcp/server.ts is a thin shim over the same REST API as the hosted HTTP endpoint. Useful when your client doesn't speak Streamable-HTTP yet, or when you need to aim at a site URL the client can't reach directly.

Requirements

  • Node 20+
  • A workspace key (iri_ws_…) from /workspaces/<slug> → API Keys

Run manually

cd /path/to/iri_notes
IRI_WORKSPACE_KEY=iri_ws_… IRI_SITE_URL=http://localhost:4321 npm run mcp

The process blocks on stdin waiting for an MCP handshake. On startup it logs MCP: Authenticated as … to stderr — if you see Invalid API key the key is wrong or revoked.

Claude Code via stdio

Drop this at .mcp.json in your project root:

{
  "mcpServers": {
    "iri-notes": {
      "command": "npx",
      "args": ["-y", "tsx", "/absolute/path/to/iri_notes/mcp/server.ts"],
      "env": {
        "IRI_SITE_URL": "http://localhost:4321",
        "IRI_WORKSPACE_KEY": "iri_ws_…"
      }
    }
  }
}

Environment

Variable Required Default Notes
IRI_WORKSPACE_KEY yes Preferred.
IRI_API_KEY (fallback) Legacy alias.
IRI_SITE_URL no http://localhost:4321 Trailing slash stripped.

Why pick stdio over HTTP

  • The client only supports stdio.
  • You're tunneling into a private network and want a local outbound connection.
  • You need to mint a per-agent process for audit-log clarity.

Otherwise prefer hosted HTTP — no Node install on the client side, easier key rotation.