Skip to main content
Glama
dhks77
by dhks77

NHN Server MCP

Ein MCP-Server (Model Context Protocol), der eine Verbindung zu Servern über ein SSH-Gateway herstellt und Befehle ausführt.

Funktionen

  • Serverzugriff über SSH-Gateway

  • Unterstützung für Kerberos-Authentifizierung (kinit)

  • Bestätigung der Befehlsausführung über native macOS-Dialoge

  • Automatische Genehmigung identischer Befehle mit der Option "Immer erlauben"

  • Abruf von Serverinformationen (ermöglicht der KI das Prüfen von Log-Pfaden etc.)

  • SCP-Datei-Upload/-Download über das Gateway

  • Schutz vor Prozess-Hangs durch Timeouts für Remote-Befehle

  • Dynamisches Neuladen der Konfiguration

Installation

npm install
npm run build

Konfiguration

1. config.json erstellen

{
  "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. Client-Konfiguration

Claude Code (CLI)

Registrierung über CLI-Befehl:

# 프로젝트 단위 (해당 프로젝트에서만 사용)
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

Alternativ können Sie die Konfigurationsdatei direkt bearbeiten.

Projektbasiert — Erstellen Sie eine .mcp.json im Projektstammverzeichnis:

{
  "mcpServers": {
    "nhn-server": {
      "command": "node",
      "args": ["/path/to/nhn-server-mcp/dist/index.js"],
      "env": {
        "CONFIG_FILE": "/path/to/config.json",
        "DEBUG": "false"
      }
    }
  }
}

Global — Hinzufügen zu ~/.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 — Wird nur in diesem Projekt verwendet. Kann in Git committet und mit Teammitgliedern geteilt werden (Vorsicht: Der Pfad zu config.json kann individuell variieren).

~/.claude.json — Wird in allen Projekten verwendet. Für persönliche Umgebungseinstellungen.

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"
      }
    }
  }
}

Konfigurationsoptionen

Schlüssel

Beschreibung

Standardwert

gatewayConnection

Gateway SSH-Verbindung (user@host:port)

-

gatewayPassword

Gateway SSH-Passwort

-

kinitPassword

Kerberos-Authentifizierungspasswort

-

allowedHosts

Liste der erlaubten Hosts

[] (alle erlaubt)

confirmDialog

Bestätigungsdialog vor Befehlsausführung anzeigen

true

serverInfo

Serverinformationen für die KI

{}

commandTimeoutSec

Timeout für Remote-Befehle (Sekunden). Umhüllt mit GNU timeout

300

Umgebungsvariablen

Variable

Beschreibung

CONFIG_FILE

Pfad zur config.json Datei

DEBUG

Debug-Logging aktivieren (true/false)

MCP-Tools

exec

Führt einen Befehl auf dem Server aus.

{
  "host": "server-hostname",
  "user": "appuser",
  "command": "tail -100 /var/log/app.log"
}

Wenn confirmDialog aktiviert ist, wird ein nativer macOS-Dialog angezeigt:

  • Abbrechen: Befehl nicht ausführen

  • Bestätigen: Nur dieses Mal ausführen

  • Immer erlauben: Ausführen + zukünftige identische Befehle ohne Bestätigung ausführen (wird beim Beenden der Sitzung zurückgesetzt)

get_config

Ruft Server-Konfigurationsinformationen ab (erlaubte Hosts, Serverinformationen).

reload_config

Lädt die Konfigurationsdatei neu.

disconnect_server

Beendet die Gateway-Verbindung.

connection_status

Überprüft den aktuellen Verbindungsstatus.

scp_upload

Lädt Dateiinhalt auf den Server hoch (SCP über Gateway).

{
  "host": "server-hostname",
  "user": "appuser",
  "remotePath": "/path/to/remote/file.txt",
  "content": "파일 내용"
}

scp_download

Lädt Dateien vom Server herunter (SCP über Gateway).

{
  "host": "server-hostname",
  "user": "appuser",
  "remotePath": "/path/to/remote/file.txt",
  "localPath": "/path/to/local/file.txt"
}
  • Wenn localPath angegeben ist, wird die Datei lokal gespeichert

  • Wenn localPath nicht angegeben ist, wird nur der Dateiinhalt zurückgegeben

Sicherheit

  • Da config.json sensible Informationen (Passwörter) enthält, sollte sie nicht in Git committet werden

  • confirmDialog erfordert eine Benutzerbestätigung vor der Befehlsausführung

  • allowedHosts schränkt die zugänglichen Server ein

  • Automatische Trennung der Verbindung nach 5 Minuten Inaktivität

  • Automatische Bereinigung der Sitzung auch bei Ausnahmen

Lizenz

MIT

Install Server
A
security – no known vulnerabilities
F
license - not found
A
quality - A tier

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