A production-ready dual-mode tool that automates the setup of local development environments for Python, Node.js, Flutter, Android, and more across macOS and Linux systems.
π― Two Modes:
- CLI Mode: Standalone command-line tool (
devenv
command) - MCP Mode: Model Context Protocol server for AI assistant integration
- Dual Mode Operation: Use as standalone CLI or MCP server
- Cross-Platform Support: Works on both macOS and Linux distributions
- Intelligent Package Manager Detection: Automatically detects and uses the appropriate package manager (Homebrew, apt, dnf, yum, pacman, zypper)
- Modular Architecture: Clean, testable, and extensible codebase
- Comprehensive Tool Support: Python, Node.js, Git, Docker, Java, Go, Rust, Flutter, and more
- Automated Installation: One-command setup for entire development stacks
- Environment Validation: Check what's installed and get recommendations
- Shell Configuration: Automatically configures environment variables and PATH
- CI/CD Ready: GitHub Actions workflows included
- Unit Tested: Comprehensive test coverage for reliability
npm install -g @cmwen/mcp-dev-env-setup
Use the devenv
command for standalone operation:
# Check installed tools
devenv check
# Get system information
devenv info
# List available tools
devenv list
# Install a tool
devenv install python
devenv install nodejs
# Install multiple tools
devenv install-all
# Get help
devenv --help
See CLI.md for complete CLI documentation.
Configure in your MCP client (e.g., Claude Desktop):
{
"mcpServers": {
"dev-env-setup": {
"command": "npx",
"args": ["-y", "mcp-dev-env-setup"]
}
}
}
Or run directly in MCP STDIO mode:
devenv --mcp
# or
devenv --stdio
- Python - Python 3 with pip
- Java - OpenJDK 17
- Go - Go programming language
- Rust - Rust with cargo
- Node.js - JavaScript runtime (via nvm or package manager)
- Git - Version control
- Docker - Container platform
- Flutter - Mobile app development SDK
- Android Studio - Android development tools
- macOS (Intel and Apple Silicon)
- Linux distributions:
- Debian/Ubuntu (apt)
- Fedora (dnf)
- RHEL/CentOS (yum)
- Arch Linux (pacman)
- openSUSE (zypper)
- Homebrew (macOS)
- apt (Debian/Ubuntu)
- dnf (Fedora)
- yum (RHEL/CentOS)
- pacman (Arch)
- zypper (openSUSE)
Check which development tools are currently installed on your system.
// Returns status of all tools with versions
Install Python 3 and pip using the system package manager.
Install Node.js with optional version specification.
{
"version": "lts" // or "18", "20", etc.
}
Install Flutter SDK for mobile app development.
Install Android Studio and development tools (including Java).
Install all development environments at once with optional skip list.
{
"skip": ["python", "flutter"] // Optional: tools to skip
}
- CLI Usage Guide - Complete CLI command reference and examples
- API Documentation - Complete API reference for all modules
- AI Agents Guide - Guide for AI agents to use and extend this project
- Development Guide - Setup, development workflow, and contribution guidelines
- Quick Start Guide - Get started in minutes
- Usage Examples - Common usage patterns
- Changelog - Version history and migration guides
The project follows a modular architecture:
src/
βββ core/ # Core business logic
β βββ package-manager.ts # OS and package manager detection
β βββ tool-config.ts # Tool definitions and configurations
βββ installers/ # Installation modules
β βββ unified-installer.ts # Unified installation logic
βββ validators/ # Validation modules
β βββ environment-validator.ts # Environment checking
βββ utils/ # Utility functions
β βββ shell.ts # Shell command execution
β βββ check.ts # Environment checking utilities
βββ __tests__/ # Unit tests
- Package Manager Detection: Automatically detects your OS and package manager
- Tool Configuration: Defines installation methods for each tool across all platforms
- Unified Installer: Provides a single interface for installing any tool
- Environment Validator: Checks system status and provides recommendations
# Run all tests
npm test
# Run tests in watch mode
npm run test:watch
# Run tests with coverage
npm run test:coverage
# Type checking
npm run lint
- Node.js >= 18.0.0
- npm or yarn
# Clone the repository
git clone https://github.com/cmwen/mcp-dev-env-setup.git
cd mcp-dev-env-setup
# Install dependencies
npm install
# Build the project
npm run build
# Run in development mode
npm run dev
- Add tool configuration to
src/core/tool-config.ts
:
export const TOOL_CONFIGS: Record<string, ToolConfig> = {
mytool: {
name: 'mytool',
displayName: 'My Tool',
category: ToolCategory.LANGUAGE,
description: 'Description of my tool',
commandToCheck: 'mytool',
versionFlag: '--version',
installMethods: {
homebrew: {
packageManager: PackageManager.HOMEBREW,
packageName: 'mytool',
},
apt: {
packageManager: PackageManager.APT,
packageName: 'mytool',
},
// Add more package managers...
},
},
};
- Add tests in
src/__tests__/
- Update documentation
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
- Follow TypeScript best practices
- Write tests for new features
- Update documentation
- Keep functions focused and single-purpose
- Use meaningful variable names
MIT License - see LICENSE file for details.
import { getSystemStatus } from './validators/environment-validator';
const status = await getSystemStatus();
console.log(`OS: ${status.os}`);
console.log(`Package Manager: ${status.packageManager?.name}`);
console.log(`Installed tools: ${status.tools.filter(t => t.installed).length}`);
import { installMultipleTools } from './installers/unified-installer';
const results = await installMultipleTools(['python', 'nodejs', 'git']);
for (const [tool, result] of Object.entries(results)) {
console.log(`${tool}: ${result.success ? 'β' : 'β'}`);
}
import { isSystemReady } from './validators/environment-validator';
const { ready, missing } = await isSystemReady(['python', 'nodejs']);
if (!ready) {
console.log('Please install:', missing.join(', '));
}
- Built with the Model Context Protocol SDK
- TypeScript and Node.js ecosystem
- Open an issue for bugs or feature requests
- Check documentation for API reference
- See AGENTS.md for AI agent integration guide