CORTEXA includes a full stdio MCP transport for use in MCP-compatible clients (Claude Desktop, Cursor, etc.).
- JSON-RPC 2.0 framing over stdio (
Content-Lengthtransport) - MCP lifecycle methods:
initializetools/listtools/callresources/list(empty)prompts/list(empty)ping
- Tool bridge into daemon routes (
/cxlink/*, compaction, self-healing, ingest, evolve) - MCP context codec tooling (
cortexa_encode_mcp_ctx,cortexa_decode_mcp_ctx)
flowchart LR
CLIENT[MCP client] --> STDIO[JSON-RPC over stdio]
STDIO --> SERVER[CORTEXA MCP server]
SERVER --> DAEMON[Daemon HTTP routes]
DAEMON --> PAYLOAD[Tool result payload]
PAYLOAD --> CLIENT
| Tool family | Examples | Mutation |
|---|---|---|
| Core retrieval | cortexa_query, cortexa_context, cortexa_plan |
no |
| Proactive and temporal | cortexa_context_suggest, cortexa_temporal_* |
no |
| Agent surface | cortexa_agent_list, cortexa_agent_run |
list: no, run: yes |
| Branch controls | cortexa_branch_* |
list: no, create/merge/switch: yes |
| Compaction controls | cortexa_compaction_*, cortexa_self_heal_* |
stats/dashboard/status: no, trigger: yes |
pnpm run cortexa:mcpFor production/distribution runs (after build):
node dist/apps/mcp-server/src/server.jsRead-only tools:
cortexa_healthcortexa_querycortexa_contextcortexa_plancortexa_context_suggestcortexa_agent_listcortexa_temporal_querycortexa_temporal_diffcortexa_branch_listcortexa_compaction_statscortexa_compaction_dashboardcortexa_self_heal_statuscortexa_encode_mcp_ctxcortexa_decode_mcp_ctx
Mutation tools (disabled by default):
cortexa_ingestcortexa_evolvecortexa_agent_runcortexa_branch_createcortexa_branch_mergecortexa_branch_switchcortexa_self_heal_trigger
Enable mutations with:
CORTEXA_MCP_ENABLE_MUTATIONS=true
cortexa_query,cortexa_context, andcortexa_planacceptbranchandasOffor branch-aware + temporal retrieval.cortexa_ingestacceptsbranchto ingest into non-mainmemory branches.cortexa_context_suggestsupportswarmup,topK, andmaxTokensfor proactive pre-compilation.cortexa_temporal_queryrequiresquery,projectId, andasOf.cortexa_temporal_diffrequiresprojectId,from, andto.cortexa_agent_runrequiresagent+textand supportsprojectId,branch,context,dryRun(defaults totrue),topK,maxChars, andexistingSnippets.
CORTEXA_MCP_SERVER_NAME(defaultcortexa-mcp)CORTEXA_MCP_SERVER_VERSION(default0.1.0)CORTEXA_MCP_PROTOCOL_VERSION(default2024-11-05)CORTEXA_MCP_DAEMON_URL(defaulthttp://127.0.0.1:4312)CORTEXA_MCP_DAEMON_TOKEN(optional, used for daemon auth)CORTEXA_MCP_TIMEOUT_MS(default20000)CORTEXA_MCP_ENABLE_MUTATIONS(defaultfalse)CORTEXA_MCP_LOG_LEVEL(debug|info|warn|error, defaultinfo)
Use your built server path and daemon token:
{
"mcpServers": {
"cortexa": {
"command": "node",
"args": ["C:/Users/ayana/Projects/Cortexta/dist/apps/mcp-server/src/server.js"],
"env": {
"CORTEXA_MCP_DAEMON_URL": "http://127.0.0.1:4312",
"CORTEXA_MCP_DAEMON_TOKEN": "replace-with-secure-token",
"CORTEXA_MCP_ENABLE_MUTATIONS": "false"
}
}
}
}- Keep mutation tools disabled for read-only assistant profiles.
- Prefer daemon token auth (
CORTEXA_DAEMON_TOKEN) and pass it asCORTEXA_MCP_DAEMON_TOKEN. - Restrict daemon bind exposure to trusted local networks unless reverse-proxied securely.