vincemic/ai-vsc-process-herder
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.
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
- list-tasks: List all available VS Code tasks from
tasks.json
- start-task: Start a specific task by name
- stop-process: Stop a running process by ID or name
- restart-process: Restart a process with the same configuration
- list-processes: List all running processes managed by the server
- get-process-status: Get detailed status information for a specific process
Project Analysis
- detect-project-type: Analyze workspace to detect project type and suggest tasks
- 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
-
Frontend Development
- Start development server
- Run build process
- Execute tests
- Monitor process health
-
Backend Development
- Start API server
- Run database migrations
- Execute integration tests
- Monitor logs
-
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
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
๐ License
MIT License - see LICENSE file for details.
๐ Related
๐ Troubleshooting
Common Issues
- Process won't start: Check that the command exists and is in PATH
- Permission denied: Ensure proper file permissions for executables
- Port conflicts: Check if ports are already in use
- 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.