Skip to main content

MCP Server

BaseLayer exposes your knowledge graph via MCP (Model Context Protocol). Any MCP-compatible client can connect to search, store, and recall your knowledge. The easiest way to connect any MCP client to BaseLayer is via OAuth. No API keys needed.

Remote MCP (Claude.ai, ChatGPT, etc.)

For cloud-based AI tools that support remote MCP:
  1. In your AI tool’s settings, add a new MCP integration
  2. Enter the server URL:
    https://api.baselayer.id/mcp
    
  3. You’ll be redirected to BaseLayer to sign in and authorize the connection
  4. Click Allow — done

CLI tools (Claude Code, Gemini CLI, etc.)

CLI-based tools connect to the remote MCP endpoint via SSE:
# Claude Code
claude mcp add --transport sse baselayer https://api.baselayer.id/mcp

# Gemini CLI
gemini mcp add baselayer https://api.baselayer.id/mcp

IDE tools (Cursor, Windsurf, Copilot)

Add BaseLayer to your IDE’s MCP configuration file:
{
  "mcpServers": {
    "baselayer": {
      "url": "https://api.baselayer.id/mcp"
    }
  }
}
See specific setup guides:

Available tools

Once connected, your AI can use these tools:

Querying

ToolWhat it does
ask_questionAsk a natural language question and get a synthesized answer from your memory

Searching

ToolWhat it does
memory_searchSemantic search across entities and fact edges
get_entityFetch a full entity dossier (overview, facts, timeline, relations)
get_entity_relationsExplore connections between entities
get_entity_provenanceTrace where a piece of knowledge came from
list_entitiesBrowse all entities of a given type
recent_conversationsLoad recent conversation context
retrieve_evidenceSearch raw conversation history for exact quotes

Writing

ToolWhat it does
record_memoryStore a new observation or memory
vault_factAssert a specific fact connecting two entities
update_planCreate or update a persistent plan scratchpad

OAuth scopes

MCP clients are granted the mcp:tools scope by default, which provides access to all available tools.

Verify the connection

Ask your AI:
“What do you know about me?”
It should call ask_question and return knowledge from your memory.
OAuth is recommended for most users. Only use API keys for custom integrations or self-built MCP clients.
  1. Go to baselayer.id/credentials
  2. Click Create API Key
  3. Copy the key and configure your MCP client:
{
  "mcpServers": {
    "baselayer": {
      "url": "https://api.baselayer.id/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY"
      }
    }
  }
}
API keys are for advanced integrations. OAuth is simpler and more secure for standard MCP clients.