Claude Code Setup
Connect Claude Code to Agiflow using MCP for seamless project management, scaffolding, and architecture validation. Choose from three 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: Marketplace + HTTP MCP (Recommended)
The easiest setup with automatic updates via Claude Code's marketplace. Direct HTTP connection to Agiflow API.
Method 2: Powertool (stdio MCP)
Use @agiflowai/powertool as a local stdio MCP proxy. Works alongside platform-tools for enhanced capabilities.
Method 3: Agent-CLI (Local Daemon)
Connect to a locally running agent-cli daemon for advanced session management, model routing, and task tracking.
Method 1: Marketplace + HTTP MCP
The easiest way to connect Claude Code with automatic updates and built-in configuration.
Get Your API Key
From your Agiflow dashboard, navigate to your project and click the Actions menu, then select Project MCP.
Select HTTP MCP + Marketplace as the setup method, then click Generate API Key to create a new API key for your MCP connection.
Install from Marketplace
Open Claude Code and access the MCP marketplace (Settings → MCP Servers → Browse Marketplace).
Search for "Agiflow Project MCP" and click Install.
Configure Connection
After installation, you'll be prompted to configure the connection with your project URL and API key.
https://agiflow.io/api/v1/organizations/YOUR_ORG_ID/projects/YOUR_PROJECT_ID/mcpAlternative: Manual Configuration
If you prefer manual setup, edit your Claude Code configuration file and add this JSON:
.mcp.json (project root){
"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": "your-generated-api-key"
}
}
}
}Method 2: Powertool (stdio MCP)
Use @agiflowai/powertool as a local stdio MCP proxy that fetches configuration from Agiflow.
Get Configuration from Dashboard
From your project's MCP setup dialog, select stdio MCP Proxy as the setup method, then click Generate API Key.
You'll see two sections: environment variables and MCP configuration JSON.
Set Environment Variables
Copy the export commands and add them to your shell profile:
export AGIFLOW_MCP_PROXY_ENDPOINT="https://agiflow.io/api/v1/organizations/YOUR_ORG_ID/projects/YOUR_PROJECT_ID/mcp-configs"
export AGIFLOW_MCP_API_KEY="your-generated-api-key"Add to Claude Code Config
Edit your Claude Code MCP settings file and add the powertool configuration:
{
"mcpServers": {
"agiflow-project-mcp": {
"command": "npx",
"args": ["-y", "@agiflowai/powertool", "mcp-serve"],
"env": {
"AGIFLOW_MCP_PROXY_ENDPOINT": "${AGIFLOW_MCP_PROXY_ENDPOINT}",
"AGIFLOW_MCP_API_KEY": "${AGIFLOW_MCP_API_KEY}"
}
}
}
}Restart Claude Code
Completely restart Claude Code (quit and reopen) to load the environment variables and new MCP server configuration.
Method 3: Agent-CLI (Local Daemon)
Connect to a locally running agent-cli daemon for advanced session management and model routing capabilities.
Install Agent-CLI
Install the @agiflowai/agent-cli package globally:
npm install -g @agiflowai/agent-cliConnect and Authenticate
Authenticate with Agiflow using the device code flow:
agent-cli connect~/.agiflow/ for future use.Use Dashboard Chat
Once authenticated, the agent daemon automatically launches Claude Code when you interact with tasks through the Agiflow Dashboard chat interface.
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.
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 powertool: ensure environment variables are loaded (
echo $AGIFLOW_MCP_PROXY_ENDPOINT) - For agent-cli: check daemon logs (
agent-cli logs)
Why are environment variables not loading for Powertool method?
- Make sure you added the export commands to the correct shell config file
- Run
source ~/.zshrc(or your shell config) to reload - For Claude Code to pick up env vars, you may need to launch it from terminal
- On macOS, try adding the variables to
~/.zprofileinstead