1Panel MCP Server

Local setup required. This server has to be cloned and prepared on your machine before you register it in Claude Code.
1

Set the server up locally

Run this once to clone and prepare the server before adding it to Claude Code.

Run in terminal
npm install -g 1panel-mcp-server
2

Register it in Claude Code

After the local setup is done, run this command to point Claude Code at the built server.

Run in terminal
claude mcp add -e "ONEPANEL_API_KEY=${ONEPANEL_API_KEY}" 1panel-mcp -- node "<FULL_PATH_TO_1PANEL_MCP>/dist/index.js"

Replace <FULL_PATH_TO_1PANEL_MCP>/dist/index.js with the actual folder you prepared in step 1.

Required:ONEPANEL_API_KEY+ 3 optional
README.md

Manage your 1Panel through AI agents like Claude, Cursor, or any MCP client.

1Panel MCP Server

MCP (Model Context Protocol) server for 1Panel - Manage your 1Panel through AI agents like Claude, Cursor, or any MCP-compatible client.

Features

  • 264 Tools covering 1Panel's complete API
  • 100% Open Source version coverage
  • ~90% Professional (XPack) version coverage
  • Modular architecture with TypeScript

Supported Modules

Core: Containers, Images, Networks, Volumes, Docker Compose Applications: App Store, Runtime Environments, PHP, Node.js Files: File Management, Backup, Recycle Bin, Snapshots Database: MySQL, PostgreSQL, Redis Website: Websites, SSL, Nginx, AntiLeech System: Monitor, Processes, Cronjobs, Firewall, Fail2ban Security: SSH, Terminal, ClamAV Antivirus AI & Advanced: AI Agent, MCP Server, Ollama, GPU, OpenResty Host Management: Remote Hosts, SSH Keys

Installation

Global Installation (Recommended)

npm install -g 1panel-mcp-server

Local Installation

npm install 1panel-mcp-server

Usage

Quick Start

  1. Get your 1Panel API key:

    • Login to 1Panel web interface
    • Go to Profile → API
    • Generate or copy your API key
  2. Start the MCP server:

# Using environment variables
export ONEPANEL_API_KEY=your-api-key
export ONEPANEL_HOST=localhost
export ONEPANEL_PORT=8080
1panel-mcp-server start

# Using command line options
1panel-mcp-server start --host 192.168.1.100 --port 8080 --key your-api-key

# Using HTTPS
1panel-mcp-server start --host panel.example.com --secure --key your-api-key

# Using short command
1pmcp start --key your-api-key

Commands

1panel-mcp-server --help              # Show help
1panel-mcp-server start --help        # Show start options
1panel-mcp-server config              # Show configuration guide
1panel-mcp-server tools               # List available tools

# Or use short command
1pmcp --help
1pmcp start --key your-api-key

Environment Variables

Variable Description Default
ONEPANEL_HOST 1Panel host localhost
ONEPANEL_PORT 1Panel port 8080
ONEPANEL_API_KEY 1Panel API key (required) -
ONEPANEL_PROTOCOL http or https http

MCP Configuration

Claude Desktop

Add to claude_desktop_config.json:

{
  "mcpServers": {
    "1panel": {
      "command": "1panel-mcp-server",
      "args": ["start"],
      "env": {
        "ONEPANEL_HOST": "localhost",
        "ONEPANEL_PORT": "8080",
        "ONEPANEL_API_KEY": "your-api-key"
      }
    }
  }
}

Cursor

Add to Cursor MCP settings:

{
  "mcpServers": {
    "1panel": {
      "command": "1panel-mcp-server",
      "args": ["start", "--host", "localhost", "--port", "8080", "--key", "your-api-key"]
    }
  }
}

Development

# Clone the repository
git clone https://github.com/EaveLuo/1panel-mcp.git
cd 1panel-mcp

# Install dependencies
npm install

# Build
npm run build

# Development mode
npm run dev

# Start locally
npm start

# Or use the CLI
npm link
1panel-mcp-server start --key your-api-key

API Coverage

Category Tools Coverage
Open Source 205 100%
XPack (Pro) 59 ~90%
Total 264 ~98%

License

MIT

Links

Tools (1)

1panel_api_toolsProvides access to 264 tools covering 1Panel's complete API for containers, databases, websites, and system management.

Environment Variables

ONEPANEL_HOST1Panel host address
ONEPANEL_PORT1Panel port number
ONEPANEL_API_KEYrequired1Panel API key
ONEPANEL_PROTOCOLhttp or https

Configuration

claude_desktop_config.json
{"mcpServers": {"1panel": {"command": "1panel-mcp-server", "args": ["start"], "env": {"ONEPANEL_HOST": "localhost", "ONEPANEL_PORT": "8080", "ONEPANEL_API_KEY": "your-api-key"}}}}

Try it

List all running Docker containers on my 1Panel server.
Check the current system resource usage and active cronjobs.
Create a new MySQL database for my project.
Restart the Nginx service for my website.
Check the status of my firewall and recent security logs.

Frequently Asked Questions

What are the key features of 1Panel MCP Server?

Access to 264 tools covering 1Panel's complete API. Full support for Docker containers, images, networks, and volumes. Comprehensive database management for MySQL, PostgreSQL, and Redis. System monitoring including processes, cronjobs, and firewall management. Website management including SSL, Nginx, and anti-leech settings.

What can I use 1Panel MCP Server for?

Automating server maintenance tasks through natural language commands. Managing multiple remote 1Panel hosts from a single AI interface. Quickly deploying and configuring web applications and databases. Monitoring server health and security status via AI-driven insights.

How do I install 1Panel MCP Server?

Install 1Panel MCP Server by running: npm install -g 1panel-mcp-server

What MCP clients work with 1Panel MCP Server?

1Panel MCP Server works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep 1Panel MCP Server docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare