Minimal MCP (JSON-RPC 2.0) handler that exposes annotations to an AI agent.
Register it with your agent (replace the port with your dev server's):
claude mcp add --transport http annotai http://localhost:4000/annotai/mcpThe tools fall into three groups:
- reads —
annotai_get_pending,annotai_get_annotation - lifecycle —
annotai_acknowledge,annotai_resolve,annotai_dismiss,annotai_reply annotai_watch_annotations— a hands-free loop that waits for new annotations
Lifecycle transitions are guarded by Annotai.Store.transition/3, so an
annotation cannot be resolved or dismissed twice.
Summary
Functions
Handle one decoded JSON-RPC request map.
The JSON-RPC response for an unparseable request body.