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
Installation
# Clone the repository
git clone https://github.com/yourusername/1panel-mcp-server.git
cd 1panel-mcp-server
# Install dependencies
npm install
# Or if you use pnpm
pnpm install
# Configure environment variables
cp .env.example .env
Edit the .env
file with your 1Panel server information:
PORT=3000
ONEPANEL_BASE_URL=http://your-1panel-ip:port/api/v1
ONEPANEL_API_KEY=your_api_key
ONEPANEL_LANGUAGE=zh # Language options: zh (Chinese) or en (English)
Usage
Start the server
# Start the server
npm start
# For development with auto-reload
npm run dev
Configure MCP in Cursor IDE
To use this server with Cursor IDE, add the following MCP configuration:
- Open Cursor
- Create
.cursor/mcp.json
{
"mcpServers": {
"Deploy to 1Panel": {
"url": "http://localhost:3000/sse"
}
}
}
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 domainbuildDir
(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
- Check Build Directory: Verifies if the specified build directory exists
- Website Creation: Creates a new static website through 1Panel API if it doesn’t exist
- File Upload: Uploads all files from the build directory to the website
- Statistics: Returns detailed statistics about the upload process
Troubleshooting
If you encounter deployment issues, check the following:
- Ensure your API Key is valid and has sufficient permissions
- Verify that the website directory exists and has write permissions
- Check the 1Panel server logs for more detailed error information
- If file uploads fail, it may be due to file permission or format issues
1Panel Website Deployment Server
Project Details
- ruibaby/1Panel-mcp
- Last Updated: 4/21/2025
Categories
Recomended MCP Servers
A model context protocol server for your Gmail
Simple MCP server for uithub.com
Model Context Protocol Server for Accessing twitter
A Model Context Protocol (MCP) server for the POX SDN controller
Efficient implementation of the Google Drive MCP server
Model Context Protocol (MCP) server for constraint optimization and solving"
MCP Server for kicking off and getting status of your crew deployments
An MCP server paired with a browser extension that enables LLM clients to control the user's browser.
Osmosis protocol tools for LLMs