Skip to content

Setup

Pillbox exposes its tools to AI agents via the Model Context Protocol. The MCP server is a Node.js process that communicates with the pillbox binary over stdin/stdout.

The MCP server does not access the database directly. It communicates with the pillbox binary via pillbox mcp run:

  1. The MCP server receives a tool call from the agent.
  2. It spawns pillbox mcp run as a subprocess.
  3. It writes a JSON payload to stdin: { "tool": "pill_take", "input": { ... } }.
  4. It reads the JSON response from stdout.
  5. It returns the response to the agent.

The MCP server is stateless. All persistence is handled by the Rust core.