mcp-cli-exec MCP Server
mcp-cli-exec MCP 서버
구조화된 출력을 통해 셸 명령을 실행할 수 있는 강력한 CLI 명령 실행 MCP 서버입니다. 이 패키지는 명령 실행 기능에 중점을 두어 다른 MCP CLI 도구와 차별화됩니다.
특징
도구
cli-exec-raw
원시 CLI 명령을 실행하고 구조화된 출력을 반환합니다.
명령 문자열과 선택적 시간 초과(기본값: 5분)를 사용합니다.
stdout, stderr, 종료 코드를 포함한 자세한 실행 결과를 반환합니다.
구조화된 오류 응답으로 오류를 우아하게 처리합니다.
cli-exec
특정 작업 디렉토리에서 하나 이상의 CLI 명령을 실행합니다.
단일 명령, 체인 명령 또는 명령 배열을 지원합니다.
모든 명령은 지정된 작업 디렉토리에서 실행됩니다.
각 명령에 대한 자세한 결과를 반환합니다.
성공/실패 상태
종료 코드
stdout 및 stderr(ANSI 코드 제거됨)
실행 기간
작업 디렉토리
첫 번째 명령 실패 시 중지
명령당 선택적 시간 초과(기본값: 5분)
참고: 실행 컨텍스트 제한으로 인해 각 명령은 독립적으로 실행됩니다. 명령 내에서 디렉터리를 변경(cd)해도 이후 명령에는 영향을 미치지 않습니다. 모든 명령은 처음 지정된 작업 디렉터리에서 실행됩니다.
출력 형식
명령은 다음을 포함한 구조화된 결과를 반환합니다.
성공/실패 상태
종료 코드
stdout 및 stderr(ANSI 코드 제거됨)
실행 기간
작업 디렉토리
해당되는 경우 자세한 오류 정보
사용 예
cli-exec-raw
간단한 명령 실행:
지엑스피1
시간 초과 시:
{
"command": "long-running-script.sh",
"timeout": 300000
}cli-exec
특정 디렉토리의 단일 명령:
{
"workingDirectory": "/path/to/project",
"commands": "npm install"
}여러 명령(모두 동일한 작업 디렉토리에서 실행):
{
"workingDirectory": "C:\\project",
"commands": [
"dir /b",
"npm run build"
]
}Related MCP server: MCP Server
설치
선택적으로 npm에서 설치:
npm install -g mcp-cli-exec
# or with pnpm
pnpm add -g mcp-cli-exec아니면 구성에서 npx를 사용하세요
Cline VSCode 확장 프로그램용
%APPDATA%/Code - Insiders/User/globalStorage/rooveterinaryinc.roo-cline/settings/cline_mcp_settings.json 에 추가:
{
"mcpServers": {
"mcp-cli-exec": {
"command": "npx",
"args": ["-y", "mcp-cli-exec"]
}
}
}클로드 데스크탑용
적절한 구성 파일에 추가:
Windows: %APPDATA%/Claude/claude_desktop_config.json MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"mcp-cli-exec": {
"command": "npx",
"args": ["-y", "mcp-cli-exec"]
}
}
}특수 Windows 구성
Windows에서 ENOENT spawn npx 문제가 발생하면 전체 경로를 지정하는 다음 대체 구성을 사용하세요.
{
"mcpServers": {
"mcp-cli-exec": {
"command": "C:\\Users\\jim\\AppData\\Roaming\\nvm\\v22.1.0\\node.exe",
"args": [
"C:\\Users\\jim\\AppData\\Roaming\\npm\\node_modules\\npm\\bin\\npx-cli.js",
"-y",
"mcp-cli-exec"
]
}
}
}개발
종속성 설치:
pnpm install서버를 빌드하세요:
pnpm run build자동 재빌드를 사용한 개발의 경우:
pnpm run watch디버깅
MCP 서버는 stdio를 통해 통신하기 때문에 디버깅이 어려울 수 있습니다. MCP Inspector는 다음과 같은 유용한 디버깅 도구를 제공합니다.
pnpm run inspector이렇게 하면 브라우저에서 검사기에 액세스할 수 있는 URL이 제공되며, 이를 통해 다음을 수행할 수 있습니다.
모든 MCP 메시지 보기
요청/응답 페이로드 검사
테스트 도구를 대화형으로
서버 상태 모니터링
오류 처리
서버에는 포괄적인 오류 처리 기능이 포함되어 있습니다.
모든 도구 매개변수에 대한 입력 검증
구조화된 오류 응답
명령 시간 초과 처리
작업 디렉토리 검증
깨끗한 출력을 위한 ANSI 코드 스트리핑
기술적 세부 사항
TypeScript 및 MCP SDK로 구축됨
안정적인 명령 실행을 위해 execa를 사용합니다.
기본 명령 시간 초과: 5분
Windows 및 Unix 계열 시스템을 지원합니다(예: 'dir' 대 'ls' 등 OS에 맞는 명령을 사용하세요)
명령을 순차적으로 실행하고 첫 번째 실패 시 중지합니다.
각 명령은 지정된 작업 디렉토리에서 독립적으로 실행됩니다.
Available Tools
2 toolscli-execC
Execute one or more CLI commands in a specific working directory
| Name | Required | Description | Default |
|---|---|---|---|
| commands | Yes | Commands to execute | |
| timeout | No | Optional timeout in milliseconds per command (default: 5 minutes) | |
| workingDirectory | Yes | Working directory to execute commands in |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden but only states basic functionality. It doesn't disclose critical behavioral traits like execution safety (potential for destructive commands), authentication needs, error handling, output format, or rate limits. The mention of 'timeout' in the schema isn't reinforced in the description.
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, efficient sentence that front-loads the core purpose without unnecessary words. Every element ('Execute', 'CLI commands', 'specific working directory') earns its place, making it optimally concise.
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?
For a CLI execution tool with no annotations and no output schema, the description is insufficient. It lacks details on execution behavior (e.g., sequential vs. parallel), error propagation, security implications, or return values, leaving significant gaps for an agent to understand tool usage.
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 schema fully documents all parameters. The description adds no additional parameter semantics beyond what's in the schema, maintaining the baseline score of 3 for adequate coverage through structured data alone.
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 action ('Execute') and resource ('CLI commands') with additional context about working directory. It distinguishes from sibling 'cli-exec-raw' by specifying 'in a specific working directory', though the distinction isn't fully explicit about what makes the sibling different.
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?
The description provides no guidance on when to use this tool versus the sibling 'cli-exec-raw'. It mentions the working directory context but doesn't explain alternative scenarios, prerequisites, or exclusions for tool selection.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
cli-exec-rawC
Execute a raw CLI command and return structured output
| Name | Required | Description | Default |
|---|---|---|---|
| command | Yes | The CLI command to execute | |
| timeout | No | Optional timeout in milliseconds (default: 5 minutes) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions the tool executes commands and returns structured output, but fails to address critical behavioral aspects such as security implications, execution environment, error handling, or potential side effects. This is inadequate for a tool that executes arbitrary CLI commands.
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 extremely concise and front-loaded in a single sentence that captures the core functionality. Every word earns its place with no wasted text, making it easy for an agent to parse quickly.
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?
Given the complexity of executing arbitrary CLI commands (which involves security, environment, and side-effect considerations), no annotations, and no output schema, the description is insufficiently complete. It doesn't explain what 'structured output' means, execution constraints, or safety warnings, leaving significant gaps for agent understanding.
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%, with clear parameter descriptions in the schema. The description adds no additional parameter semantics beyond what the schema provides, such as command syntax examples or timeout behavior details. Baseline 3 is appropriate when the schema does the heavy lifting.
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 purpose: 'Execute a raw CLI command and return structured output'. It specifies the verb ('execute'), resource ('raw CLI command'), and outcome ('return structured output'). However, it doesn't explicitly differentiate from its sibling 'cli-exec', which likely has similar functionality, preventing a perfect score.
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?
The description provides no guidance on when to use this tool versus its sibling 'cli-exec' or other alternatives. It lacks context about appropriate use cases, prerequisites, or exclusions, leaving the agent with minimal direction beyond the basic purpose.
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
v1.0.0- First observed
cli-exec - First observed
cli-exec-raw
TDQS
Scored across 2 tools
The two tools have significant overlap in purpose, both executing CLI commands. While cli-exec-raw specifies 'raw' and 'structured output', the distinction is subtle and could easily lead to confusion about which to use for basic command execution. The descriptions don't clearly delineate when to choose one over the other.
Both tools follow a consistent cli-exec prefix pattern with hyphenated suffixes. The naming is predictable and readable, though the suffix conventions differ slightly (one has no suffix, the other uses '-raw'). This minor deviation keeps it from a perfect score.
With only 2 tools, the server feels thin for a CLI execution domain. While it covers basic execution, more operations like command validation, history tracking, or batch processing might be expected. The count is borderline minimal but functional for core tasks.
For a CLI execution server, there are notable gaps. Missing tools for command chaining, environment variable management, output parsing beyond 'structured', or error handling make the surface incomplete. Agents will hit dead ends when needing advanced CLI interactions beyond simple execution.
Maintenance
Related MCP Connectors
A paid remote MCP for CLI tool MCP, built to return verdicts, receipts, usage logs, and audit-ready
Personal assistant MCP server with search, execute, packages, jobs, secrets, and integrations.
QuLab MCP remote server (Streamable HTTP) for computational science and lab tools.
A paid remote MCP for AI SDK benchmark dashboard, built to return verdicts, receipts, usage logs, an
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that allows LLMs to execute shell commands and receive their output in a controlled manner.7MIT
- AlicenseNot gradedqualityDmaintenanceA cross-platform shell command execution server that supports Windows, macOS, and Linux environments with PowerShell, CMD, GitBash, and Bash shells, optimized for Japanese language environments.48 npmMIT
- FlicenseBqualityDmaintenanceEnables safe execution of system shell commands with real-time streaming output and rich metadata capture. Provides configurable command execution with timeout controls, environment management, and extensible plugin architecture for monitoring command lifecycles.4-
- FlicenseBqualityDmaintenanceAn MCP server that enables users to execute arbitrary shell commands on their local machine and receive the output. It provides a terminal tool for running system commands through MCP-compatible clients using the Python SDK.1-