Enables the creation and management of webhooks to send Minecraft server notifications, such as startup alerts and event triggers, to Discord channels.
crafty-mcp
An MCP (Model Context Protocol) server for Crafty Controller 4 — manage your Minecraft servers via AI assistants.
The first MCP server for Crafty Controller.
What it does
crafty-mcp exposes the full Crafty Controller 4 API V2 as MCP tools, letting AI assistants like Claude manage your Minecraft servers using natural language. Start and stop servers, send console commands, manage players, edit server files, configure backups, set up scheduled tasks, manage webhooks, and administer users — all without leaving your AI chat.
Quick Start
Add to your MCP client config:
Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json on macOS, %APPDATA%\Claude\claude_desktop_config.json on Windows):
{
"mcpServers": {
"crafty": {
"command": "npx",
"args": ["-y", "crafty-mcp"],
"env": {
"CRAFTY_URL": "https://localhost:8443",
"CRAFTY_API_TOKEN": "your-bearer-token",
"CRAFTY_ALLOW_INSECURE": "true"
}
}
}
}Claude Code:
claude mcp add crafty npx -y crafty-mcp \
--env CRAFTY_URL=https://localhost:8443 \
--env CRAFTY_API_TOKEN=your-token \
--env CRAFTY_ALLOW_INSECURE=trueCursor (.cursor/mcp.json):
{
"mcpServers": {
"crafty": {
"command": "npx",
"args": ["-y", "crafty-mcp"],
"env": {
"CRAFTY_URL": "https://localhost:8443",
"CRAFTY_API_TOKEN": "your-bearer-token",
"CRAFTY_ALLOW_INSECURE": "true"
}
}
}
}Configuration
Variable | Required | Description |
| Yes | Crafty Controller base URL (e.g. |
| No* | Bearer token from Crafty UI |
| No | Set to |
| No | Request timeout in milliseconds (default: |
*
CRAFTY_API_TOKENis optional if you authenticate dynamically using thecrafty_logintool, but recommended for most setups.
Getting your API token
Open Crafty Controller in your browser
Click your username -> Profile
Scroll to API Keys section
Click Generate Key
Copy the token and use it as
CRAFTY_API_TOKEN
A superuser token has full access to all servers and operations.
Available Tools
Auth / Meta
Tool | Description |
| Login with username/password to get a bearer token |
| Get API version info and MOTD |
| List available JSON schema names |
| Get a specific JSON schema by name |
Crafty Host (System)
Tool | Description |
| Get host CPU, RAM, disk, and boot time |
| Get Crafty panel configuration |
| Update Crafty panel configuration |
Servers — CRUD & Info
Tool | Description |
| List all managed Minecraft servers |
| Get a server's full configuration |
| Create a new Minecraft server (Java, Bedrock, custom) |
| Update server configuration |
| Permanently delete a server |
Servers — Runtime & Logs
Tool | Description |
| Get live stats: CPU/RAM, players online, version, world |
| Get server console log lines |
| Get historical stats for graphing |
Servers — Actions
Tool | Description |
| Start a server |
| Stop a server |
| Restart a server |
| Force-kill a server process |
| Trigger an immediate backup |
| Update the server jar/executable |
| Clone an existing server |
Servers — Console
Tool | Description |
| Send a command to the server console |
Servers — Files
Tool | Description |
| List files/directories in a server directory |
| Read a file's contents |
| Write or update a file |
| Delete files or directories |
| Create a new file |
| Create a new directory |
| Rename or move a file |
| Decompress an archive |
Servers — Backups
Tool | Description |
| List all backups with timestamps and sizes |
| Get backup configuration |
| Update backup settings |
| Restore a specific backup |
| Delete a backup |
Servers — Scheduled Tasks
Tool | Description |
| List all scheduled tasks |
| Get a task's configuration |
| Create a scheduled task (interval or cron) |
| Update a scheduled task |
| Delete a scheduled task |
| Manually trigger a task |
Servers — Webhooks
Tool | Description |
| List all webhooks |
| Get a webhook's details |
| Create a webhook (Discord, etc.) |
| Update a webhook |
| Delete a webhook |
| Send a test webhook message |
Users
Tool | Description |
| List all Crafty users |
| Get a user's details (use |
| Create a new user |
| Update a user |
| Delete a user |
| Get user permissions |
| Update user permissions |
| List a user's API keys |
| Generate a new API key |
| Revoke an API key |
Roles
Tool | Description |
| List all roles |
| Get a role's details |
| Create a new role |
| Update a role |
| Delete a role |
Examples
"What servers are running?" -> server_list + server_get_stats
"Start my SMP server" -> server_start
"How many players are online on survival?" -> server_get_stats
"Send 'say Server restarting in 5 minutes' to all servers" -> server_list + server_send_command
"Back up all servers" -> server_list + server_backup (for each)
"Show me the server.properties for my SMP server" -> server_get_file
"Create a Paper 1.21.4 server on port 25566" -> server_create
"Set up a daily backup at 3 AM" -> server_create_task (cron: "0 3 * * *")
"Add a Discord webhook that fires when the server starts" -> server_create_webhook
"Op PlayerName on the survival server" -> server_send_commandDevelopment
git clone https://github.com/HadiCherkaoui/crafty-mcp.git
cd crafty-mcp
npm install
npm run build
# Test locally
CRAFTY_URL=https://localhost:8443 \
CRAFTY_API_TOKEN=your-token \
CRAFTY_ALLOW_INSECURE=true \
node dist/index.js
# Inspect with MCP Inspector
npx @modelcontextprotocol/inspector node dist/index.jsLicense
GPLv3 — Hadi Cherkaoui