# Minecraft

This MCP server connects an AI agent to Minecraft through WorldAPI, so it can inspect the world and carry out actions allowed by its token. Use it to check or manage a server from chat.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI
- Author: MairwunNx
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/MairwunNx/minecraft-mcp
- Updated: 2026-10-22
- HTML: https://affpapa.org/en/nevibecode/mcp/minecraft

## What it does

The agent can access information about players, worlds, blocks, chests, entities, recipes, settings, and logs. Available operations include running commands and Java scripts, inspecting inventories, and editing configuration when the token permits it. It can also report events such as a player joining.

A Paper, Fabric, or NeoForge server needs WorldAPI installed; for singleplayer, install the WorldAPI mod in the game world. The MCP server connects through Claude Code, Codex, Cursor, and other listed MCP clients. Token permissions shape what the agent can do: read-only mode hides write operations, while a viewer token exposes 17 tools for viewing data. WorldAPI must be running for the connection to work.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `WORLDAPI_URL`, `WORLDAPI_TOKEN`, `WORLDAPI_READ_ONLY` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env WORLDAPI_URL=<WORLDAPI_URL> --env WORLDAPI_TOKEN=<WORLDAPI_TOKEN> --env WORLDAPI_READ_ONLY=<WORLDAPI_READ_ONLY> --transport stdio minecraft -- npx -y @mairwunnx/minecraft-mcp
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add minecraft --env WORLDAPI_URL=<WORLDAPI_URL> --env WORLDAPI_TOKEN=<WORLDAPI_TOKEN> --env WORLDAPI_READ_ONLY=<WORLDAPI_READ_ONLY> -- npx -y @mairwunnx/minecraft-mcp
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "minecraft": {
            "command": "npx",
            "args": [
                "-y",
                "@mairwunnx/minecraft-mcp"
            ],
            "env": {
                "WORLDAPI_URL": "<WORLDAPI_URL>",
                "WORLDAPI_TOKEN": "<WORLDAPI_TOKEN>",
                "WORLDAPI_READ_ONLY": "<WORLDAPI_READ_ONLY>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "minecraft": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@mairwunnx/minecraft-mcp"
            ],
            "env": {
                "WORLDAPI_URL": "<WORLDAPI_URL>",
                "WORLDAPI_TOKEN": "<WORLDAPI_TOKEN>",
                "WORLDAPI_READ_ONLY": "<WORLDAPI_READ_ONLY>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e WORLDAPI_URL=<WORLDAPI_URL> -e WORLDAPI_TOKEN=<WORLDAPI_TOKEN> -e WORLDAPI_READ_ONLY=<WORLDAPI_READ_ONLY> minecraft npx -y @mairwunnx/minecraft-mcp
```
Replace <…> with your own values

## When to use it
- check which players are online and locate them
- inspect server status and investigate lag
- read server configuration and logs
- change an allowed configuration value while retaining its comments
- get notified when a player joins

## Example prompts
- Show me who is online and where each player is.
- Inspect the logs and find out why the server is lagging.
- Tell me when Steve joins the server.

## Similar
- [Pascal 3D Editor](https://affpapa.org/en/nevibecode/mcp/pascal-3d-editor.md) — MCP server · ★ 25137
- [Unity-MCP](https://affpapa.org/en/nevibecode/mcp/unity-mcp.md) — MCP server · ★ 4534
- [mcp](https://affpapa.org/en/nevibecode/mcp/sceneview-mcp.md) — MCP server · ★ 1349
- [Gearboy MCP Server](https://affpapa.org/en/nevibecode/mcp/gearboy-mcp-server.md) — MCP server · ★ 1218
- [ChiR24-unreal_mcp_server](https://affpapa.org/en/nevibecode/mcp/chir24-unreal-mcp-server.md) — MCP server · ★ 982
- [Nova3D](https://affpapa.org/en/nevibecode/mcp/nova3d.md) — MCP server · ★ 732

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
