Welcome! This guide helps you use the AA Coding Agent's Model Context Protocol (MCP) server to create and manage coding tasks directly from your favorite editor or AI assistant.
MCP (Model Context Protocol) is a standard that lets AI assistants like Claude, Cursor, and Windsurf talk to external tools. Think of it as a bridge between your editor and the AA Coding Agent platform. Instead of switching to the web UI, you can ask Claude to create a task, and it automatically manages the workflow for you.
The AA Coding Agent MCP server gives Claude access to:
- Create coding tasks in your repositories
- Check task status and get progress updates
- Send follow-up messages to continue tasks
- List and stop running tasks
- Sign in to the AA Coding Agent web app
- Open the signed-in user menu
- Choose API Keys and generate a token there
- Copy the token (shown only once!) and save it somewhere safe
- In the web app, use the header or signed-in user menu to connect GitHub
- Authorize the app
- You're ready! The token will automatically use your GitHub access
Choose your editor and follow the setup:
Claude Desktop (macOS, Windows, or Linux)
- Open the appropriate configuration file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
- macOS:
- Add this configuration (replace
your-domain.comwith your actual deployment URL):
{
"mcpServers": {
"aa-coding-agent": {
"url": "https://your-domain.com/api/mcp?apikey=YOUR_TOKEN"
}
}
}- Restart Claude Desktop
- Look for the tools icon (hammer) in Claude—you should see "aa-coding-agent" listed
Cursor
- Open the appropriate configuration file:
- macOS/Linux:
~/.cursor/mcp_config.json - Windows:
%USERPROFILE%\.cursor\mcp_config.json
- macOS/Linux:
- Add:
{
"mcpServers": {
"aa-coding-agent": {
"url": "https://your-domain.com/api/mcp?apikey=YOUR_TOKEN",
"transport": "http"
}
}
}- Restart Cursor
Windsurf
- Open the appropriate configuration file:
- macOS:
~/Library/Application Support/Windsurf/mcp_config.json - Windows:
%APPDATA%\Windsurf\mcp_config.json - Linux:
~/.config/Windsurf/mcp_config.json
- macOS:
- Add this configuration (replace
your-domain.comwith your actual deployment URL):
{
"mcpServers": {
"aa-coding-agent": {
"url": "https://your-domain.com/api/mcp?apikey=YOUR_TOKEN"
}
}
}- Restart Windsurf
| Tool | Use When | Example |
|---|---|---|
| create-task | You want Claude to write code in a repo | "Create unit tests for the auth module in my repo starting from develop branch" |
| get-task | You want to check a task's status or see logs | "What's the status of task ABC123?" |
| continue-task | You want to give the agent more instructions (requires keepAlive) | "Also add integration tests for the login flow" |
| list-tasks | You want to see your recent tasks | "Show me my completed tasks from today" |
| stop-task | You want to stop a running task | "Stop task ABC123" |
Claude learns what tools to use from your natural language requests. Here are examples:
Create a New Task:
"Use the AA Coding Agent to add unit tests for the authentication module in https://github.com/myorg/myrepo. Use Claude Sonnet model and install dependencies."
Create Task from Specific Branch:
"Create a task in https://github.com/myorg/myrepo starting from the develop branch. Add integration tests for the new payment API."
Check Progress:
"Get the task with ID abc123def456 and tell me how far along it is"
Iterate on Work:
"Continue task abc123def456 with this: Also refactor the error handling to use custom exceptions instead of generic errors"
List Your Work:
"List my completed tasks from AA Coding Agent"
Claude will recognize these patterns and call the right tool. You don't need to specify tool names—just describe what you want!
When creating tasks, you can customize:
- sourceBranch - Start from a specific branch instead of the repository's default branch
- Example: "Create task from the develop branch"
- keepAlive - Keep sandbox running after completion to send follow-up messages via
continue-task- Without keepAlive: Sandbox terminates immediately, task cannot be continued
- With keepAlive: Sandbox stays alive until timeout or manual stop
- installDependencies - Automatically run
npm installor equivalent before agent execution - selectedModel - Choose specific AI model (e.g., claude-sonnet-4-5-20250929, gpt-5.2-codex)
For complete parameter details and available models, see MCP_SERVER.md.
- Ask Claude: "Create a task to fix the typo in the README at https://github.com/myorg/myrepo"
- Claude runs the task and shows you the task ID
- Ask: "What's the status of that task?" to check progress
- Claude shows logs and PR details when ready
- Ask: "Create a task to add a login form component in https://github.com/myorg/myrepo. Keep the sandbox alive."
- Claude creates the component and the sandbox remains running
- Ask: "Continue the task to also add validation and error handling"
- Claude adds the improvements in the same branch
- Ask: "Stop the task when ready" (or let it auto-terminate after timeout)
- Ask: "List my failed tasks from last week"
- Review the failures
- Ask: "Create a new task to fix the issues in https://github.com/myorg/myrepo based on what we learned"
DO:
- ✅ Generate a new token for production use (rotate quarterly)
- ✅ Use long prompts for complex tasks (Claude handles 5000-char prompts)
- ✅ Enable "keepAlive" if you plan to iterate with follow-ups (sandbox stays alive for continue-task, otherwise terminates immediately)
- ✅ Use
get-taskregularly to monitor progress - ✅ Reference task IDs when continuing work
- ✅ Specify
sourceBranchwhen starting from a feature branch (defaults to repo's default branch)
DON'T:
- ❌ Commit your API token to version control—use environment variables
- ❌ Share tokens publicly or include them in logs
- ❌ Assume a task is done without checking status first
- ❌ Create too many tasks at once (you have a daily limit)
- ❌ Try to continue a task without keepAlive enabled (sandbox will be terminated)
- Default users: 20 tasks per day
- Admin users: 100 tasks per day
- Limits reset at midnight UTC
- Each task creation and follow-up counts as one request
"GitHub not connected" error → Connect GitHub from the signed-in web UI, then generate a fresh token from the API Keys dialog
"Authentication required" error → Check your token is correct and hasn't expired. Generate a new one if needed.
Tools don't appear in Claude/Cursor/Windsurf → Verify the configuration file path is correct, check JSON syntax, and restart the app
Rate limit hit → Wait until midnight UTC or request admin status for higher limits
For detailed technical information, see MCP_SERVER.md:
- Complete API schemas and parameters (including
sourceBranch,selectedModel,keepAlive) - Error response formats and HTTP status codes
- Token security and rotation best practices
- Advanced client configurations
- Full troubleshooting guide
Ready to start? Generate a token and configure your editor!