skip to content
all projects
in progress 2026

Minecraft LLM

MCP server giving AI coding tools accurate Paper API knowledge via RAG.

TypeScript Bun Qdrant Tree-sitter MCP Docker
aigame dev

An MCP server that plugs into Claude Code, Cursor, or any MCP-compatible tool and gives it version-accurate Paper 1.21.3 API knowledge. Without it, AI assistants guess at Minecraft plugin APIs – wrong class names, hallucinated methods, outdated Bukkit patterns instead of modern Paper equivalents.

The pipeline: 4,504 Java source files from the Paper API parsed with Tree-sitter into 14,015 AST-level chunks (class, method, enum boundaries), embedded locally via fastembed BGE-base-en-v1.5 (ONNX, no API calls), stored in Qdrant with both dense vectors and self-computed BM25 sparse vectors. At query time, the MCP server runs hybrid search across both indexes, traverses the type graph for related classes, and returns the relevant chunks as context for the host LLM. Retrieval is sub-500ms and entirely deterministic – nothing in the pipeline touches an LLM.

The v2 A/B benchmark (70 cases, GLM-5.1 as judge) came back at +17.3% overall and +27.1% on hard/obscure APIs – a 5:1 win:loss ratio. PlayerPickItemEvent is a good example: the base LLM said the event doesn’t exist; MCP scored 5/5. The worst losses were the opposite problem – cases where retrieval returned 40KB+ of loosely-related chunks, and the context noise caused the LLM to hallucinate methods that weren’t there. Reranking is next.

Writeups

from this project