Run Command MCP Server

Run Command MCP Server

Provides tools for executing shell commands both synchronously and asynchronously with real-time output streaming and process management capabilities. It enables users to start background tasks, monitor progress, and manage long-running processes via Stdio or HTTP transports.

Category
Visit Server

README

Run Command MCP Server

A Model Context Protocol (MCP) server that provides command execution capabilities with both synchronous and asynchronous streaming support.

Features

  • Synchronous Command Execution: Run commands and wait for completion
  • Asynchronous Command Execution: Start commands in background and monitor progress
  • Real-time Output Streaming: Check command output while it's running
  • Process Management: List, monitor, kill, and clean up processes
  • Timeout Support: Automatically terminate long-running commands
  • Multiple Transport Modes:
    • Stdio Transport: Standard MCP communication via stdin/stdout
    • HTTP Transport: RESTful API with Server-Sent Events (SSE) support for real-time notifications
  • MCP Standard Compliance: Fully compliant with MCP specifications

Usage

Stdio Transport (Default)

Claude Desktop

{
  "mcpServers": {
    "run-command": {
      "command": "npx",
      "args": ["github:stilllovee/run-command-mcp"]
    }
  }
}

Or use locally after cloning:

{
  "mcpServers": {
    "run-command": {
      "command": "node",
      "args": ["PATH_TO_YOUR_REPO/index.js"]
    }
  }
}

Github Copilot

{
    "servers": {
        "run-command": {
            "type": "stdio",
            "command": "npx",
            "args": ["github:stilllovee/run-command-mcp"]
        },
    },
    "inputs": []
}

Or use locally after cloning:

{
    "servers": {
        "run-command": {
            "type": "stdio",
            "command": "node",
            "args": ["PATH_TO_YOUR_REPO/index.js"]
        }
    },
    "inputs": []
}

HTTP Transport (Streamable)

Start the HTTP server:

# Default port (8123)
npm run start:http

# Custom port
node http-server.js --port=3000

The server will be available at: http://localhost:8123/mcp

Github Copilot Configuration (HTTP)

{
    "servers": {
        "run-command-http": {
            "type": "http",
            "url": "http://localhost:8123/mcp"
        }
    },
    "inputs": []
}

Available Tools

run_command

Run a custom shell command synchronously and return the output (stdout, stderr, exit code). Blocks until command completes.

Parameters:

  • command (required): The full command to execute (e.g., "echo hello world", "npm install", "git status")
  • timeout (optional): Timeout in milliseconds (default: 30000)

Example:

{
  "command": "echo hello world",
  "timeout": 5000
}

start_command

Start a command asynchronously (non-blocking). Returns a process_id to check status and output later.

Parameters:

  • command (required): The full command to execute (e.g., "node server.js", "npm run dev")
  • timeout (optional): Timeout in milliseconds. 0 means no timeout (default: 0)

Example:

{
  "command": "node server.js",
  "timeout": 0
}

get_command_output

Get the current output and status of a running or completed async command by process_id.

Parameters:

  • process_id (required): The process ID returned by start_command
  • tail (optional): Only return the last N lines of output (0 = all)

Example:

{
  "process_id": "550e8400-e29b-41d4-a716-446655440000",
  "tail": 10
}

list_processes

List all tracked processes (running, completed, failed, etc.)

Parameters:

  • status (optional): Filter by status: running, completed, failed, killed, error, timed_out

Example:

{
  "status": "running"
}

kill_process

Kill a running process by process_id

Parameters:

  • process_id (required): The process ID to kill

Example:

{
  "process_id": "550e8400-e29b-41d4-a716-446655440000"
}

clear_processes

Clear finished processes from memory. If process_id is provided, clears that specific process. Otherwise clears all non-running processes.

Parameters:

  • process_id (optional): Specific process ID to clear

Example:

{
  "process_id": "550e8400-e29b-41d4-a716-446655440000"
}

Usage Examples

Example 1: Run a simple synchronous command

User: Run "echo hello world"
AI: Uses run_command to execute and get immediate results

Example 2: Start a long-running server

User: Start my Node.js server
AI: Uses start_command to start server in background
AI: Uses get_command_output to check if server started successfully

Example 3: Monitor build progress

User: Build my project and show me the progress
AI: Uses start_command to start build
AI: Periodically uses get_command_output to check build logs
AI: Reports progress to user in real-time

Example 4: Run Azure Functions locally

User: Start my Azure Functions app
AI: Uses start_command with "func start"
AI: Monitors output with get_command_output
AI: Shows compilation progress and when functions are ready

Use Cases

  • Development Servers: Start and monitor Node.js, Python, or other development servers asynchronously
  • Build Processes: Run and monitor long build processes (webpack, tsc, etc.)
  • Testing: Run test suites and monitor results
  • System Administration: Execute system commands and check results
  • Log Monitoring: Start services and continuously check their logs

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
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
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
Qdrant Server

Qdrant Server

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

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
E2B

E2B

Using MCP to run code via e2b.

Official
Featured