This guide is for AI coding agents (Cursor, Copilot, or any other tool) that want to access the Zap Projects system -- a centralised hub of all Cursor chat history, plans, and project data.
| Entity | Description | Count |
|---|---|---|
| Projects | Auto-discovered from chat data (e.g. philoenic, zap-mail, energystats) | 9+ |
| Chats | Full Cursor AI chat transcripts with metadata, LLM summaries, and deep analysis | 23+ |
| Plans | Cursor .plan.md files cross-referenced to chats and projects |
415+ |
| Deep analysis | Structured JSON: artifacts, decisions, unfinished work, chart work, questions raised | Per chat |
The zap-projects MCP server is registered globally in ~/.cursor/mcp.json on orcus.
Tools:
list_projects() -- all projects with chat/plan countsget_project(slug) -- project detail with recent chats/planssearch_chats(query, project?, limit?) -- full-text search across chatsget_chat(id, include_transcript?) -- chat detail with summary, deep analysis, planslist_plans(project?, query?) -- list/search plan filesget_plan(path) -- read a plan file's contentsearch_all(query) -- unified search across everythingFor external agents (remote mode):
Set environment variables in your MCP config:
{
"mcpServers": {
"zap-projects": {
"command": "python3",
"args": ["/path/to/mcp/server.py"],
"env": {
"ZAP_PROJECTS_MODE": "remote",
"ZAP_PROJECTS_API_URL": "https://orcus.getzap.co/projects/api",
"ZAP_PROJECTS_API_KEY": "<your-key>"
}
}
}
}
Base URL: https://zap.orcus.lan/projects/api/ (LAN) or https://orcus.getzap.co/projects/api/ (external, when configured).
Authentication:
X-Api-Key: <key> headerphp /var/www/zap/scripts/manage-api-keys.php --create "agent-name"Endpoints:
List all projects with chat/plan counts.
curl -s 'https://zap.orcus.lan/projects/api/projects.php' | jq '.projects[] | {slug, name, chat_count, plan_count}'
Single project detail with recent chats and plans.
List chats. Params: ?project=, ?q=, ?limit=, ?offset=.
curl -s 'https://zap.orcus.lan/projects/api/chats.php?q=postgres&limit=5' | jq '.chats[] | {id, first_query_short}'
Single chat with metadata, summary, plans, deep analysis.
Add &include=transcript for full transcript text.
List plans. Params: ?project=, ?q=, ?limit=, ?offset=.
Single plan with content and linked projects/chats.
Unified search across chats, plans, and projects.
PostgreSQL on localhost, database zap, tables prefixed with cursor_:
cursor_chats -- main chat table with tsvector FTScursor_chat_plans -- chat-to-plan linkscursor_chat_deep_analysis -- structured LLM analysis (JSONB)cursor_projects -- project registrycursor_chat_projects -- chat-to-project many-to-manycursor_plans -- plan file indexcursor_plan_projects -- plan-to-project many-to-manycursor_api_keys -- API key managementCredentials in /var/www/zap/env/.env.
Find what was done in previous sessions:
search_chats("postgres migration") -> get_chat("<id>")
Understand a project's history:
get_project("philoenic") -> lists recent chats and plans
Find related plans:
list_plans(project="philoenic", query="deploy")
Get deep analysis of a session:
get_chat("<id>") -> includes deep_analysis with artifacts, decisions, unfinished work
php /var/www/zap/scripts/manage-api-keys.php --create "my-agent"
X-Api-Key header)https://zap.orcus.lan/projects/https://zap.orcus.lan/projects/cursorhttps://zap.orcus.lan/projects/<slug>https://zap.orcus.lan/projects/docs/agent-guide