MCP Directory

How to add Task Master AI to Windsurf

AI-powered task-management system for AI-driven development that drops into Cursor, Windsurf, Claude Code, and more. Paste the config into ~/.codeium/windsurf/mcp_config.json and restart Windsurf.

Last updated June 14, 2026 · 28k · stdio · apikey

Windsurf 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 Windsurf → Cascade → the hammer/MCP icon → Configure (or edit ~/.codeium/windsurf/mcp_config.json).
  2. 2Paste the Task Master AI config below.
  3. 3Fill in placeholder secrets, then save.
  4. 4Click Refresh in the MCP panel.
  5. 5Task Master AI's tools become available to Cascade.

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 Windsurf

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 + Windsurf FAQ

Where is the Windsurf config file?

Windsurf reads MCP servers from ~/.codeium/windsurf/mcp_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 Windsurf?

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