Project Zomboid MCP Server
An AI-powered MCP server for Project Zomboid mod development, offering script validation, generation, and contextual assistance.
Project Zomboid MCP Server
A comprehensive Model Context Protocol (MCP) server for Project Zomboid mod development, providing intelligent script validation, generation, and contextual assistance through AI-enhanced tooling.
๐ Features
Smart Project Zomboid Integration
- Auto-detection of Steam, Epic Games, and GOG installations
- Cross-platform support (Windows, Linux, macOS, WSL)
- Build 42 compatibility with modern mod structure support
- Fallback system with local script parsing
Comprehensive Game Data Knowledge
- Complete vanilla game indexing with full-text search capabilities
- Rich metadata extraction including damage, durability, categories, and tags
- Relationship mapping between items, recipes, and dependencies
- Real-time reference validation against game database
Intelligent Script Generation
- Template-based generation using real game patterns
- Balance analysis comparing custom items to vanilla equivalents
- Reference validation ensuring all dependencies exist
- Multiple output formats (items, recipes, fixing scripts, sounds, vehicles)
Advanced Validation Engine
- Real-time syntax validation with detailed error reporting
- Reference checking for items, sounds, and sprites
- Balance analysis with gameplay impact assessment
- Best practices suggestions for mod development
Deployment Ready
- Cloudflare Workers support for serverless deployment
- D1 Database integration for persistent storage
- HTTP API for integration with any MCP client
- Claude Desktop ready with example configurations
๐ง Installation
Prerequisites
- Node.js 18.0.0 or higher
- npm or yarn package manager
Local Development
# Clone the repository
git clone https://github.com/minimax/pz-mcp-server.git
cd pz-mcp-server
# Install dependencies
npm install
# Build the project
npm run build
# Run in development mode
npm run dev
Cloudflare Workers Deployment
# Install Wrangler CLI
npm install -g wrangler
# Login to Cloudflare
wrangler login
# Create D1 database
wrangler d1 create pz-mcp-prod
# Deploy to Cloudflare Workers
wrangler deploy
๐ Usage
With Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"pz-mcp-server": {
"command": "node",
"args": ["/path/to/pz-mcp-server/dist/index.js"]
}
}
}
With Cursor/VSCode
The server can be integrated with any IDE that supports MCP protocol:
- Install the MCP extension for your IDE
- Configure the server endpoint
- Start using Project Zomboid development tools
๐ ๏ธ MCP Tools
search_vanilla
Search vanilla Project Zomboid content with intelligent matching.
Parameters:
query(string): Search query for game contenttype(string, optional): Filter by content type (item, recipe, sound, vehicle)category(string, optional): Filter by item categorylimit(number, optional): Maximum results (default: 20)
Example:
// Search for weapons
await mcp.callTool('search_vanilla', {
query: 'katana',
type: 'item',
category: 'Weapon'
});
generate_script
Generate balanced Project Zomboid scripts using templates and game data.
Parameters:
type(string): Script type (item, recipe, evolvedrecipe, fixing, sound, vehicle)name(string): Name of the item/recipe to generateproperties(object): Properties and specificationsmodule(string, optional): Module name (default: "Base")
Example:
// Generate a custom weapon
await mcp.callTool('generate_script', {
type: 'item',
name: 'SuperKatana',
properties: {
DisplayName: 'Super Katana',
Type: 'Weapon',
MaxDamage: 5.0,
Weight: 2.0,
Categories: 'LongBlade'
}
});
validate_script
Validate Project Zomboid script syntax and references with detailed error reporting.
Parameters:
content(string): Script content to validatetype(string, optional): Expected script typestrict(boolean, optional): Enable strict validation mode
Example:
// Validate mod script
await mcp.callTool('validate_script', {
content: scriptContent,
type: 'item',
strict: true
});
check_references
Validate item, sound, and sprite references against game database.
Parameters:
references(string[]): List of references to validatetype(string, optional): Type of references (item, sound, sprite, all)
Example:
// Check if items exist
await mcp.callTool('check_references', {
references: ['Base.Katana', 'Base.Apple'],
type: 'item'
});
analyze_mod
Comprehensive analysis of mod directory including balance, compatibility, and structure validation.
Parameters:
modPath(string): Path to mod directorycheckBalance(boolean, optional): Perform balance analysischeckCompatibility(boolean, optional): Check compatibility with vanillagenerateReport(boolean, optional): Generate detailed analysis report
Example:
// Analyze mod quality
await mcp.callTool('analyze_mod', {
modPath: '/path/to/my-mod',
checkBalance: true,
checkCompatibility: true
});
parse_game_files
Parse and index Project Zomboid game files to populate the database.
Parameters:
gamePath(string, optional): Path to Project Zomboid installation (auto-detected if not provided)forceReparse(boolean, optional): Force re-parsing even if data exists
Example:
// Parse vanilla game files
await mcp.callTool('parse_game_files', {
forceReparse: false
});
๐๏ธ Architecture
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ MCP Server Core โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Path Manager โ Enhanced Parser โ Script Gen โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ SQLite/D1 Database Layer โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ Game Data โ Templates โ Validation โ
โ (Vanilla PZ) โ (JSON-based) โ (Real-time) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
Core Components
- DatabaseManager: SQLite/D1 database with full-text search capabilities
- ProjectZomboidParser: Parse vanilla game files and mod directories
- ScriptGenerator: Generate balanced scripts using templates and game data
- ValidationEngine: Real-time syntax and reference validation
- ModAnalyzer: Comprehensive mod analysis and quality metrics
- PathManager: Auto-detection of Project Zomboid installations
๐ Cloudflare Workers Deployment
The server includes full Cloudflare Workers support for serverless deployment:
Features
- D1 Database for persistent storage
- KV Storage for caching frequently accessed data
- HTTP API endpoints for all MCP tools
- Automatic scaling with zero cold starts
- Global edge deployment for low latency
API Endpoints
GET /health- Health checkGET /mcp/info- Server capabilitiesPOST /tools/{toolName}- Execute MCP toolsPOST /admin/load-game-data- Load vanilla game data
Configuration
Update wrangler.toml with your database IDs:
[[env.production.d1_databases]]
binding = "DB"
database_name = "pz-mcp-prod"
database_id = "your-database-id"
๐ Development Workflow
Setting Up for Mod Development
-
Initialize Database:
npm run dev # Server will auto-detect Project Zomboid installation -
Parse Game Files:
await mcp.callTool('parse_game_files', {}); -
Start Development:
// Search for existing items const results = await mcp.callTool('search_vanilla', { query: 'weapon damage > 3' }); // Generate new item const script = await mcp.callTool('generate_script', { type: 'item', name: 'MyWeapon', properties: { /* ... */ } }); // Validate before use const validation = await mcp.callTool('validate_script', { content: script });
Supported File Formats
- mod.info: Mod metadata and configuration
- Script Files (.txt): Items, recipes, vehicles, sounds, fixing scripts
- Lua Files (.lua): Game logic and event handlers
- Assets: Textures, sounds, models, and maps
๐ Examples
Creating a Custom Weapon
// 1. Search for similar weapons
const similarWeapons = await mcp.callTool('search_vanilla', {
query: 'katana sword blade',
type: 'item'
});
// 2. Generate balanced weapon
const weaponScript = await mcp.callTool('generate_script', {
type: 'item',
name: 'EliteKatana',
properties: {
DisplayName: 'Elite Katana',
Type: 'Weapon',
Weight: 2.5,
MaxDamage: 4.5,
MinDamage: 3.5,
Categories: 'LongBlade',
Icon: 'Katana',
SwingSound: 'KatanaSwing'
}
});
// 3. Validate the script
const validation = await mcp.callTool('validate_script', {
content: weaponScript,
strict: true
});
// 4. Check references exist
await mcp.callTool('check_references', {
references: ['Katana', 'KatanaSwing'],
type: 'all'
});
Analyzing Mod Quality
const analysis = await mcp.callTool('analyze_mod', {
modPath: '/path/to/my-zombie-mod',
checkBalance: true,
checkCompatibility: true,
generateReport: true
});
console.log(`Mod Quality Score: ${analysis.quality.overall}/100`);
console.log(`Issues Found: ${analysis.issues.length}`);
console.log(`Recommendations: ${analysis.recommendations.join(', ')}`);
๐ค Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests for new functionality
- Submit a pull request
๐ License
MIT License - see the LICENSE file for details.
๐ Support
- GitHub Issues: Bug reports and feature requests
- Documentation: Comprehensive guides and API references
- Community: Discord server for mod developers
๐ฎ Roadmap
v1.1.0 - Enhanced Features
- Vehicle script support with complete parsing and generation
- Advanced templates for complex modding scenarios
- Lua script integration for game logic assistance
- Performance optimization tools for large mods
v1.2.0 - Collaboration Features
- Multi-user support for team mod development
- Version control integration with Git workflows
- Automated testing pipelines for mod validation
- Documentation generation from mod analysis
v2.0.0 - Full Platform
- Web interface for non-technical users
- Steam Workshop integration for direct publishing
- Marketplace features for mod discovery
- Enterprise support for large mod teams
Built with โค๏ธ for the Project Zomboid modding community
Related Servers
Scout Monitoring MCP
sponsorPut performance and error data directly in the hands of your AI assistant.
Alpha Vantage MCP Server
sponsorAccess financial market data: realtime & historical stock, ETF, options, forex, crypto, commodities, fundamentals, technical indicators, & more
Digma
A code observability MCP enabling dynamic code analysis based on OTEL/APM data to assist in code reviews, issues identification and fix, highlighting risky code etc.
Google Tag Manager
Integrates Google Tag Manager to automate GTM configuration and component creation through natural language prompts.
KiCad MCP Server
An MCP server for KiCad providing project management, PCB design analysis, BOM management, and design rule checking.
Homebrew MCP
Interact with Homebrew (the package manager for macOS and Linux) using natural language commands.
WTP - Worktree Plus
Let agents manage Git worktrees via the wtp CLI.
Django MCP Server
A Django extension to enable AI agents to interact with Django apps through the Model Context Protocol.
DeepInfra API
Provides a full suite of AI tools via DeepInfraโs OpenAI-compatible API, including image generation, text processing, embeddings, and speech recognition.
Replicate Flux MCP
Generate high-quality images and vector graphics using the Replicate API.
Yellhorn MCP
An MCP server that integrates Gemini 2.5 Pro and OpenAI models for software development tasks, allowing the use of your entire codebase as context.
Calva Backseat Driver
An MCP server for the Calva VS Code extension, allowing AI assistants to interact with a live Clojure REPL.