Cmd Line MCP Server

An MCP server that lets AI assistants run terminal commands safely. Commands are categorized (read/write/system), directories are whitelisted, and

Local serverstdioPython

What is the Cmd Line MCP MCP server?

Cmd line mcp mcp server connects Cmd Line MCP to AI assistants that speak the Model Context Protocol. An MCP server that lets AI assistants run terminal commands safely. Commands are categorized (read/write/system), directories are whitelisted, and dangerous patterns are blocked automatically.

What Cmd Line MCP does

An MCP server that lets AI assistants run terminal commands safely. Commands are categorized (read/write/system), directories are whitelisted, and dangerous patterns are blocked automatically.

Installing the cmd line mcp mcp server

The server is distributed via PyPI as cmd-line-mcp, so most clients can run it without a manual build step. Add it to your MCP client's configuration and restart the client to pick it up — the copy-paste configs for Claude Desktop, Claude Code and Cursor are on this page.

Configuration

The server reads 2 environment variables: CMD_LINE_MCP_SECURITY_REQUIRE_SESSION_ID, CMD_LINE_MCP_COMMANDS_READ. Keep credentials in your client's env block or a secrets manager rather than committing them.

Where it fits

Developer-tool servers are usually the first ones people connect, because they turn "help me with this code" into an assistant that can actually read the repo and act on it. Cmd Line MCP sits in that group. Worth comparing against the other developer tools servers in this directory before you commit to one, since several overlap in scope but differ sharply in setup cost and permissions.

Practical notes

  • This server runs locally, so it operates with whatever access your machine and its credentials already have. Scope that deliberately rather than by default.
  • Maintained by andresthor, written in Python.
  • MCP clients ask for confirmation before each tool call by default. Keep that on while you learn what the cmd line mcp mcp server actually does with your data.
  • Every entry in this directory is reviewed by hand before it goes live, and details are checked against the project's own documentation.

How to install the Cmd Line MCP MCP server

{
  "mcpServers": {
    "cmd-line": {
      "command": "/path/to/venv/bin/cmd-line-mcp",
      "args": ["--config", "/path/to/config.json"],
      "env": {
        "CMD_LINE_MCP_SECURITY_REQUIRE_SESSION_ID": "false",
        "CMD_LINE_MCP_SECURITY_AUTO_APPROVE_DIRECTORIES_IN_DESKTOP_MODE": "true"
      }
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Configuration

VariableDescriptionRequired
CMD_LINE_MCP_SECURITY_REQUIRE_SESSION_IDConfiguration value read at startup.Optional
CMD_LINE_MCP_COMMANDS_READConfiguration value read at startup.Optional

Frequently asked questions

It connects Cmd Line MCP to MCP-compatible AI assistants such as Claude and Cursor. Instead of copying data back and forth by hand, the assistant works with Cmd Line MCP directly.