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

Claude Code

Connect Claude Code to LocusGraph over MCP using the production auth endpoint:

https://api.locusgraph.com/mcp

Claude Code supports remote HTTP MCP servers and uses /mcp for OAuth authentication. This guide follows Anthropic's Claude Code MCP documentation for remote HTTP transport, configuration scopes, and OAuth behavior.

Official reference: Connect Claude Code to tools via MCP

Add LocusGraph

HTTP is the recommended transport for remote cloud-hosted MCP services. Add LocusGraph with one of these commands:

claude mcp add --transport http locusgraph https://api.locusgraph.com/mcp

Scope choice:

  • local: private to your current project on your machine
  • project: shared via .mcp.json at the repo root
  • user: available across your projects on your machine

Use --scope project when the whole team should see the same LocusGraph MCP server in the repo. Claude Code will create or update .mcp.json.

Authenticate

LocusGraph uses OAuth at https://api.locusgraph.com/mcp. After adding the server:

  1. Open Claude Code in the project where you want to use LocusGraph.
  2. Run /mcp.
  3. Select locusgraph.
  4. Choose Authenticate if Claude Code shows the server as unauthenticated.
  5. Finish the browser login flow, then select the graph you want to bind to the token.
  6. Return to Claude Code and run /mcp again to confirm the server is connected.

Once connected, Claude Code should discover:

  • store_event
  • retrieve_memories
  • list_contexts
  • generate_insights
  • locusgraph://contexts
  • auto_capture

LocusGraph's production auth worker supports dynamic client registration, so the standard Claude Code OAuth flow should work without manually supplying --client-id or --client-secret.

Shared .mcp.json

Project scope writes a repo-level .mcp.json. A minimal LocusGraph entry looks like this:

{
  "mcpServers": {
    "locusgraph": {
      "type": "http",
      "url": "https://api.locusgraph.com/mcp"
    }
  }
}

Claude Code asks for approval before using project-scoped servers from .mcp.json. That is expected behavior for shared repo config.

Fixed Callback Port

Claude Code can use a fixed localhost callback port when a server or organization requires a pre-registered redirect URI such as http://localhost:8765/callback.

claude mcp add --transport http --callback-port 8765 locusgraph https://api.locusgraph.com/mcp

For the default api.locusgraph.com setup, this is usually not required. Use it only if your OAuth setup depends on a specific localhost callback port.

Verify

You can verify the server from the CLI and inside Claude Code:

claude mcp list
claude mcp get locusgraph

Then inside Claude Code:

/mcp

If authentication completed correctly, Claude Code should show the server as connected and make the MCP tools available in-session.

Troubleshooting

ProblemFix
Claude Code shows Authentication requiredRun /mcp, select locusgraph, and complete the browser OAuth flow
Browser does not open automaticallyCopy the auth URL from Claude Code and open it manually in the browser
Redirect fails after loginPaste the full callback URL from the browser back into Claude Code if prompted
Team members do not see the serverUse --scope project or commit the repo's .mcp.json
Tools are missing after authReopen /mcp or restart the Claude Code session so capabilities refresh

Next

Connect MCP Clients
See the generic client setup flow for LocusGraph MCP.
MCP Tools
See what Claude Code can call once LocusGraph is connected.