Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

Model Context Protocol (MCP)

MCP is an open protocol that lets AI agents connect to external tools and data sources. In LocusGraph, MCP is served through the auth worker as a remote OAuth-protected endpoint.

What is MCP?

Model Context Protocol standardizes how AI agents discover and call external tools. Instead of writing custom integrations for each agent framework, you expose a single MCP server. Any compatible client connects instantly.

MCP defines three primitives:

  • Tools — functions the agent can call (store knowledge, retrieve wisdom, generate insights)
  • Resources — read-only data the agent can browse before calling tools
  • Prompts — reusable prompt templates the client can fetch on demand

Why MCP for LocusGraph?

LocusGraph exposes its memory workflows over MCP at the auth worker's /mcp endpoint. The auth worker handles OAuth, binds the token to a selected graph, and then proxies MCP calls into the region server.

The backend currently exposes:

  • Four tools: store_event, retrieve_memories, list_contexts, generate_insights
  • One resource: locusgraph://contexts
  • One prompt: auto_capture

Use MCP when your client supports remote HTTP MCP with OAuth 2.0. Use the SDKs when you want direct application-level control.

How It Works

  1. Your MCP client connects to https://api.locusgraph.com/mcp.
  2. The auth worker challenges the client with OAuth metadata from /.well-known/oauth-protected-resource.
  3. The client discovers the authorization server at /.well-known/oauth-authorization-server and /.well-known/openid-configuration.
  4. The user signs in, approves access, and selects a graph during /oauth/authorize.
  5. The auth worker issues an OAuth token with scopes such as profile, memory.read, and memory.write.
  6. Each authenticated MCP request is proxied to the region server with the selected graph injected via X-Graph-Id.

Auth Endpoints

The auth worker exposes these MCP-related endpoints:

EndpointPurpose
POST /mcpRemote MCP endpoint
GET /.well-known/oauth-protected-resourceProtected resource metadata for /mcp
GET /.well-known/oauth-authorization-serverOAuth authorization server metadata
GET /.well-known/openid-configurationOpenID configuration
GET /oauth/authorizeAuthorization UI and graph selection
POST /oauth/registerDynamic client registration
POST /oauth/tokenAuthorization code and refresh token exchange
GET /oauth/userinfoUser claims for issued access tokens

The production auth host is https://api.locusgraph.com.

Next

MCP Tools
Explore the tools LocusGraph exposes over MCP.
Connect a Client
Set up Claude, Cursor, Amp, or a custom MCP client.