Skip to main content

Excel MCP Server

High-performance Model Context Protocol (MCP) server for programmatic Excel (.xlsx) spreadsheet generation and manipulation

PyPI Version Python Version uv CodeQL Security Policy Rules for AI License MCP Compatible

Excel MCP Server (excel-mcp, PyPI: luiccian-excel-mcp) is a high-performance Python server implementing the Model Context Protocol (MCP) to provide advanced, token-optimized Excel spreadsheet (.xlsx) creation, batch synthesis, formula automation, and inspection capabilities for AI assistants (Claude, Cursor, Copilot, Cline).

Designed from the ground up for maximum token efficiency, it replaces chatty micro-iterations with single-pass workbook construction—saving over 90% of model tokens and conversational turns.


Key Architectural Highlights

  • Single-Pass Workbook Builder: Create complete, multi-sheet, publication-ready workbooks (title banners, table headers, alternating row colors, accounting borders, auto-calculated totals, currency formatting, and native charts) in one single MCP call (excel_build_workbook).
  • Visual Design Presets: Built-in typography and visual standards (corporate, financial, modern, compact).
  • Lightweight Outline Inspection: Extract sheet names, populated dimensions (A1:H50), column headers, and formula summaries without dumping massive cell grids (excel_get_workbook_outline), saving thousands of context tokens.
  • Batch Data Ingestion: Append or overwrite 2D matrices of values into existing sheets in a single atomic operation (excel_batch_write_data).
  • Formula & Analytics Engine: Apply validated formulas (SUM, AVERAGE, VLOOKUP), generate native bar/line/pie charts, and build analytical pivot tables.
  • Zero-Install Execution: Instant launch with uvx luiccian-excel-mcp.

No manual clone or virtual environment management required. You can run the server directly using uv:

# Run with stdio transport (default for AI IDEs)
uvx luiccian-excel-mcp

MCP Client Configuration

1. Claude Desktop

Add this configuration to your claude_desktop_config.json:

{
  "mcpServers": {
    "excel-mcp": {
      "command": "uvx",
      "args": ["luiccian-excel-mcp"],
      "env": {
        "MCP_ALLOWED_DIRECTORIES": "/path/to/your/spreadsheets"
      }
    }
  }
}

2. Cursor (.cursor/mcp.json)

{
  "mcpServers": {
    "excel-mcp": {
      "command": "uvx",
      "args": ["luiccian-excel-mcp"],
      "env": {
        "MCP_ALLOWED_DIRECTORIES": "${workspaceFolder}"
      }
    }
  }
}

Visual Design Presets

Preset Header Fill Header Text Zebra Row Fill Typography Borders / Totals Best For
corporate (Default) Navy Blue (#1F4E79) White Ice Blue (#EDF2F8) Calibri 11pt Thin gray, soft blue total Business proposals, management reports, executive summaries
financial Forest Green (#1E4620) White Pale Mint (#F0F6F1) Calibri 11pt, currency format Double bottom line on totals Balance sheets, P&L statements, budgeting, cash flow
modern Slate / Charcoal (#2F3542) White Cool Gray (#F8F9FA) Segoe UI 10.5pt Minimalist soft borders SaaS metrics, tech product analytics, modern dashboards
compact Steel Gray (#4A6572) White Off-White (#F5F5F5) Arial 9.5pt Dense grid, high data density Inventory lists, master catalogs, high-volume exports

Modular Agent Skills

The repository includes pre-built agent skills under skills/:

  • excel-spreadsheet-creator: Direct single-pass synthesis for reports, budgets, and financial statements.
  • excel-spreadsheet-editor: Lightweight structural inspection, atomic batch matrix writes, formatting, and pivot tables.
  • excel-spreadsheet-analyzer: Context-efficient sampling, formula verification, and structural auditing.

Tool Taxonomy

All tools support both canonical excel_ prefixes and legacy names for 100% backward compatibility:

Category Primary Tool Description
Batch / Single-Pass excel_build_workbook Build full multi-sheet workbooks with styles, formulas, and charts in 1 call
excel_get_workbook_outline Lightweight outline inspection without loading entire cell matrices
excel_batch_write_data Write 2D matrix of values or formulas into a sheet range atomically
Workbook Operations excel_create_excel_workbook Create a new Excel workbook file
excel_create_excel_worksheet Add a new worksheet to a workbook
excel_list_excel_documents List available Excel files in allowed directories
excel_copy_worksheet Duplicate a worksheet within a workbook
excel_delete_worksheet Delete a worksheet
excel_rename_worksheet Rename an existing worksheet
excel_get_workbook_metadata Retrieve sheet names, active sheet, and file size
Content & Ranges excel_read_data_from_excel Read specific cell range data
excel_write_data_to_excel Write individual cell values
excel_copy_range Copy cells, formats, and formulas across ranges
excel_delete_range Delete range of cells
excel_merge_cells Merge cell ranges
excel_unmerge_cells Unmerge cell ranges
Formatting excel_format_range_excel Apply custom fonts, fills, borders, alignments, and number formats
Formulas excel_apply_formula_excel Apply calculation formulas to cells
excel_validate_formula_syntax Validate formula syntax before applying
Graphics & Analytics excel_create_chart Generate native bar, line, or pie charts from data
excel_create_pivot_table Create analytical pivot tables

Security

  • Restricted Directories: Access is strictly limited to paths listed in MCP_ALLOWED_DIRECTORIES (or DIRECTORY).
  • Formula Sanitization: Formula inputs are validated to avoid dangerous injection patterns.
  • Trusted Publishing: Automated PyPI releases use GitHub Actions OIDC and PEP 740 artifact attestation.

Development

# Clone the repository
git clone https://github.com/LuiccianDev/excel-mcp.git
cd excel-mcp

# Install dependencies with Astral uv
uv sync --all-groups

# Run linting
uv run ruff check src

# Run test suite
uv run pytest

License

This project is licensed under the MIT License.

Metadata

Release files for luiccian-excel-mcp 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for luiccian-excel-mcp 2.0.0
File Size Uploaded Provenance Actions
luiccian_excel_mcp-2.0.0.tar.gz 86.7 kB Without provenance Details for luiccian_excel_mcp-2.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for luiccian-excel-mcp 2.0.0
File Interpreter ABI Platform Actions
luiccian_excel_mcp-2.0.0-py3-none-any.whl Python 3 none any Details for luiccian_excel_mcp-2.0.0-py3-none-any.whl

Total release size: 201.6 kB

Release files / luiccian_excel_mcp-2.0.0.tar.gz

Download URL luiccian_excel_mcp-2.0.0.tar.gz
Size 86.7 kB
Tags Source
SHA-256 checksum
How to use checksums
97a5c333dda308cf2d8daf9889265672a8d61d44e19884d76f243617bfe835d2
BLAKE2b-256 checksum
How to use checksums
4afbe6836410390246011249c6a7183e43b3fbb0001a947cbffd4253cd92628e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / luiccian_excel_mcp-2.0.0-py3-none-any.whl

Download URL luiccian_excel_mcp-2.0.0-py3-none-any.whl
Size 114.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9e0e364f3159cab894393225183eb167c6ac58ac081b11d970722702c97b5641
BLAKE2b-256 checksum
How to use checksums
efa0a854bd545db125243386a32b745fa58416c5493501e11004ab9c649fda85
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for luiccian-excel-mcp 2.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page