Cursor Setup
This guide covers setting up CodeLoop specifically for Cursor. Make sure you have your API key ready (see API Keys).
Automatic Setup (Recommended)
The fastest way to configure CodeLoop for Cursor:
cd your-project
npx codeloop initThis command auto-detects Cursor and creates the necessary config files.
Manual MCP Configuration
If you prefer manual setup, create .cursor/mcp.json in your project root:
{
"mcpServers": {
"codeloop": {
"command": "npx",
"args": ["-y", "@codeloop/mcp-server"],
"env": {
"CODELOOP_API_KEY": "cl_live_your_key_here"
}
}
}
}Rule Files
CodeLoop creates rule files in .cursor/rules/ that guide the AI agent to use CodeLoop tools at the right moments:
core.mdc
Defines the core verification workflow: after any implementation step, always call codeloop_verify. If verification fails, callcodeloop_diagnose and fix the issues before moving on.
loop.mdc
Manages the verify-diagnose-fix loop. Tells the agent to continue iterating until the gate check passes with sufficient confidence.
recommendations.mdc
Guides the agent to use codeloop_release_readiness before marking work as complete, ensuring quality gates are met.
Expected Result
After setup, you should see these tools in Cursor's tool list:
| Tool | Purpose |
|---|---|
codeloop_verify | Run build, lint, tests, screenshots |
codeloop_diagnose | Categorize and prioritize failures |
codeloop_gate_check | Confidence-scored quality gate |
codeloop_section_status | Multi-section progress tracking |
codeloop_visual_review | Screenshot-based UI review |
codeloop_design_compare | Compare coded UI vs design specs |
codeloop_release_readiness | Final release quality check |
Troubleshooting
Tools don't appear in Cursor
- Verify
.cursor/mcp.jsonexists and is valid JSON - Check that
CODELOOP_API_KEYis set in your environment - Restart Cursor after creating the config file
- Check Cursor's MCP panel for connection errors
MCP server won't start
- Ensure Node.js 18+ is installed:
node --version - Try running manually:
npx -y @codeloop/mcp-server - Check if another MCP server is using the same port
API key validation fails
- Verify your key is correct:
echo $CODELOOP_API_KEY - Check if your trial has expired at the dashboard
- Ensure you have internet connectivity (first validation requires network)
Next Steps
- Tool Reference — learn what each tool does
- Configuration — customize CodeLoop settings