Depyler MCP Server
A Python-to-Rust transpiler with semantic verification and memory safety analysis that translates annotated Python code into idiomatic Rust, preserving program semantics and providing compile-time safety guarantees.
Get this MCP server
A Python-to-Rust transpiler with semantic verification and memory safety analysis that translates annotated Python code into idiomatic Rust, preserving program semantics and providing compile-time safety guarantees.
Installation
Cargo Install
cargo install depyler
Configuration
Claude Desktop
{
"mcpServers": {
"depyler": {
"command": "depyler",
"args": ["agent", "start", "--foreground", "--port", "3000"]
}
}
}
Available Tools
| Tool | Description |
|---|---|
transpile_python |
Convert Python code to Rust |
analyze_migration_complexity |
Analyze migration complexity |
verify_transpilation |
Verify semantic equivalence |
pmat_quality_check |
Code quality analysis |
Features
- One-command compilation from Python to standalone native binaries
- Type-driven transpilation using Python type annotations
- Memory safety analysis with ownership and borrowing pattern inference
- Semantic verification through property-based testing
- Support for 27 Python stdlib modules with 100% validation
- Custom Rust attributes via @rust.attr() decorators
- ArgumentParser support with clap derive macros
- Generator expression and function support
- Exception handling mapped to Result<T, E>
- Cross-platform compilation (Windows, Linux, macOS)
Usage Examples
Compile Python script to binary: depyler compile script.py
Transpile Python file to Rust: depyler transpile example.py
Analyze migration complexity: depyler analyze example.py
Verify transpilation with semantic checking: depyler transpile example.py --verify
Notes
Requires Rust 1.83.0 or higher and Python 3.8+ for test validation. Production-ready with 100% stdlib validation (27 modules, 151 tests passed). Current version v3.20.0 with core compile command functionality.