Skip to content
briefkastencloud

MCP

Every operation of the API as an MCP tool, over HTTP or stdio, for agents.

Every operation of the HTTP API is also an MCP tool with the same input schema: sources.create becomes sources_create, events.list becomes events_list. An agent can set up projects and sources, send test events, read events and redeliver them.

Over HTTP

The endpoint is POST /mcp (JSON-RPC 2.0) with a token:

{
  "mcpServers": {
    "briefkasten": {
      "url": "https://briefkasten.example/mcp",
      "headers": { "Authorization": "Bearer bk_pat_…" }
    }
  }
}

Over stdio

The CLI serves the same tools for the target it is signed in to:

{
  "mcpServers": {
    "briefkasten": { "command": "briefkasten", "args": ["mcp"] }
  }
}

Tokens for agents

Give an agent a management token with only the scopes it needs, not your session:

briefkasten token create --name agent --scope manage
ScopeAllows
readProjects, sources, events, usage
writeChanging config, test events, redelivery
billingThe plan and checkout links

Tokens are hashed at rest, shown once, and revocable from the dashboard. To let an agent receive events, use the client or briefkasten listen: MCP is for managing, the stream is for listening.