MCP Setup

Connect Soullayer to any Model Context Protocol client. Create an API key in Settings, paste the config, and your AI tools gain live access to your identity, state, and policies.

Get an API key

Sign in at app.soullayer.ai, open Settings → API Keys, and create a new key with the mcp scope. Copy the key starting with sk_sl_ — it's only shown once.

Cursor

Add to ~/.cursor/mcp.json (or the workspace equivalent):

{
  "mcpServers": {
    "soullayer": {
      "url": "https://api.soullayer.ai/v1/mcp/sse",
      "headers": {
        "Authorization": "Bearer sk_sl_YOUR_KEY_HERE"
      }
    }
  }
}

Restart Cursor. The soullayer server should appear in the MCP panel.

Claude Desktop

Claude Desktop only speaks stdio, so point it at a small shim that proxies to the SSE endpoint:

{
  "mcpServers": {
    "soullayer": {
      "command": "npx",
      "args": ["-y", "@soullayer/mcp-remote", "--url", "https://api.soullayer.ai/v1/mcp/sse", "--api-key", "sk_sl_YOUR_KEY_HERE"]
    }
  }
}

On macOS the config lives at ~/Library/Application Support/Claude/claude_desktop_config.json.

Self-hosted

If you're running Soullayer locally (not Cloud), skip the API key — use the bundled MCP server directly:

# Self-hosted: run the local MCP server
soullayer serve --mcp

# Claude Desktop config (stdio transport)
{
  "mcpServers": {
    "soullayer": {
      "command": "soullayer",
      "args": ["serve", "--mcp"]
    }
  }
}

Tools & resources

# Tools exposed to the connected client
get_identity       — returns filtered Identity Pack
get_preferences    — returns filtered Preferences Pack
get_context        — compiles SSD for a target platform (openai, claude, cursor, ...)
update_state       — applies a JSON merge patch to State Pack
eval_policy        — evaluates a value against active policy rules

# Resources (read-only)
soullayer://identity    — markdown rendering of Identity Pack
soullayer://state       — current state JSON
soullayer://policy      — active policy rules

# Prompts
soullayer_init          — system prompt with identity compiled for a target
soullayer_reflect       — memory-consolidation guidance prompt

Test the connection

# Quick test: verify the SSE endpoint with curl
curl -N -H "Authorization: Bearer sk_sl_YOUR_KEY_HERE" \
  https://api.soullayer.ai/v1/mcp/sse

# You should see SSE events stream. Ctrl-C to exit.

# List active connections (dashboard session only)
curl --cookie "sl_access=..." https://api.soullayer.ai/v1/mcp/connections

Connection limits

Concurrent MCP connections are gated per plan. Disconnect idle sessions from Settings → API Keys → Active MCP Connections.

Plan     Concurrent connections
───────  ──────────────────────
Free     0 (MCP not available)
Pro      3
Team     10
Enterprise 50