loading…
Search for a command to run...
loading…
A secure Model Context Protocol server that allows AI assistants to execute terminal commands with controlled directory access and command permissions. It featu
A secure Model Context Protocol server that allows AI assistants to execute terminal commands with controlled directory access and command permissions. It features a robust security architecture including whitelisting, session IDs, and categorized command levels to ensure safe system interaction.
npm version License: MIT Node.js
A secure Model Context Protocol (MCP) server that allows AI assistants to execute terminal commands with controlled directory access and command permissions.
Written in JavaScript (ESM) — works with npx out of the box, no Python runtime required.
npx cmd-line-mcp
npx cmd-line-mcp --config /path/to/config.json
npx cmd-line-mcp --config config.json --env .env
npm install -g cmd-line-mcp
cmd-line-mcp
npm install cmd-line-mcp
npx cmd-line-mcp
Edit ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"cmd-line": {
"command": "npx",
"args": ["-y", "cmd-line-mcp"],
"env": {
"CMD_LINE_MCP_SECURITY_REQUIRE_SESSION_ID": "false",
"CMD_LINE_MCP_SECURITY_AUTO_APPROVE_DIRECTORIES_IN_DESKTOP_MODE": "true"
}
}
}
}
Or with a custom config file:
{
"mcpServers": {
"cmd-line": {
"command": "npx",
"args": ["-y", "cmd-line-mcp", "--config", "/path/to/config.json"]
}
}
}
Restart Claude for Desktop after saving.
Configuration is resolved in this order (later overrides earlier):
default_config.jsonCMD_LINE_MCP_CONFIG environment variable--config <path> CLI argument.env file (searched from cwd upward)CMD_LINE_MCP_* environment variablesconfig.json{
"security": {
"whitelisted_directories": ["/home", "/tmp", "~/Projects"],
"auto_approve_directories_in_desktop_mode": false,
"require_session_id": false,
"allow_command_separators": true
},
"commands": {
"read": ["ls", "cat", "grep"],
"write": ["touch", "mkdir", "rm"],
"system": ["ps", "ping"]
}
}
CMD_LINE_MCP_<SECTION>_<SETTING>
Examples:
export CMD_LINE_MCP_SECURITY_WHITELISTED_DIRECTORIES="/projects,/var/data"
export CMD_LINE_MCP_SECURITY_AUTO_APPROVE_DIRECTORIES_IN_DESKTOP_MODE=true
export CMD_LINE_MCP_COMMANDS_READ="awk,jq,wc"
| Tool | Description |
|---|---|
execute_command |
Execute any allowed command (read/write/system) |
execute_read_command |
Execute read-only commands only |
approve_directory |
Grant access to a directory for a session |
approve_command_type |
Grant permission for a command category |
list_directories |
List whitelisted and approved directories |
list_available_commands |
Show commands grouped by category |
get_command_help |
Get usage guidance and examples |
get_configuration |
View current server configuration |
ls, pwd, cat, less, head, tail, grep, find, which, du, df, file, uname, hostname, uptime, date, whoami, id, env, history, sort, wc, ...
cp, mv, rm, mkdir, rmdir, touch, chmod, chown, ln, echo, tar, gzip, zip, unzip, awk, sed, ...
ps, top, htop, who, netstat, ifconfig, ping, ssh, curl, wget, xargs, ...
sudo, su, bash, sh, zsh, eval, exec, dd, mkfs, shutdown, reboot, ...
┌───────────────────────────────────────────────────────────────┐
│ COMMAND-LINE MCP SERVER │
├──────────────────┬────────────────────────┬───────────────────┤
│ COMMAND SECURITY │ DIRECTORY SECURITY │ SESSION SECURITY │
├──────────────────┼────────────────────────┼───────────────────┤
│ ✓ Read commands │ ✓ Directory whitelist │ ✓ Session IDs │
│ ✓ Write commands │ ✓ Runtime approvals │ ✓ Persistent │
│ ✓ System commands│ ✓ Path validation │ permissions │
│ ✓ Blocked list │ ✓ Home dir expansion │ ✓ Auto timeouts │
│ ✓ Pattern filters│ ✓ Subdirectory check │ ✓ Desktop mode │
└──────────────────┴────────────────────────┴───────────────────┘
MIT
The original Python implementation is preserved in the temp/ directory for reference.
Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"cmd-line-mcp": {
"command": "npx",
"args": []
}
}
}Web content fetching and conversion for efficient LLM usage.
Retrieval from AWS Knowledge Base using Bedrock Agent Runtime.
Provides auto-configuration for setting up an MCP server in Spring Boot applications.
A very streamlined mcp client that supports calling and monitoring stdio/sse/streamableHttp, and can also view request responses through the /logs page. It also