Integrated with Prometheus for visualization and monitoring of server metrics, providing dashboards for real-time performance analytics.
Utilized for high-performance scientific computing operations, particularly for world generation algorithms and efficient terrain manipulation.
Employed for high-performance data operations, enhancing server analytics and data processing capabilities.
Acts as the primary production database, offering configurable connection pooling, transactional world saving, and efficient data management for player and world data.
Provides real-time server metrics through a dedicated port, enabling monitoring of server performance statistics like TPS, memory usage, online players, and loaded chunks.
Integrated for advanced scientific computing capabilities, supporting world generation and complex mathematical operations.
Provides ORM capabilities for database interactions, enabling efficient player data management, world persistence, and structured queries.
Provides lightweight database functionality as a default option, with configurable journal modes and synchronization options for world data storage.
MCPy: High-Performance Minecraft Server Engine
MCPy is a next-generation, ultra-optimized Minecraft server engine powered by Python, Cython, and advanced scientific computing libraries. Our mission is to deliver exceptional performance and flexibility, making Minecraft server development both accessible and future-proof.
Note:
MCPy is under active development and is not yet feature-complete. The codebase contains known errors and is unstable. We welcome your bug reports and contributions to help us reach our goals faster!
🚧 Project Status
- The project is incomplete and contains known issues.
- Major features are under active development; the codebase is unstable.
- We highly value contributions and bug reports from the community.
🚀 Features at a Glance
- Cython-Accelerated Core: Event-driven server engine approaching C-level performance.
- Scientific Computing Backbone: Integrates NumPy, SciPy, and Polars for high-efficiency operations.
- Zero-Overhead Networking: Asynchronous, non-blocking, protocol-optimized networking.
- Sophisticated Entity System: Efficient, extensible entity management with advanced AI support.
- Robust Persistence Layer: Powered by PostgreSQL and SQLAlchemy ORM for reliable data storage.
- Comprehensive Benchmarking: Built-in performance analytics and profiling tools.
- Extensible Plugin Framework: Easily add server modifications.
- Real-Time Monitoring: Prometheus & Grafana integration for live metrics.
📐 Architecture Overview
MCPy is modular, with five high-performance core components:
server_core.pyx
- Event-driven request handling
- Adaptive, high-precision tick system
- Dynamic worker thread pool management
- Real-time performance profiling
world_engine.pyx
- Procedural terrain generation with multi-octave noise and advanced biomes
- Multi-threaded chunk generation & memory-efficient terrain storage
network_core.pyx
- Zero-copy packet serialization and protocol-level compression
- Robust connection pooling & DDoS mitigation
entity_system.pyx
- Spatial hash-based entity tracking and multi-threaded physics
- Modular AI behavior trees
persistence
- SQLAlchemy ORM for PostgreSQL/SQLite
- Efficient chunk serialization and transactional world state
📊 Performance Goals
Metric | Target Value |
---|---|
Scalability | 20 TPS with 100+ concurrent players |
Memory Usage | <2 GB for 10,000 chunks |
Latency | <50 ms per player action |
Reliability | 100% test coverage for core modules |
Throughput | 10,000+ entity updates per tick |
⚙️ Technical Highlights
Cython & Performance
- Static typing (
cdef
) and aggressive compiler directives - Direct NumPy buffer access and pointer arithmetic
- Multi-threaded parallelism via thread pools
Entity System
- Hierarchical, component-based design
- O(1) spatial partitioning via custom memory pools
- Adaptive Level-of-Detail (LOD) entity management
World Generation
- Multi-octave Perlin/Simplex noise
- Voronoi-based biome transitions
- Erosion, cave, and structure algorithms
- 10x chunk compression for storage efficiency
📦 Installation
Prerequisites
- Python 3.9+ (3.11+ recommended)
- Modern C++ compiler (VS 2019+ / GCC 9+)
- PostgreSQL 13+ (for production)
- Minimum 8 GB RAM (16 GB recommended)
Quick Setup
Manual Installation
🚀 Running the Server
Command Line Options
Option | Description |
---|---|
--config PATH | Path to TOML config file |
--world PATH | World directory |
--port NUMBER | Network port (default: 25565) |
--max-players NUMBER | Max players (default: 20) |
--view-distance NUMBER | Chunk view distance (default: 10) |
--performance-mode | Extra performance optimizations |
--debug | Enable debug mode |
--log-level LEVEL | Set log level (default: info) |
--backup | Enable automatic backups |
🗄️ Database Configuration
SQLite (Default)
PostgreSQL (Production)
💾 Persistence Features
- Transactional World Saving
- Efficient Chunk Serialization
- Player Data Management
- Intelligent Auto-saving: Only modified chunks/entities are saved
- Automated Backups: Configurable intervals & retention
🧪 Development & Testing
Performance Tuning Examples
- Entity System
- World Engine
- Network Optimization
🔧 Advanced Features
Plugin System
Add custom commands and behaviors easily:
Real-time Monitoring
Integrated Prometheus/Grafana support:
AI Entity Behaviors
Flexible, behavior-tree-driven AI:
🗺️ Roadmap
Short-Term
- Entity collision system
- Crafting & inventory management
- Basic combat mechanics
- World generation optimization
Medium-Term
- Multi-world support & portals
- Custom block behaviors
- Enhanced mob AI
- In-game scripting API
Long-Term
- Distributed server architecture
- Machine learning-driven mob AI
- Real-time ray-traced lighting
- Custom physics engine
🤝 Contributing
We welcome your contributions! Please see our Contributing Guide to get started:
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to your branch (
git push origin feature/amazing-feature
) - Open a Pull Request
📄 License
This project is licensed under the MIT License. See the LICENSE file for details.
This server cannot be installed
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
A next-generation Minecraft server engine built with Python and Cython, aiming to deliver exceptional performance and flexibility through advanced scientific computing libraries and optimized architecture.
Related MCP Servers
- -securityFlicense-qualityThis is an MCP server that facilitates building tools for interacting with various APIs and workflows, supporting Python-based development with potential for customizable prompts and user configurations.Last updated -Python
- -securityAlicense-qualityA Model Context Protocol server that enables seamless execution of commands, Python code, web content fetching, and reusable task management with secure credentials handling.Last updated -2PythonMIT License
- -securityFlicense-qualityA server implementation that enables remote Python code execution in Unreal Engine environments, featuring automatic Unreal node discovery and management through a multicast network.Last updated -2Python
- AsecurityAlicenseAqualityA Minecraft MCP Server powered by Mineflayer API. It allows to control a Minecraft character in real-time, allowing AI assistants to build structures, explore the world, and interact with the game environment through natural language instructionLast updated -14131TypeScriptApache 2.0