mcmodding-mcp
MC Modding is a Model Context Protocol (MCP) server designed to equip AI assistants, such as Claude, with direct and current access to Minecraft modding documentation. By indexing official Fabric and NeoForge sources weekly, it ensures AI responses are always accurate, backed by real documentation,
README
mcmodding-mcp
MCP server providing AI assistants with comprehensive, up-to-date Minecraft modding documentation for Fabric and NeoForge.
What is this?
mcmodding-mcp is a Model Context Protocol (MCP) server that gives AI assistants like Claude direct access to Minecraft modding documentation. Instead of relying on potentially outdated training data, your AI assistant can search real documentation, find code examples, and explain concepts accurately.
Key Benefits
- Always Current - Documentation is indexed weekly from official sources
- Accurate Answers - AI responses backed by real documentation, not hallucinations
- Code Examples - Searchable code blocks with proper context
- Semantic Search - Understands what you mean, not just keywords
- Zero Config - Works immediately after installation
📚 Knowledge Base Stats
Our documentation database (mcmodding-docs.db) is comprehensive and constantly updated:
- 1,000+ Documentation Pages
- 185,000+ Searchable Chunks
- 8,500+ Logical Sections
- 185,000+ Vector Embeddings for Semantic Search
This ensures that even obscure API details can be found via semantic search.
Quick Start
Installation
# Install globally
npm install -g mcmodding-mcp
Configure Your AI Client
Add to your MCP client configuration (e.g., Claude Desktop):
{
"mcpServers": {
"mcmodding": {
"command": "mcmodding-mcp"
}
}
}
🧠 Optimized System Prompt
To get the best results, we recommend adding this to your AI's system prompt or custom instructions:
You are an expert Minecraft Modding Assistant connected to
mcmodding-mcp. DO NOT rely on your internal knowledge for modding APIs (Fabric/NeoForge) as they change frequently. ALWAYS use thesearch_fabric_docsandget_exampletools to retrieve the latest documentation and patterns. Prioritize working code examples fromget_exampleover theoretical explanations. If the user specifies a Minecraft version, ensure all retrieved information matches that version.
That's it! Your AI assistant now has access to Minecraft modding documentation.
Available Tools
The MCP server provides four powerful tools:
search_fabric_docs
Search documentation with smart filtering.
// Example: Find information about item registration
{
query: "how to register custom items",
category: "items", // Optional filter
loader: "fabric", // fabric | neoforge
minecraft_version: "1.21.4" // Optional version filter
}
get_example
Get working code examples for any topic.
// Example: Get block registration code
{
topic: "custom block with block entity",
language: "java",
loader: "fabric"
}
explain_fabric_concept
Get detailed explanations of modding concepts with related resources.
// Example: Understand mixins
{
concept: 'mixins';
}
get_minecraft_version
Get current Minecraft version information.
// Get latest version
{
type: 'latest';
}
// Get all indexed versions
{
type: 'all';
}
Features
Hybrid Search Engine
Combines multiple search strategies for best results:
| Strategy | Purpose |
|---|---|
| FTS5 Full-Text | Fast keyword matching with ranking |
| Semantic Embeddings | Understanding meaning and context |
| Section Search | Finding relevant documentation sections |
| Code Search | Locating specific code patterns |
Auto-Updates
The database automatically checks for updates on startup:
- Compares local version with GitHub releases
- Downloads new versions with hash verification
- Creates backups before updating
- Non-blocking - server starts immediately
Documentation Sources
Currently indexes:
- wiki.fabricmc.net - Fabric Wiki (226+ pages)
- docs.fabricmc.net - Official Fabric Docs (266+ pages)
- docs.neoforged.net - NeoForge Docs (512+ pages)
For Developers
Development Setup
# Clone repository
git clone https://github.com/OGMatrix/mcmodding-mcp.git
cd mcmodding-mcp
# Install dependencies
npm install
# Run in development mode
npm run dev
Build Commands
# Development
npm run dev # Watch mode with hot reload
npm run typecheck # TypeScript type checking
npm run lint # ESLint
npm run test # Run tests
npm run format # Prettier formatting
# Production
npm run build # Build TypeScript
npm run build:prod # Build with fresh documentation index
npm run index-docs # Index documentation with embeddings
Project Structure
mcmodding-mcp/
├── src/
│ ├── index.ts # MCP server entry point
│ ├── db-versioning.ts # Auto-update system
│ ├── indexer/
│ │ ├── crawler.ts # Documentation crawler
│ │ ├── chunker.ts # Text chunking
│ │ ├── embeddings.ts # Semantic embeddings
│ │ ├── store.ts # SQLite database
│ │ └── sitemap.ts # Sitemap parsing
│ ├── services/
│ │ ├── search-service.ts # Search logic
│ │ └── concept-service.ts # Concept explanations
│ └── tools/
│ ├── searchDocs.ts # search_fabric_docs handler
│ ├── getExample.ts # get_example handler
│ └── explainConcept.ts # explain_fabric_concept handler
├── scripts/
│ └── index-docs.ts # Documentation indexing script
├── data/
│ ├── mcmodding-docs.db # SQLite database
│ └── db-manifest.json # Version manifest
└── dist/ # Compiled JavaScript
Database Schema
-- Documents: Full documentation pages
CREATE TABLE documents (
id INTEGER PRIMARY KEY,
url TEXT UNIQUE NOT NULL,
title TEXT NOT NULL,
content TEXT NOT NULL,
category TEXT NOT NULL,
loader TEXT NOT NULL, -- fabric | neoforge | shared
minecraft_version TEXT,
hash TEXT NOT NULL -- For change detection
);
-- Chunks: Searchable content units
CREATE TABLE chunks (
id TEXT PRIMARY KEY,
document_id INTEGER NOT NULL,
chunk_type TEXT NOT NULL, -- title | section | code | full
content TEXT NOT NULL,
section_heading TEXT,
code_language TEXT,
word_count INTEGER,
has_code BOOLEAN
);
-- Embeddings: Semantic search vectors
CREATE TABLE embeddings (
chunk_id TEXT PRIMARY KEY,
embedding BLOB NOT NULL, -- 384-dim Float32Array
dimension INTEGER NOT NULL,
model TEXT NOT NULL -- Xenova/all-MiniLM-L6-v2
);
-- FTS5 indexes for fast text search
CREATE VIRTUAL TABLE documents_fts USING fts5(...);
CREATE VIRTUAL TABLE chunks_fts USING fts5(...);
Release Workflow
This project uses release-please for automated releases.
Branch Strategy
| Branch | Purpose |
|---|---|
dev |
Active development |
prod |
Production releases |
How It Works
- Push commits to
devusing conventional commits - Release-please maintains a Release PR (
dev→prod) - When merged, automatic release: npm publish + GitHub release + database upload
- Changes sync back to
dev
See RELEASE_WORKFLOW.md for complete details.
Configuration
Environment Variables
| Variable | Description | Default |
|---|---|---|
DB_PATH |
Custom database path | ./data/mcmodding-docs.db |
GITHUB_REPO_URL |
Custom repo for updates | Auto-detected |
MCP_DEBUG |
Enable debug logging | false |
Disabling Auto-Updates
Set DB_PATH to a custom location to manage updates manually:
DB_PATH=/path/to/my/database.db mcmodding-mcp
Contributing
We welcome contributions! See CONTRIBUTING.md for guidelines.
Quick Contribution Guide
- Fork the repository
- Create a feature branch from
dev - Make changes with conventional commits
- Submit a PR to
dev
License
MIT License - see LICENSE for details.
Acknowledgments
- Fabric Documentation - Official Fabric documentation
- Fabric Wiki - Community wiki
- Model Context Protocol - MCP specification
- Transformers.js - Local ML embeddings
- better-sqlite3 - Fast SQLite bindings
<p align="center"> <strong>Built with care for the Minecraft modding community</strong> </p>
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。