Cosmos MCP logo

Cosmos MCP

by teampolarity

Shared personal knowledge graph with MCP tools for reading, writing, and syncing information across supported clients and sources.

Install Cosmos MCP

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "teampolarity-cosmos-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "@polarity-lab/cosmos-mcp"
      ],
      "env": {
        "COSMOS_TOKEN": "YOUR_VALUE_HERE"
      }
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Values are written into the snippet above so you can paste it as is. They never leave your browser.

We couldn’t confirm it starts correctly

We ran the install command but it didn't respond within our test window — this can mean a slow first-time install rather than a real problem.

npx -y @polarity-lab/cosmos-mcp

No response to initialize.

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked 1mo ago.

Overview

The teampolarity/cosmos-mcp MCP server connects MCP clients to a shared Cosmos personal knowledge graph. It provides read tools for graph export, scoped graph views, identity checks, and natural-language questions, plus write tools for observations, events, preferences, conversations, and location-based updates. Local commands can also sync iMessage, shell history, and Claude Code transcripts, while Notion and Obsidian connect through separate integrations. Reach for it when agents need portable, account-keyed context that persists across multiple MCP clients.

Use cases

  • Share persistent personal context across MCP clients
  • Sync iMessage conversations into a knowledge graph
  • Capture durable observations from agent conversations
  • Import shell history and Claude Code transcripts
  • Query a personal graph with natural-language questions

Key features

  • Shared account-keyed personal knowledge graph
  • Eleven MCP read and write tools
  • Portable .polarity graph export
  • Incremental iMessage and shell-history synchronization
  • Claude Code transcript synchronization
  • Notion and Obsidian source connections

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked 2d ago

Recent health check succeeded.

9/10 checks healthy over the last 84d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 15d ago via OSV.dev · @polarity-lab/cosmos-mcp (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars3Stargazers on the source repository.
npm downloads494Package downloads in the last 30 days.
Last commit2mo agoMost recent push to the default branch.
Install checkInconclusiveDidn't respond in our test window — often a slow first install.
Directory activity4 viewsConfig copies, upvotes, and views on AllMCPs.

How Cosmos MCP works

What teampolarity/cosmos-mcp MCP server does

The teampolarity/cosmos-mcp MCP server gives MCP-capable applications access to a shared Cosmos knowledge graph. The graph is associated with a user account and can be exported as a portable .polarity file. Multiple clients can read from and write to the same graph instead of maintaining separate agent-specific context.

The server exposes eleven tools. Read operations identify the bound user and scopes, return graph data at different entity levels, export the complete personal graph, or answer natural-language questions using graph contents. Write operations accept observations, events, preferences, full conversation turns, short location-based messages, check-ins, future presence declarations, and reconstructed work-hour records.

Use this server when context needs to follow a user between supported MCP clients such as Claude Desktop, Cursor, Codex, Zed, or Continue.

How it works

The MCP client runs the package through npx and communicates with the Cosmos service using an account key. A client can submit a freeform observation, a typed event or preference, or an entire user-assistant exchange. The latter lets Cosmos extract durable observations from a conversation in one request.

Read tools expose the resulting graph through API-backed operations. polarity_get_graph can scope its view to the user, Cosmos, or Polarity entities, while polarity_ask sends a natural-language question for synthesis over the graph. polarity_export returns the full graph in the polarity/v1 JSON format.

The package also includes source-specific CLI commands. On macOS, iMessage data is read locally from the Messages database after Full Disk Access is granted; only normalized conversation turns are sent to the graph. Shell-history sync reads local shell history with a byte-offset watermark, filters trivial commands and consecutive duplicates, and uploads each sync window as a source page. Claude Code session transcripts under ~/.claude/projects/ can also be synchronized. Notion uses OAuth and Obsidian uses a community plugin.

Setup and configuration

The documented MCP command is:

config.json
{
  "mcpServers": {
    "cosmos": {
      "command": "npx",
      "args": ["-y", "@polarity-lab/cosmos-mcp"]
    }
  }
}

Authentication can be provisioned through the Cosmos website and stored in the macOS system keychain, or supplied manually with a pmk_ key. The init command opens a browser-based sign-in flow and stores the token at ~/.config/cosmos-mcp/token. For CI, set COSMOS_TOKEN; this takes precedence over the keychain. The install-handler provisioning flow is macOS-only.

The repository also documents a shell installer that configures common clients. On macOS, that installer can register the cosmos-mcp:// scheme and install Cosmos Sync for background source synchronization. Linux and Windows receive the MCP server path only.

Tools and capabilities

The teampolarity/cosmos-mcp MCP server includes these supported capabilities:

  • Check the authenticated account with polarity_whoami.
  • Export or inspect graph data with polarity_export and polarity_get_graph.
  • Ask natural-language questions with polarity_ask.
  • Store observations, events, and preferences.
  • Capture a complete conversation turn for durable-knowledge extraction.
  • Record reconstructed work-hour receipts, location dumps, check-ins, and declarations.
  • Synchronize supported local and connected sources into the same graph.

Limitations and notes

Local source access depends on the operating system and permissions. iMessage synchronization is macOS-only and requires Full Disk Access for the application running the CLI. The automatic URL-handler provisioning flow is also macOS-only.

Notion requires connecting through the Cosmos connectors page, and Obsidian requires the Polarity community plugin. The server is one write path into Cosmos; source pages may also be supplied by other integrations or the direct API. Re-synchronization skips unchanged pages, and iMessage synchronization uses an incremental watermark after its initial window.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Cosmos MCP

Run `npx -y @polarity-lab/cosmos-mcp`, or configure an MCP client with that command and package argument. The repository also documents a shell installer for configuring common clients.

Yes. Claude Desktop is listed as a supported MCP client, and the installer can configure it. Manual configuration uses `npx` with `@polarity-lab/cosmos-mcp`.

Provision a `pmk_` key through the Cosmos sign-in flow or with the `provision` command. The key can be stored in the macOS keychain; CI environments can set `COSMOS_TOKEN` instead.

Yes, on macOS. Run the `imessage sync` subcommand after granting Full Disk Access to the application running the CLI. The sync is incremental and supports backfills or a specified start date.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewCosmos MCP AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/teampolarity-cosmos-mcp?style=directory)](https://allmcps.com/mcp/teampolarity-cosmos-mcp)
HTML Embed
<a href="https://allmcps.com/mcp/teampolarity-cosmos-mcp"><img src="https://allmcps.com/api/badge/teampolarity-cosmos-mcp?style=directory" alt="Cosmos MCP on AllMCPs" /></a>