Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
COSMOS_URLNoPointing at your own cosmos.https://cosmos.polarity-lab.com
COSMOS_MCP_KEYNopmk_... per-user key. Overrides cache.
COSMOS_USER_IDNoPolarity user id.
COSMOS_SYSTEM_KEYNoSingle-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

CapabilityDetails
tools
{}

Tools

Functions exposed to the LLM to take actions

NameDescription
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. entity selects which projection: 'user' (the user's self-graph), 'cosmos' (the cosmos entity's view of them), or 'polarity' (the dyadic synchronization between the two). Use 'user' for general questions about what the user thinks, does, or knows. Use 'polarity' when comparing the user's self-image against the system's observation.

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. source should identify your client (e.g. 'claude-code', 'cursor'). kind defaults to 'observation'; use 'event' for things that happened, 'preference' for stated likes/dislikes.

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 user_text, your reply in assistant_text. Cosmos returns the node ids it created.

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. chip is the time-window enum: next_30, next_hour, tonight, tomorrow_night.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

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