Integrations

/

Claude Code

Claude Code logo

Claude Code Integration

Claude Code + Diaphora

Add Diaphora as a remote MCP server in Claude Code so the agent can run deterministic workflows without leaving the terminal.

MCP Server URL

https://mcp.diaphora.ai/mcp

Copy
Guide
Run plans
Call MCP tools
Inspect results
Stay in the terminal

Reference

Commands & settings

Setup commands

Run these from a terminal with the Claude Code CLI installed.

StepNotesCommand
Add the serverUses Dynamic Client Registration — omit --client-id to let Claude Code self-register.claude mcp add --transport http diaphora https://mcp.diaphora.ai/mcp
Add with a pre-registered clientAdd --callback-port 8080 too if Diaphora pinned a fixed redirect port. --client-secret is a bare flag — prompts (masked) or reads MCP_CLIENT_SECRET.claude mcp add --transport http --client-id <id> --client-secret diaphora https://mcp.diaphora.ai/mcp
AuthenticateRun inside a Claude Code session, select diaphora, then Authenticate./mcp

Overview

How Diaphora fits into Claude Code

Claude Code talks to Diaphora over the same remote MCP endpoint as every other client — Streamable HTTP at mcp.diaphora.ai/mcp, authenticated with OAuth 2.1 and PKCE. Diaphora handles connector access, repeatable extraction, and schema-shaped output; Claude Code uses the results as grounded context while working through a coding task in the terminal.

Claude Code is strong at reading, writing, and refactoring code, but connector access, repeatable extraction, and schema-shaped output are still best handled by Diaphora plans. Adding Diaphora as an MCP server lets Claude Code call those plans directly from a session.

Claude Code stays focused on the coding task, while Diaphora handles the deterministic parts of the workflow — gathering data from connected tools and returning structured, reliable results Claude Code can act on.

Setup

How to connect Diaphora to Claude Code

Diaphora is exposed as a remote MCP server at mcp.diaphora.ai/mcp. Register it once with the Claude Code CLI, then authenticate from inside a session — no client registration is required up front, since Claude Code uses Dynamic Client Registration by default.

1. Start with a Diaphora account

Make sure you have an active Diaphora account before configuring Claude Code. That account is the identity layer the OAuth flow will authorize.

2. Register the server with claude mcp add

Register Diaphora's remote MCP server with the Claude Code CLI. Claude Code registers itself with Diaphora automatically through Dynamic Client Registration, so no client ID or secret is needed up front — unless Diaphora issued your team a pre-registered client, in which case you'll pass that ID and secret instead. See the reference table below for both commands.

3. Authenticate with Diaphora

Inside a Claude Code session, run /mcp, select diaphora, and choose Authenticate. Your browser opens for OAuth consent, and Claude Code picks the session back up once you approve.

4. Call Diaphora MCP tools from the session

Once authenticated, Claude Code can list and call connected Diaphora plans as MCP tools for the rest of the session — no need to reauthenticate until the token expires.

How it works

Working with the integration

1. Run the deterministic workflow through Diaphora

Reach for a Diaphora plan when a task needs connector access, repeatable extraction, or schema-shaped output rather than free-form generation.

  • Claude Code calls the plan as an MCP tool instead of trying to reconstruct the workflow from scratch.
  • Diaphora enforces structure before any result reaches the session.

2. Let Claude Code use the structured result as context

The MCP tool call returns a structured, schema-shaped result that Claude Code can read, summarize, or use to inform the next change.

  • This cuts down on hallucinated details, since the session is grounded in real tool output.
  • Results stay consistent across runs because the same plan enforces the same structure.

3. Ask Claude Code to act on the result, not re-derive it

Use Claude Code for what it does best — reading, writing, and refactoring code — based on the facts Diaphora already gathered.

  • Ask for code changes, tests, or documentation grounded in the plan's output.
  • Keep the factual backbone anchored to the Diaphora result rather than the model's own recall.

4. Keep Diaphora as the source of truth

When the underlying data changes, rerun the plan through MCP rather than asking Claude Code to regenerate the context by hand.

  • This preserves repeatability across every session.
  • Claude Code stays focused on the coding task instead of data wrangling.