@itapi-core/mcp-linux
v1.0.0
Published
MCP server for mcp-linux
Downloads
75
Maintainers
Readme
Linux MCP Server
KR: 범용 Linux 환경의 쉘 제어, 메트릭 모니터링 및 파일 관리를 MCP(Model Context Protocol) 도구로 제공하는 서버입니다. EN: This server exposes generic Linux shell control, metrics monitoring, and file management as MCP (Model Context Protocol) tools.
KR: 터미널 명령어를 직접 전송하거나 디스크, 메모리 자원 등의 공통 지표를 수집하고 텍스트 파일을 관리하는 통합 관리 도구입니다. EN: It is an integrated administration tool to directly send terminal commands, collect common metrics like disk/memory usage, and manage text files.
1) 인코딩 / Encoding
- KR: 이 문서는 UTF-8 기준입니다.
- EN: This document is written in UTF-8.
2) 환경 변수 / Environment Variables
공통 옵션 / Common Options
PORT(선택/Optional): HTTP 모드 사용 시 서버가 바인딩할 포트 (기본값: 3000)TRANSPORT(선택/Optional): 서버 통신 방식 (stdio또는http, 기본값:stdio)
원격 제어 (SSH) 옵션 / Remote Control (SSH) Options
KR: 아래 SSH 환경 변수를 하나라도 설정하면 원격 서버로 연결합니다. 설정하지 않으면 로컬 환경(child_process)에서 실행합니다. EN: If the SSH environment variables below are set, commands are executed on the remote server. Otherwise, they fall back to local execution.
SSH_HOST(선택/Optional): 연결할 SSH 서버 주소 (IP 또는 도메인)SSH_PORT(선택/Optional): SSH 포트 (기본값: 22)SSH_USER(선택/Optional): SSH 연결에 사용할 사용자명SSH_PASSWORD(선택/Optional): SSH 비밀번호 (비밀번호 인증 시 사용)SSH_PRIVATE_KEY(선택/Optional): SSH 개인 키 경로 또는 내용 (키 인증 시 사용)
3) 실행 / Run
npm install
npm run build
npm start4) MCP 서버 설정 / MCP Server Configuration
npx 설정 / npx Configuration
{
"mcpServers": {
"linux-remote": {
"command": "npx",
"args": ["-y", "mcp-linux"],
"env": {
"SSH_HOST": "192.168.1.100",
"SSH_USER": "root",
"SSH_PRIVATE_KEY": "/path/to/private/key"
}
}
}
}5) 도구 분류 / Tool Categories
A. 쉘 커맨드 / Shell Commands
linux_run_command
- KR: 임의의 쉘 명령어를 실행하고 결과를 반환합니다.
- EN: Execute an arbitrary shell command and return the result.
- 인자 / Args:
command(required)
B. 시스템 모니터링 / System Monitoring
linux_get_metrics
- KR: CPU, 메모리, 디스크 상태 및 Uptime 지표 수집 (
free,df,uptime) - EN: Collect CPU, memory, disk status, and uptime metrics (
free,df,uptime). - 인자 / Args: 없음 / None
C. 파일 관리 / File Management
linux_manage_file
- KR: 지정한 경로의 파일을 읽어오거나 내용을 덮어씁니다.
- EN: Read or overwrite file contents at a specified path.
- 인자 / Args:
action(required: read, write),path(required),content(optional)
