Terminal MCP Server
터미널 MCP 서버
터미널 MCP 서버는 로컬 또는 원격 호스트에서 명령을 실행할 수 있는 모델 컨텍스트 프로토콜(MCP) 서버입니다. AI 모델 및 기타 애플리케이션이 로컬 머신이나 SSH를 통해 원격 호스트에서 시스템 명령을 실행할 수 있도록 간단하면서도 강력한 인터페이스를 제공합니다.
특징
로컬 명령 실행 : 로컬 머신에서 직접 명령을 실행합니다.
원격 명령 실행 : SSH를 통해 원격 호스트에서 명령 실행
세션 지속성 : 지정된 시간(기본 20분) 동안 동일한 터미널 환경을 재사용하는 지속 세션 지원
환경 변수 : 명령에 대한 사용자 정의 환경 변수 설정
다양한 연결 방법 : stdio 또는 SSE(Server-Sent Events)를 통해 연결
Related MCP server: mcp-remote-ssh
설치
Smithery를 통해 설치
Smithery를 통해 Claude Desktop용 terminal-mcp-server를 자동으로 설치하려면:
지엑스피1
수동 설치
# Clone the repository
git clone https://github.com/weidwonder/terminal-mcp-server.git
cd terminal-mcp-server
# Install dependencies
npm install
# Build the project
npm run build용법
서버 시작
# Start the server using stdio (default mode)
npm start
# Or run the built file directly
node build/index.jsSSE 모드에서 서버 시작
SSE(Server-Sent Events) 모드를 사용하면 HTTP를 통해 원격으로 서버에 연결할 수 있습니다.
# Start the server in SSE mode
npm run start:sse
# Or run the built file directly with SSE flag
node build/index.js --sse다음 명령줄 옵션을 사용하여 SSE 서버를 사용자 정의할 수 있습니다.
옵션 | 설명 | 기본 |
| 수신할 포트 | 8080 |
| 종료 지점 경로 | /세 |
| 바인딩할 호스트 | 로컬호스트 |
사용자 정의 옵션의 예:
# Start SSE server on port 3000, endpoint /mcp, and bind to all interfaces
node build/index.js --sse --port 3000 --endpoint /mcp --host 0.0.0.0이렇게 하면 서버가 시작되고 http://0.0.0.0:3000/mcp 에서 SSE 연결을 수신합니다.
MCP Inspector로 테스트
# Start the MCP Inspector tool
npm run inspectorexecute_command 도구
execute_command 도구는 Terminal MCP Server가 제공하는 핵심 기능으로, 로컬 또는 원격 호스트에서 명령을 실행하는 데 사용됩니다.
매개변수
매개변수 | 유형 | 필수의 | 설명 |
명령 | 끈 | 예 | 실행할 명령 |
주인 | 끈 | 아니요 | 연결할 원격 호스트입니다. 지정하지 않으면 명령이 로컬에서 실행됩니다. |
사용자 이름 | 끈 | 호스트가 지정된 경우 필수 | SSH 연결을 위한 사용자 이름 |
세션 | 끈 | 아니요 | 세션 이름(기본값은 "default"입니다. 동일한 세션 이름을 사용하면 20분 동안 동일한 터미널 환경이 재사용됩니다.) |
환경 | 물체 | 아니요 | 환경 변수는 기본적으로 빈 객체로 설정됩니다. |
예시
로컬에서 명령 실행
{
"command": "ls -la",
"session": "my-local-session",
"env": {
"NODE_ENV": "development"
}
}원격 호스트에서 명령 실행
{
"host": "example.com",
"username": "user",
"command": "ls -la",
"session": "my-remote-session",
"env": {
"NODE_ENV": "production"
}
}AI Assistant를 사용한 구성
Roo 코드로 구성
VSCode를 열고 Roo Code 확장 프로그램을 설치하세요.
Roo Code 설정 파일을 엽니다:
~/Library/Application Support/Code/User/globalStorage/rooveterinaryinc.roo-cline/settings/cline_mcp_settings.json다음 구성을 추가합니다.
stdio 모드(로컬 연결)의 경우
{
"mcpServers": {
"terminal-mcp": {
"command": "node",
"args": ["/path/to/terminal-mcp-server/build/index.js"],
"env": {}
}
}
}SSE 모드(원격 연결)의 경우
{
"mcpServers": {
"terminal-mcp-sse": {
"url": "http://localhost:8080/sse",
"headers": {}
}
}
}사용자 정의한 경우 localhost:8080/sse 실제 서버 주소, 포트 및 종단점으로 바꾸세요.
Cline으로 구성
Cline 설정 파일을 엽니다:
~/.cline/config.json다음 구성을 추가합니다.
stdio 모드(로컬 연결)의 경우
{
"mcpServers": {
"terminal-mcp": {
"command": "node",
"args": ["/path/to/terminal-mcp-server/build/index.js"],
"env": {}
}
}
}SSE 모드(원격 연결)의 경우
{
"mcpServers": {
"terminal-mcp-sse": {
"url": "http://localhost:8080/sse",
"headers": {}
}
}
}Claude Desktop으로 구성
Claude Desktop 설정 파일을 엽니다:
~/Library/Application Support/Claude/claude_desktop_config.json다음 구성을 추가합니다.
stdio 모드(로컬 연결)의 경우
{
"mcpServers": {
"terminal-mcp": {
"command": "node",
"args": ["/path/to/terminal-mcp-server/build/index.js"],
"env": {}
}
}
}SSE 모드(원격 연결)의 경우
{
"mcpServers": {
"terminal-mcp-sse": {
"url": "http://localhost:8080/sse",
"headers": {}
}
}
}모범 사례
명령 실행
명령을 실행하기 전에 시스템 유형(Mac, Linux 등)을 확인하는 것이 가장 좋습니다.
경로 관련 문제를 방지하려면 전체 경로를 사용하세요.
환경을 유지해야 하는 명령 시퀀스의 경우
&&사용하여 여러 명령을 연결합니다.장기 실행 명령의 경우
nohup또는screen/tmux사용하는 것이 좋습니다.
SSH 연결
SSH 키 기반 인증이 설정되어 있는지 확인하세요.
연결이 실패하면 키 파일이 있는지 확인하세요(기본 경로:
~/.ssh/id_rsa)원격 호스트에서 SSH 서비스가 실행 중인지 확인하세요.
세션 관리
관련 명령 간의 환경을 유지하려면 세션 매개변수를 사용하세요.
특정 환경이 필요한 작업의 경우 동일한 세션 이름을 사용하세요.
세션은 20분 동안 활동이 없으면 자동으로 종료됩니다.
오류 처리
명령 실행 결과에는 stdout과 stderr이 모두 포함됩니다.
명령이 성공적으로 실행되었는지 확인하려면 stderr을 확인하세요.
복잡한 작업의 경우 성공을 보장하기 위해 검증 단계를 추가하세요.
중요 참고 사항
원격 명령 실행을 위해서는 SSH 키 기반 인증을 미리 설정해야 합니다.
로컬 명령 실행의 경우 명령은 서버를 시작한 사용자의 컨텍스트에서 실행됩니다.
세션 시간 초과는 20분이며, 이 시간이 지나면 연결이 자동으로 종료됩니다.
Available Tools
1 toolexecute_commandB
Execute commands on remote hosts or locally (This tool can be used for both remote hosts and the current machine)
| Name | Required | Description | Default |
|---|---|---|---|
| command | Yes | Command to execute. Before running commands, it's best to determine the system type (Mac, Linux, etc.) | |
| env | No | Environment variables | |
| host | No | Host to connect to (optional, if not provided the command will be executed locally) | |
| session | No | Session name, defaults to 'default'. The same session name will reuse the same terminal environment for 20 minutes, which is useful for operations requiring specific environments like conda. | default |
| username | No | Username for SSH connection (required when host is specified) |
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 that commands can be executed remotely or locally and hints at session reuse for 20 minutes, but it lacks critical details such as security implications, error handling, output format, or potential side effects. This leaves significant gaps for a tool that executes arbitrary 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 a single, efficient sentence that front-loads the core functionality. It avoids unnecessary details and stays focused on the tool's scope, though it could be slightly more structured by explicitly separating remote and local use cases.
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 commands (which can have security and system impacts), the lack of annotations, and no output schema, the description is insufficient. It fails to address critical aspects like return values, error conditions, or safety warnings, making it incomplete for informed 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?
The input schema has 100% description coverage, so the baseline is 3. The description does not add any meaningful parameter semantics beyond what is already documented in the schema, such as explaining the 'command' parameter's system dependencies or the 'session' parameter's environmental implications in more depth.
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 as executing commands on remote hosts or locally, specifying both the verb ('execute') and the resource ('commands'). It distinguishes between remote and local execution contexts. However, without sibling tools, it cannot demonstrate differentiation from alternatives, 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 implies usage by mentioning both remote and local contexts, but it does not provide explicit guidance on when to choose one over the other or any prerequisites. For example, it notes host is optional for local execution but does not clarify when remote execution is preferable or what conditions might affect it.
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.
1 tool update
v1.0.0- First observed
execute_command
TDQS
Scored across 1 tool
With only one tool, there is no possibility of ambiguity or overlap between tools. The tool 'execute_command' has a clear, singular purpose that cannot be confused with any other tool in the set.
Since there is only one tool, naming consistency is inherently perfect. The tool name 'execute_command' follows a standard verb_noun pattern, and there are no other tools to cause inconsistency.
A single tool for a terminal server is too few for the apparent scope, as terminal operations typically involve multiple commands and actions. This minimal set may cause agents to struggle with complex tasks that require more granular control.
The tool surface is severely incomplete for a terminal server domain. It lacks essential operations such as listing files, navigating directories, managing processes, or handling input/output streams, making it inadequate for typical terminal workflows.
Maintenance
Related MCP Connectors
Remote MCP server exposing your Node Command fleet (files, shell, processes, browser) to AI hosts.
1Remote MCP server for supportsheep: run AI interviews and manage support content for your blog.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
MCP server for building and testing AI agents with multi-model experimentation and insights.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server that gives AI assistants full SSH/SFTP remote operations — session management, command execution, interactive shells, file transfers, port forwarding, and system diagnostics.2MIT
- AlicenseAqualityAmaintenanceMCP server giving AI agents full SSH access with persistent sessions, structured command output, SFTP file transfer, and port forwarding.1811MIT
- AlicenseAqualityDmaintenanceAn MCP server that gives AI agents SSH access to remote machines through your local OpenSSH client, enabling remote command execution, file transfer, persistent shell sessions, and port forwarding.17169 PyPI24MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that gives AI agents SSH capabilities to execute commands, transfer files, and inspect remote systems through a preconfigured host list.41 npmMIT