caffeine as an MCP server
Drive caffeine from Claude Desktop, Claude Code or any MCP client.
caffeine mcp serves caffeine over MCP on stdio. An MCP client (Claude Desktop, Claude Code, any agent that speaks MCP) can then see your pipelines, start runs, read their results and your inbox. Ask "what waits for a decision?" or "run the site check on bakery as a dry run" in plain words.
Set it up
Claude Code:
claude mcp add caffeine -- caffeine mcpClaude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"caffeine": { "command": "/usr/bin/caffeine", "args": ["mcp"] }
}
}Use the full path to the binary (which caffeine prints it): desktop apps don't get your shell's PATH. Add "env": {"CAFFEINE_HOME": "…"} if your home is not ~/.caffeine.
Tools
| Tool | What it does |
|---|---|
list_pipelines | Pipelines, their steps, description and targets. |
list_targets | Targets, optionally only those that use a pipeline. |
list_runs | Recent runs: status, cost, duration, pull request or error. |
get_run | The latest run of a pipeline (on a target): summary.json and REPORT.md. |
inbox, inbox_item | What waits for a decision, and one item in detail. |
digest | The Markdown digest of the last days. |
stats | Cost, success and fallback rates. |
doctor | Tools, config and pipelines. |
run_pipeline | Starts a run in the background and returns at once: pipeline, targets or all, dry_run. Read the result later with get_run. |
approve, reject | Only with --allow-decisions. |
Every tool runs this same caffeine binary, so it behaves exactly like the command line. run_pipeline checks the pipeline and the targets before starting, so a typo is an answer and not a dead background run. The run's output goes to ~/.caffeine/logs/mcp-*.log, and its logs go where every run's logs go. A run started from MCP needs named targets or all: the server has no "current folder" of yours.
Flags
| Flag | Effect |
|---|---|
| (none) | Read everything, start runs. |
--read-only | No run_pipeline: the client can only read. |
--allow-decisions | Also approve and reject. |
approve and reject are off by default on purpose. The point of the inbox is that a human decides: an agent that can approve its own proposals skips that. Turn them on only for a client you drive yourself, and keep in mind that approve merges pull requests and applies actions.
Values from the client never become flags: a target named --all is refused.