PterodactylMCP

PterodactylMCP

MCP server for managing Pterodactyl game panel resources (users, servers, nodes, locations, etc.) via the Application API.

Category
访问服务器

README

PterodactylMCP

MCP Badge License: MIT Python 3.10+

Model Context Protocol (MCP) server for the Pterodactyl Panel Application API (admin endpoints), built with FastMCP.

Quick install

Pick whichever path matches your client.

uvx (recommended, no checkout needed):

uvx pterodactyl-mcp

pip:

pip install pterodactyl-mcp
pterodactyl-mcp

Docker:

docker build -t pterodactyl-mcp .
docker run --rm -i \
  -e PANEL_URL=https://panel.example.com \
  -e PANEL_TOKEN=ptla_REPLACE_ME \
  pterodactyl-mcp

Claude Desktop one-click (DXT): see Building a DXT bundle below.

Smithery: a ready-to-use smithery.yaml ships at the repo root.

Capabilities

Kind Count Highlights
Tools 50 All Application API routes (users, servers, nodes, locations, nests/eggs, databases) plus AI-friendly helpers and a generic raw-request escape hatch.
Prompts 2 troubleshoot_server, provision_user_and_server
Resources 2 pterodactyl://panel/overview, pterodactyl://servers/{server_id}/summary

What this provides

  • MCP tools that map to Pterodactyl Application API routes (users, servers, nodes, locations, nests/eggs, server databases).
  • A generic ptero_app_request tool for calling any /api/application/... endpoint not yet mapped.
  • AI-friendly, token-efficient tools (search, compact lists, summaries).

Supported endpoints (Application API)

This server exposes one MCP tool per route from the NETVPX Application API docs, including:

  • Users: list/get/create/update/delete, lookup by external_id
  • Servers: list/get/create/delete, lookup by external_id, update details/build/startup, suspend/unsuspend, reinstall
  • Nodes: list/get/create/update/delete, list deployable nodes, get config, manage allocations
  • Locations: list/get/create/update/delete
  • Nests/Eggs: list nests, get nest, list eggs, get egg
  • Server databases: list/get/create/delete, reset database password

AI-friendly tools (recommended)

These tools are designed to keep responses small and “LLM-friendly”:

  • ptero_ai_search_users (top-N fuzzy search across username/email/name/external_id/uuid)
  • ptero_ai_search_servers (top-N fuzzy search across name/identifier/uuid/external_id)
  • ptero_ai_list_users / ptero_ai_list_servers (compact, safe defaults)
  • ptero_ai_get_user_summary / ptero_ai_get_server_summary (compact single-resource views)
  • ptero_ai_panel_totals (counts for common resources)

References

  • FastMCP Quickstart: https://gofastmcp.com/getting-started/quickstart
  • NETVPX Pterodactyl Application API docs: https://pterodactyl-api-docs.netvpx.com/docs/api/application
  • NETVPX Authentication docs: https://pterodactyl-api-docs.netvpx.com/docs/authentication

Requirements

  • Python 3.10+
  • A Pterodactyl Application API key (ptla_...) with appropriate permissions

Getting an Application API key

You need an Application token (usually ptla_...), not a Client token (ptlc_...).

Typical flow in the panel:

  1. Sign in with an admin account
  2. Open your account’s API credentials page
  3. Create an Application API key and copy it

If your panel UI differs, follow the Authentication reference link below.

Setup

  1. Create a virtual environment (recommended):
  • Windows (PowerShell): python -m venv .venv; .\\.venv\\Scripts\\Activate.ps1
  • macOS/Linux: python3 -m venv .venv && source .venv/bin/activate
  1. Install dependencies:

pip install -r requirements.txt

  1. Configure environment variables:
  • Copy .env.example to .env
  • Set:
    • PANEL_URL (e.g. https://panel.example.com)
    • PANEL_TOKEN (your Application API key, usually starts with ptla_)

Optional env vars:

  • PANEL_TIMEOUT (seconds, default 30)
  • PANEL_VERIFY_SSL (true/false, default true)
  • PANEL_USER_AGENT (default PterodactylMCP/0.1)

Run the MCP server

STDIO transport (recommended for desktop MCP clients)

From the repo root:

python run_server.py

Alternatively:

python -m pterodactyl_mcp

HTTP transport (optional)

python -m pterodactyl_mcp --transport sse --host 127.0.0.1 --port 8000 --path /mcp

Connecting from an MCP client

Most MCP desktop clients launch the server as a subprocess. Point them at:

  • Command: python
  • Args: C:\\path\\to\\PterodactylMCP\\run_server.py (recommended)

If your client does not run with this repo as the working directory, prefer setting PANEL_URL and PANEL_TOKEN in the client config environment instead of relying on .env discovery.

Claude Desktop example (uvx — works on Windows/macOS/Linux)

Edit your claude_desktop_config.json and add:

{
  "mcpServers": {
    "pterodactyl": {
      "command": "uvx",
      "args": ["pterodactyl-mcp"],
      "env": {
        "PANEL_URL": "https://panel.example.com",
        "PANEL_TOKEN": "ptla_REPLACE_ME"
      }
    }
  }
}

Claude Desktop (from a local checkout, Windows)

{
  "mcpServers": {
    "pterodactyl": {
      "command": "python",
      "args": ["C:\\\\path\\\\to\\\\PterodactylMCP\\\\run_server.py"],
      "env": {
        "PANEL_URL": "https://panel.example.com",
        "PANEL_TOKEN": "ptla_REPLACE_ME"
      }
    }
  }
}

Building a DXT bundle

This repo ships a manifest.json so you can build a one-click .dxt for Claude Desktop:

npm install -g @anthropic-ai/dxt
dxt pack

The resulting .dxt file can be dropped into Claude Desktop — it prompts the user for PANEL_URL and PANEL_TOKEN on install.

Development

pip install -e ".[dev]"
ruff check .
pytest

License

MIT

Tool naming

Route tools are generated using the pattern:

ptero_app_{method}_{path} (with /api/application/ removed, /_, -_, {param}param).

Calling tools

  • Each route tool takes the route path params as normal arguments (e.g. server, user, node), plus optional query and body.
  • Use query for query-string parameters (pagination, filters, includes), and body for JSON request payloads.
  • To discover all tool names and their routes, call ptero_app_list_endpoints.
  • For token efficiency, prefer the ptero_ai_* tools for discovery (search/list/summary), then call the raw ptero_app_* route tool once you have the exact ID.

Example query params (brackets are valid dict keys):

  • {"filter[email]": "admin@example.com", "include": "servers"}

Example workflow:

  1. Find the user you mean (compact results):
  • Call ptero_ai_search_users with query="pixel flip"
  1. Then fetch the full object only for the selected match:
  • Call ptero_app_get_users_user with user=<id>

To list all exposed tools and their routes, call:

  • ptero_app_list_endpoints

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选