Dynamic Excel MCP Server
Dynamic Excel file generation server using Model Context Protocol (MCP). This server allows LLMs to automatically create Excel files with any structure through dynamic JSON schemas.
๐ Features
โ Generate Excel files from JSON schemas
โ Dual transport modes: Local (stdio) and Remote (HTTP/SSE)
โ Deploy anywhere: VPS, Cloud (AWS, GCP, Heroku), Docker
โ Multiple sheets support
โ Advanced formatting (styling, borders, colors)
โ Data validation and conditional formatting
โ Formulas and calculations
โ Charts support (limited)
โ Page setup and printing options
โ S3 and local file storage
โ Presigned URLs for secure downloads
โ Freeze panes, auto-filter
โ Merged cells and row grouping
โ API key authentication
โ CORS support for web clients
๐ฆ Installation
โ๏ธ Configuration
Create a .env file (copy from .env.example):
For Local (Stdio) Mode:
For Remote (HTTP/SSE) Mode:
๐ง Usage
๐ฅ๏ธ Local Mode (Stdio) - For Claude Desktop
Add to your Claude Desktop or MCP client configuration:
For macOS (~/Library/Application Support/Claude/claude_desktop_config.json):
For Windows (%APPDATA%\Claude\claude_desktop_config.json):
๐ Remote Mode (HTTP/SSE) - For Web Apps & Remote Access
Start the server:
Server endpoints:
Example client usage:
See examples/client-example.ts for a complete TypeScript client example using the MCP SDK.
Deployment options:
๐ณ Docker: See
DEPLOYMENT.mdfor Dockerfile and docker-compose examplesโ๏ธ Cloud: Deploy to AWS, GCP, Heroku, etc.
๐ง VPS: Use PM2, systemd, or other process managers
๐ Production: Enable API key auth, configure CORS, use HTTPS
๐ Full deployment guide: See DEPLOYMENT.md
Tool: generate_excel
The server provides one tool: generate_excel
Input Schema:
๐ JSON Schema Structure
Column Configuration
Supported Column Types
text: Plain textnumber: Numeric valuescurrency: Currency formatpercentage: Percentage formatdate: Date formatdatetime: Date and time formatboolean: Boolean valuesformula: Excel formulas
Formatting Options
๐ Examples
1. Simple Data Table
See: examples/01-simple-table.json
Creates a basic product table with formatting:
Freeze panes
Auto-filter
Currency formatting
2. Financial Report
See: examples/02-financial-report.json
Advanced report with:
Report layout with title
Conditional formatting
Percentage calculations
Formula totals
3. Employee Database
See: examples/03-employee-database.json
Employee management spreadsheet with:
Multiple column types
Date formatting
Currency display
Auto-filter
4. Multi-Sheet Report
See: examples/04-multi-sheet-report.json
Comprehensive report with:
Multiple sheets
Summary and detail views
Cross-sheet consistency
๐จ Development
๐งช Testing with MCP Inspector
Test the server using the MCP Inspector:
๐ฏ Use Cases
Data Export: Export database queries to formatted Excel files
Financial Reports: Generate quarterly/annual financial statements
Inventory Management: Create product catalogs and stock reports
HR Management: Employee databases and payroll reports
Sales Analytics: Sales reports with charts and conditional formatting
Project Tracking: Project status reports with multiple sheets
๐๏ธ Architecture
๐ Security Notes
For S3 storage, ensure proper IAM permissions
Use presigned URLs for temporary file access
Set appropriate expiry times for download links
Validate all user inputs through Zod schemas
๐ License
MIT
๐ค Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
๐ง Support
For issues and questions, please open an issue on GitHub.
๐ Acknowledgments
Built with:
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Tools
Enables LLMs to automatically generate Excel files with custom structures, advanced formatting, multiple sheets, formulas, and charts from JSON schemas, with support for both local and remote deployment.