MCP Hub
Back to servers

crafty-mcp

MCP Server for crafty controller

glama
Forks
1
Updated
Mar 23, 2026

crafty-mcp

npm

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=true

Cursor (.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

VariableRequiredDescription
CRAFTY_URLYesCrafty Controller base URL (e.g. https://localhost:8443)
CRAFTY_API_TOKENNo*Bearer token from Crafty UI
CRAFTY_ALLOW_INSECURENoSet to true to allow self-signed certificates (Crafty's default)
CRAFTY_TIMEOUTNoRequest timeout in milliseconds (default: 30000)

*CRAFTY_API_TOKEN is optional if you authenticate dynamically using the crafty_login tool, but recommended for most setups.

Getting your API token

  1. Open Crafty Controller in your browser
  2. Click your username -> Profile
  3. Scroll to API Keys section
  4. Click Generate Key
  5. 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

ToolDescription
crafty_loginLogin with username/password to get a bearer token
crafty_api_infoGet API version info and MOTD
crafty_list_schemasList available JSON schema names
crafty_get_schemaGet a specific JSON schema by name

Crafty Host (System)

ToolDescription
crafty_get_statsGet host CPU, RAM, disk, and boot time
crafty_get_configGet Crafty panel configuration
crafty_update_configUpdate Crafty panel configuration

Servers — CRUD & Info

ToolDescription
server_listList all managed Minecraft servers
server_getGet a server's full configuration
server_createCreate a new Minecraft server (Java, Bedrock, custom)
server_updateUpdate server configuration
server_deletePermanently delete a server

Servers — Runtime & Logs

ToolDescription
server_get_statsGet live stats: CPU/RAM, players online, version, world
server_get_logsGet server console log lines
server_get_historyGet historical stats for graphing

Servers — Actions

ToolDescription
server_startStart a server
server_stopStop a server
server_restartRestart a server
server_killForce-kill a server process
server_backupTrigger an immediate backup
server_update_executableUpdate the server jar/executable
server_cloneClone an existing server

Servers — Console

ToolDescription
server_send_commandSend a command to the server console

Servers — Files

ToolDescription
server_list_filesList files/directories in a server directory
server_get_fileRead a file's contents
server_update_fileWrite or update a file
server_delete_fileDelete files or directories
server_create_fileCreate a new file
server_create_directoryCreate a new directory
server_rename_fileRename or move a file
server_decompress_fileDecompress an archive

Servers — Backups

ToolDescription
server_list_backupsList all backups with timestamps and sizes
server_get_backup_configGet backup configuration
server_update_backup_configUpdate backup settings
server_restore_backupRestore a specific backup
server_delete_backupDelete a backup

Servers — Scheduled Tasks

ToolDescription
server_list_tasksList all scheduled tasks
server_get_taskGet a task's configuration
server_create_taskCreate a scheduled task (interval or cron)
server_update_taskUpdate a scheduled task
server_delete_taskDelete a scheduled task
server_run_taskManually trigger a task

Servers — Webhooks

ToolDescription
server_list_webhooksList all webhooks
server_get_webhookGet a webhook's details
server_create_webhookCreate a webhook (Discord, etc.)
server_update_webhookUpdate a webhook
server_delete_webhookDelete a webhook
server_test_webhookSend a test webhook message

Users

ToolDescription
user_listList all Crafty users
user_getGet a user's details (use @me for yourself)
user_createCreate a new user
user_updateUpdate a user
user_deleteDelete a user
user_get_permissionsGet user permissions
user_update_permissionsUpdate user permissions
user_get_api_keysList a user's API keys
user_create_api_keyGenerate a new API key
user_delete_api_keyRevoke an API key

Roles

ToolDescription
role_listList all roles
role_getGet a role's details
role_createCreate a new role
role_updateUpdate a role
role_deleteDelete 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_command

Development

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.js

License

GPLv3 — Hadi Cherkaoui

Reviews

No reviews yet

Sign in to write a review