dev-env-setup
Automates setup of local development environments for Python, Node.js, Flutter, Android, and more on macOS and Linux. Can be used as a standalone CLI or as an MCP server for AI assistant integration.
README
Dev Environment Setup Tool
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 (
devenvcommand) - MCP Mode: Model Context Protocol server for AI assistant integration
✨ Features
- 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
🚀 Quick Start
Installation
npm install -g @cmwen/mcp-dev-env-setup
CLI Mode
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.
MCP Mode
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
📋 Supported Tools
Languages
- Python - Python 3 with pip
- Java - OpenJDK 17
- Go - Go programming language
- Rust - Rust with cargo
Runtimes & Tools
- Node.js - JavaScript runtime (via nvm or package manager)
- Git - Version control
- Docker - Container platform
SDKs & Frameworks
- Flutter - Mobile app development SDK
- Android Studio - Android development tools
🖥️ Supported Systems
Operating Systems
- macOS (Intel and Apple Silicon)
- Linux distributions:
- Debian/Ubuntu (apt)
- Fedora (dnf)
- RHEL/CentOS (yum)
- Arch Linux (pacman)
- openSUSE (zypper)
Package Managers
- Homebrew (macOS)
- apt (Debian/Ubuntu)
- dnf (Fedora)
- yum (RHEL/CentOS)
- pacman (Arch)
- zypper (openSUSE)
🔧 Available MCP Tools
1. check_environment
Check which development tools are currently installed on your system.
// Returns status of all tools with versions
2. install_python
Install Python 3 and pip using the system package manager.
3. install_nodejs
Install Node.js with optional version specification.
{
"version": "lts" // or "18", "20", etc.
}
4. install_flutter
Install Flutter SDK for mobile app development.
5. install_android
Install Android Studio and development tools (including Java).
6. setup_all
Install all development environments at once with optional skip list.
{
"skip": ["python", "flutter"] // Optional: tools to skip
}
📚 Documentation
- 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
🏗️ Architecture
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
Key Modules
- 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
🧪 Testing
# 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
🛠️ Development
Prerequisites
- Node.js >= 18.0.0
- npm or yarn
Setup
# 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
Adding New Tools
- 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
🤝 Contributing
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
Development Guidelines
- Follow TypeScript best practices
- Write tests for new features
- Update documentation
- Keep functions focused and single-purpose
- Use meaningful variable names
📄 License
MIT License - see LICENSE file for details.
🔗 Links
💡 Examples
Check System Status
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}`);
Install Multiple Tools
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 ? '✓' : '✗'}`);
}
Validate Environment
import { isSystemReady } from './validators/environment-validator';
const { ready, missing } = await isSystemReady(['python', 'nodejs']);
if (!ready) {
console.log('Please install:', missing.join(', '));
}
🙏 Acknowledgments
- Built with the Model Context Protocol SDK
- TypeScript and Node.js ecosystem
📞 Support
- Open an issue for bugs or feature requests
- Check documentation for API reference
- See AGENTS.md for AI agent integration guide
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。