bug: Claude Code fails to engage with the Task Master
Description
There are a couple of problems.
- Claude code prefers to use projectplan.md (not PRD)
- Claude code doesn't like the current MCP configuration of the Task Master
Steps to Reproduce
- Create a simple project with claude code in Cursor
- Ask claude code anything about task master
Expected Behavior
Claude Code should be able to answer questions about tasks
Actual Behavior
Claude Code doesn't know and doesn't see configured Task Master MCP in the project
Screenshots or Logs
...
Environment
- Task Master version: 0.17.0
- Node.js version: v20.18.0
- Operating system: Mac Sequoya 15.5
- IDE (if applicable): Cursor 1.0
Additional Context
My assumption if the project called "claude-task-master" there should be some integration with Claude Code, unless I'm incorrectly interpreting the name?
Can I see your mcp.json ?
sure. Below is the mcp.json that was generated and located in .cursor/mscp.json path:
{
"mcpServers": {
"task-master-ai": {
"command": "npx",
"args": [
"-y",
"--package=task-master-ai",
"task-master-ai"
],
"env": {
"ANTHROPIC_API_KEY": "XXX",
"PERPLEXITY_API_KEY": "YYY"
}
}
}
}
same issue for me, I get the following errors
[DEBUG] MCP server "task-master": Connection failed: McpError: MCP error -32000: Connection closed
[DEBUG] MCP server "task-master": Error message: MCP error -32000: Connection closed
[DEBUG] MCP server "task-master": Error stack: McpError: MCP error -32000: Connection closed
at Wl1._onclose (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1321:12595)
at _transport.onclose (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1321:12095)
at ChildProcess.<anonymous> (file:///opt/homebrew/lib/node_modules/@anthropic-ai/claude-code/cli.js:1323:1444)
at ChildProcess.emit (node:events:507:28)
at ChildProcess.emit (node:domain:489:12)
at maybeClose (node:internal/child_process:1101:16)
at Socket.<anonymous> (node:internal/child_process:457:11)
at Socket.emit (node:events:507:28)
at Socket.emit (node:domain:489:12)
at Pipe.<anonymous> (node:net:351:12)
with the following MCP config
"mcpServers": {
"telegram-mcp": {
"type": "stdio",
"command": "uv",
"args": [
"--directory=/Users/awallis/dev/telegram-mcp",
"run",
"main.py"
],
"env": {}
},
"task-master": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"--package=task-master-ai",
"task-master-ai"
],
"env": {
"OPENROUTER_API_KEY": "sk-or-v1-REDACTED",
"MODEL": "anthropic/claude-sonnet-4",
"MAX_TOKENS": 128000000,
"TEMPERATURE": 0.2,
"DEFAULT_SUBTASKS": 5,
"DEFAULT_PRIORITY": "medium"
}
}
},
I tried in both user context and project context with the same results :(
@igormoochnick , try following the steps in here: https://github.com/eyaltoledano/claude-task-master/issues/761
remove "--package=task-master-ai", for some reason, that other issue was closed as a bug, but this is clearly not user induced when we are following the docs
Is claude code supposed to use the MCP through Cursor? Or are we supposed to get claude code to run its own instance of the server? If so what is the command for that. All it wants to do is read the raw file version of the task master tasks for me.
Is claude code supposed to use the MCP through Cursor? Or are we supposed to get claude code to run its own instance of the server? If so what is the command for that. All it wants to do is read the raw file version of the task master tasks for me.
I think it effectively calls claude -p, so no, I don't think you need to run an MCP or do anything special - just have claude installed and configured
you need to have a different mcp file either at your project level in the form of .mcp.json by using the claude cli for adding MCP servers. in your ~/.claude.json if you search mcpServers you'll find project level and global mcp configs as well https://claudelog.com/configuration#mcp-configuration
Is there any way to NOT use cursor and just use Claude Code ? Where do we put the mcp json ? It seems like Claude Code with a task master mcp added never ends up calling the tool.
improved and implemented as of 0.20.0, but this can be improved by adding a .mcp.json into the claude code rules @joedanz
Ah, didn’t realize the support file-based now. Will get that added to the Claude profile, thanks!
Added .mcp.json as part of 0.21.0