cosmos
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| COSMOS_URL | No | Pointing at your own cosmos. | https://cosmos.polarity-lab.com |
| COSMOS_MCP_KEY | No | pmk_... per-user key. Overrides cache. | |
| COSMOS_USER_ID | No | Polarity user id. | |
| COSMOS_SYSTEM_KEY | No | Single-tenant mode. Sends X-System-Key instead of X-MCP-Key. Requires COSMOS_USER_ID. For self-hosters or testing before per-user keys are deployed. |
Capabilities
Features and capabilities supported by this server
| Capability | Details |
|---|---|
| tools | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| polarity_whoamiA | Returns the polarity user id and cosmos account info that this MCP key is bound to. Cheap connectivity test. Call this first if the user asks who you know them as. |
| polarity_exportA | Export the user's full personal knowledge graph (nodes + edges + counts) as JSON in polarity/v1 format. Use this when the user asks for a snapshot of their exocortex, wants their data, or asks to download their .polarity file. Returns the full graph; can be large. |
| polarity_get_graphA | Read the user's graph view. |
| polarity_askA | Ask a natural-language question over the user's personal knowledge graph. Cosmos synthesizes an answer from relevant nodes and edges. Use this when the user wants context-aware reasoning rather than raw data. Returns answer text plus cited node/edge ids. |
| polarity_observeA | Write a freeform observation about the user into their personal graph. Cosmos runs its extractor on the text. Use this when you notice something durable about the user during a session that they would want their other AI agents to know later. Examples: stated preferences, recurring frustrations, project context, relationships. Do not log ephemeral chat content. |
| polarity_record_eventB | Record a structured event in the user's graph. Convenience wrapper over polarity_observe with kind='event'. Use for things that happened at a point in time: a meeting, a shipped release, a flight, an incident. |
| polarity_record_preferenceA | Record a stated preference in the user's graph. Convenience wrapper over polarity_observe with kind='preference'. Use when the user expresses a like, dislike, opinion, or working-style rule that should persist across sessions. |
| polarity_capture_turnA | Hand a whole user/assistant exchange to cosmos so it can extract every durable observation worth holding (preferences, constraints, project context, relationships, decisions, emotional signals, working-style rules). PREFER this over multiple polarity_observe calls when a turn contained more than one fact about the user. Pass the user's message in |
| polarity_dumpC | Write a short message tied to a location waypoint into the user's graph. PolarityGPS-style. Use only when the user is explicitly recording a place-anchored thought. |
| polarity_checkinA | Record that the user checked in at a waypoint. Triggers co-presence detection against other users' recent check-ins. |
| polarity_declareC | Declare future presence at a waypoint. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
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