Cursor Setup
Connect Cursor to Agiflow using the stdio MCP proxy for seamless project management and code generation.
Prerequisites
Cursor installed
Download from cursor.com
Node.js and npm installed
Required for @agiflowai/powertool package
Agiflow account and project
Create a free account at agiflow.io
Setup via stdio MCP Proxy
Cursor uses the stdio MCP protocol. We'll use @agiflowai/powertool as a local proxy to connect to Agiflow.
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 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 from the setup dialog and add them to your shell profile:
# Add to ~/.bashrc, ~/.zshrc, or ~/.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"source ~/.zshrc (or your shell config file) to load the variables, or restart your terminal.Configure Cursor MCP Settings
Open Cursor's MCP configuration file. In Cursor, go to Settings → MCP or directly edit:
# macOS/Linux
~/.cursor/mcp_settings.json
# Windows
%APPDATA%\Cursor\mcp_settings.jsonAdd MCP Server Configuration
Copy the JSON configuration from the Agiflow setup dialog and paste it into the mcpServers object:
{
"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}"
}
}
}
}$${VARIABLE}). Cursor will replace these with the actual values from your shell environment.Restart Cursor
Completely restart Cursor (quit and reopen) to load the new MCP server configuration and environment variables.
How It Works
The @agiflowai/powertool package acts as a local MCP proxy:
- Cursor starts the proxy: When you open Cursor, it launches
npx @agiflowai/powertool mcp-serve - Proxy fetches config: Powertool connects to
AGIFLOW_MCP_PROXY_ENDPOINTusing your API key - Config is cached locally: The MCP server configuration is fetched and served to Cursor via stdio
- Tools are available: Cursor can now use all Agiflow MCP tools (create-task, scaffold, etc.)
Verify Connection
After setup, verify the connection by checking available MCP tools:
- Open Cursor's command palette (Cmd/Ctrl + Shift + P)
- Type "MCP" to see available MCP commands
- Look for "agiflow-project-mcp" in the MCP servers list
- Verify available tools include: create-task, list-tasks, create-work-unit, etc.
Troubleshooting
MCP server not appearing in Cursor
- Verify environment variables are set: run
echo $AGIFLOW_MCP_PROXY_ENDPOINTin your terminal - Check that the mcp_settings.json file has valid JSON syntax
- Make sure you restarted Cursor completely after making changes
- Try running
npx @agiflowai/powertool mcp-servemanually to check for errors
Getting connection errors
- Verify your API key is correct and hasn't expired
- Check the proxy endpoint URL matches your organization and project IDs
- Ensure the endpoint URL ends with
/mcp-configs - Verify you have an active internet connection
Environment variables not loading
- Make sure you added the export commands to the correct shell config file
- Run
source ~/.zshrc(or your shell config) to reload - For Cursor to pick up env vars, you may need to launch it from a terminal:
cursor . - On macOS, try adding the variables to
~/.zprofileinstead