npm-mcp

npm-mcp

Enables AI assistants to manage Nginx Proxy Manager, including proxy hosts, SSL certificates, streams, and more.

Category
访问服务器

README

NPM MCP - Nginx Proxy Manager MCP Server

An MCP (Model Context Protocol) server for managing Nginx Proxy Manager through Claude and other MCP-compatible AI assistants.

Features

  • Proxy Hosts: Create, update, delete, enable/disable proxy hosts
  • SSL Certificates: Manage Let's Encrypt certificates with DNS challenge support
  • Streams: Configure TCP/UDP port forwarding
  • Access Lists: Set up authentication with basic auth and IP rules
  • Redirection Hosts: Configure URL redirections
  • Dead Hosts (404): Set up custom 404 pages
  • Users: Manage NPM user accounts
  • System: View audit logs, settings, and host reports

Quick Install (Recommended)

The easiest way to get started is with the automated installer:

# Clone the repository
git clone https://github.com/crogers2287/npm-mcp.git
cd npm-mcp

# Run the installer
./install.sh

The installer will:

  1. Check prerequisites (Node.js 18+, npm, jq)
  2. Install dependencies and build the project
  3. Prompt for your NPM connection details
  4. Test the connection to your NPM instance
  5. Automatically configure Claude Code

Installer Options

./install.sh              # Run interactive installation
./install.sh --help       # Show help
./install.sh --uninstall  # Remove NPM MCP configuration

Manual Installation

If you prefer to configure manually:

# Clone the repository
git clone https://github.com/crogers2287/npm-mcp.git
cd npm-mcp

# Install dependencies
npm install

# Build
npm run build

Configuration

Set the following environment variables:

Variable Required Default Description
NPM_HOST Yes - NPM server hostname (e.g., npm.example.com)
NPM_PORT No - NPM API port (omit for standard 80/443)
NPM_EMAIL Yes - Admin email for authentication
NPM_PASSWORD Yes - Admin password
NPM_HTTPS No false Set to true for HTTPS connections

Claude Desktop Configuration

Add to your Claude Desktop config (~/.config/claude/claude_desktop_config.json on Linux or ~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

{
  "mcpServers": {
    "npm": {
      "command": "node",
      "args": ["/path/to/npm-mcp/dist/index.js"],
      "env": {
        "NPM_HOST": "npm.example.com",
        "NPM_HTTPS": "true",
        "NPM_EMAIL": "admin@example.com",
        "NPM_PASSWORD": "your-password"
      }
    }
  }
}

Claude Code Configuration

Add to your MCP settings (~/.claude/settings.json):

{
  "mcpServers": {
    "npm": {
      "command": "node",
      "args": ["/path/to/npm-mcp/dist/index.js"],
      "env": {
        "NPM_HOST": "npm.example.com",
        "NPM_HTTPS": "true",
        "NPM_EMAIL": "admin@example.com",
        "NPM_PASSWORD": "your-password"
      }
    }
  }
}

Available Tools

Proxy Hosts

  • npm_list_proxy_hosts - List all proxy hosts
  • npm_get_proxy_host - Get proxy host details
  • npm_create_proxy_host - Create a new proxy host
  • npm_update_proxy_host - Update a proxy host
  • npm_delete_proxy_host - Delete a proxy host
  • npm_enable_proxy_host - Enable a proxy host
  • npm_disable_proxy_host - Disable a proxy host

SSL Certificates

  • npm_list_certificates - List all certificates
  • npm_get_certificate - Get certificate details
  • npm_create_certificate - Create a Let's Encrypt certificate
  • npm_delete_certificate - Delete a certificate
  • npm_renew_certificate - Renew a certificate

Streams (TCP/UDP)

  • npm_list_streams - List all streams
  • npm_get_stream - Get stream details
  • npm_create_stream - Create a new stream
  • npm_update_stream - Update a stream
  • npm_delete_stream - Delete a stream
  • npm_enable_stream - Enable a stream
  • npm_disable_stream - Disable a stream

Access Lists

  • npm_list_access_lists - List all access lists
  • npm_get_access_list - Get access list details
  • npm_create_access_list - Create an access list
  • npm_update_access_list - Update an access list
  • npm_delete_access_list - Delete an access list

Redirection Hosts

  • npm_list_redirection_hosts - List all redirections
  • npm_get_redirection_host - Get redirection details
  • npm_create_redirection_host - Create a redirection
  • npm_update_redirection_host - Update a redirection
  • npm_delete_redirection_host - Delete a redirection
  • npm_enable_redirection_host - Enable a redirection
  • npm_disable_redirection_host - Disable a redirection

Dead Hosts (404)

  • npm_list_dead_hosts - List all 404 hosts
  • npm_get_dead_host - Get 404 host details
  • npm_create_dead_host - Create a 404 host
  • npm_delete_dead_host - Delete a 404 host

Users

  • npm_list_users - List all users
  • npm_get_user - Get user details
  • npm_create_user - Create a user
  • npm_delete_user - Delete a user

System

  • npm_list_audit_log - View audit log
  • npm_list_settings - List settings
  • npm_get_setting - Get a setting value
  • npm_update_setting - Update a setting
  • npm_get_hosts_report - Get hosts summary

Resources

The MCP server also exposes these resources:

  • npm://hosts/summary - Summary of all configured hosts
  • npm://certificates/summary - Summary of SSL certificates

Usage Examples

Create a Proxy Host

Create a proxy host for app.example.com that forwards to 192.168.1.100:8080

Request SSL Certificate

Create a Let's Encrypt certificate for app.example.com

Set Up Stream Forwarding

Create a TCP stream to forward port 25565 to minecraft-server:25565

Create Access List with Basic Auth

Create an access list called "admin-only" with username "admin" and password "secret123"

API Reference

This MCP server wraps the Nginx Proxy Manager API. For detailed API documentation, see:

License

MIT

Contributing

Contributions welcome! Please open an issue or pull request.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选