User Context MCP - Dashboard

4 min read Original article ↗

LLM Gateway

User Context MCP: What's Possible?

This service lets you create a shared "Digital Memory" and "Identity Layer" across different AI agents (Claude, ChatGPT, Windsurf, etc.). Supports OpenAI (GPT-4.1 series), Gemini (3.x series), Anthropic (Claude 4.x series), and Ollama Cloud models. Here's what you can do with this system:

🚀 Seamless Memory

Only Layer 0 (preferences) is auto-injected by default. Agents use the search_context tool to semantically search deeper context layers on demand, preventing over-injection of data into conversations.

🛡️ Secure Secret Management

Instead of giving your API keys or passwords to each agent separately, store them in the Vault (Layer 3). When an agent needs access, you get a consent request and approve it with a temporary token.

🌍 Personalized Experience

Your language preference, communication style (formal/casual), and timezone are consistent across all AI agents. No need to reconfigure these settings in every new conversation.

📊 Auditable Access

See which agent accessed which data and when through the Audit Log. You have full control over your data.


Usage Guide

1. Create an API Key

Go to the API Keys tab. Give your key a name (e.g., "Claude Desktop") and select the layers you want to grant access to. Important: Copy the key immediately; you won't see it again.

2. Connect Your AI Agent

To connect an agent like Claude Desktop, add this to your claude_desktop_config.json:

{
  "mcpServers": {
    "user-context": {
      "command": "curl",
      "args": [
        "-X", "POST",
        "-H", "Authorization: Bearer YOUR_API_KEY_HERE",
        "-H", "Content-Type: application/json",
        "-d", "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"tools/list\"}",
        "https://cereb.run/mcp"
      ]
    }
  }
}

Note: Most MCP clients expect a local command or SSE. This server supports HTTP POST with JSON-RPC. Replace YOUR_API_KEY_HERE with the key you created in the first step.

3. Direct API Usage (Example)

You can also use curl to test it directly from your terminal:

# List available tools
curl -X POST \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' \
  https://cereb.run/mcp

# Get Layer 0 (Public) Context
curl -H "Authorization: Bearer YOUR_API_KEY" \
  https://cereb.run/api/v0/context

4. Manage Context Layers

  • Layer 0 (Public): General preferences like language and communication style.
  • Layer 1 (Context): Active projects, goals, and recent memories.
  • Layer 2 (Personal): Personal details for trusted agents.
  • Layer 3 (Vault): Highly sensitive data (passwords, API keys) that requires one-time approval per session.

4. Vault Access (Layer 3)

When an agent needs sensitive data, it will send a request. You'll see this in the Vault Requests tab. Once approved, the agent gets a temporary token to read the specific fields you allowed.


LLM Gateway MCP Tools

Windsurf, Claude Desktop, or any MCP client can access the LLM Gateway using the tools below. This way, when you say "the project I worked on in Gemini yesterday," the agent knows what you're referring to.

list_conversations

Lists all your LLM conversations. Can filter by provider. The agent can see which conversations you have.

get_conversation

Returns the full message history of a specific conversation. Answers the question "What did I discuss with Gemini yesterday?"

search_conversations

Searches across all conversation history by keyword. For example: "Find my conversation about Rust macros."

chat_with_llm

Sends a message to another LLM through the gateway. When you say "Ask Gemini about this," the agent uses this tool.

fork_conversation

Forks a conversation at a specific point and transfers it to a different LLM.

get_llm_usage

Returns token usage metrics (total tokens and request counts per provider/model). Answers the question "How many tokens have I used?"

search_context

Use search_context to semantically search your context and knowledge base before injecting into conversations. This prevents over-injection.

Example Scenario: Using with Windsurf

While working on a project in Windsurf, you say: "Recall the database architecture I discussed with Gemini yesterday." Windsurf calls the search_conversations tool via MCP, finds your conversation, and automatically loads the context.

# Search conversations via MCP
curl -X POST \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"search_conversations","arguments":{"query":"database architecture"}}}' \
  https://YOUR_SERVER_URL/mcp

# Send a message to Gemini via MCP
curl -X POST \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"chat_with_llm","arguments":{"message":"Analyze this code","provider":"gemini","model":"gemini-3.0-flash"}}}' \
  https://YOUR_SERVER_URL/mcp

Layer 0 — Public

Layer 2 — Personal

Layer 1 — Active Context

Knowledge Base

Structured knowledge stored by agents or manually. Embedded for semantic search.

System Settings

Data Management


Danger Zone

Once you delete your account, there is no going back. Please be certain.