MCP Hub
Back to servers

1Panel MCP Server

Enables AI agents to manage server infrastructure through the 1Panel API, including Docker containers, databases, and system monitoring. It provides tools for website management, file operations, and application deployment via natural language commands.

glama
Updated
Mar 17, 2026

1Panel MCP Server

A Model Context Protocol (MCP) server for managing 1Panel through AI agents.

Features

This MCP server provides tools for:

  • Container Management: List, start, stop, restart Docker containers
  • Image Management: List and pull Docker images
  • Application Management: List installed apps and browse app store
  • File Management: List files in directories
  • System Monitoring: Get system info and monitoring data (CPU, memory, disk)
  • Website Management: List websites and SSL certificates
  • Database Management: List MySQL, PostgreSQL, and Redis databases
  • Compose Management: List Docker Compose projects

Installation

npm install
npm run build

Configuration

Set the following environment variables:

export ONEPANEL_HOST="your-1panel-host"      # default: localhost
export ONEPANEL_PORT="8080"                   # default: 8080
export ONEPANEL_API_KEY="your-api-key"        # required
export ONEPANEL_PROTOCOL="http"               # default: http

Getting your 1Panel API Key

  1. Log in to your 1Panel dashboard
  2. Go to 面板设置 (Panel Settings)
  3. Enable API access and generate an API key
  4. Add your IP to the whitelist (use 0.0.0.0/0 for all IPs)

Usage with Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "1panel": {
      "command": "node",
      "args": ["/path/to/1panel-mcp/dist/index.js"],
      "env": {
        "ONEPANEL_HOST": "your-1panel-host",
        "ONEPANEL_PORT": "8080",
        "ONEPANEL_API_KEY": "your-api-key"
      }
    }
  }
}

Usage with OpenClaw

Add to your OpenClaw configuration:

{
  "mcpServers": {
    "1panel": {
      "command": "node",
      "args": ["/path/to/1panel-mcp/dist/index.js"],
      "env": {
        "ONEPANEL_HOST": "your-1panel-host",
        "ONEPANEL_PORT": "8080",
        "ONEPANEL_API_KEY": "your-api-key"
      }
    }
  }
}

Available Tools

ToolDescription
list_containersList all Docker containers
start_containerStart a container by ID
stop_containerStop a container by ID
restart_containerRestart a container by ID
list_imagesList all Docker images
pull_imagePull a Docker image
list_installed_appsList installed applications
list_app_storeList available apps in store
list_filesList files in a directory
get_system_infoGet system information
get_system_monitorGet CPU/memory/disk usage
list_websitesList all websites
list_databasesList databases (mysql/postgresql/redis)
list_composesList Docker Compose projects
list_certificatesList SSL certificates

API Reference

This MCP server uses the 1Panel API v2. For complete API documentation, visit: http://your-1panel-host:port/1panel/swagger/index.html

Authentication

1Panel uses a custom token authentication:

Token = md5('1panel' + API-Key + UnixTimestamp)

The server automatically generates tokens for each request.

Development

# Install dependencies
npm install

# Build
npm run build

# Development mode with watch
npm run dev

License

MIT

Reviews

No reviews yet

Sign in to write a review