Skip to main content

A basic MCP (Model Context Protocol) server implementation

Project description

DevCtl MCP

A Model Context Protocol (MCP) server for managing development processes. Start, stop, and monitor your development servers, background tasks, and other processes directly through Claude or other MCP-compatible clients.

Features

  • 🚀 Start/Stop Processes: Launch and terminate development processes by name
  • 📊 Process Monitoring: View real-time status and uptime for all processes
  • 📝 Log Management: Retrieve and view process logs with configurable line limits
  • ⚙️ YAML Configuration: Define processes with commands, arguments, working directories, and environment variables
  • 🔄 Automatic Cleanup: Graceful shutdown of all processes when the server terminates
  • 🛡️ Process Groups: Proper signal handling for clean process termination

Installation

pip install devctl-mcp

Configuration

Create a processes.yaml file in your project root to define your development processes:

processes:
  # Example Go API server
  go_api:
    cmd: go
    args:
      - run
      - ./cmd/server
    working_directory: ~/projects/my-api
    env:
      PORT: "8080"
      GO_ENV: "development"
  
  # Example Python web server
  web_server:
    cmd: python
    args:
      - -m
      - flask
      - run
    working_directory: /path/to/your/flask/project
    env:
      FLASK_APP: app.py
      FLASK_ENV: development
      FLASK_DEBUG: "1"
  
  # Example Node.js development server
  frontend:
    cmd: npm
    args:
      - run
      - dev
    working_directory: /path/to/your/frontend
    env:
      NODE_ENV: development

MCP Client Setup

Claude Desktop

Add to your Claude Desktop configuration file:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "devctl": {
      "command": "devctl-mcp"
    }
  }
}

Other MCP Clients

The server runs via stdio transport and can be used with any MCP-compatible client:

devctl-mcp

Available Tools

The MCP server provides the following tools:

start_process

Start a named development process.

Parameters:

  • name (required): The name of the process to start

stop_process

Stop a running process.

Parameters:

  • name (required): The name of the process to stop
  • force (optional): Force kill the process (default: false)

get_process_logs

Retrieve logs from a process.

Parameters:

  • name (required): The name of the process
  • lines (optional): Number of recent log lines to retrieve

list_processes

List all defined processes and their current status.

Parameters: None

Usage Examples

Once configured, you can interact with your processes through Claude:

"Start my web server"
"Stop the API server"
"Show me the logs for the frontend process"
"List all my development processes"
"Restart the database with force kill"

Process Configuration Reference

Each process in processes.yaml supports:

  • cmd (required): The command to execute
  • args (optional): List of command arguments
  • working_directory (optional): Working directory for the process
  • env (optional): Environment variables as key-value pairs

Development

Setup

git clone https://github.com/opentrace/devctl-mcp.git
cd devctl-mcp
pip install -e ".[dev]"

Running Tests

pytest

Building

python -m build

License

MIT License - see LICENSE file for details.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

devctl_mcp-0.0.1.tar.gz (13.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

devctl_mcp-0.0.1-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

Details for the file devctl_mcp-0.0.1.tar.gz.

File metadata

  • Download URL: devctl_mcp-0.0.1.tar.gz
  • Upload date:
  • Size: 13.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.13

File hashes

Hashes for devctl_mcp-0.0.1.tar.gz
Algorithm Hash digest
SHA256 cb0a7e34d2caabb515513ef3f2910355645516ad910761c49294f60075caef0c
MD5 3900294b38221610c7514c1da4e1ebda
BLAKE2b-256 e968f3b0b8b2a8f361e25c7f0e41aa097c340f2c96a56fa74f9dff961474a47d

See more details on using hashes here.

File details

Details for the file devctl_mcp-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: devctl_mcp-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 8.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.13

File hashes

Hashes for devctl_mcp-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e11af30d3cd7c16b8ce084fe665ef4a4e3ea551e1e93fd95a35f46d01188cf1d
MD5 5ba5de0fcd1bd4841d8506a57ba9ff47
BLAKE2b-256 05b22e3bbed33318da51dd0c4bb57b182bef7632f6cf2bdffd3c6ff5bc42898e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page