π¦
Excel VBA Macro Converter Python 2
A Model Context Protocol (MCP) server built with FastMCP that converts Excel files containing VBA macros into equivalent Python code.
0 installs
Trust: 34 β Low
Devtools
Ask AI about Excel VBA Macro Converter Python 2
Powered by Claude Β· Grounded in docs
I know everything about Excel VBA Macro Converter Python 2. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Loading tools...
Reviews
Documentation
Excel VBA to Python Converter using FastMCP
A Model Context Protocol (MCP) server built with FastMCP that converts Excel files containing VBA macros into equivalent Python code.
Features
- π Convert VBA macros to Python code
- π Extract Excel data and structure
- π Generate clean, readable Python code
- π οΈ Support for common VBA constructs
- π Batch processing capabilities
- π Code analysis and optimization suggestions
Installation
- Clone the repository:
git clone <repository-url>
cd python-mcp-vba-conversion
- Create a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
- Install dependencies:
pip install -r requirements.txt
Usage
As MCP Server
Start the FastMCP server:
python src/mcp_server.py
Standalone Usage
Convert a single Excel file:
python src/converter.py path/to/your/file.xlsm
Convert multiple files:
python src/batch_converter.py path/to/excel/files/
Project Structure
python-mcp-vba-conversion/
βββ src/
β βββ mcp_server.py # FastMCP server implementation
β βββ converter.py # Main VBA to Python converter
β βββ vba_parser.py # VBA code parsing utilities
β βββ python_generator.py # Python code generation
β βββ excel_extractor.py # Excel file processing
β βββ batch_converter.py # Batch processing utilities
βββ tests/
β βββ test_converter.py
β βββ test_vba_parser.py
β βββ sample_files/
βββ examples/
β βββ sample_macro.xlsm
β βββ converted_output.py
βββ requirements.txt
βββ setup.py
βββ README.md
MCP Tools Available
convert_vba_file: Convert a single Excel file with VBAextract_vba_code: Extract VBA code from Excel fileanalyze_vba_complexity: Analyze VBA code complexitybatch_convert_files: Convert multiple Excel filesgenerate_python_equivalent: Generate Python code from VBA
Examples
See the examples/ directory for sample Excel files and their Python conversions.
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests
- Submit a pull request
License
MIT License
