pzmcp

wink-/pzmcp

3.1

If you are the rightful owner of pzmcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

The Project Zomboid MCP Server is a Model Context Protocol server designed to enhance mod development for Project Zomboid through AI-assisted tools.

Tools
5
Resources
0
Prompts
0

Project Zomboid MCP Server

Project Zomboid MCP Server Python uv Claude

Intelligent script validation, generation, and contextual assistance for Project Zomboid mod development

Transform your modding workflow with AI-enhanced tooling

šŸš€ Overview

The Project Zomboid MCP Server is a comprehensive Model Context Protocol server that revolutionizes Project Zomboid mod development. It provides intelligent script validation, generation, and contextual assistance through AI-enhanced tooling, making modding accessible to developers of all skill levels.

✨ Key Features

  • šŸ” 2,700+ Vanilla Items - Complete searchable database with full-text search
  • šŸŽÆ Smart Auto-Detection - Automatically finds your Project Zomboid installation
  • ⚔ Lightning Fast Setup - One-command installation with uv package manager
  • šŸ¤– Claude Desktop Integration - Seamless AI-assisted development
  • āœ… Real-time Validation - Syntax checking and reference validation
  • šŸ› ļø Script Generation - Template-based creation with balanced stats
  • šŸ”§ WSL Compatible - Perfect for Windows developers

šŸŽ® What It Does

Transform your modding experience:

"Use the Project Zomboid MCP to find me a crowbar"
→ Returns: Crowbar item with damage: 1.0, durability: 10, categories: Blunt;Improvised

"Create a steel katana with 2.5 damage and high durability"  
→ Generates: Complete Project Zomboid script with balanced stats

"Validate this script for syntax errors"
→ Analyzes: Line-by-line validation with specific error locations

šŸš€ Quick Start

Windows Users (WSL Recommended)

# Install WSL (PowerShell as admin)
wsl --install

# Clone and setup (in WSL Ubuntu terminal)
git clone https://github.com/your-username/pzmcp.git
cd pzmcp
curl -LsSf https://astral.sh/uv/install.sh | sh && source ~/.bashrc
uv sync && uv run python -c "from mcp_server.core.enhanced_data_extractor import extract_with_path_manager; extract_with_path_manager(comprehensive=True)"

šŸ“– Complete setup guide: | šŸ¤– Claude integration:

Linux/macOS Users

git clone https://github.com/your-username/pzmcp.git && cd pzmcp
curl -LsSf https://astral.sh/uv/install.sh | sh
uv sync && uv run python -c "from mcp_server.core.enhanced_data_extractor import extract_with_path_manager; extract_with_path_manager(comprehensive=True)"

šŸ”§ Usage Examples

With Claude Desktop (Recommended)

Once configured, simply chat with Claude:

"Use the Project Zomboid MCP to find me a crowbar"
"Create a steel katana with 2.5 damage and high durability"  
"Validate this Project Zomboid script for syntax errors"

Command Line Interface

# Search items directly
uv run python -c "import sqlite3; conn = sqlite3.connect('mcp_data.db'); cursor = conn.cursor(); cursor.execute('SELECT item_name, display_name FROM items_fts WHERE display_name MATCH \"baseball bat\"'); [print(f'{item[0]}: {item[1]}') for item in cursor.fetchall()]"

# Run MCP server for testing
uv run python run_server.py

šŸ—ļø Architecture

ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”
│                MCP Server Core                      │
ā”œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¤
│  Path Manager  │  Enhanced Parser  │  Script Gen    │
ā”œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¤
│          SQLite FTS5 Database Layer                 │
ā”œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¤
│  Game Data     │  Templates       │  Validation     │
│  (2,700+ items)│  (JSON-based)   │  (Real-time)    │
ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜

Data Pipeline

Project Zomboid Installation
        ↓
Path Manager (Auto-detection)
        ↓  
Enhanced Data Extractor
        ↓
SQLite FTS5 Database
        ↓
MCP Tools & Claude Integration

šŸ› ļø MCP Tools Available

When integrated with Claude Desktop, you get access to:

ToolPurposeExample Usage
search_vanillaFind vanilla game items"Find all melee weapons with damage > 2.0"
generate_scriptCreate new item/recipe scripts"Generate a tactical knife with spear attachment"
validate_scriptCheck syntax and references"Validate this weapon script for errors"
check_referencesVerify item dependencies"Check if all referenced items exist"
analyze_modComprehensive mod analysis"Analyze my mod for balance issues"

šŸŽÆ Real-World Examples

Item Research

User: "Find me all the different types of axes in Project Zomboid"
Claude: Using the Project Zomboid MCP to search for axes...
→ Returns: HandAxe, WoodAxe, AxeStone, FireAxe with full stats

Balanced Script Creation

User: "Create a reinforced crowbar that's better than normal but not overpowered"
Claude: Analyzing vanilla crowbar stats and generating balanced alternative...
→ Creates: Complete item script with appropriate damage/durability increases

Recipe Development

User: "Make a recipe to craft the reinforced crowbar using a normal crowbar and steel"
Claude: Generating craftRecipe with proper skill requirements...
→ Produces: Balanced recipe requiring Metalworking skill and appropriate materials

šŸ“ Project Structure

pzmcp/
ā”œā”€ā”€ mcp_server/           # Core MCP server implementation
│   ā”œā”€ā”€ core/            # Database, extraction, path management
│   ā”œā”€ā”€ parsers/         # Script parsers for items/recipes/vehicles
│   └── templates/       # JSON templates for script generation
ā”œā”€ā”€ media/scripts/       # Project Zomboid script files (copied)
ā”œā”€ā”€ docs/               # Documentation and guides
│   ā”œā”€ā”€ WINDOWS_SETUP.md
│   ā”œā”€ā”€ CLAUDE_DESKTOP_INTEGRATION.md
│   └── CHANGELOG.md
ā”œā”€ā”€ pz_path_manager.py  # Smart PZ installation detection
ā”œā”€ā”€ pyproject.toml      # Modern Python packaging
└── README.md          # This file

⚔ Performance

  • šŸš€ 10-100x faster dependency management with uv
  • ⚔ Sub-second search across 2,700+ items
  • šŸ’¾ Efficient storage using SQLite FTS5
  • šŸ”„ Auto-detection of Project Zomboid installations
  • šŸ“± Lightweight - works on modest hardware

šŸ”§ Advanced Configuration

Custom Project Zomboid Paths

# Add custom installation path
uv run python pz_path_manager.py --add "my_pz" "C:\Custom\ProjectZomboid\media\scripts" 1

Multiple Environments

Configure different Claude Desktop environments for development vs production mods.

Debug Mode

# Run with debug logging
uv run python run_server.py --debug

šŸ¤ Contributing

We welcome contributions! Here's how to get started:

  1. Fork the repository
  2. Create a feature branch: git checkout -b feature/amazing-feature
  3. Make your changes and add tests
  4. Run the linter: uv run ruff check .
  5. Submit a pull request

Development Setup

git clone https://github.com/your-username/pzmcp.git
cd pzmcp
uv sync --dev  # Install with development dependencies
uv run pytest  # Run tests

šŸ“š Documentation

  • - Complete WSL installation and configuration
  • - AI assistant setup
  • - Version history and features
  • - Product requirements and architecture

šŸ› Troubleshooting

Common Issues

MCP Server won't start?

  • Check WSL is installed and running
  • Verify paths in Claude Desktop config
  • Ensure database has been populated

Database empty?

  • Run data extraction: uv run python -c "from mcp_server.core.enhanced_data_extractor import extract_with_path_manager; extract_with_path_manager()"
  • Check Project Zomboid installation path

Claude Desktop can't connect?

  • Restart Claude Desktop completely after config changes
  • Check JSON syntax in MCP configuration
  • Verify WSL paths are correct

Get Help

  • GitHub Issues: Bug reports and feature requests
  • Documentation: Comprehensive guides for setup and usage
  • Community: Discord servers for Project Zomboid modding

šŸ“œ License

This project is licensed under the MIT License - see the file for details.

šŸ™ Acknowledgments

  • The Indie Stone - For creating Project Zomboid and making it so moddable
  • Anthropic - For Claude and the MCP protocol
  • Project Zomboid Modding Community - For inspiration and feedback
  • Contributors - Everyone who helps improve this tool

šŸš€ Roadmap

v0.3.0 - Advanced Features

  • Complete vehicle script support
  • Advanced template system
  • Lua script integration
  • Performance optimization tools

v1.0.0 - Production Ready

  • GUI interface for non-technical users
  • Steam Workshop integration
  • Automated testing pipelines
  • Enterprise support for mod teams

Transform your Project Zomboid modding workflow today!

• •

Made with ā¤ļø for the Project Zomboid modding community