Integrations

/

Claude Code

Claude Code logo

Claude Code Integration

Claude Code + Barndoor Automations

Add Barndoor Automations 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 serverUse the client ID from app.diaphora.ai/user/clients. --client-secret is a bare flag — it prompts (masked) or reads MCP_CLIENT_SECRET. --callback-port 8080 matches the registered redirect URI, http://localhost:8080/callback.claude mcp add --transport http --client-id <id> --client-secret --callback-port 8080 diaphora https://mcp.diaphora.ai/mcp
AuthenticateRun inside a Claude Code session, select diaphora, then Authenticate./mcp

Overview

How Barndoor Automations fits into Claude Code

Claude Code talks to Barndoor Automations over the same remote MCP endpoint as every other client — Streamable HTTP at mcp.diaphora.ai/mcp, authenticated with OAuth 2.1 and PKCE. It 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 Barndoor Automations plans. Adding Barndoor Automations as an MCP server lets Claude Code call those plans directly from a session.

Claude Code stays focused on the coding task, while Barndoor Automations 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 Barndoor Automations to Claude Code

Barndoor Automations is exposed as a remote MCP server at mcp.diaphora.ai/mcp. Create an OAuth client at app.diaphora.ai/user/clients, register the server once with the Claude Code CLI using that client, then authenticate from inside a session.

1. Start with a Barndoor Automations account

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

2. Register the server with claude mcp add

Create an OAuth client at app.diaphora.ai/user/clients, then register the Barndoor Automations remote MCP server with the Claude Code CLI, passing that client's ID and secret. Barndoor Automations doesn't support Dynamic Client Registration, so Claude Code can't register itself. See the reference table below for the command.

3. Authenticate with Barndoor Automations

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 Barndoor Automations MCP tools from the session

Once authenticated, Claude Code can list and call connected Barndoor Automations 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 Barndoor Automations

Reach for a Barndoor Automations 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.
  • It 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 Barndoor Automations already gathered.

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

4. Keep Barndoor Automations 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.