Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>VSCode Task MCPNew to Visual Studio Code? Get it now.
VSCode Task MCP

VSCode Task MCP

hwshqtb

| (0) | Free
Expose VSCode tasks to AI coding assistants (Cline, etc.) via MCP
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

VSCode Task MCP

Expose VSCode tasks to AI coding assistants (Cline, etc.) via the Model Context Protocol.

Features

  • list_tasks — List all available VSCode tasks in the current window
  • execute_task — Execute a task by name and wait for completion

Installation

# Clone
git clone https://github.com/hwshqtb/vscode-task-mcp.git
cd mcp

# Install & compile
npm install
npm run compile

Then press F5 in VSCode to start extension development, or package it:

npx vsce package
code --install-extension ./vscode-task-mcp-0.1.0.vsix

Cline MCP Configuration

Add this to your Cline MCP settings (cline_mcp_settings.json):

{
  "mcpServers": {
    "vscode-tasks": {
      "disabled": false,
      "timeout": 30,
      "type": "stdio",
      "command": "node",
      "args": [
        "~/.vscode/extensions/hwshqtb.vscode-task-mcp-<version>/out/mcp-stdio-bridge.js"
      ]
    }
  }
}

Replace hwshqtb with the actual publisher name.

Architecture

┌────────────────────────┐
│  Cline (AI Assistant)   │
│   │                     │
│   └─ stdio ──────────┐  │
├───────────────────────┼──┤
│  mcp-stdio-bridge.js  │  │  ← MCP bridge process
│   │                    │  │
│   └─ HTTP ─────────┐  │  │
├────────────────────┼──┼──┤
│  VSCode Extension   │  │  │
│  ┌─────────────────┘  │  │
│  │ mcpServer.ts        │  │  ← Built-in HTTP API
│  │ ├─ GET  /tasks      │  │
│  │ └─ POST /execute    │  │
│  └─────────────────────┘  │
│  ┌────────────────────────┤
│  │ vscode.tasks API        │
│  └────────────────────────┤
└────────────────────────────┘
  1. Extension starts an embedded Express server on a random local port
  2. Port info is written to os.tmpdir()/vscode-task-mcp-{PID}.json
  3. Bridge process discovers the port via parent PID (process.ppid)
  4. Bridge communicates with Cline over stdio MCP protocol

Multi-window support

Each VSCode window's Extension Host has a unique PID. The port file is named with the Extension Host PID, and the bridge uses process.ppid to look up the correct port. Multiple VSCode windows work independently without interference.

Development

npm run watch    # Watch & compile
npm run compile  # Compile once
npm run lint     # Lint

License

MIT

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft