NHN Server MCP
Enables secure SSH access to servers through a gateway with Kerberos authentication, allowing execution of whitelisted commands with pattern-based security controls and server information retrieval.
README
NHN Server MCP
SSH Gateway를 통해 서버에 접속하고 명령어를 실행하는 MCP (Model Context Protocol) 서버입니다.
기능
- SSH Gateway를 통한 서버 접속
- Kerberos 인증 (kinit) 지원
- 명령어 화이트리스트
- 위험 패턴 차단 (설정 가능)
- 서버 정보 조회 (AI가 로그 경로 등 확인 가능)
- 설정 동적 리로드
설치
npm install
npm run build
설정
1. config.json 생성
{
"gatewayConnection": "user@gateway.example.com:22",
"gatewayPassword": "your-password",
"kinitPassword": "your-kerberos-password",
"allowedHosts": ["server1", "server2"],
"blockedPatterns": [">", "`", "$(", ";", "&&", "||"],
"allowedCommands": [
"tail", "head", "cat", "grep", "ls", "ps", "whoami"
],
"serverInfo": {
"서버에 대한 user 정보 필수": "exec 할때 user 를 같이 보냅니다.",
"나머지는": "원하는 내용으로",
"ex - logPaths": {
"app": "/var/log/app.log",
"nginx": "/var/log/nginx/access.log"
}
}
}
2. 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"
}
}
}
}
설정 옵션
| 키 | 설명 | 기본값 |
|---|---|---|
gatewayConnection |
Gateway SSH 연결 (user@host:port) | - |
gatewayPassword |
Gateway SSH 비밀번호 | - |
kinitPassword |
Kerberos 인증 비밀번호 | - |
allowedHosts |
접속 허용 호스트 목록 | [] (모두 허용) |
allowedCommands |
실행 허용 명령어 목록 | 기본 명령어 목록 |
blockedPatterns |
차단할 패턴 목록 | [">", "\", "$(", ";", "&&", "||"]` |
serverInfo |
AI에게 노출할 서버 정보 | {} |
환경변수
| 변수 | 설명 |
|---|---|
CONFIG_FILE |
config.json 파일 경로 |
DEBUG |
디버그 로그 활성화 (true/false) |
MCP 도구
exec
서버에서 명령어를 실행합니다.
{
"host": "server-hostname",
"user": "user",
"command": "tail -100 /var/log/app.log"
}
get_config
서버 설정 정보를 조회합니다. (허용 호스트, 명령어, 서버 정보)
reload_config
설정 파일을 다시 로드합니다.
disconnect_server
Gateway 연결을 종료합니다.
connection_status
현재 연결 상태를 확인합니다.
보안
- config.json에 민감한 정보(비밀번호)가 포함되므로 git에 커밋하지 마세요
blockedPatterns로 위험한 명령어 패턴을 차단합니다allowedHosts로 접속 가능한 서버를 제한합니다allowedCommands로 실행 가능한 명령어를 제한합니다- 5분 비활성 시 자동 연결 종료
라이선스
MIT
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。