NHN Server MCP
NHN Server MCP
SSHゲートウェイを介してサーバーに接続し、コマンドを実行するためのMCP (Model Context Protocol) サーバーです。
機能
SSHゲートウェイを介したサーバー接続
Kerberos認証 (kinit) サポート
macOSネイティブダイアログによるコマンド実行確認
「常に許可」オプションによる同一コマンドの自動承認
サーバー情報の照会 (AIがログパスなどを確認可能)
ゲートウェイ経由のSCPファイルアップロード/ダウンロード
リモートコマンドのタイムアウトによるプロセスハングの防止
設定の動的リロード
インストール
npm install
npm run build設定
1. config.jsonの作成
{
"gatewayConnection": "user@gateway.example.com:22",
"gatewayPassword": "your-password",
"kinitPassword": "your-kerberos-password",
"allowedHosts": ["server1", "server2"],
"confirmDialog": true,
"serverInfo": {
"서버에 대한 user 정보 필수": "exec 할때 user 를 같이 보냅니다.",
"나머지는": "원하는 내용으로",
"ex - logPaths": {
"app": "/var/log/app.log",
"nginx": "/var/log/nginx/access.log"
}
}
}2. クライアント設定
Claude Code (CLI)
CLIコマンドで登録:
# 프로젝트 단위 (해당 프로젝트에서만 사용)
claude mcp add --scope project nhn-server -e CONFIG_FILE=/path/to/config.json -e DEBUG=false -- node /path/to/nhn-server-mcp/dist/index.js
# 글로벌 (모든 프로젝트에서 사용)
claude mcp add --scope user nhn-server -e CONFIG_FILE=/path/to/config.json -e DEBUG=false -- node /path/to/nhn-server-mcp/dist/index.jsまたは、設定ファイルを直接編集することもできます。
プロジェクト単位 — プロジェクトルートに .mcp.json を作成:
{
"mcpServers": {
"nhn-server": {
"command": "node",
"args": ["/path/to/nhn-server-mcp/dist/index.js"],
"env": {
"CONFIG_FILE": "/path/to/config.json",
"DEBUG": "false"
}
}
}
}グローバル — ~/.claude.json に追加:
{
"mcpServers": {
"nhn-server": {
"command": "node",
"args": ["/path/to/nhn-server-mcp/dist/index.js"],
"env": {
"CONFIG_FILE": "/path/to/config.json",
"DEBUG": "false"
}
}
}
}
.mcp.json— そのプロジェクトでのみ使用。gitにコミットすればチームメンバーと共有可能 (ただし、config.jsonのパスが各々異なる可能性があるため注意)
~/.claude.json— すべてのプロジェクトで使用。個人環境設定用
Claude Desktop
~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"nhn-server": {
"command": "node",
"args": ["/path/to/nhn-server-mcp/dist/index.js"],
"env": {
"CONFIG_FILE": "/path/to/config.json",
"DEBUG": "false"
}
}
}
}設定オプション
キー | 説明 | デフォルト値 |
| ゲートウェイSSH接続 (user@host:port) | - |
| ゲートウェイSSHパスワード | - |
| Kerberos認証パスワード | - |
| 接続許可ホストリスト | [] (すべて許可) |
| コマンド実行前の確認ダイアログ表示 | true |
| AIに公開するサーバー情報 | {} |
| リモートコマンドのタイムアウト (秒)。GNU timeoutでラップ | 300 |
環境変数
変数 | 説明 |
| config.jsonファイルのパス |
| デバッグログの有効化 ( |
MCPツール
exec
サーバーでコマンドを実行します。
{
"host": "server-hostname",
"user": "appuser",
"command": "tail -100 /var/log/app.log"
}confirmDialog が有効な場合、macOSネイティブダイアログが表示されます:
キャンセル: コマンドを実行しない
確認: 今回のみ実行
常に許可: 実行 + 以降同じコマンドは確認なしで実行 (セッション終了時に初期化)
get_config
サーバー設定情報を照会します。(許可ホスト、サーバー情報)
reload_config
設定ファイルを再読み込みします。
disconnect_server
ゲートウェイ接続を切断します。
connection_status
現在の接続状態を確認します。
scp_upload
ファイル内容をサーバーにアップロードします。(ゲートウェイ経由のSCP)
{
"host": "server-hostname",
"user": "appuser",
"remotePath": "/path/to/remote/file.txt",
"content": "파일 내용"
}scp_download
サーバーからファイルをダウンロードします。(ゲートウェイ経由のSCP)
{
"host": "server-hostname",
"user": "appuser",
"remotePath": "/path/to/remote/file.txt",
"localPath": "/path/to/local/file.txt"
}localPath指定時: ローカルファイルとして保存localPath未指定時: ファイル内容のみを返却
セキュリティ
config.json には機密情報(パスワード)が含まれるため、gitにコミットしないでください
confirmDialogにより、コマンド実行前にユーザーの確認を求めますallowedHostsにより、接続可能なサーバーを制限します5分間非アクティブな場合、自動的に接続を切断します
例外発生時にもセッションを自動的にクリーンアップします
ライセンス
MIT
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/dhks77/nhn-server-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server