dev-env-setup

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.

Category
Visit Server

README

Dev Environment Setup Tool

CI npm version License: MIT

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

โœจ 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

๐Ÿ—๏ธ 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

  1. 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...
    },
  },
};
  1. Add tests in src/__tests__/
  2. 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

๐Ÿ“ž Support

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured