cryptiklemur/rimworld-mcp-server
If you are the rightful owner of rimworld-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
RimWorld MCP Server is a high-performance Model Context Protocol server designed for analyzing RimWorld XML definitions, patches, and mod interactions.
RimWorld MCP Server
A high-performance MCP (Model Context Protocol) server for analyzing RimWorld XML definitions, patches, and mod interactions.
Installation
🐳 Docker Installation (Recommended)
Note: Docker must be installed on your system
Add to your MCP client configuration:
{
"mcpServers": {
"rimworld": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-v", "/path/to/your/rimworld:/rimworld:ro",
"-v", "/path/to/your/workshop:/workshop:ro",
"ghcr.io/cryptiklemur/rimworld-mcp-server:latest",
"--rimworld-path=/rimworld",
"--mod-dirs=/rimworld/Mods,/workshop"
]
}
}
}
Manual Installation
1. Clone the repository
git clone https://github.com/cryptiklemur/rimworld-mcp-server.git
cd rimworld-mcp-server
2. Build the project
npm install
npm run build
3. Configure your AI client
Add to your MCP configuration:
{
"mcpServers": {
"rimworld": {
"command": "node",
"args": [
"/path/to/rimworld-mcp-server/dist/index.js",
"--rimworld-path=/path/to/your/rimworld",
"--mod-dirs=/path/to/your/rimworld/Mods"
]
}
}
}
Claude Desktop Installation
Add to your Claude Desktop configuration (~/Library/Application Support/Claude/claude_desktop_config.json on macOS or %APPDATA%/Claude/claude_desktop_config.json on Windows):
{
"mcpServers": {
"rimworld": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-v", "/path/to/your/rimworld:/rimworld:ro",
"ghcr.io/cryptiklemur/rimworld-mcp-server:latest",
"--mod-dirs=/rimworld/Mods"
]
}
}
}
Continue.dev Installation
Add to your Continue configuration:
{
"mcpServers": {
"rimworld": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-v", "/path/to/your/rimworld:/rimworld:ro",
"ghcr.io/cryptiklemur/rimworld-mcp-server:latest",
"--mod-dirs=/rimworld/Mods"
]
}
}
}
Setup
Docker (Recommended)
-
Pull the image:
docker pull ghcr.io/cryptiklemur/rimworld-mcp-server:latest -
Run with Docker:
docker run -v "/path/to/rimworld:/rimworld:ro" ghcr.io/cryptiklemur/rimworld-mcp-server:latest -
With extra mod directories:
docker run \ -v "/path/to/rimworld:/rimworld:ro" \ -v "/path/to/workshop:/workshop:ro" \ ghcr.io/cryptiklemur/rimworld-mcp-server:latest \ --rimworld-path=/rimworld --extra-mod-dirs=/workshop
Local Development
-
Install dependencies:
npm install -
Build the server:
npm run build -
Run the server:
tsx src/index.ts --rimworld-path="/path/to/rimworld"Or using Node with the built version:
node dist/index.js --rimworld-path="/path/to/rimworld"
Configuration
The server uses command-line arguments for configuration:
Required Arguments
--rimworld-path=<path>- Path to your RimWorld installation directory- Windows Steam:
"C:\Program Files (x86)\Steam\steamapps\common\RimWorld" - Windows Epic:
"C:\Program Files\Epic Games\RimWorld" - Linux Steam:
~/.steam/steam/steamapps/common/RimWorld - macOS Steam:
~/Library/Application\ Support/Steam/steamapps/common/RimWorld
- Windows Steam:
Optional Arguments
--mod-dirs=<paths>- Comma-separated list of mod directories to scan--server-name=<name>- Server name (default: rimworld-defs)--server-version=<version>- Server version (default: 3.0.0)--mod-concurrency=<n>- Number of mods to process simultaneously (default: 4)--xml-batch-size=<n>- Number of XML files to process in parallel (default: 8)--mod-batch-size=<n>- Number of mods to load in parallel (default: 10)--log-level=<level>- Logging level: debug, info, warn, error (default: info)--disable-patch-validation- Disable patch validation--disable-conflict-detection- Disable conflict detection--disable-reference-analysis- Disable reference analysis--disable-inheritance-resolution- Disable inheritance resolution--help, -h- Show help message
Examples
# Basic usage
tsx src/index.ts --rimworld-path="/path/to/rimworld"
# With mod directories
tsx src/index.ts --rimworld-path="/path/to/rimworld" --mod-dirs="/path/to/workshop,/path/to/custom"
# Performance tuning
tsx src/index.ts --rimworld-path="/path/to/rimworld" --mod-concurrency=8 --xml-batch-size=16
# Docker examples
docker run -v "/path/to/rimworld:/rimworld:ro" ghcr.io/cryptiklemur/rimworld-mcp-server:latest --mod-dirs=/rimworld/Mods
# Docker with custom arguments
docker run -v "/path/to/rimworld:/rimworld:ro" -v "/path/to/workshop:/workshop:ro" ghcr.io/cryptiklemur/rimworld-mcp-server:latest --rimworld-path=/rimworld --mod-dirs=/workshop --mod-concurrency=8
Features
- Parallel Processing: Optimized for speed with configurable concurrency
- Mod Loading: Automatic discovery and loading of Core, DLC, and specified mod directories
- Definition Parsing: Full XML definition parsing with type categorization
- Patch System: Complete patch application with conflict detection
- Reference Analysis: Dependency graph building and circular dependency detection
- Conflict Detection: Comprehensive mod conflict analysis
- Inheritance Resolution: Parent-child definition resolution
Tools Available
The MCP server provides the following tools:
getDef- Get specific definition by namegetDefsByType- Get all definitions of a specific typesearchDefs- Search definitions by contentgetDefsByMod- Get all definitions from a specific modgetReferences- Get reference information for a definitiongetDependencyChain- Get dependency chain for a definitiongetPatchHistory- Get patch history for a definitiongetConflicts- Get conflict informationgetPatchCoverage- Get patch coverage for a modsimulateModRemoval- Simulate the impact of removing a modsuggestLoadOrder- Get load order suggestionsgetModList- Get list of all loaded modsgetStatistics- Get server statistics
Performance
The server is optimized for large mod collections:
- Parallel mod loading: Up to 10x faster for many mods
- Parallel XML processing: 5-8x faster per mod
- Combined scanning: 50% reduction in file system operations
- Configurable concurrency: Tunable for your system
Development
Build the project:
npm run build
The compiled JavaScript will be in the dist/ directory.