mcpField
1
1Panel MCP Server

1Panel MCP Server

Local
bilibili.comCloud & Infra36Updated 68w ago

About 1Panel MCP Server

1Panel MCP Server is an experimental MCP server that automates website deployment to 1Panel servers. It creates static websites when needed and uploads build files, for users who want to deploy through an AI assistant.

Key features

  1. 01Automates website deployment to 1Panel servers
  2. 02Creates websites that do not yet exist
  3. 03Uploads static website files
  4. 04Compatible with the MCP standard protocol

Use cases

  1. 01Deploying a built static site to 1Panel from Cursor chat
  2. 02Uploading the files of a build directory to a given domain

MCP support

The project runs as an MCP server and exposes a deploy_website tool to MCP clients such as Cursor, which performs the deployment.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

mcp.json · Universal config
{
"mcpServers": {
"1Panel": {
"command": "npx",
"args": [
"-y",
"1panel-mcp"
],
"env": {
"ONEPANEL_BASE_URL": "<ONEPANEL_BASE_URL>",
"ONEPANEL_API_KEY": "<ONEPANEL_API_KEY>",
"ONEPANEL_API_VERSION": "<ONEPANEL_API_VERSION>"
}
}
}
}
Run commandnpx -y 1panel-mcp
Environment variables to set
ONEPANEL_BASE_URL
ONEPANEL_API_KEYSecret
ONEPANEL_API_VERSION

Local servers need a runtime on your machine (e.g. Node.js 18+). Config file locations differ by client; see your client’s docs.

Packages
npm1panel-mcp

Tools

1

Saved tool list · updated 3w ago

ParameterTypeRequiredDescription
domainstringYesWebsite domain
buildDirstringYesBuild directory name (e.g. /Users/username/project/dist, /Users/username/project/build)

Details

From the project README

1Panel MCP Server

A Model Context Protocol (MCP) server for automated website deployment to 1Panel.

Important

Currently, this project is an experimental project and does not mean that it can be used directly.

Video demo

https://www.bilibili.com/video/BV1SjQRY3EmM/

Features

  • Automates website deployment to 1Panel servers
  • Creates websites if they don't already exist
  • Uploads static website files to 1Panel
  • Fully compatible with the MCP standard protocol

Usage

Configure MCP in Cursor IDE

To use this server with Cursor IDE, add the following MCP configuration:

  1. Open Cursor
  2. Create .cursor/mcp.json
{
  "mcpServers": {
    "1panel-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "1panel-mcp"
      ],
      "env": {
        "ONEPANEL_BASE_URL": "<your 1Panel base URL>",
        "ONEPANEL_API_KEY": "<your 1Panel API key>",
        "ONEPANEL_API_VERSION": "v2" // optional, default is v2
      }
    }
  }
}
Use MCP to Deploy Websites

In Cursor, you can deploy websites using the following command in the AI chat:

Deploy to 1Panel with domain=yourdomain.com

Or you can use the following format:

Deploy website to 1Panel server, domain: yourdomain.com

API Reference

MCP Tool: deploy_website

Deploys a website to 1Panel.

Parameters:

  • domain (required): Website domain
  • buildDir (optional): Build directory path

Response:

Successfully deployed to 1Panel!
Domain: yourdomain.com
URL: http://yourdomain.com
Upload statistics:
- Total files: 25
- Successfully uploaded: 25
- Failed to upload: 0

Implementation Details

Deployment Process
  1. Check Build Directory: Verifies if the specified build directory exists
  2. Website Creation: Creates a new static website through 1Panel API if it doesn't exist
  3. File Upload: Uploads all files from the build directory to the website
  4. Statistics: Returns detailed statistics about the upload process

Troubleshooting

If you encounter deployment issues, check the following:

  1. Ensure your API Key is valid and has sufficient permissions
  2. Verify that the website directory exists and has write permissions
  3. Check the 1Panel server logs for more detailed error information
  4. If file uploads fail, it may be due to file permission or format issues

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.