Overview
rousseau mcp starts a stdio Model Context Protocol server (spec revision 2024-11-05). It publishes rousseau's session store and cron jobs as MCP tools so any MCP host (Claude Desktop, Cursor, IDE extensions, other agents) can search, list, and read your rousseau history.
Source: internal/cli/mcp.go. Server implementation: internal/mcp/.
Synopsis
rousseau mcp [--config <path>]
There are no MCP-specific flags. Communication is over stdin/stdout; the MCP host launches rousseau as a subprocess.
Exposed tools
| Tool | Purpose | Returns |
|---|---|---|
rousseau_search_sessions |
FTS5 search across every recorded conversation | ranked list of {session_id, title, snippet, rank} |
rousseau_list_sessions |
List recent sessions newest-first | {id, title, message_count, updated_at} rows |
rousseau_read_session |
Fetch the full transcript of one session | ordered messages with role + content |
rousseau_cron_list |
List every scheduled prompt | {id, name, cron_expr, enabled, last_run_at, ...} |
These tools are registered by mcp.RegisterRousseauTools(s, mcp.NewStoreBackend(concrete, cronStore)).
Environment variables
rousseau mcp inherits every environment variable resolved by config.Load. The most relevant:
| Variable | Effect |
|---|---|
ROUSSEAU_STATE_PATH |
Override the SQLite session store location. |
ROUSSEAU_LOG_LEVEL |
Log level for the MCP server itself (writes to stderr; stdout is reserved for JSON-RPC). |
ROUSSEAU_LOG_FORMAT |
Log format (text or json). |
Wiring into an MCP host
Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"rousseau": {
"command": "rousseau",
"args": ["mcp"]
}
}
}
Restart Claude Desktop. The tools appear under the tool picker.
Cursor honours the same mcpServers shape in its settings JSON. Set the command to the absolute path of your rousseau binary if it isn't on Cursor's PATH.
Any MCP host that follows the stdio transport spec can attach to rousseau mcp by spawning the subprocess and pumping JSON-RPC over stdio.
Startup sequence
- Open the SQLite session store at
state.path. - Instantiate the cron store.
- Construct
mcp.NewServer("rousseau", version, logger). - Register the four tools.
s.Serve(ctx, os.Stdin, os.Stdout)— blocks reading JSON-RPC from stdin.
Exit codes
| Code | Meaning |
|---|---|
| 0 | stdin closed (host disconnected). |
| 1 | Store or server startup error. |
| 130 | SIGINT. |
Worked examples
# Manual smoke-test: send an `initialize` request over stdin
printf '%s\n' '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","clientInfo":{"name":"probe","version":"0"},"capabilities":{}}}' | rousseau mcp
You should see a JSON-RPC response containing serverInfo with "name":"rousseau".
Common failure modes
- Host says "server exited immediately" — a permission error opening
state.path. Checkls -l ~/.local/share/rousseau/sessions.db. - Nothing shows up in Claude Desktop — the config JSON syntax is wrong. Validate with
jq . claude_desktop_config.json. FTS5 syntax error— search queries must use FTS5 grammar (phrases in double quotes,AND/OR/NOT, prefixfoo*).
Related pages
- MCP — protocol overview.
- Recipes: MCP desktop integration
- Reference: Session store
- Reference: Commands: chat