mcmodding-mcp
<div align="center">
<img src="docs/logo.png" alt="MCModding-MCP Logo" width="180" />
# MCModding-MCP
### ๐ค AI-Powered Minecraft Modding Documentation Server
_Give your AI assistant real-time access to Fabric & NeoForge documentation_
<br />
[](https://www.npmjs.com/package/mcmodding-mcp)
[](https://www.npmjs.com/package/mcmodding-mcp)
[](https://opensource.org/licenses/MIT)
[](https://github.com/OGMatrix/mcmodding-mcp/actions/workflows/ci.yml)
<br />
[](https://github.com/OGMatrix/mcmodding-mcp/stargazers)
[](https://github.com/OGMatrix/mcmodding-mcp/issues)
[](https://github.com/OGMatrix/mcmodding-mcp/commits)
[](https://nodejs.org/)
<br />
[๐ Documentation](#available-tools) โข [๐ Quick Start](#quick-start) โข [๐ก Features](#features) โข [๐ค Contributing](#contributing)
---
</div>
## โจ What is this?
**MCModding-MCP** is a [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) server that supercharges AI assistants like Claude with **real, up-to-date** Minecraft modding knowledge. No more hallucinations or outdated API references!
<table>
<tr>
<td width="50%">
### ๐ฏ Key Benefits
| Feature | Description |
| ----------------------- | -------------------------------------- |
| ๐
**Always Current** | Weekly-indexed from official sources |
| โ
**Accurate Answers** | Real documentation, not hallucinations |
| ๐ป **Code Examples** | Searchable code blocks with context |
| ๐ง **Semantic Search** | Understands meaning, not just keywords |
| โก **Zero Config** | Works immediately after installation |
</td>
<td width="50%">
### ๐ Live Statistics
| Database | Content |
| ----------------- | ----------------------------- |
| ๐ **Docs** | 1,000+ pages, 185K+ chunks |
| ๐บ๏ธ **Mappings** | 831K+ methods, 166K+ fields |
| ๐งฉ **Examples** | 1,000+ battle-tested patterns |
| ๐ **Embeddings** | 185K+ semantic vectors |
| ๐ **Javadocs** | 2.3M+ documented parameters |
</td>
</tr>
</table>
---
## Quick Start
### Installation
```bash
# Install globally
npm install -g mcmodding-mcp
```
### Configure Your AI Client
Add to your MCP client configuration (e.g., Claude Desktop):
```json
{
"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 the available tools:
>
> - `search_fabric_docs` and `get_example` for documentation and code patterns
> - `search_mappings` and `get_class_details` for Minecraft internals and method signatures
> - `search_mod_examples` for battle-tested implementations from popular mods
>
> Prioritize working code examples over theoretical explanations. When dealing with Minecraft internals, use the mappings tools to get accurate parameter names and Javadocs. If the user specifies a Minecraft version, ensure all retrieved information matches that version.
That's it! Your AI assistant now has access to comprehensive Minecraft modding resources.
---
## Database Management
Manage your documentation databases with the built-in CLI:
```bash
# Run the database manager
npx mcmodding-mcp manage
```
The interactive manager allows you to:
- **Install** - Download databases you don't have yet
- **Update** - Check for and apply database updates
- **Re-download** - Restore deleted or corrupted databases
### Available Databases
| Database | Description | Size |
| ----------------------------- | ----------------------------------------------------------- | ------- |
| **Documentation Database** | Core Fabric & NeoForge documentation (installed by default) | ~520 MB |
| **Parchment Mappings** โจ NEW | Minecraft class/method/field mappings with Javadocs | ~180 MB |
| **Mod Examples Database** | 1000+ high-quality modding examples | ~30 MB |
The manager shows version information and highlights available updates:
```
โ ๐ Documentation Database [core]
โ Installed: v0.2.1 โ โป Update: v0.2.2 [520.3 MB]
Core Fabric & NeoForge documentation - installed by default
โ ๐บ๏ธ Parchment Mappings Database โจ NEW
โ Not installed โ Available: v0.1.0 [178.5 MB]
Minecraft class/method/field names with parameter names and Javadocs
โ ๐งฉ Mod Examples Database
โ Not installed โ Available: v0.1.0 [28.1 MB]
1000+ high-quality modding examples for Fabric & NeoForge
```
---
## Available Tools
The MCP server provides powerful tools across three categories:
### ๐ Documentation Tools
#### `search_fabric_docs`
Search documentation with smart filtering.
```typescript
// Example: Find information about item registration
{
query: "how to register custom items",
category: "items", // Optional filter
loader: "fabric", // fabric | neoforge
minecraft_version: "1.21.10" // Optional version filter
}
```
#### `get_example`
Get working code examples for any topic.
```typescript
// 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.
```typescript
// Example: Understand mixins
{
concept: 'mixins';
}
```
#### `get_minecraft_version`
Get current Minecraft version information.
```typescript
// Get latest version
{
type: 'latest';
}
// Get all indexed versions
{
type: 'all';
}
```
---
### ๐บ๏ธ Parchment Mappings Tools โจ NEW
_Requires Parchment Mappings database - install via `npx mcmodding-mcp manage`_
#### `search_mappings`
Search Minecraft class, method, and field mappings with parameter names and Javadocs.
```typescript
// Example: Find block-related classes and methods
{
query: "BlockEntity",
type: "class", // class | method | field | all
minecraft_version: "1.21.10",
include_javadoc: true
}
```
#### `get_class_details`
Get comprehensive information about a Minecraft class including all methods and fields.
```typescript
// Example: Explore the Block class
{
class_name: "net.minecraft.world.level.block.Block",
include_methods: true,
include_fields: true
}
```
#### `lookup_obfuscated`
Look up deobfuscated names from obfuscated identifiers (useful for crash logs).
```typescript
// Example: Decode an obfuscated method name
{
obfuscated_name: 'm_46859_';
}
```
#### `get_method_signature`
Get the full signature of a method including all parameter names and types.
```typescript
// Example: Get method details
{
class_name: "Block",
method_name: "onPlace"
}
```
#### `browse_package`
Discover classes in a Minecraft package.
```typescript
// Example: Browse block package
{
package_name: 'net.minecraft.world.level.block';
}
```
---
### ๐งฉ Mod Examples Tools
_Requires Mod Examples database - install via `npx mcmodding-mcp manage`_
#### `search_mod_examples`
Search battle-tested code from popular mods like Create, Botania, and Applied Energistics 2.
```typescript
// Example: Find block entity implementations
{
query: "block entity tick",
mod: "Create", // Optional: filter by mod
category: "tile-entities",
complexity: "intermediate"
}
```
#### `get_mod_example`
Get detailed information about a specific example with full code and explanations.
```typescript
// Example: Get full details for an example
{
id: 42,
include_related: true
}
```
#### `list_canonical_mods`
Discover all indexed mods and their available examples.
#### `list_mod_categories`
Browse available example categories (blocks, entities, rendering, etc.).
---
## 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](https://wiki.fabricmc.net) - Fabric Wiki (226+ pages)
- [docs.fabricmc.net](https://docs.fabricmc.net) - Official Fabric Docs (266+ pages)
- [docs.neoforged.net](https://docs.neoforged.net) - NeoForge Docs (512+ pages)
---
## For Developers
### Development Setup
```bash
# 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
```bash
# 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
# Database Management
npx mcmodding-mcp manage # Interactive database installer/updater
```
### 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
```sql
-- 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](https://github.com/googleapis/release-please) for automated releases.
### Branch Strategy
| Branch | Purpose |
| ------ | ------------------- |
| `dev` | Active development |
| `prod` | Production releases |
### How It Works
1. Push commits to `dev` using [conventional commits](https://www.conventionalcommits.org/)
2. Release-please maintains a Release PR (`dev` โ `prod`)
3. When merged, automatic release: npm publish + GitHub release + database upload
4. Changes sync back to `dev`
See [RELEASE_WORKFLOW.md](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:
```bash
DB_PATH=/path/to/my/database.db mcmodding-mcp
```
---
## ๐ก Share Your Ideas!
We're actively developing mcmodding-mcp and want to hear from you!
### Have an Idea?
- **Feature requests** - What tools would make your modding easier?
- **New documentation sources** - Know a great modding resource we should index?
- **Workflow improvements** - How could the tools work better for your use case?
๐ [Open a Feature Request](https://github.com/OGMatrix/mcmodding-mcp/issues/new?template=feature_request.yml)
### Found a Bug?
- Incorrect search results?
- Missing or outdated documentation?
- Tool not working as expected?
๐ [Report a Bug](https://github.com/OGMatrix/mcmodding-mcp/issues/new?template=bug_report.yml)
### Share Your Experience
Using mcmodding-mcp for a cool project? We'd love to hear about it! Share your story in [Discussions](https://github.com/OGMatrix/mcmodding-mcp/discussions).
---
## Contributing
We welcome contributions! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
### Quick Contribution Guide
1. Fork the repository
2. Create a feature branch from `dev`
3. Make changes with conventional commits
4. Submit a PR to `dev`
---
## License
MIT License - see [LICENSE](LICENSE) for details.
## Changelog
See [CHANGELOG.md](CHANGELOG.md) for a detailed history of changes and releases.
---
## Acknowledgments
- [Fabric Documentation](https://docs.fabricmc.net/) - Official Fabric documentation
- [Fabric Wiki](https://wiki.fabricmc.net/) - Community wiki
- [NeoForge Documentation](https://docs.neoforged.net/) - Official NeoForge documentation
- [ParchmentMC](https://parchmentmc.org/) - Parameter names and Javadoc mappings
- [Model Context Protocol](https://modelcontextprotocol.io/) - MCP specification
- [Transformers.js](https://huggingface.co/docs/transformers.js) - Local ML embeddings
- [better-sqlite3](https://github.com/WiseLibs/better-sqlite3) - Fast SQLite bindings
---
<div align="center">
<br />
**๐ฎ Built with โค๏ธ for the Minecraft modding community**
<br />
[](https://www.typescriptlang.org/)
[](https://www.sqlite.org/)
[](https://modelcontextprotocol.io/)
<br />
If you find this project useful, please consider giving it a โญ!
[โฌ๏ธ Back to Top](#mcmodding-mcp)
</div>
TDQS
Scored across 4 tools
Each tool has a clearly distinct purpose with no overlap: explain_fabric_concept covers conceptual understanding, get_example provides code snippets, get_minecraft_version handles version data, and search_fabric_docs focuses on documentation retrieval. The descriptions reinforce these boundaries, making misselection unlikely.
All tool names follow a consistent verb_noun pattern (explain_fabric_concept, get_example, get_minecraft_version, search_fabric_docs), using snake_case throughout. This predictability aids agent comprehension and tool selection without confusion.
With 4 tools, the count is reasonable for a modding documentation server, covering key areas like concepts, examples, versions, and search. However, it feels slightly thinโadding tools for specific API queries or troubleshooting could enhance coverage, but the current set is well-scoped.
The tool surface covers core modding documentation needs: conceptual explanations, code examples, version info, and documentation search. Minor gaps exist, such as lack of tools for direct API calls or mod configuration, but agents can work around these using the provided tools effectively.