home / mcp / mcp 1panel server

MCP 1Panel Server

mcp-1panel is an implementation of the Model Context Protocol (MCP) server for 1Panel.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "1panel-dev-mcp-1panel": {
      "url": "http://localhost:8000/sse",
      "headers": {
        "PANEL_HOST": "http://localhost:8080",
        "PANEL_ACCESS_TOKEN": "<your 1Panel access token>"
      }
    }
  }
}

This MCP server provides a bridge between your 1Panel setup and external MCP clients, allowing you to query status, manage websites, databases, certificates, and applications via standardized MCP endpoints. It supports both local (stdio) execution and remote (http) transport, so you can run it as a background service or connect directly from your MCP client.

How to use

You connect to the MCP server from your MCP client by configuring one or more server endpoints. You can run the server locally and expose it via a local socket, or run it as a remote HTTP endpoint that your client talks to over HTTP. Start by choosing the transport you prefer and then point your MCP client at the provided address.

If you want to operate the server locally, you will start the executable and provide your 1Panel access credentials through environment variables. If you prefer a remote setup, you will use the HTTP configuration that points at the server’s address and ensure the client can reach it.

Below are the two explicit MCP connection configurations you can use. The first uses a remote HTTP endpoint, and the second uses a local stdio command. Copy these into your MCP client configuration to start using the server right away.

{
  "mcpServers": {
    "mcp_1panel": {
      "type": "http",
      "url": "http://localhost:8000/sse",
      "args": []
    }
  }
}
```
```json
{
  "mcpServers": {
    "mcp_1panel": {
      "type": "stdio",
      "command": "mcp-1panel",
      "args": [] ,
      "env": {
        "PANEL_ACCESS_TOKEN": "<your 1Panel access token>",
        "PANEL_HOST": "http://localhost:8080"
      }
    }
  }
}

How to install

Prerequisites: you need Go 1.23.0 or higher and an existing 1Panel deployment.

Step by step to build from source and install the MCP server locally:

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

# Build the project
make build

# Move the built binary to your PATH
mv ./build/mcp-1panel /usr/local/bin/
```
```bash
# Alternatively, install via Go
go install github.com/1Panel-dev/mcp-1panel@latest

Additional notes

Environment variables play a key role in configuring the local stdio setup. When running in stdio mode, provide the 1Panel access details through env vars to authorize and route requests correctly.

If you choose the SSE/remote mode, ensure the remote endpoint is reachable at the specified address and that your 1Panel instance is accessible using the provided host and token.

Available tools

get_dashboard_info

List dashboard status

get_system_info

Get system information

list_websites

List all websites

create_website

Create a website

list_ssls

List all certificates

create_ssl

Create a certificate

list_installed_apps

List all installed applications

install_openresty

Install OpenResty

install_mysql

Install MySQL

list_databases

List all databases

create_database

Create a database