Agiflow
DocumentationBlogPricing

Documentation

IntroductionGetting Started
Spec + Task ManagementReliable Agent ExecutionSecurity & Governance
Claude CodeCursor
@agiflowai/agent-cli
Project MCPTask MCPScaffold MCPOpen SourceArchitect MCPOpen SourceOne MCPOpen Source

Claude Code Setup

Connect Claude Code to Agiflow using MCP for seamless project management, scaffolding, and architecture validation. Choose from two connection methods based on your workflow.

Prerequisites

Claude Code installed

Download from claude.com/claude-code

Agiflow account and project

Create a free account at agiflow.io

Choose Your Connection Method

Method 1: Agent-CLI (Recommended)

Connect to a locally running agent-cli daemon for advanced session management, model routing, and task tracking. Enables autonomous execution from Agiflow platform in Docker.

✅ Full session management • ✅ Model routing • ✅ Task tracking • ✅ Docker autonomous execution

Method 2: HTTP MCP

Direct HTTP connection to Agiflow API. Configure via JSON file with OAuth2 or API key authentication.

✅ Simple configuration • ✅ OAuth2 or API key • ✅ Direct connection • ⚠️ Requires internet connection

Method 1: Agent-CLI (Recommended)

Connect to a locally running agent-cli daemon for advanced session management, model routing, and autonomous task execution from Agiflow platform in Docker.

1

Install Agent-CLI

Install the @agiflowai/agent-cli package globally:

Install globally
npm install -g @agiflowai/agent-cli
2

Connect and Authenticate

Authenticate with Agiflow using the device code flow:

Connect and authenticate
agent-cli daemon
💡 Tip: This opens your browser for authentication. Once authenticated, credentials are stored in ~/.agiflow/ for future use.
3

Use Dashboard Chat

Once authenticated, the agent daemon automatically launches Claude Code when you interact with tasks through the Agiflow Dashboard chat interface.

ℹ️ Automatic Agent Launch: The agent daemon watches for dashboard chat interactions and automatically launches Claude Code with the appropriate session context and MCP configuration. No manual commands needed!
✨ Bonus: With agent-cli, you get additional features like session tracking, model routing (switch between Claude, GPT-5, etc.), and task-level progress tracking visible in your Agiflow dashboard.

Method 2: HTTP MCP

Connect Claude Code to Agiflow using HTTP MCP for seamless project management and code generation.

1

Get Your Configuration

From your Agiflow dashboard, navigate to your project and click the Actions menu, then select Project MCP.

In the MCP setup dialog, select HTTP MCP as the setup method. You can use either OAuth2 or API key for MCP authorization.

You'll see two sections: environment variables and MCP configuration JSON.

2

Set Environment Variables (API key only)

Copy the export commands from the setup dialog and add them to your shell profile:

# Add to ~/.bashrc, ~/.zshrc, or ~/.profile export AGIFLOW_MCP_API_KEY="your-generated-api-key"
💡 Tip: After adding these lines, run source ~/.zshrc (or your shell config file) to load the variables, or restart your terminal.
3

Configure Claude Code MCP Settings

Create or edit the MCP configuration file in your project root:

Config file location
.mcp.json (project root)
4

Add MCP Server Configuration

Copy the JSON configuration from the Agiflow setup dialog and paste it into the mcpServers object:

Example configuration
{ "mcpServers": { "agiflow-project-mcp": { "type": "http", "url": "https://agiflow.io/api/v1/organizations/YOUR_ORG_ID/projects/YOUR_PROJECT_ID/mcp", "headers": { "X-API-KEY": "${AGIFLOW_MCP_API_KEY}" } } } }
⚠️ Important: The configuration uses environment variable placeholders ($${VARIABLE}). Claude Code will replace these with the actual values from your shell environment.
5

Restart Claude Code

Completely restart Claude Code (quit and reopen) to load the new MCP server configuration and environment variables.

Verify Connection

After setup with any method, verify the connection by checking available MCP tools:

  • Open Claude Code's MCP panel (View → MCP Servers)
  • Look for "agiflow-project-mcp" with a green connection indicator
  • Verify available tools include: create-task, list-tasks, create-work-unit, etc.
✅ Success: Your Claude Code is now connected to Agiflow. You can create tasks, manage work units, and use scaffolding templates directly from Claude Code.

Frequently Asked Questions

Why is my Claude Code MCP connection failing or showing a red indicator?
  • Verify your API key is correct and hasn't expired
  • Check the MCP URL matches your organization and project IDs
  • Ensure you have an active internet connection
  • For agent-cli: verify the daemon is running (agent-cli status)
  • Try refreshing the MCP server connection
Why are MCP tools not appearing in Claude Code?
  • Restart Claude Code completely (quit and reopen)
  • Check the .mcp.json file has valid JSON syntax
  • Verify the server isn't disabled in MCP settings
  • For agent-cli: check daemon logs (agent-cli logs)

Next Steps

Project MCP

Learn about all available project management tools and how to use them.

View Documentation

Agent-CLI

Explore session management, model routing, and advanced agent-cli features.

View Documentation
Agiflow
BlogTermsPrivacy© 2025 Agiflow. All rights reserved.