Skip to content
MCP server

cli-mcp-server

MCP server that lets AI clients run whitelisted command-line operations inside a locked

cli-mcp-server is an open-source MCP server for developer tools. It is available on CLI, API and Self-hosted.

Pricing
Open source
Platforms
CLI, API, Self-hosted
What it can do
Can change data (1 tool)
GitHub stars
177
Last commit
Language
Python

Similar MCP servers

About cli-mcp-server

This server gives AI clients controlled access to a shell-style command runner. Operators decide which commands and flags are permitted, and every path is checked against a single base directory before anything runs, so an assistant can inspect files or run approved tools without open-ended system access.

Each request is validated before execution: command and flag whitelists are enforced, shell operators such as pipes and redirects are blocked unless explicitly enabled, symlinks are resolved, and runs are cut off by a configurable timeout and maximum command length. A separate tool reports the active security configuration so the client can see what it is allowed to do.

It suits developers wiring Claude Desktop or other MCP-compatible clients to a project folder who want read-only style access to tools like ls, cat or pwd, with settings adjusted through environment variables.

Tools this server provides (2)

Taken from the project documentation; the running server may differ.

From the tool list in its README, going by the names, 1 of 2 tools changes data.

From the server's own tool labels and tool names; not verified by us.

run_commandName suggests: changes
Executes whitelisted CLI commands within allowed directories.
show_security_rulesName suggests: reads
Displays current security configuration and restrictions.

What it does

Command whitelisting
Only commands listed in the allowed set can run, with an option to permit everything.
Flag validation
Each command's flags are checked against a configurable allow list before execution.
Directory confinement
All paths are normalised and resolved, including symlinks, and must stay inside the configured base directory.
Shell operator blocking
Pipes, redirects and chaining operators are rejected unless turned on through an environment setting.
Execution limits
Commands are bounded by a maximum length and a timeout that can be set in seconds.
Security rules inspection
A dedicated tool shows the current working directory, allowed commands, flags and limits.

Good for

  • Letting an AI assistant list and read files inside a project folder
  • Giving an LLM client limited access to git or other approved CLI tools
  • Testing MCP client integrations against a sandboxed command runner
  • Auditing which commands an AI assistant is permitted to execute

Pricing

Open source

cli-mcp-server FAQ

How is the server installed?

It can be added to Claude Desktop's configuration file using uvx or a local uv project path, or installed automatically through Smithery.

Are shell operators allowed by default?

No. Operators such as &&, | and > are blocked unless ALLOW_SHELL_OPERATORS is set to true.

Which commands are available out of the box?

By default the whitelist includes ls, cat and pwd, with -l, -a and --help as allowed flags.

What license does cli-mcp-server use?

The project is released under the MIT License.

Is cli-mcp-server free?

Yes. cli-mcp-server is open source, so you can use and self-host it for free.

What are the best alternatives to cli-mcp-server?

The closest alternatives to cli-mcp-server are cmdshellmcp, mcp-shell-server, mcp-shell, mcp-linux-tools and mcp-server-commands.

Where this comes from

  • Description: written from the project's README.

How AIPoweredBot checks servers