cmd-line-executor MCP server

by MarkusPfundstein

4 stars
193 downloads
Not rated
GitHub

About

Experimental MCP server to execute command line commands

Details

Author
MarkusPfundstein
GitHub stars
4
Downloads
193
Categories
Other

- Single tool run_command for executing command-line commands
- Accepts command and arguments as separate strings
- Returns stdout, stderr, status code from the command
- Built with Python and the uv package manager
- Supports both development and published deployment modes

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name cmd-line-executor MCP server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Install via the Claude Desktop configuration file (claude_desktop_config.json) using either the development path with uv or the published path with uvx. The server exposes one tool run_command that accepts a cmd string and an args string array.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "cmd-line-executor mcp server": {
            "cmd-line-executor-MCP": {
                "command": "uv",
                "args": [
                    "sync"
                ]
            }
        }
    }
}

McpServers

{
    "cmd-line-executor-MCP": {
        "command": "uv",
        "args": [
            "sync"
        ]
    }
}

cmd-line-executor MCP server

Example MCP server to call command line apps

Components

Tools

The server implements one tool:
- run_command: Runs a command line comment
- Takes "cmd" and "args" as string arguments
- Runs the command and returns stdout, stderr, status_code, etc.

Configuration

Quickstart

Install

Claude Desktop

On MacOS: ~/Library/Application\ Support/Claude/claude_desktop_config.json
On Windows: %APPDATA%/Claude/claude_desktop_config.json

<details>
<summary>Development/Unpublished Servers Configuration</summary>

  "mcpServers": {
"cmd-line-executor": {
"command": "uv",
"args": [
"--directory",
"/Users/$(whoami)/experiments/claude-mvp/cmd-line-executor",
"run",
"cmd-line-executor"
]
}
}

</details>

<details>
<summary>Published Servers Configuration</summary>

  "mcpServers": {
"cmd-line-executor": {
"command": "uvx",
"args": [
"cmd-line-executor"
]
}
}

</details>

Development

Building and Publishing

To prepare the package for distribution:

1. Sync dependencies and update lockfile:

uv sync

2. Build package distributions:

uv build

This will create source and wheel distributions in the dist/ directory.

3. Publish to PyPI:

uv publish

Note: You'll need to set PyPI credentials via environment variables or command flags:
- Token: --token or UV_PUBLISH_TOKEN
- Or username/password: --username/UV_PUBLISH_USERNAME and --password/UV_PUBLISH_PASSWORD

Debugging

Since MCP servers run over stdio, debugging can be challenging. For the best debugging
experience, we strongly recommend using the MCP Inspector.

You can launch the MCP Inspector via npm with this command:

npx @modelcontextprotocol/inspector uv --directory /Users/markus/experiments/claude-mvp/cmd-line-executor run cmd-line-executor

Upon launching, the Inspector will display a URL that you can access in your browser to begin debugging.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.