MCP Directory

How to add Task Master AI to Claude Desktop

AI-powered task-management system for AI-driven development that drops into Cursor, Windsurf, Claude Code, and more. Paste the config into ~/Library/Application Support/Claude/claude_desktop_config.json and restart Claude Desktop.

Last updated June 14, 2026 ยท 28kโ˜… ยท stdio ยท apikey

Claude Desktop 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

  1. 1Open Claude Desktop โ†’ Settings โ†’ Developer โ†’ Edit Config (this opens ~/Library/Application Support/Claude/claude_desktop_config.json).
  2. 2Paste the Task Master AI config below under the top-level "mcpServers" key.
  3. 3Fill in any placeholder secrets (API keys, paths) in the snippet.
  4. 4Save the file, then fully quit and reopen Claude Desktop.
  5. 5Open a chat and confirm Task Master AI's tools appear under the ๐Ÿ”Œ tools menu.

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 Claude Desktop

initialize_project

Initialize Task Master in a project, creating the necessary files and structure.

parse_prd

Parse a Product Requirements Document (PRD) and generate structured tasks from it.

get_tasks

List all tasks in the project.

get_task

Show details for a specific task (supports retrieving individual tasks by ID).

next_task

Determine the next task to work on based on dependencies and status.

set_task_status

Set or update the status of a task.

add_task

Add a new task to the project.

remove_task

Remove 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 + Claude Desktop FAQ

Where is the Claude Desktop config file?

Claude Desktop reads MCP servers from ~/Library/Application Support/Claude/claude_desktop_config.json. Paste the Task Master AI config there under the "mcpServers" key and restart the client.

Is Task Master AI safe to use with Claude Desktop?

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.

View repo Full Task Master AI page