1Panel MCP
1Panel MCP Server is an MCP protocol server for 1Panel that manages websites, apps, and databases. It offers tools to list, create, and install resources, enhancing 1Panel integration and control.
How to Install and Use 1Panel MCP
If you want to manage your 1Panel easily, you can use the tool called 1Panel MCP. It helps you connect and control 1Panel with simple commands. Here is a simple guide on how to install and start using 1Panel MCP.
Prerequisites Before Installation
Before installing 1Panel MCP, make sure you have these ready. You need:
- Go programming language, version 1.23.0 or newer installed on your computer.
- An existing 1Panel setup to connect with the MCP.
Once you have these, you can move on to install 1Panel MCP.
Installing 1Panel MCP from the Source
To install 1Panel MCP by building it yourself, follow these steps carefully:
-
Clone the Repository
First, get the MCP source code on your computer. Open your terminal or command prompt and type:git clone https://github.com/1Panel-dev/mcp-1panel.git cd mcp-1panel -
Build the Project
Next, build the software using the make command:make build -
Move the Built File
You will see a file calledmcp-1panelinside the./build/folder. Move this file to a place included in your system's environment path. This will allow you to run the command from anywhere.
Installing 1Panel MCP Using Go Install
If you prefer a quicker way without building from source, you can install 1Panel MCP directly with Go:
go install github.com/1Panel-dev/mcp-1panel@latest
This command downloads and installs the MCP tool for you automatically.
How to Use 1Panel MCP
After installation, you can start 1Panel MCP in two main ways depending on your needs:
Using stdio Mode
This mode runs MCP as a command your system interacts with through standard input/output. Here is an example configuration you can use:
{
"mcpServers": {
"mcp-1panel": {
"command": "mcp-1panel",
"env": {
"PANEL_ACCESS_TOKEN": "<your 1Panel access token>",
"PANEL_HOST": "such as http://localhost:8080"
}
}
}
}
Make sure to replace <your 1Panel access token> and the host address with your actual details.
Using sse Mode
This method runs MCP through a server-sent event (SSE) transport. To start MCP server using SSE, use this command:
mcp-1panel -host <your 1Panel access address> -token <your 1Panel access token> -transport sse -addr "http://localhost:8000"
Then use this configuration to connect:
{
"mcpServers": {
"mcp-1panel": {
"url": "http://localhost:8000/sse"
}
}
}
Command Line Options You Should Know
You can customize how MCP runs by adding these options when starting it:
-token: Your 1Panel access token.-host: The address of your 1Panel.-transport: The way data is sent (choosestdioorsse). The default isstdio.-addr: The address to start the SSE server (default ishttp://localhost:8000).
Setting Environment Variables
Instead of using command options, you can also use environment variables to set things up:
PANEL_HOST: Set this to your 1Panel access address.PANEL_ACCESS_TOKEN: Set this to your 1Panel access token.
This way, MCP knows how to connect when it starts.
By following these steps, you can easily install and start using 1Panel MCP to manage your 1Panel. This tool makes working with 1Panel simpler and faster with commands and server options ready to go.