
tumf/mcp-shell-server
Developer toolsЭта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал
tumf/mcp-shell-server — это кандидат на MCP-сервер, импортированный из https://github.com/tumf/mcp-shell-server.
Обзор
tumf/mcp-shell-server — это кандидат на MCP-сервер, импортированный из https://github.com/tumf/mcp-shell-server.
Обзор (машинный перевод)
Доверенный сервер исполнения, реализующий протокол Model Context Protocol (MCP). Он выполняет команды с списком разрешений в виде argv-массивов с входом stdin, содержащей перенаправлением, минимальной дочерней средой, ограничениями на выполнение и структурированным логированием аудита.
Этот пакет не является песочницей. Разрешая команде делегировать существующий авторитет серверного процесса. Прочитайте контракт на доверенное выполнение перед его настройкой.
Особенности
- Выполнение команд на основе Argv: Разрешалось выполнять команды через подпроцесс argv без интерпретации строк shell
- Стандартная поддержка ввода: Передавать ввод командам через stdin
- Comprehensive Output: Возвращает stdout, stderr, статус выхода и время выполнения
- Безопасная поддержка конвейера: Конвейеры сохраняют и проверяют сегменты argv вместо вызова оболочки
- Ограничения выполнения: Соблюдаются тайм-аут по умолчанию, максимальный тайм-аут и лимиты выходных байтов
- Содержащееся перенаправление:
и>>цели должны оставаться внутри запрашиваемой рабочей папки - Минимальная дочерняя среда: Дочерние процессы получают небольшую разрешённую среду вместо наследования всех серверных секретов
Эта страница переведена автоматически. Технические детали смотрите в оригинале.
README
Показан фрагмент оригинального README. Открыть оригинал.
MCP Shell Server
A trusted execution server implementing the Model Context Protocol (MCP). It runs allowlisted commands as argv arrays, with stdin input, contained redirection, a minimal child environment, execution limits, and structured audit logging.
This package is not a sandbox. Allowing a command delegates that program the server process’s existing OS authority. Read Trusted execution contract before configuring it.
Features
- Argv-based Command Execution: Allowed commands run via subprocess argv without shell-string interpretation
- Standard Input Support: Pass input to commands via stdin
- Comprehensive Output: Returns stdout, stderr, exit status, and execution time
- Safe Pipeline Support: Pipelines preserve and validate argv segments instead of invoking a shell
- Execution Limits: Server-side default timeout, maximum timeout, and output byte caps are enforced
- Contained Redirection: ``, and
>>targets must stay inside the requested working directory - Minimal Child Environment: Child processes receive a small allowlisted environment instead of inheriting all server secrets
- Structured Audit Logging: Success, rejection, timeout, output-cap, and process-error outcomes are logged with redaction
Trusted execution contract
Read this before the configuration examples below. The server emits the same warning once at startup through its logger (stderr); MCP stdout framing is unchanged.
What the server controls
mcp-shell-server enforces a boundary around its own behavior:
- which executable names it launches directly (
ALLOW_COMMANDS,ALLOW_PATTERNS), - argv-based process creation without shell-string interpretation,
- server-managed ``, and
>>redirection contained under the requested working directory, - the child environment it builds,
- timeout and output-byte limits,
- structured audit records.
What the server does not control
Allowing a command is authority delegation: the allowed program runs with the server process’s existing OS identity, filesystem access, network access, and credentials. ALLOW_COMMANDS and ALLOW_PATTERNS restrict only the command names the server launches directly. They do not guarantee containment of:
- child processes an allowed program spawns,
- program-specific interpreters, expression languages, or plugins,
Установка
uvx mcp-shell-serverКонфигурация
{
"mcpServers": {
"shell": {
"command": "uvx",
"args": [
"mcp-shell-server"
],
"env": {
"ALLOW_COMMANDS": "ls,cat,pwd,grep,wc,touch,find"
}
},
}
}