MCP server for managing VS Code tasks from Claude Code CLI
npm install mcp-vscode-tasksbash
npm install -g mcp-vscode-tasks
`
Configuration
Add to your Claude Code config (~/.claude.json or project-level):
`json
{
"mcpServers": {
"vscode-tasks": {
"type": "stdio",
"command": "npx",
"args": ["--yes", "mcp-vscode-tasks"]
}
}
}
`
Tools
| Tool | Parameters | Description |
|------|------------|-------------|
| run_task | taskLabel, workspaceFolder, readyPattern?, readyTimeout? | Run a VS Code task by label |
| stop_task | taskLabel | Stop a running task |
| get_running_tasks | (none) | List all tracked tasks with status |
| get_task_output | taskLabel | Get buffered output from a running task |
$3
- taskLabel: Label of the task from .vscode/tasks.json
- workspaceFolder: Absolute path to project directory containing .vscode/tasks.json
- readyPattern: Regex pattern to wait for before returning (e.g., listening on, localhost:\\d+). Only applies to background tasks.
- readyTimeout: Timeout in seconds to wait for ready pattern (default: 30)
Usage
Once configured, you can ask Claude to:
- "Start the backend server"
- "Run the build task"
- "Stop the running frontend task"
- "Show me the output from the backend task"
Notes
- Background tasks (isBackground: true in tasks.json) run in background and can be monitored with get_task_output
- Non-background tasks wait for completion and return full output
- Use readyPattern` to wait for a specific output before returning (useful for server startup)