claude-task-master icon indicating copy to clipboard operation
claude-task-master copied to clipboard

bug: Task Master v0.16.0 CLI and MCP Server File Structure Incompatibility

Open control1kr opened this issue 1 year ago • 2 comments

Bug Report: Task Master v0.16.0 CLI and MCP Server Compatibility Issue

Summary

Task Master v0.16.0 introduces a new file structure for CLI operations, but the bundled MCP server still uses legacy v0.15.0 path resolution logic, causing complete incompatibility when using CLI and MCP together.

Environment

  • Task Master Version: 0.16.0
  • Platform: Windows 11
  • Editor: Cursor IDE with MCP integration
  • Installation Method: npx task-master init (CLI) + MCP server from same package

Problem Description

Version 0.16.0 CLI Structure

When initializing with npx task-master init, v0.16.0 creates:

project/
├── .taskmaster/
│   ├── config.json          # New config location
│   ├── tasks/
│   │   └── tasks.json       # New tasks location
│   ├── templates/
│   ├── docs/
│   └── reports/

MCP Server Still Uses v0.15.0 Logic

The MCP server bundled with v0.16.0 package only searches for:

project/
├── .taskmasterconfig        # Legacy config (not .taskmaster/config.json)
├── tasks/
│   └── tasks.json          # Legacy tasks location
└── tasks.json              # Alternative legacy location

Reproduction Steps

  1. Initialize project with v0.16.0 CLI:

    npx [email protected] init
    

    Result: Creates .taskmaster/ folder structure

  2. Create tasks using CLI:

    npx task-master parse-prd --input=prd.txt --num-tasks=10
    

    Result: Tasks saved to .taskmaster/tasks/tasks.json

  3. Verify CLI functionality:

    npx task-master list
    

    Result: ✅ CLI works perfectly, reads from .taskmaster/tasks/tasks.json

  4. Try to access via MCP in Cursor:

    Result: ❌ Error: "Tasks file not found in any of the expected locations"

Technical Analysis

Root Cause

The MCP server's path-utils.js contains hardcoded legacy paths:

// Current MCP server code (v0.15.0 logic in v0.16.0 package)
possiblePaths.push(
    path.join(dirPath, 'tasks.json'),           // Legacy
    path.join(dirPath, 'tasks', 'tasks.json')  // Legacy
    // Missing: path.join(dirPath, '.taskmaster', 'tasks', 'tasks.json')
);

Evidence

File locations created by CLI v0.16.0:

C:\project\.taskmaster\tasks\tasks.json     ✅ EXISTS (CLI uses this)
C:\project\tasks\tasks.json                 ❌ MISSING (MCP looks for this)  
C:\project\tasks.json                       ❌ MISSING (MCP looks for this)

MCP Error Message:

Tasks file not found in any of the expected locations relative to project root:
C:\project\tasks.json, C:\project\tasks\tasks.json

Impact

High Priority Issues

  • Complete workflow breakage: Users cannot use CLI and MCP together
  • Version inconsistency: Same package version behaves differently for CLI vs MCP
  • Data isolation: CLI and MCP operate on different files (when manually created)
  • User confusion: Error messages don't indicate version mismatch

Affected Workflows

  • Development workflow: CLI for task management + MCP for AI integration
  • Team collaboration: Mixed usage of CLI and MCP tools
  • CI/CD integration: Automated task management using both interfaces

Current Workarounds

Workaround 1: Manual File Duplication

# After CLI operations, manually sync files
copy .taskmaster\tasks\tasks.json tasks\tasks.json
copy .taskmaster\tasks\tasks.json tasks.json

Issues: Manual process, prone to sync errors, not sustainable

Workaround 2: Downgrade to v0.15.0

{
  "taskmaster-ai": {
    "args": ["-y", "[email protected]", "task-master-ai"]
  }
}

Issues: Lose v0.16.0 CLI features, version lock-in

Expected Behavior

The MCP server should:

  1. Auto-detect Task Master project version (v0.15.0 vs v0.16.0+)
  2. Support both legacy and v0.16.0+ file structures
  3. Prioritize version-appropriate paths when searching
  4. Provide consistent behavior with CLI of the same version

Suggested Solution Areas

  1. Path Detection Enhancement

    • Add v0.16.0+ paths to search logic
    • Implement version detection based on folder structure
    • Maintain backward compatibility with v0.15.0 projects
  2. Configuration Alignment

    • Update MCP server to recognize .taskmaster/config.json
    • Support both config formats during transition
  3. Documentation Update

    • Clear versioning compatibility matrix
    • Migration guide for v0.15.0 → v0.16.0

Additional Information

Package Inconsistency

  • CLI Binary: /bin/task-master.js → Uses v0.16.0 logic ✅
  • MCP Server: /mcp-server/ → Uses v0.15.0 logic ❌

Files Affected

  • mcp-server/src/core/utils/path-utils.js (Primary)
  • mcp-server/src/tools/*.js (All path-dependent tools)

Version Check

npx [email protected] --version  # Returns: 0.16.0
# But MCP server internally uses 0.15.0 path logic

Priority

CRITICAL - This breaks the core value proposition of seamless CLI+MCP integration that Task Master provides.

Labels

bug, compatibility, mcp, version-mismatch, file-structure


Reporter: Development team using Task Master v0.16.0
Date: June 2025
Affects: All users attempting to use v0.16.0 CLI with MCP integration

control1kr avatar Jun 02 '25 12:06 control1kr

bump

TheGreatestAlan avatar Jun 02 '25 14:06 TheGreatestAlan

Fixed in 0.16.1

Crunchyman-ralph avatar Jun 03 '25 12:06 Crunchyman-ralph