Local companion

Install

Optional. Sign in first, then run the install script to wire Cursor, Claude, ChatGPT, or local iMessage sync on your Mac.

macOS · linux · windows

agent loop

Hosted MCP at https://cosmos.polarity-lab.com/api/mcp. Call in order when you need full context:

Briefing → path → query → capture → recall

Cosmos tracks what you're mastering and what's fading. Your agents and Anki handle the reps. Use cosmos_recall_due and cosmos_record_recall for review bursts.

one command

curl -fsSL https://cosmos.polarity-lab.com/install.sh | sh

macOS gets the full stack: MCP server, background sync app, and client config merge. Linux and Windows get the MCP server only.

Prefer to read first? Open the script or run with --dry-run to see every path before anything changes.

what it does

  1. Installs @polarity-lab/cosmos-mcp from npm (Node 20+).
  2. On macOS: drops Cosmos Sync.app, registers a LaunchAgent, and opens connectors for key handoff.
  3. Merges Cosmos into Claude Desktop, Claude Code, Cursor, Codex, and Zed. Backs up each config before touching it.
--dry-run    print steps without changes
--no-app     MCP server only (skip macOS daemon)
--help       usage

Claude on your phone

Remote MCP with OAuth. Works on Claude iOS, Android, and claude.ai.

  1. Open claude.ai/customize/connectors (phone browser or desktop).
  2. Add custom connector → URL: https://cosmos.polarity-lab.com/api/mcp
  3. When Claude asks you to connect, sign in to cosmos and approve access.
  4. In any chat: + → Connectors → enable cosmos.

Agent loop on mobile: briefing → path → query → capture → recall. Same tools as Cursor.

manual path

npm install -g @polarity-lab/cosmos-mcp
claude mcp add cosmos --scope user -- npx -y @polarity-lab/cosmos-mcp

Provision a key at /connectorsopen in cosmos-mcp. Or:

npx -y @polarity-lab/cosmos-mcp provision pmk_xxx

Background sync (macOS):

npx -y @polarity-lab/cosmos-mcp daemon install
npx -y @polarity-lab/cosmos-mcp daemon kick

Grant Full Disk Access to ~/Applications/Cosmos Sync.app for iMessage.

rollback

Every modified config has a .bak.<timestamp> beside it.

mv ~/.cursor/mcp.json.bak.TIMESTAMP ~/.cursor/mcp.json
npm uninstall -g @polarity-lab/cosmos-mcp

troubleshooting


Source: teampolarity/cosmos-mcp (MIT)