mcp-server-commands
Инструмент runProcess
Инструмент runProcess запускает процессы на хост-машине. Существует два взаимоисключающих способа его вызова:
command_line(строка) — выполняется через системную оболочку по умолчанию (как при вводе вbash/fish/pwshи т. д.). Работают все функции оболочки, такие как конвейеры (pipes), перенаправления и раскрытие переменных.argv(массив строк) — прямой вызов исполняемого файла.argv[0]— это исполняемый файл, остальные элементы — аргументы. Интерпретация оболочкой не производится.
Вы не можете передать оба параметра одновременно. Инструмент определяет, использовать ли оболочку, исходя из того, какой параметр вы предоставили.
Если вы хотите, чтобы ваша модель использовала определенные оболочки в системе, я бы рекомендовал перечислить их в системном промпте. Или, возможно, в инструкциях к инструменту, хотя модели, как правило, лучше обращают внимание на примеры в системном промпте.
Дайте знать, если столкнетесь с проблемами!
Related MCP server: cargo-mcp
Инструменты
Инструменты предназначены для запросов LLM. Claude Sonnet 3.5 интеллектуально использует run_process. Первоначальное тестирование также показывает многообещающие результаты с Groq Desktop с MCP и моделями llama4.
В настоящее время есть только одна команда на все случаи жизни!
run_process— запуск команды, напримерhostname,ls -alилиecho "hello world"и т. д.Возвращает
STDOUTиSTDERRв виде текстаНеобязательный параметр
stdinозначает, что ваша LLM может:передавать скрипты через
STDINтаким командам, какfish,bash,zsh,pythonсоздавать файлы с помощью
cat >> foo/bar.txtиз текста вstdin
[!WARNING] Будьте осторожны с тем, какие команды вы просите этот сервер выполнять! В приложении Claude Desktop используйте
Approve Once(а неAllow for This Chat), чтобы вы могли проверять каждую команду, и используйтеDeny, если не доверяете команде. Права доступа определяются пользователем, который запускает сервер. НЕ запускайте сsudo.
Видеоинструкция
Промпты
Промпты предназначены для включения пользователями в историю чата, например, через слэш-команды Zed (в панели AI Chat).
run_process— генерация сообщения с выводом команды
К сведению, это было в основном учебное упражнение... Я рассматриваю это как вызов инструмента по запросу пользователя. Это модный способ сказать, что это шаблон для запуска команды и передачи результатов модели!
Разработка
Установка зависимостей:
npm installСборка сервера:
npm run buildДля разработки с автоматической пересборкой:
npm run watchУстановка
Для использования с Claude Desktop добавьте конфигурацию сервера:
На MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
На Windows: %APPDATA%/Claude/claude_desktop_config.json
Groq Desktop (бета, macOS) использует ~/Library/Application Support/groq-desktop-app/settings.json
Использование опубликованного npm-пакета
Опубликовано в npm как mcp-server-commands с использованием этого рабочего процесса
{
"mcpServers": {
"mcp-server-commands": {
"command": "npx",
"args": ["mcp-server-commands"]
}
}
}Использование локальной сборки (клонирование репозитория)
Убедитесь, что выполнили npm run build
{
"mcpServers": {
"mcp-server-commands": {
// works b/c of shebang in index.js
"command": "/path/to/mcp-server-commands/build/index.js"
}
}
}Локальные модели
Большинство моделей обучены так, что они не считают, что могут выполнять команды за вас.
Иногда они используют инструменты без колебаний... в других случаях мне приходится их уговаривать.
Используйте системный промпт или шаблон промпта, чтобы дать указание следовать запросам пользователя. Включая использование
run_processбез дополнительной проверки.
Ollama — отличный способ запускать модель локально (с Open-WebUI)
# NOTE: make sure to review variants and sizes, so the model fits in your VRAM to perform well!
# Probably the best so far is [OpenHands LM](https://www.all-hands.dev/blog/introducing-openhands-lm-32b----a-strong-open-coding-agent-model)
ollama pull https://huggingface.co/lmstudio-community/openhands-lm-32b-v0.1-GGUF
# https://ollama.com/library/devstral
ollama pull devstral
# Qwen2.5-Coder has tool use but you have to coax it
ollama pull qwen2.5-coderHTTP / OpenAPI
Сервер реализован с использованием транспорта STDIO.
Для HTTP используйте mcpo для интерфейса веб-сервера, совместимого с OpenAPI.
Это работает с Open-WebUI
uvx mcpo --port 3010 --api-key "supersecret" -- npx mcp-server-commands
# uvx runs mcpo => mcpo run npx => npx runs mcp-server-commands
# then, mcpo bridges STDIO <=> HTTP[!WARNING] Я кратко использовал
mcpoсopen-webui, обязательно проверьте его на предмет проблем с безопасностью.
Логирование
Приложение Claude Desktop записывает логи в ~/Library/Logs/Claude/mcp-server-mcp-server-commands.log
По умолчанию логируются только важные сообщения (например, ошибки).
Если вы хотите видеть больше сообщений, добавьте --verbose в args при настройке сервера.
Кстати, логи записываются в STDERR, потому что именно туда Claude Desktop направляет файлы логов.
В будущем я ожидаю, что хорошо отформатированные сообщения логов будут записываться через транспорт STDIO в MCP-клиент (примечание: не в приложение Claude Desktop).
Отладка
Поскольку MCP-серверы обмениваются данными через stdio, отладка может быть сложной. Мы рекомендуем использовать MCP Inspector, который доступен как скрипт пакета:
npm run inspectorInspector предоставит URL для доступа к инструментам отладки в вашем браузере.
Available Tools
1 toolrun_processB
Run a process on this linux machine
| Name | Required | Description | Default |
|---|---|---|---|
| command_line | No | Shell mode: a shell command line executed via the system's default shell. Supports pipes, redirects, globbing. Cannot be combined with 'argv'. | |
| argv | No | Executable mode: directly spawn a process. argv[0] is the executable, followed by arguments passed verbatim (no shell interpretation). Cannot be combined with 'command_line'. | |
| cwd | No | Optional to set working directory | |
| stdin_text | No | Optional text written to STDIN (written fully, then closed). Useful for heredoc-style input or file contents. | |
| timeout_ms | No | Optional timeout in milliseconds, defaults to 30,000ms |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are present, so the description must carry the burden. It only states 'Run a process' without disclosing that it executes shell commands (which could be dangerous), blocks until completion, or handles errors. The lack of behavioral context is a significant gap.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, short sentence with no fluff. It is front-loaded and efficient. Could be slightly more informative without harm, but current length is acceptable.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
No output schema or annotations exist. The description fails to mention return values, error behavior, or success/failure indicators. For a command execution tool, this is notably incomplete.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the input schema already explains each parameter. The description adds no extra meaning beyond what the schema provides. Baseline 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's action and resource ('Run a process on this linux machine'). The verb 'run' and noun 'process' are specific. No siblings exist, so differentiation isn't needed. Slight lack of detail about the two execution modes (shell vs. argv) prevents a 5.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No explicit when or when-not-to-use guidance is provided. However, the tool is standalone with no siblings, and the description implies it's for executing arbitrary processes. This is minimally adequate.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
2 tool updates
v0.8.2- Removed
run_command - Added
run_process
1 tool update
v1.0.0- Added
run_command
TDQS
Scored across 1 tool
Only one tool exists, so there is no possibility of ambiguity.
With a single tool, naming is trivially consistent. The tool name 'run_process' follows a clear verb_noun pattern.
A server named 'commands' with only one tool is too few; it suggests the scope is not well-captured.
The server only supports running a process, lacking essential operations like listing, managing, or stopping processes, which are significant gaps.
Maintenance
Related MCP Connectors
An MCP server for deep research or task groups
Related MCP Servers
- AlicenseBqualityDmaintenanceMCP server allowing any and all command execution over CMD283 npm24MIT
- Apache 2.0
- AlicenseAqualityCmaintenanceAn MCP server for interacting with Discord.19155 npm11MIT
- AGPL 3.0