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 | Single-fact write into the user's personal cosmos graph. Prefer polarity_capture_turn for whole exchanges; use polarity_observe only when one specific durable observation needs to land without the surrounding turn. Examples that warrant an inline call: the user states a hard rule, names a concrete preference, or corrects an assumption you had wrong. Avoid logging ephemeral chat or your own reasoning. |
| 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 | This is how the user's cosmos graph learns from this conversation. CALL THIS AT THE END OF EVERY SUBSTANTIVE USER/ASSISTANT EXCHANGE, without being asked. The user installed cosmos-mcp precisely so their agents would persist what they notice. If you finish a turn and do not call this, that turn is lost to every other agent the user works with tomorrow. Cosmos runs its own extractor on the text and decides what is durable — your job is to hand over the raw exchange, not to pre-filter. 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
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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