fastpanel-mcp
MCP server for FastPanel 2 — manage sites, databases, SSL, nginx configs from Claude/Cursor via natural language
Install / Use
claude mcp add iMateo -- npx -y github:iMateo/fastpanel-mcpIf the server publishes to npm under a different name, use that package instead — check the repo README.
MCP Server
Model Context Protocol server
Quality Score
Category
AutomationSupported Platforms
Our assessment of fastpanel-mcp
fastpanel-mcp scores 75/100 on our quality scale, 2598th of 2,857 Automation skills we index.
Its MCP Server is 17 KB long, well organised into 24 sections with 13 code examples: a thorough specification that gives an agent plenty to work with.
It has 3 GitHub stars, so there is little community track record yet; judge it on its content.
Maintenance, license and trust
- The repository was last updated about 3 months ago. That is recent enough to be usable, but agent tooling moves fast, so check the instructions against your agent's current version.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 90/100, with 1 caution from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful.
AI review by kimi-k2.7-code on 2026-11-01. Automated pattern scan on 2026-11-01. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
fastpanel-mcp compared with similar skills
All 4 of these similar skills score higher than fastpanel-mcp; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| fastpanel-mcp (this skill)by iMateo | 75 | 3 | 3mo ago | MCP Server |
| Agent-Reachby Panniantong | 100 | 107.3k | 7d ago | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 78.5k | 1d ago | CLAUDE.md |
| CowAgentby zhayujie | 100 | 47.7k | today | CLAUDE.md |
| Scraplingby D4Vinci | 100 | 91.2k | today | MCP Server |
Frequently asked questions
- How do I install fastpanel-mcp?
- Run
claude mcp add iMateo -- npx -y github:iMateo/fastpanel-mcp. The install tabs above show the steps for each supported agent. - Which AI agents does fastpanel-mcp work with?
- It is written for Claude Code, Claude Desktop and Cursor, as a MCP Server file. Other agents that read the same format can often use it too.
- Is fastpanel-mcp safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful. It is MIT-licensed and scores 90/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is fastpanel-mcp still maintained?
- The repository was last updated about 3 months ago. That is recent enough to be usable, but agent tooling moves fast, so check the instructions against your agent's current version.
Skill content
View source on GitHubfastpanel-mcp
Talk to your FastPanel 2 server from Claude, Cursor, or any MCP-compatible client. Create sites, provision databases, attach SSL, harden nginx configs — through natural language, with production-grade safety rails.
Keywords: FastPanel, MCP, Model Context Protocol, Claude Code, Claude Desktop, server management, hosting automation, nginx, Let's Encrypt, DevOps, LLM ops, AI sysadmin.
Read this in other languages: English · Русский · Українська · Español · Deutsch
What you get
Ask an LLM, get real infra changes on your FastPanel server:
You: "Create a new site
foo.example.comunder userwww-root, PHP 8.4, no database, and attach our wildcard SSL cert. Also enable HTTP/2 and HTTP/3."LLM (~30 seconds, 5 tool calls later): Site id 53 is live at https://foo.example.com with HTTP/2, HTTP/3, wildcard TLS, and an auto-provisioned HTTPS redirect.
You: "Show me the nginx config for site 1 — check if it blocks
.env,.git, and other sensitive paths. If not, add hardening."LLM: Reads the config, notes that
.envand.htaccessare served as static files (security gap), edits the frontend to add deny rules for dotfiles + sensitive extensions + framework files, previews the diff viadry_run, then deploys it..envnow returns 404;.well-known/acme-challengestill works.
You: "What sites are running on this server, who owns them, and which ones don't force HTTPS?"
LLM: Queries
sites_listand reports the 5 sites withouthttps_redirect: true.
Features
- 32 tools covering sites, databases (incl. SSH dump/import), users, DNS zones, SSL certificates, system load, queue, site logs, backup plans, host-level diagnostics, file upload/deploy into a site's web root, and raw nginx/apache/php.ini configs.
- Dual-token safety model. Read operations use a read-only token; mutating operations require a separate write token (
FASTPANEL_WRITE_TOKEN). Unset the write token and every write tool fails closed. confirm: truerequired on every write. Accidental LLM outputs cannot mutate state.dry_run: truepreviews the exact HTTP body the server would receive — passwords redacted as***, no network call fired.- Compact response mode on sites_list to avoid overflowing LLM context on large panels.
- stderr audit log for every executed write, with passwords redacted.
- MCP tool annotations (
readOnlyHint/destructiveHint/idempotentHint/openWorldHint) so clients and policy scanners classify each tool correctly instead of treating read-only diagnostics as destructive. nginx -tauto-validation with rollback —site_configuration_updatevalidates the live config after applying and reverts a broken edit automatically when SSH is configured.- Tested against a live FastPanel 2 panel with 35+ sites in production.
Why this exists
FastPanel publishes no OpenAPI spec. The endpoints and payload shapes in this server were reverse-engineered from the panel's Angular SPA bundle and live DevTools captures, including non-obvious quirks like:
- List endpoints require
filter[limit]=…&filter[type]=…wrapped params — bare?limit=…is silently ignored. - Site creation is a two-step wizard (
POST /api/master/domainprobe →PUT /api/master), not a conventionalPOST /api/sites. - The
backendfield in site configuration is PHP-FPM pool config whenhandler=php_fpm, but an Apache VirtualHost block whenhandler=fcgi. - SSL attach/detach flows through
PUT /api/sites/{id}(site-side) notPOST /api/sites/{id}/certificate(there is no such endpoint).
These are documented in the tool descriptions so the LLM doesn't have to rediscover them.
Requirements
- Node.js 20 or newer
- A FastPanel 2 installation reachable over HTTPS
- Root SSH on the panel host to create API tokens (one-time)
Install
git clone https://github.com/iMateo/fastpanel-mcp.git
cd fastpanel-mcp
pnpm install # or: npm install
pnpm build
Get API tokens
On the FastPanel host (as root), create a read-only token for day-to-day use:
mogwai users tokens add -n mcp-read -s read_only -e 2030-12-31
The CLI binary is
/usr/local/fastpanel2/fastpanel; recent FastPanel builds expose it onPATHasmogwai(/usr/local/bin/mogwai→ the same binary). Older docs call itfastpanel, which is not onPATH— usemogwai, or the full path. Root only.
Copy the msg field from the returned JSON — that's your token. It bypasses 2FA and survives session TTLs, so treat it as a server credential.
Optional write token, with an expiry and IP lock:
mogwai users tokens add -n mcp-write -c <your-ip> -e 2030-12-31
Leave FASTPANEL_WRITE_TOKEN unset in configs where you don't need writes.
Configure
cp .env.example .env
Minimum viable .env:
FASTPANEL_URL=https://panel.example.com:8888
FASTPANEL_TOKEN=<your read token>
FASTPANEL_INSECURE_TLS=1 # only if panel uses self-signed cert
Use with Claude Code
claude mcp add fastpanel \
-s user \
-e "FASTPANEL_URL=https://panel.example.com:8888" \
-e "FASTPANEL_TOKEN=…" \
-e "FASTPANEL_INSECURE_TLS=1" \
-- node $PWD/dist/index.js
Add -e "FASTPANEL_WRITE_TOKEN=…" when you want write tools enabled.
Use with Claude Desktop / Cursor / other MCP clients
claude_desktop_config.json (or equivalent):
{
"mcpServers": {
"fastpanel": {
"command": "node",
"args": ["/absolute/path/to/fastpanel-mcp/dist/index.js"],
"env": {
"FASTPANEL_URL": "https://panel.example.com:8888",
"FASTPANEL_TOKEN": "…",
"FASTPANEL_INSECURE_TLS": "1"
}
}
}
}
Debug
Inspect tools with the MCP Inspector GUI:
pnpm inspect
Drive JSON-RPC over stdio manually:
FASTPANEL_URL=… FASTPANEL_TOKEN=… node scripts/smoke.mjs
Tools
Read (no write token required)
| Tool | Endpoint | Returns |
|---|---|---|
| sites_list | GET /api/sites/list | All websites, 13 essential fields by default (compact mode) |
| site_get | GET /api/sites/{id} | Full 40-field site object (cert, backend, backups, stats) |
| site_configuration_get | GET /api/sites/{id}/configuration | Raw nginx (frontend), handler backend (PHP-FPM or Apache), php.ini |
| databases_list | GET /api/databases | MySQL + PostgreSQL databases with owners and sizes |
| database_servers_list | GET /api/databases/servers | Available DB servers — use ids in database_create |
| users_list | GET /api/users | Panel users and site owners |
| dns_domains_list | GET /api/dns/domains | DNS zones (empty if panel DNS is off) |
| dns_records_list | GET /api/dns/domain/{id}/records | Records for one zone |
| certificates_list | GET /api/certificates | Stored SSL certificates (LE + custom) |
| system_load | GET /api/loads/full | CPU / memory / disk / load averages / top processes |
| queue_list | GET /api/queue/list | Background tasks including completed |
| queue_active | GET /api/queue | In-flight tasks only (filters finished) + meta.all_done for deterministic polling |
| site_logs | GET /api/sites/{id}/log/{lines}/{type} | Tail nginx/apache access or error log (frontend_/backend_) without SSH |
| site_resources | GET /api/sites/{id}/resources | Databases, sub-domains, DNS & email zones attached to a site |
| backup_plans_list | GET /api/v2/backup/plans | Configured backup plans |
| me | GET /api/me | Account behind the current read token (username, roles, ssh) |
| settings_get | GET /api/settings | Panel-wide settings (OS, license, limits, notifications) |
Write (require FASTPANEL_WRITE_TOKEN + explicit confirm: true)
| Tool | Endpoint | Purpose |
|---|---|---|
| user_create | POST /api/users | Create a new panel user (site owner) |
| database_create | POST /api/databases | Create MySQL or PostgreSQL database with a dedicated DB user |
| site_create | POST /api/master/domain + PUT /api/master | Create a site atomically, optionally with inline user / database / FTP |
| site_update | PUT /api/sites/{id} | Change document root (index_dir) / directory index — e.g. point a Laravel site at public/ (framework: "laravel" preset) |
| site_ssl_update | PUT /api/sites/{id} | Attach / replace / detach an SSL certificate, toggle HTTPS / HTTP2 / HTTP3 / HSTS |
| site_backend_update | PUT /api/sites/backend/{backend_id} | Change PHP version, handler, port, socket, env vars (pass site id — backend id resolved internally) |
| site_configuration_update | PUT /api/sites/{id}/configuration | Replace raw nginx/apache/php.ini for the site. Dangerous: bad syntax can break the site — when SSH is configured, runs nginx -t after applying and auto-reverts on failure (validate: false to skip) |
| certificate_create_letsencrypt | POST /api/certificates | Issue a new Let's Encrypt certificate (async — poll queue_active) |
SSH-backed (require FASTPANEL_SSH_HOST)
These do what the REST API can't — they run on the panel host itself. Opt-in and host-agnostic: set FASTPANEL_SSH_HOST (+ optional FASTPANEL_SSH_USER/PORT/KEY) to point at any FastPanel server. The server shells out to your own ssh client, so the host just needs to be reachable with key-based auth. nginx_validate and site_doctor are read-only; the rest are writes (confirm: true + dry_run preview).
| Tool | Runs | Purpose |
|---|---|---|
| nginx_validate | nginx -t | Validate the live nginx config before/after site_configuration_update — catch syntax errors before they take nginx down |
| site_doctor | stat / systemctl / nginx -t | Diagnose why a site errors: missing docroot, a parent dir without o+x (the 750 → 404 trap), missing FPM socket, dead backend, broken nginx config |
| database_dump | mysqldump | Dump a database to a .sql file in the staging dir (local MySQL). Writes a root-owned file — needs confirm: true |
| database_import | mysql | Load a .sql file (from the staging dir) into a database. Destructive — needs confirm: true |
| site_files_upload | rsync (scp fallback) | Upload a local file/dir into a site's web root, then chown to the site user. delete: true mirrors (removes remote-only files) |
| site_files_deploy | git clone / curl + tar | Fetch files on the host (https git repo or tarball) into a site's web root, then chown to the site user |
| site_file_put | cat over ssh | Write one small inline file (placeholder/.htaccess/robots.txt) into a site's web root, then chown to the site user |
Dump/import paths are confined to a staging dir (default /root/fastpanel-mcp-dumps, override with FASTPANEL_DUMP_DIR); paths outside it or containing .. are rejected. The three upload/deploy tools resolve the site's index_dir + owner via site_get, refuse destination subpaths that escape the web root or contain shell-unsafe characters, and chown everything to the site's system user so nginx/PHP-FPM can serve it (root-owned files would 403).
Cookbook
Provision a new test site under a wildcard cert (30 seconds, no DNS/LE wait):
site_create(domain="foo.example.com", owner_id=2, php_version="84")
→ site_ssl_update(site_id=<new>, certificate_id=<wildcard>, https_redirect=true, http2=true, http3=true)
Provision a production site with a fresh Let's Encrypt cert:
site_create(domain="foo.com", aliases=["
Truncated for display — read the full file on GitHub.
Related Skills
Agent-Reach
107.3kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
headroom
78.5kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
CowAgent
47.7kOpen-source personal AI assistant & Agent Harness. Plans tasks, runs tools and skills, self-evolves with memory and knowledge. Multi-agent, multi-model, multi-channel. Lightweight, extensible, one-line install.
Scrapling
91.2k🕷️ The BEST Web Scraping framework that handles everything from a single request to a full-scale crawl! Don't be shy, join here: https://discord.gg/EMgGbDceNQ and follow here for daily tips and tricks: https://x.com/Scrapling_dev
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
