Connect to Cog

Integrate persistent memory with Claude Code and other AI assistants.

Getting Started

1

Get Access

Cog is invite-only. Log in if you have an account.

2

Create a Brain

From your dashboard, create a new brain. Each brain is a separate knowledge domain with its own API token.

3

Copy Your API Token

Your API token is shown on the brain page. It starts with cog_ and identifies your brain membership.

Configuration

Choose your AI coding assistant and add the configuration.

~/.claude/settings.json
{
  "mcpServers": {
    "cog": {
      "type": "http",
      "url": "https://trycog.ai/mcp",
      "headers": {
        "Authorization": "Bearer cog_YOUR_API_TOKEN"
      }
    }
  }
}
~/.config/opencode/opencode.json
{
  "mcp": {
    "cog": {
      "type": "remote",
      "url": "https://trycog.ai/mcp",
      "headers": {
        "Authorization": "Bearer cog_YOUR_API_TOKEN"
      },
      "enabled": true
    }
  }
}
~/.codex/config.toml
[mcp_servers.cog]
url = "https://trycog.ai/mcp"
bearer_token_env_var = "COG_API_TOKEN"
startup_timeout_sec = 10
tool_timeout_sec = 60

Set the environment variable: export COG_API_TOKEN=cog_YOUR_API_TOKEN

~/.gemini/settings.json
{
  "mcpServers": {
    "cog": {
      "httpUrl": "https://trycog.ai/mcp",
      "headers": {
        "Authorization": "Bearer cog_YOUR_API_TOKEN"
      }
    }
  }
}
Connection Details
URL:     https://trycog.ai/mcp
Method:  POST
Headers:
  Authorization: Bearer cog_YOUR_API_TOKEN
  Content-Type: application/json

Protocol: JSON-RPC 2.0 over HTTP
Replace cog_YOUR_API_TOKEN with your actual API token.

Available Tools

Once connected, your AI has access to these tools. Your token automatically routes requests to the correct brain.

cog_remember Store a new concept with optional associations
cog_recall Search for concepts with spreading activation
cog_get Retrieve a specific concept by ID
cog_associate Create a link between two concepts
cog_trace Find reasoning paths between concepts
cog_update Update a concept's term or definition
cog_unlink Remove a link between concepts
cog_connections Get all connections from a concept
cog_bootstrap Get exploration prompt for empty brains

Spreading Activation

When searching with cog_recall, use expand: true to enable spreading activation. This returns related concepts, not just direct matches.

Without Expansion

cog_recall({
  "query": "authentication"
})

Returns only direct matches

With Expansion

cog_recall({
  "query": "authentication",
  "expand": true
})

Returns matches + connected concepts

Testing with curl

Verify your connection:

List tools

curl -X POST https://trycog.ai/mcp \
  -H "Authorization: Bearer cog_YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/list",
    "params": {}
  }'

Store a concept

curl -X POST https://trycog.ai/mcp \
  -H "Authorization: Bearer cog_YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "jsonrpc": "2.0",
    "id": 2,
    "method": "tools/call",
    "params": {
      "name": "cog_remember",
      "arguments": {
        "term": "Rate Limiting",
        "definition": "Controls the frequency of API requests per user to prevent abuse.",
        "associations": [
          {"target": "Authentication", "predicate": "requires"},
          {"target": "API Gateway", "predicate": "implemented_by"}
        ]
      }
    }
  }'

Ready to get started?

Log in to your account and give your AI persistent memory.

Log In