by hyunjae-labs
xlwings Excel: Manipulate Excel files without installing Excel. 30+ tools for workbooks, data ops, formatting, formulas,
Creates and manipulates Excel files without needing Microsoft Excel installed, using the xlwings library with 30+ automation tools.
xlwings Excel is a community-built MCP server published by hyunjae-labs that provides AI assistants with tools and capabilities via the Model Context Protocol. xlwings Excel: Manipulate Excel files without installing Excel. 30+ tools for workbooks, data ops, formatting, formulas, It is categorized under productivity, developer tools.
You can install xlwings Excel in your AI client of choice. Use the install panel on this page to get one-click setup for Cursor, Claude Desktop, VS Code, and other MCP-compatible clients. This server runs locally on your machine via the stdio transport.
NOASSERTION
xlwings Excel is released under the NOASSERTION license.
Add new capabilities to Claude beyond text generation
Example
Access external data sources, execute code, interact with tools and services
Transform Claude from chatbot to action-taking agent
Provide Claude with access to relevant context and data
Example
Load project documentation, access knowledge bases, query databases
Get more accurate, context-aware responses
Automate multi-step workflows combining AI and external tools
Example
Research → Summarize → Create document → Send notification
Complete complex tasks end-to-end without manual steps
Share your MCP server with the developer community
xlwings Excel has been reliable for tool-calling workflows; the MCP profile page is a good permalink for internal docs.
xlwings Excel is a well-scoped MCP server in the explainx.ai directory — install snippets and categories matched our Claude Code setup.
According to our notes, xlwings Excel benefits from clear Model Context Protocol framing — fewer ambiguous “AI plugin” claims.
We wired xlwings Excel into a staging workspace; the listing’s GitHub and npm pointers saved time versus hunting across READMEs.
We wired xlwings Excel into a staging workspace; the listing’s GitHub and npm pointers saved time versus hunting across READMEs.
According to our notes, xlwings Excel benefits from clear Model Context Protocol framing — fewer ambiguous “AI plugin” claims.
xlwings Excel is a well-scoped MCP server in the explainx.ai directory — install snippets and categories matched our Claude Code setup.
xlwings Excel is among the better-indexed MCP projects we tried; the explainx.ai summary tracks the official description.
xlwings Excel is among the better-indexed MCP projects we tried; the explainx.ai summary tracks the official description.
We evaluated xlwings Excel against two servers with overlapping tools; this profile had the clearer scope statement.
showing 1-10 of 45
A robust Model Context Protocol (MCP) server for Excel automation using xlwings. This server provides comprehensive Excel file manipulation capabilities through a session-based architecture, designed for high-performance and reliable Excel operations.
pip install xlwings-mcp-server
git clone https://github.com/yourusername/xlwings-mcp-server.git
cd xlwings-mcp-server
pip install -e .
uv add xlwings-mcp-server
Start the MCP server:
xlwings-mcp-server
Or run directly:
python -m xlwings_mcp
# Example using MCP client
import mcp
# Open a workbook session
session_result = client.call_tool("mcp__xlwings-mcp-server__open_workbook", {
"filepath": "C:/path/to/your/file.xlsx",
"visible": False,
"read_only": False
})
session_id = session_result["session_id"]
# Write data
client.call_tool("mcp__xlwings-mcp-server__write_data_to_excel", {
"session_id": session_id,
"sheet_name": "Sheet1",
"data": [["Name", "Age", "Score"], ["Alice", 25, 95], ["Bob", 30, 87]]
})
# Apply formulas
client.call_tool("mcp__xlwings-mcp-server__apply_formula", {
"session_id": session_id,
"sheet_name": "Sheet1",
"cell": "D2",
"formula": "=B2+C2"
})
# Create chart
client.call_tool("mcp__xlwings-mcp-server__create_chart", {
"session_id": session_id,
"sheet_name": "Sheet1",
"data_range": "A1:C3",
"chart_type": "column",
"target_cell": "E1"
})
# Close session
client.call_tool("mcp__xlwings-mcp-server__close_workbook", {
"session_id": session_id
})
# Session management
EXCEL_MCP_SESSION_TTL=600 # Session TTL in seconds (default: 600)
EXCEL_MCP_MAX_SESSIONS=8 # Maximum concurrent sessions (default: 8)
EXCEL_MCP_DEBUG_LOG=1 # Enable debug logging (default: 0)
# Excel settings
EXCEL_MCP_VISIBLE=false # Show Excel windows (default: false)
EXCEL_MCP_CALC_MODE=automatic # Calculation mode (default: automatic)
{
"name": "xlwings-mcp-server",
"version": "1.0.0",
"transport": {
"type": "stdio"
},
"tools": {
"prefix": "mcp__xlwings-mcp-server__"
}
}
open_workbook(filepath, visible=False, read_only=False): Create new sessionclose_workbook(session_id): Close session and save workbooklist_workbooks(): List active sessionsforce_close_workbook_by_path(filepath): Force close by file pathwrite_data_to_excel(session_id, sheet_name, data, start_cell=None)read_data_from_excel(session_id, sheet_name, start_cell=None, end_cell=None)apply_formula(session_id, sheet_name, cell, formula)validate_formula_syntax(session_id, sheet_name, cell, formula)create_worksheet(session_id, sheet_name)copy_worksheet(session_id, source_sheet, target_sheet)rename_worksheet(session_id, old_name, new_name)delete_worksheet(session_id, sheet_name)format_range(session_id, sheet_name, start_cell, **formatting_options)create_chart(session_id, sheet_name, data_range, chart_type, target_cell)create_table(session_id, sheet_name, data_range, table_name=None)merge_cells(session_id, sheet_name, start_cell, end_cell)unmerge_cells(session_id, sheet_name, start_cell, end_cell)copy_range(session_id, sheet_name, source_start, source_end, target_start)delete_range(session_id, sheet_name, start_cell, end_cell)The server implements a sophisticated session management system:
# Run all tests
python -m pytest test/
# Run specific test categories
python -m pytest test/test_session.py # Session management
python -m pytest test/test_functions.py # MCP function tests
python -m pytest test/test_integration.py # Integration tests
The project maintains 100% test coverage for:
git checkout -b feature/amazing-feature)git commit -m 'Add amazing feature')git push origin feature/amazing-feature)git clone https://github.com/yourusername/xlwings-mcp-server.git
cd xlwings-mcp-server
uv venv
uv sync
uv run python -m xlwings_mcp
See CHANGELOG.md for detailed version history.
Excel COM Error: Ensure Excel is properly installed and not running in safe mode
# Check Excel installation
excel --version
Session Not Found: Verify session hasn't expired (default TTL: 10 minutes)
# List active sessions
client.call_tool("mcp__xlwings-mcp-server__list_workbooks")
Permission Denied: Run with appropriate file system permissions
# Windows: Run as administrator if needed
Enable detailed logging:
export EXCEL_MCP_DEBUG_LOG=1
xlwings-mcp-server
This project is licensed under the MIT License - see the LICENSE file for details.
Made with ❤️ for the Excel automation community
Prerequisites
Time Estimate
15-60 minutes depending on server complexity
Steps
Troubleshooting
✓ Do
✗ Don't
💡 Pro Tips
Architecture
Model Context Protocol standardizes how AI hosts (Claude, Cursor) communicate with external tools and data sources through server implementations.
Protocols
Compatibility
✓ Use when
Use when you need Claude to access external data, execute actions, or integrate with tools. Best for extending AI capabilities beyond conversation.
✗ Avoid when
Avoid when native integrations exist (use official APIs directly), for real-time critical systems, or when security/compliance requires zero external dependencies.