Claude Code
Connect Claude Code to LocusGraph over MCP using the production auth endpoint:
https://api.locusgraph.com/mcpClaude 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:
Scope choice:
local: private to your current project on your machineproject: shared via.mcp.jsonat the repo rootuser: 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:
- Open Claude Code in the project where you want to use LocusGraph.
- Run
/mcp. - Select
locusgraph. - Choose Authenticate if Claude Code shows the server as unauthenticated.
- Finish the browser login flow, then select the graph you want to bind to the token.
- Return to Claude Code and run
/mcpagain to confirm the server is connected.
Once connected, Claude Code should discover:
store_eventretrieve_memorieslist_contextsgenerate_insightslocusgraph://contextsauto_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/mcpFor 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 locusgraphThen inside Claude Code:
/mcpIf authentication completed correctly, Claude Code should show the server as connected and make the MCP tools available in-session.
Troubleshooting
| Problem | Fix |
|---|---|
Claude Code shows Authentication required | Run /mcp, select locusgraph, and complete the browser OAuth flow |
| Browser does not open automatically | Copy the auth URL from Claude Code and open it manually in the browser |
| Redirect fails after login | Paste the full callback URL from the browser back into Claude Code if prompted |
| Team members do not see the server | Use --scope project or commit the repo's .mcp.json |
| Tools are missing after auth | Reopen /mcp or restart the Claude Code session so capabilities refresh |