cosmos
Every AI you use is building its own private graph of you. Claude has one. ChatGPT has one. Cursor has one. None of them talk to each other, and none of them are yours.
Cosmos inverts that. Your knowledge graph lives in one place, and any MCP-capable client (Claude Code, Claude Desktop, Cursor, Codex, Zed, Continue) reads and writes to the same one. When an agent notices something durable about you, it lands in the graph. When you switch tools, the graph follows. The user, not the platform, owns the integration layer.
The thing you carry is a .polarity file. Yours.
Install
npx -y @polarity-lab/cosmos-mcp initOpens your browser. Sign in at cosmos.polarity-lab.com, approve a per-user key, and the token lands at ~/.config/cosmos-mcp/token (0600). Then point any MCP client at it:
{
"mcpServers": {
"cosmos": {
"command": "npx",
"args": ["-y", "@polarity-lab/cosmos-mcp"]
}
}
}That config drops into ~/Library/Application Support/Claude/claude_desktop_config.json for Claude Desktop, your .cursor/mcp.json for Cursor, the equivalent for whichever client.
What you get
Eleven tools, four read, seven write.
Read
Tool | Calls | What it returns |
|
| Bound user + scopes. Cheap probe. |
|
| Full personal graph as |
|
| Graph view, scoped by entity ( |
|
| NL question synthesized over the graph. |
Write
Tool | Calls | What it does |
|
| Freeform observation. Cosmos extracts. |
|
| Something happened at a point in time. |
|
| A like, dislike, working-style rule. |
|
| Hand a whole user/assistant exchange to cosmos. Pulls every durable observation in one call. Prefer over multiple |
|
| Location-anchored short message. |
|
| Check-in at a waypoint. Triggers co-presence detection. |
|
| Declare future presence at a waypoint. |
Sources
The MCP server is one way to write to the graph. Cosmos accepts source pages from anywhere you keep notes, and the MCP read tools see all of it through the same view.
Source | How it connects | What lands |
Notion | OAuth at cosmos.polarity-lab.com/connectors. Pick the pages and databases you want shared. | Each Notion page becomes a |
Obsidian | Community plugin: polarity-lab/obsidian-cosmos. Paste your | Each note becomes a |
MCP clients | This package. | Observations, events, preferences, location dumps, check-ins, declarations. |
Direct API |
| Anything you can express as an observation. |
Unchanged pages are skipped server-side, so re-syncing a quiet vault or stable Notion workspace costs almost nothing.
Configuration
Env var | Default | When you set it |
|
| Pointing at your own cosmos. |
| (from token file) |
|
| (from token file) | Polarity user id. |
| (unset) | Single-tenant mode. Sends |
Self-hosting
The cosmos backend is open. Run taiscoding/cosmos on your own Cloudflare account, mint a key against your instance, set COSMOS_URL to your domain. The graph stays on your D1. The .polarity export still works.
The pitch in three lines
Your AI tools each know fragments of you. They are not allowed to share. Cosmos is the layer that lets them. You hold the key. The graph is portable. When you leave, you take the understanding with you.
License
MIT.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/teampolarity/cosmos-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server