
How to add Task Master AI to Cursor
AI-powered task-management system for AI-driven development that drops into Cursor, Windsurf, Claude Code, and more. Paste the config into ~/.cursor/mcp.json and restart Cursor.
Last updated June 14, 2026 · 28k★ · stdio · apikey
Cursor config for Task Master AI
npx -y task-master-ai{
"mcpServers": {
"task-master-ai": {
"command": "npx",
"args": [
"-y",
"task-master-ai"
],
"env": {
"ANTHROPIC_API_KEY": "YOUR_ANTHROPIC_API_KEY_HERE",
"PERPLEXITY_API_KEY": "YOUR_PERPLEXITY_API_KEY_HERE",
"OPENAI_API_KEY": "YOUR_OPENAI_KEY_HERE",
"GOOGLE_API_KEY": "YOUR_GOOGLE_KEY_HERE",
"MISTRAL_API_KEY": "YOUR_MISTRAL_KEY_HERE",
"GROQ_API_KEY": "YOUR_GROQ_KEY_HERE",
"OPENROUTER_API_KEY": "YOUR_OPENROUTER_KEY_HERE",
"XAI_API_KEY": "YOUR_XAI_KEY_HERE",
"AZURE_OPENAI_API_KEY": "YOUR_AZURE_KEY_HERE",
"OLLAMA_API_KEY": "YOUR_OLLAMA_API_KEY_HERE"
}
}
}
}Setup steps
- 1Open Cursor → Settings → MCP → Add new MCP server (or edit ~/.cursor/mcp.json directly).
- 2Paste the Task Master AI config below into the "mcpServers" object.
- 3Fill in placeholder secrets, then save.
- 4Cursor reloads MCP servers automatically — check Settings → MCP for a green status dot.
- 5Ask Cursor to use one of Task Master AI's tools to confirm it's connected.
Before you start
- Node.js with npx available
- An MCP-compatible editor/client (Cursor, Windsurf, VS Code, Claude Code, or Q CLI)
- At least one AI provider API key (Anthropic, OpenAI, Google, Perplexity, xAI, OpenRouter, etc.) OR Claude Code CLI / Codex CLI for keyless use
What Task Master AI can do in Cursor
initialize_projectInitialize Task Master in a project, creating the necessary files and structure.
parse_prdParse a Product Requirements Document (PRD) and generate structured tasks from it.
get_tasksList all tasks in the project.
get_taskShow details for a specific task (supports retrieving individual tasks by ID).
next_taskDetermine the next task to work on based on dependencies and status.
set_task_statusSet or update the status of a task.
add_taskAdd a new task to the project.
remove_taskRemove a task from the project.
Security
Requires at least one AI provider API key (e.g. ANTHROPIC_API_KEY, OPENAI_API_KEY, PERPLEXITY_API_KEY) supplied via the MCP config's env section or a project .env file. Claude Code and Codex CLI can be used without an API key. Keep your API keys secret; remove any provider keys you don't use from the config.
Task Master AI + Cursor FAQ
Where is the Cursor config file?
Cursor reads MCP servers from ~/.cursor/mcp.json. Paste the Task Master AI config there under the "mcpServers" key and restart the client.
Is Task Master AI safe to use with Cursor?
Requires at least one AI provider API key (e.g. ANTHROPIC_API_KEY, OPENAI_API_KEY, PERPLEXITY_API_KEY) supplied via the MCP config's env section or a project .env file. Claude Code and Codex CLI can be used without an API key. Keep your API keys secret; remove any provider keys you don't use from the config.
Do I need an API key?
You need at least one AI provider API key (e.g. Anthropic, OpenAI, Perplexity) set in your MCP config's env section or a project .env file. Alternatively, you can use Claude Code or Codex CLI, which require no API key (Claude Code uses your local Claude instance; Codex uses OAuth via a ChatGPT subscription).
How do I reduce the context window used by the MCP tools?
Set the TASK_MASTER_TOOLS environment variable in your MCP config. Options are 'all' (36 tools, default), 'standard' (15 tools), 'core'/'lean' (7 tools), or a comma-separated list of specific tools. Core mode reduces token usage by roughly 70%.
Which editors are supported?
Cursor, Windsurf, VS Code, Claude Code, and Q CLI are documented. Cursor/Windsurf/Q use the 'mcpServers' key; VS Code uses 'servers' with a 'type': 'stdio'. There's also a one-click install link for Cursor 1.0+ and a 'claude mcp add' command for Claude Code.