mcp-remote-agent
mcp-remote-agent
AIエージェント向けリモート開発用MCPサーバー
AIエージェントがMCPプロトコルを通じてリモートのLinuxサーバーを操作できるようにし、ローカルの開発環境とリモートサーバーをシームレスに接続します。
概要
AIエージェント(WorkBuddy、Claude Desktop、Cursorなど)がMCPを介してリモートのLinuxサーバー上のファイルを直接読み書きし、コマンドを実行できるようにし、ローカル開発とリモートサーバーをシームレスに接続します。
例え: VS Code Remote SSHが人間向けであるのに対し、mcp-remote-agentはAI向けです。
Related MCP server: SSH MCP Server
主な機能
機能 | 説明 |
リモートファイル操作 |
|
リモート検索 |
|
コマンド実行 | 単純なコマンド用の |
バッチ操作 | 1リクエストあたり最大20操作の |
非同期実行 | 長時間実行タスク用の |
設定のホットリロード | 再起動なしでリモート設定を変更する |
動的接続 | MCPを再起動せずに複数のサーバーを切り替え可能 |
ヘルスチェック | リモートサービスの状態を自動検知 |
エンコーディング処理 | 特殊文字の自動Base64エンコード、CRLF/BOMのクリーンアップ |
クイックスタート
1. リポジトリのクローン
git clone https://github.com/knownothing20/mcp-remote-agent.git
cd mcp-remote-agent2. 依存関係のインストール
npm install3. 設定
cp mcp-remote-agent.example.json local/mcp-remote-agent.json
# Edit local/mcp-remote-agent.json, fill in all variables主要な変数:
変数 | 説明 |
| スキルインストールディレクトリの絶対パス |
| 対象AIツールのMCP設定ファイルのパス |
| リモートデーモンのアドレス |
| クライアント認証トークン |
4. 設定の同期
node sync.cjs5. リモートデーモンのデプロイ
# 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 |
|
|
Claude Desktop |
|
|
Cursor |
|
|
Windsurf |
|
|
ツール一覧
ツール | 機能 |
| リモートサービスの到達可能性を確認 |
| リモートファイルの読み込み (ETagキャッシュ) |
| リモートファイルの書き込み (CRLF/BOM自動クリーンアップ) |
| ファイルメタデータの取得 |
| グロブパターンによる検索 |
| リモートコマンドの実行 |
| 複数行スクリプトの実行 |
| バッチ操作 |
| 非同期実行 |
| 非同期タスクの照会 |
| 設定のホットリロード |
| 接続診断 |
詳細な使用方法は 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設定ファイル
ファイル | 場所 | 説明 |
|
| メイン設定 ( |
|
| マルチサーバー接続 (オプション、 |
|
| サーバー設定 ( |
詳細な設定ガイドについては local/README.md を参照してください。
ダッシュボード
mcp-remote-agentは、監視と管理のためのWebダッシュボードを提供します。
ダッシュボードの有効化
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_EXECおよびALLOWED_COMMANDS
バージョン履歴
CHANGELOG.md を参照してください
ライセンス
MITライセンス - LICENSE を参照してください
コントリビューション
Issueやプルリクエストを歓迎します!
This server cannot be deployed
Maintenance
Related MCP Connectors
Remote MCP server to read and manage your Atako AI agents, messages, files, and integrations.
MCP server connecting AI agents to 100+ apps (Gmail, Slack, Notion, GitHub) via one-click OAuth.
Run commands and read/write files on your servers over Termalin's keyless tunnels (hosted MCP).
Persistent file storage for AI agents via MCP and curl. Upload, download, and version files.
Related MCP Servers
- AlicenseAqualityAmaintenanceAn open MCP server that gives any AI agent SSH access to remote Linux/Unix machines — shell commands, file read/write, and SFTP transfers.11MIT
- AlicenseAqualityDmaintenanceEnables AI tools to manage SSH connections, execute commands, transfer files, and perform remote server diagnostics via MCP protocol.174 npmMIT
- AlicenseNot gradedqualityDmaintenanceA centralized MCP server that enables LLM agents to securely execute commands and manage Linux servers via SSH.2MIT
- AlicenseNot gradedqualityCmaintenanceEnables 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 npmMIT