Skip to main content
Glama

mcp-remote-agent

AI 에이전트 원격 개발을 위한 MCP 서버

AI 에이전트가 MCP 프로토콜을 통해 원격 Linux 서버를 운영할 수 있도록 하여, 로컬 개발 환경과 원격 서버를 원활하게 연결합니다.

License: MIT Version

中文文档


한 줄 요약

AI 에이전트(WorkBuddy, Claude Desktop, Cursor 등)가 MCP를 통해 원격 Linux 서버 파일을 직접 읽고/쓰며 명령을 실행할 수 있게 하여, 로컬 개발과 원격 서버를 원활하게 연결합니다.

비유: VS Code Remote SSH가 인간을 위한 것이라면, mcp-remote-agent는 AI를 위한 것입니다.


Related MCP server: SSH MCP Server

핵심 기능

기능

설명

원격 파일 읽기/쓰기

remote_read / remote_write / remote_stat

원격 검색

remote_glob을 통한 glob 패턴 파일 검색

명령 실행

간단한 명령을 위한 remote_bash, 여러 줄 스크립트를 위한 remote_script

일괄 작업

요청당 최대 20개 작업까지 가능한 remote_batch

비동기 실행

장기 실행 작업을 위한 remote_exec_async + remote_task

설정 핫 리로드

재시작 없이 원격 설정을 수정하는 remote_config

동적 연결

MCP를 재시작하지 않고 여러 서버 간 전환

상태 확인

원격 서비스 상태 자동 감지

인코딩 처리

특수 문자 자동 base64 인코딩, CRLF/BOM 정리


빠른 시작

1. 저장소 복제

git clone https://github.com/knownothing20/mcp-remote-agent.git
cd mcp-remote-agent

2. 의존성 설치

npm install

3. 구성

cp mcp-remote-agent.example.json local/mcp-remote-agent.json
# Edit local/mcp-remote-agent.json, fill in all variables

주요 변수:

변수

설명

skillDir

스킬 설치 디렉토리의 절대 경로

mcpConfigPath

대상 AI 도구의 MCP 설정 파일 경로

remoteUrl

원격 데몬 주소

authToken

클라이언트 인증 토큰

4. 설정 동기화

node sync.cjs

5. 원격 데몬 배포

# Create daemon directory on remote server
ssh USER@SERVER "mkdir -p /path/to/daemon"

# Upload server files to remote server
scp server/server.js server/mcp-remote-agent-manager.sh server/package.json USER@SERVER:/path/to/daemon/

# Upload generated .env config (created by sync.cjs in step 4)
scp local/server/.env USER@SERVER:/path/to/daemon/

# SSH to remote server
ssh USER@SERVER
cd /path/to/daemon
npm install
nohup bash mcp-remote-agent-manager.sh >> boot.log 2>&1 &

6. AI 도구 재시작

설정이 적용된 후, AI 도구를 재시작하여 MCP 등록을 활성화하세요.


지원되는 AI 도구

AI 도구

MCP 설정 경로 (Windows)

MCP 설정 경로 (macOS/Linux)

WorkBuddy

C:\Users\<user>\.workbuddy\mcp.json

~/.workbuddy/mcp.json

Claude Desktop

C:\Users\<user>\AppData\Roaming\Claude\claude_desktop_config.json

~/.config/Claude/claude_desktop_config.json

Cursor

<project>\.cursor\mcp.json

<project>/.cursor/mcp.json

Windsurf

C:\Users\<user>\.codeium\windsurf\mcp_config.json

~/.codeium/windsurf/mcp_config.json


도구 목록

도구

기능

remote_health

원격 서비스 연결 가능 여부 확인

remote_read

원격 파일 읽기 (ETag 캐시)

remote_write

원격 파일 쓰기 (CRLF/BOM 자동 정리)

remote_stat

파일 메타데이터 가져오기

remote_glob

glob 패턴으로 검색

remote_bash

원격 명령 실행

remote_script

여러 줄 스크립트 실행

remote_batch

일괄 작업

remote_exec_async

비동기 실행

remote_task

비동기 작업 쿼리

remote_config

설정 핫 리로드

remote_status

연결 진단

자세한 사용법은 SKILL.md를 참조하세요.


디렉토리 구조

mcp-remote-agent/
├── SKILL.md                        # Complete documentation
├── README.md                       # This file (English)
├── README_CN.md                    # Chinese documentation
├── index.js                        # MCP server main program
├── package.json                    # Client dependencies
├── mcp-remote-agent.example.json   # Config template
├── sync.cjs                        # Variable sync script
├── test.cjs                        # Test script
├── .gitignore                      # Git ignore config
├── LICENSE                         # MIT License
├── CHANGELOG.md                    # Version changelog
├── local/                          # Local config directory
│   ├── README.md                   # Configuration guide
│   ├── mcp-remote-agent.json       # Main config (copy from example)
│   ├── connections.json.example    # Multi-server config example
│   └── server/
│       └── .env                    # Server config (auto-generated)
└── server/
    ├── server.js                   # Daemon process
    ├── mcp-remote-agent-manager.sh # Process guardian script
    ├── setup-autostart.sh          # Autostart config script
    ├── dashboard.html              # Web Dashboard UI
    ├── .env.example                # Server config template
    └── package.json                # Server dependencies

설정 파일

파일

위치

설명

mcp-remote-agent.json

local/

기본 설정 (mcp-remote-agent.example.json에서 복사)

connections.json

local/

다중 서버 연결 (선택 사항, connections.json.example 참조)

.env

server/

서버 설정 (sync.cjs에 의해 자동 생성)

자세한 설정 가이드는 local/README.md를 참조하세요.


대시보드

mcp-remote-agent는 모니터링 및 관리를 위한 웹 대시보드를 제공합니다:

대시보드 활성화

local/mcp-remote-agent.json에서 설정:

{
  "variables": {
    "serverEnableDashboard": "true"
  }
}

대시보드 접속

서비스 시작 후 다음 주소로 접속하세요:

  • http://your-server:3183/

  • http://your-server:3183/dashboard

대시보드 기능

기능

설명

서비스 상태

Node.js, 의존성, 포트, 디스크 상태 확인

감사 통계

요청 통계, 성공률, 유형/클라이언트별 분석 확인

오류 로그

최근 오류 로그 확인

설정 관리

서버 설정 보기 및 수정 (관리자 토큰 필요)


자동 시작 설정

방법 1: setup-autostart.sh 사용 (권장)

# SSH to remote server
ssh USER@SERVER
cd /path/to/daemon

# Install autostart
bash setup-autostart.sh install

# Check status
bash setup-autostart.sh status

# Uninstall autostart
bash setup-autostart.sh uninstall

방법 2: 수동 crontab 설정

# Edit crontab
crontab -e

# Add the following line
@reboot /path/to/daemon/mcp-remote-agent-manager.sh # mcp-remote-agent autostart

방법 3: systemd 사용 (선택 사항)

/etc/systemd/system/mcp-remote-agent.service 생성:

[Unit]
Description=mcp-remote-agent daemon
After=network.target

[Service]
Type=simple
User=your-user
WorkingDirectory=/path/to/daemon
ExecStart=/bin/bash /path/to/daemon/mcp-remote-agent-manager.sh
Restart=always
RestartSec=5

[Install]
WantedBy=multi-user.target

그 후 활성화:

sudo systemctl enable mcp-remote-agent
sudo systemctl start mcp-remote-agent

보안 기능

  • 작업 공간 격리: 파일 작업은 WORKSPACE_ROOT 내로 제한됨

  • 토큰 인증: 클라이언트 토큰 + 관리자 토큰

  • 경로 제한: 무단 액세스 방지

  • 스크립트 인터프리터 화이트리스트: 안전한 인터프리터만 허용

  • 명령 실행 제한: 구성 가능한 ALLOW_BASH_EXECALLOWED_COMMANDS


버전 기록

CHANGELOG.md 참조


라이선스

MIT 라이선스 - LICENSE 참조


기여

이슈 및 풀 리퀘스트는 언제나 환영합니다!

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    A
    maintenance
    An open MCP server that gives any AI agent SSH access to remote Linux/Unix machines — shell commands, file read/write, and SFTP transfers.
    11
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    Enables AI tools to manage SSH connections, execute commands, transfer files, and perform remote server diagnostics via MCP protocol.
    17
    4 npm
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    A centralized MCP server that enables LLM agents to securely execute commands and manage Linux servers via SSH.
    2
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Enables MCP-compatible AI clients to remotely manage a Linux server via SSH, supporting file operations, Docker control, Git pulls, and arbitrary command execution.
    6,170 npm
    MIT