Cortex exposes two MCP-compatible paths:
- HTTP JSON-RPC:
POST http://127.0.0.1:8766/mcp - Stdio proxy:
scripts/cortex_mcp_stdio.py
The macOS app starts the local backend automatically. Once Cortex is running, local tools can connect through the stdio proxy.
The macOS app uses a local per-install admin token for Cortex REST API calls. Local AI-tool integrations should not use that admin token. New copied or installed MCP configs use a separate scoped cxm_ MCP token.
/mcp accepts:
- the admin app token for backward compatibility with older local configs;
- a stored scoped MCP token for current integrations.
Scoped MCP tokens are checked before Connections & Privacy controls. A tool call succeeds only when the token has the needed scope and the matching local privacy control is enabled. Newly generated local MCP tokens include read, write, export, and maintenance; they do not include destructive.
Scoped tokens are advertised a curated CORE surface — one tool per job — instead of the full catalog, so agents pick the right tool on the first try:
get_context— the context assembly engine: a token-budgeted, cited pack of constraints, decisions, facts, entity context, procedures, identity, open loops, and recency, shaped by task intent (answer/act/draft/plan/recall). Call this first before doing work. Also available over REST asGET/POST /v1/context(read scope; the identity layer alone requires export scope and degrades to a visible omission record without it).ask_memory— cite-or-abstain answer to a specific question (never an uncited guess).search_memory— keyword/semantic search with retrieval diagnostics.get_entity_context— everything known about one person/project/org/topic + its graph neighborhood.get_person_map— the whole cited image of the person (export scope).remember_this— save one learning (write scope).list_capabilities— discovery: counts, your scopes, the full catalog with required scopes.
Tokens minted with maintenance or destructive scopes additionally see those tool groups.
Hiding is never authorization: every legacy tool remains callable via tools/call when the
token's scopes allow — the collapse changes only what tools/list advertises. To restore the
full legacy list, mint the token with the advertise_full marker scope (advertisement-only,
grants nothing) or set CORTEX_MCP_TOOL_SURFACE=full on the backend. The admin app token
always sees the full catalog.
MCP source tools can register connected source accounts, sync cited source records, and run due sync for already connected sources:
list_source_connectorsconnect_source_accountsync_source_recordssync_connected_sourcesis maintenance-scoped and runs due sync for already connected sources using the locally stored source configuration.
This is the preferred beta path for connected tools and local connector processes. Direct connector tools such as sync_slack, sync_readwise, sync_raindrop, sync_zotero, sync_calendar, sync_linear, sync_jira, and sync_notion feed this same account, cursor, citation, and review contract. When sync_source_records includes a stable external_id, Cortex treats the record as the same source item on future syncs: unchanged content is skipped, changed content replaces the existing record's derived memory, and citations stay attached to the source account.
The macOS app exposes integrations from Connections & Privacy > AI tools. It supports two integration modes:
- One-click MCP install for clients with stable local JSON config files.
- Advanced/fallback context-copy handoff for tools that cannot connect through MCP yet.
For direct installs, Cortex creates the parent config directory if needed, backs up an existing config next to the original file, then merges a single mcpServers.cortex entry without removing other servers.
Primary local install targets:
- Claude Desktop:
~/Library/Application Support/Claude/claude_desktop_config.json - Cursor:
~/.cursor/mcp.json - Windsurf:
~/.codeium/windsurf/mcp_config.json - Cline:
~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json - Roo Code:
~/Library/Application Support/Code/User/globalStorage/rooveterinaryinc.roo-cline/settings/mcp_settings.json
Fallback targets that still need direct MCP or account sync before they should be treated as primary:
- VS Code Copilot
- Claude Code
- ChatGPT
- Claude web
- Gemini
- Perplexity
- Microsoft Copilot
- Grok
- Poe
- NotebookLM
- LM Studio
- Open WebUI
- LibreChat
- AnythingLLM
The app-generated config should be preferred because it points at the bundled stdio proxy inside the installed app.
Packaged app shape:
{
"mcpServers": {
"cortex": {
"command": "python3",
"args": [
"/Applications/Cortex.app/Contents/Resources/scripts/cortex_mcp_stdio.py"
],
"env": {
"CORTEX_BASE_URL": "http://127.0.0.1:8766",
"CORTEX_API_KEY": "<scoped cxm_ MCP token generated by Cortex>"
}
}
}
}Development repo shape:
{
"mcpServers": {
"cortex": {
"command": "python3",
"args": [
"/absolute/path/to/cortex-app/scripts/cortex_mcp_stdio.py"
],
"env": {
"CORTEX_BASE_URL": "http://127.0.0.1:8766",
"CORTEX_API_KEY": "<scoped cxm_ MCP token generated by Cortex>"
}
}
}
}Browser assistants do not all expose a stable local MCP config. For those, Cortex can copy scoped chat context as an advanced/fallback handoff with instructions:
- search/use pasted Cortex memory before asking the user to repeat context
- treat saved decisions and follow-ups as high-priority
- ask focused follow-ups when context is missing or stale
- preserve the user's local-first privacy constraints
remember_this: save text into Cortex memorysearch_memory: search active memories, optionally filtered bykindor memorylayer(semantic,episodic,style,decision,preference,negative,procedural)get_recent_context: retrieve recent active memoriesget_memory_graph: retrieve the active graphget_daily_review: retrieve today's pending memory candidates, follow-ups, decisions, topics, and recommended actionsbuild_context_pack: build an advanced/fallback context-copy payload for ChatGPT, Claude, Cursor, or another assistant when direct connection is not availableget_personal_profile: retrieve a cited profile grouped by memory layer, coverage, source health, follow-ups, and limitationsget_agent_adaptation: retrieve cited operating instructions that adapt an AI assistant to the user's preferences, style, decisions, limits, and current memory coverageget_decisions: retrieve saved decisionsget_open_questions: retrieve open questions and taskslist_memory_topics: list active topicslist_memory_entities: list active people, projects, organizations, and topicsget_about_person: retrieve memories involving a personget_about_entity: retrieve memories involving any named entityget_product_loop: retrieve the connect/sync, review, ask loop stateget_memory_stats: retrieve counts and top contextget_memory_inbox: retrieve pending memory candidatesapprove_memory_capture: approve a pending memory candidatearchive_memory_capture: archive a memory candidate and remove it from active retrievaldelete_memory_capture: permanently delete a memory candidate and its derived memories/tasks from the current local memory folder and indexget_memory_diagnostics: inspect storage healthget_reliability_report: inspect health contract, storage checks, backup state, and recommended recovery actionsget_support_bundle: generate a sanitized operational support bundle without raw source text or memory contentcreate_memory_backup: create a full local memory folder backuprestore_latest_memory_backup: restore memory records from the latest local backup and rebuild the local search indexdelete_memory_backups: delete local backup archivesdelete_all_user_data: delete the current user's local memory folder/index data; includes backup archives by defaultrepair_memory_storage: create a backup, clean stale derived index rows, and rebuild searchrebuild_memory_search: rebuild full-text searchrebuild_index_from_vault: rebuild the SQLite search index from user-owned memory filesexport_memory: export memory as Markdown or JSON
Diagnostics and reliability reports require the MCP token maintenance scope and the Connections & Privacy maintenance control, because they include local operational paths and repair context.
forget_memory: permanently delete one memory by ID from the current local memory folder and index
Connected AI tools should search before asking users to repeat context, cite source memory text when making claims, and use archive/delete/forget tools only when the user explicitly asks to remove memory.
- Direct installers never delete an existing config file.
- Existing JSON must parse as an object before Cortex writes to it.
- Every changed config gets a timestamped
.cortex-backup-*copy. - Users can rerun Install as Repair to refresh the Python path, local API URL, or token.
- Browser integrations use context-copy fallback until the target service exposes a safe local config or remote OAuth/MCP flow.
- MCP maintenance tools still respect Connections & Privacy controls.
- The app and MCP clients can verify the backend through
health_contract >= 3, thereliability-hardeningfeature flag, and theoperational-readinessfeature flag. build_context_packrecords use in the loop because fallback context-copy still means Cortex memory was used in an AI workflow.get_agent_adaptationrecords use in the loop because agent instructions are a higher-privilege AI workflow and should be visible in review/audit surfaces.get_support_bundleis intended for support triage; users should still review the JSON before sharing it.