ai-vsc-process-herder

vincemic/ai-vsc-process-herder

3.2

If you are the rightful owner of ai-vsc-process-herder and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

The VS Code Process Herder MCP Server is a TypeScript-based server designed to manage development workflows in VS Code using the Model Context Protocol.

Tools
5
Resources
0
Prompts
0

VS Code Process Herder MCP Server

A TypeScript-based MCP (Model Context Protocol) server that provides intelligent process management for VS Code development workflows. This server acts as a standardized interface for AI assistants like GitHub Copilot to manage development processes without confusion.

๐Ÿš€ Features

  • VS Code Tasks Integration: Read and execute tasks from tasks.json
  • Process Lifecycle Management: Start, stop, restart, and monitor processes
  • Intelligent Process Detection: Automatically detect common development scenarios
  • Status Monitoring: Query running processes and their health
  • Project Type Detection: Auto-detect project type and suggest relevant tasks
  • Multi-Project Support: Handle multiple workspace configurations
  • Cross-Platform: Works on Windows, macOS, and Linux

๐Ÿ›  Installation

Prerequisites

  • Node.js 18 or higher
  • VS Code (optional, but recommended)

Install Dependencies

npm install

Build the Project

npm run build

๐Ÿ“– Usage

Starting the MCP Server

# Direct execution
node build/index.js

# Or using npm script
npm run dev

The server runs on stdio and follows the MCP protocol specification.

Integration with AI Assistants

To use this server with GitHub Copilot or other AI assistants, you'll need to configure it as an MCP server in your AI assistant's settings.

๐Ÿ”ง Available Tools

Process Management

  1. list-tasks: List all available VS Code tasks from tasks.json
  2. start-task: Start a specific task by name
  3. stop-process: Stop a running process by ID or name
  4. restart-process: Restart a process with the same configuration
  5. list-processes: List all running processes managed by the server
  6. get-process-status: Get detailed status information for a specific process

Project Analysis

  1. detect-project-type: Analyze workspace to detect project type and suggest tasks
  2. get-vscode-status: Check VS Code integration status and workspaces

๐Ÿ— Architecture

Core Components

  • ProcessManager: Handles process lifecycle and monitoring
  • TaskManager: Manages VS Code tasks and configurations
  • ProjectDetector: Analyzes projects and suggests appropriate tasks
  • VSCodeIntegration: Integrates with VS Code workspace settings

Supported Project Types

  • JavaScript/TypeScript: npm, yarn, pnpm support with framework detection
  • Python: pip, pipenv, poetry support with framework detection
  • Rust: Cargo support with standard commands
  • Go: Go modules with standard commands
  • Java: Maven and Gradle support
  • .NET: dotnet CLI support
  • Web Projects: HTML/CSS detection

๐Ÿ“‹ Example Tasks

Starting a Development Server

# AI Assistant can use:
start-task "npm start"

Running Tests

# AI Assistant can use:
start-task "npm test"

Managing Processes

# List all running processes
list-processes

# Stop a specific process
stop-process --processName "npm start"

# Restart a process
restart-process --processName "npm start"

๐Ÿ”„ Development Workflow

Common Scenarios

  1. Frontend Development

    • Start development server
    • Run build process
    • Execute tests
    • Monitor process health
  2. Backend Development

    • Start API server
    • Run database migrations
    • Execute integration tests
    • Monitor logs
  3. Full-Stack Development

    • Manage multiple processes (frontend + backend)
    • Coordinate startup order
    • Monitor all services

๐Ÿšจ Error Handling

The server provides comprehensive error handling with:

  • Graceful process termination
  • Meaningful error messages
  • Process state recovery
  • Timeout handling for unresponsive processes

๐Ÿงช Testing

# Run tests (when implemented)
npm test

# Lint code
npm run lint

# Format code
npm run format

๐Ÿ“ Project Structure

src/
โ”œโ”€โ”€ index.ts              # Main MCP server implementation
โ”œโ”€โ”€ process-manager.ts    # Process lifecycle management
โ”œโ”€โ”€ task-manager.ts       # VS Code tasks integration
โ”œโ”€โ”€ project-detector.ts   # Project type detection
โ””โ”€โ”€ vscode-integration.ts # VS Code workspace integration

build/                    # Compiled JavaScript output
.vscode/                  # VS Code configuration
โ”œโ”€โ”€ tasks.json           # VS Code tasks
โ””โ”€โ”€ settings.json        # Workspace settings

๐Ÿค Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Add tests if applicable
  5. Submit a pull request

๐Ÿ“„ License

MIT License - see LICENSE file for details.

๐Ÿ”— Related

๐Ÿ› Troubleshooting

Common Issues

  1. Process won't start: Check that the command exists and is in PATH
  2. Permission denied: Ensure proper file permissions for executables
  3. Port conflicts: Check if ports are already in use
  4. VS Code tasks not found: Verify tasks.json exists and is valid

Debug Mode

Set environment variable for verbose logging:

DEBUG=vscode-process-herder node build/index.js

๐Ÿ“š API Reference

See the inline documentation in the source code for detailed API reference and examples.