excel-mcp-server
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@excel-mcp-serverOpen sales.xlsx and show me the totals from the Summary sheet"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
excel-mcp-server
Local Model Context Protocol (MCP) server that lets LLMs explore Excel workbooks. It combines:
ExcelJS — parses
.xlsx/.xlsmfiles (values, formulas, rich text, hyperlinks, dates).HyperFormula — an in-memory spreadsheet engine that re-evaluates every formula, so tools return the computed result rather than the value cached in the file.
The server speaks MCP over stdio, so it works with any MCP-compatible client: VS Code, Claude Desktop, Cursor, and custom agents.
License: GPL-3.0-or-later. HyperFormula is dual-licensed (GPL-3.0 or commercial); see NOTICE for details.
Intended use
This repository is a personal, educational proof-of-concept. Please read this section before reusing the code.
Do not:
Bundle this project inside a commercial software product.
Deploy this project as part of a paid SaaS offering.
Redistribute this project (or its binaries) under any license other than GPL-3.0-or-later.
Use this project as a substitute for a properly licensed HyperFormula commercial integration.
Why the caveat? HyperFormula (see the Credits section below) is dual-licensed. This project uses the open-source GPL-3.0 tier by passing licenseKey: 'gpl-v3' at engine construction. If you plan to embed HyperFormula in commercial or closed-source software, you must obtain a commercial license directly from Handsontable and use your commercial license key. Doing so is a requirement of HyperFormula's dual-licensing model, not a limitation of this repository.
Everything else in this repository (ExcelJS, MCP SDK, Zod, TypeScript, etc.) is MIT / Apache-2.0 licensed and free to reuse under those terms.
If your use case is purely personal exploration, learning, or open-source contribution back to a GPL-3.0-or-later project, you are welcome to use, fork, and modify this code freely.
Related MCP server: Excel Explorer
How this was built
This repository was scaffolded and iterated on with the help of an AI coding assistant (Anthropic's Claude, via GitHub Copilot's agent mode in VS Code). The design decisions, dependency choices, licensing posture, and architectural trade-offs were driven by the author; the assistant contributed code generation, test scaffolding, and documentation drafting under human review. All committed code has been read and vetted by a human before landing.
Features
The server exposes 10 read-only tools that cover the common "explore this spreadsheet" workflow:
Tool | Purpose |
| Load a local |
| List all workbooks currently loaded in the session. |
| Enumerate sheets with row/column counts. |
| Dimensions, header row heuristic, per-column type inference, sample. |
| Read a rectangular A1 range with computed values and optional formulas. |
| Value + formula + cell type + number format for a single cell. |
| Evaluate an arbitrary Excel formula against the loaded workbook. |
| Substring / regex search across all sheets (values and formulas). |
| Aggregate counts (non-empty, formulas, errors) per sheet and overall. |
| Release memory held by a workbook. |
Highlights:
Formulas are re-evaluated by HyperFormula — you always see the live computed value, never a stale cached one.
Handles cross-sheet references (
=SUM(Data!C2:C5)), named expressions defined in the file, and standard Excel error types (#DIV/0!,#N/A, …).Safe by default: read-only, size- and cell-count-capped, and an optional allow-list restricts which directories can be opened.
No writes, no network calls, no telemetry.
Install & run
Prerequisites: Node.js ≥ 18.17 (Node 20+ recommended).
git clone https://github.com/manil2020/excel_mcp_server.git
cd excel_mcp_server
npm install
npm run build
npm test # runs the vitest suite
# Start the server on stdio (this is what MCP clients do automatically)
node dist/index.jsFor local development without a build step:
npm run devWiring the server into MCP clients
VS Code (GitHub Copilot Chat MCP)
Add the server to your workspace or user MCP config. A minimal .vscode/mcp.json:
{
"servers": {
"excel": {
"command": "node",
"args": ["/absolute/path/to/excel_mcp_server/dist/index.js"],
"env": {
"EXCEL_MCP_LOG_LEVEL": "info"
}
}
}
}See examples/vscode-mcp.json for a ready-to-copy version.
Claude Desktop
Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or the equivalent on Windows / Linux:
{
"mcpServers": {
"excel": {
"command": "node",
"args": ["/absolute/path/to/excel_mcp_server/dist/index.js"]
}
}
}See examples/claude-desktop-config.json.
Any other MCP client
Point the client at node /absolute/path/to/dist/index.js with the environment variables described below. The server uses stdio, the standard MCP local transport.
Configuration
All configuration is via environment variables. Defaults are safe for a laptop workload.
Variable | Default | Description |
|
| Reject workbooks larger than this many megabytes. |
|
| Maximum number of workbooks kept in memory concurrently. |
| (unset) | Colon-separated absolute paths. If set, only files under one of these roots may be opened. |
|
|
|
Example workflow (LLM-side)
open_workbook(path="/data/orders.xlsx")
→ { workbookId: "wb_a1b2c3d4", sheets: [ ... ] }
get_sheet_summary(workbookId, sheet="Orders")
→ headers: ["order_id", "customer", "amount", "region"], columnTypes: [ ... ]
find_in_workbook(workbookId, query="EMEA")
→ hits: [ { sheet: "Orders", cell: "D42", value: "EMEA" }, ... ]
evaluate_formula(workbookId, formula="=SUMIFS(Orders!C:C, Orders!D:D, \"EMEA\")")
→ { result: 12345.67 }
close_workbook(workbookId)Architecture
src/index.ts– Bin entry: creates the server and connects aStdioServerTransport.src/server.ts– ConstructsMcpServer, wires all tools, exportscreateServer()for tests.src/workbook/loader.ts– Reads the file with ExcelJS, converts each cell into HyperFormula-friendly primitives (formulas kept as=…strings, dates converted to Excel serial numbers, rich text flattened), then callsHyperFormula.buildFromSheets.src/workbook/manager.ts– Registry of open workbooks keyed by opaquewb_*handles, with per-process limits and graceful shutdown.src/tools/*.ts– One file per MCP tool. Each registers itself with the sharedMcpServerand delegates to the workbook manager.
See docs/ARCHITECTURE.md for a diagram and the full data flow.
Development
npm run dev # tsx watch (single run)
npm run typecheck # tsc --noEmit
npm run lint # eslint
npm run format # prettier --write
npm test # vitest run
npm run test:watch # vitest watchDirectory layout:
excel_mcp_server/
├── src/
│ ├── index.ts # #!/usr/bin/env node entry
│ ├── server.ts # MCP server factory
│ ├── workbook/ # ExcelJS + HyperFormula bridge
│ ├── tools/ # One file per MCP tool
│ └── util/ # Address helpers, errors, logger, path safety
├── tests/
│ ├── fixtures/ # Programmatic xlsx generation
│ ├── loader.test.ts # Workbook layer
│ └── tools.test.ts # Full MCP round-trip (in-memory transport)
├── docs/
│ ├── ARCHITECTURE.md
│ └── USAGE.md
├── examples/
│ ├── vscode-mcp.json
│ └── claude-desktop-config.json
├── LICENSE # GPL-3.0
└── NOTICE # Third-party licensingLicensing summary
This project uses HyperFormula, which is dual-licensed under GPL-3.0 or a commercial license from Handsontable. Because this project links against HyperFormula, the combined work is distributed as GPL-3.0-or-later. See NOTICE for full detail and instructions for commercial reuse.
The other runtime dependencies (ExcelJS, @modelcontextprotocol/sdk, zod) are MIT-licensed and compatible with GPL-3.0.
Credits & acknowledgements
This project would not exist without the following open-source libraries and the maintainers who built them. If you find this project useful, please star and support the upstream projects — they did the hard work.
Runtime dependencies
Project | Maintainer(s) | License | Homepage |
HyperFormula | Handsontable Sp. z o.o. (Poland) | GPL-3.0 / Commercial | |
ExcelJS | Guyon Roche and contributors | MIT | |
@modelcontextprotocol/sdk | Anthropic PBC and the MCP community | MIT | |
zod | Colin McDonnell (@colinhacks) and contributors | MIT |
Development dependencies
Project | Maintainer(s) | License |
TypeScript | Microsoft | Apache-2.0 |
Vitest | Anthony Fu (@antfu) and contributors | MIT |
tsx | Hiroki Osame (@privatenumber) | MIT |
ESLint | OpenJS Foundation / ESLint team | MIT |
Prettier | Prettier team | MIT |
Node.js | OpenJS Foundation | MIT |
Protocol
The Model Context Protocol specification is developed and stewarded by Anthropic and the wider MCP community at modelcontextprotocol.io. The protocol design work makes servers like this one possible.
Sample data
The
samples/financial-sample.xlsxfixture (used for local testing only, gitignored) is Microsoft's public Power BI Financial Sample workbook, freely distributed by Microsoft for learning purposes: download link.All other files in
samples/are synthesised locally by scripts/generate-samples.ts and contain no real personal or commercial data.
If any maintainer name or attribution detail here is missing or wrong, please open an issue — corrections are welcome and I want the credit right.
Roadmap
Optional write tools (
set_cell,save_workbook) behind an opt-in--allow-writesflag.Streaming for very large ranges via
read_rangepagination.CSV /
.xlslegacy format support.Prompt / resource providers exposing the workbook as MCP
Resources.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityDmaintenanceA Model Context Protocol server that enables AI agents to create, read, and modify Excel workbooks without requiring Microsoft Excel installation.MIT
- Flicense-qualityDmaintenanceAn MCP server that allows LLMs to read, analyze, and interact with Excel files through file operations, data discovery, and comprehensive analysis tools.2
- AlicenseBqualityCmaintenanceMCP server for semantic spreadsheet operations that lets LLMs create and edit Excel workbooks by describing spreadsheet intent.42MIT
- AlicenseCqualityCmaintenanceLocal-first Excel MCP server for AI agents enabling structured reads, workbook introspection, and safer .xlsx mutation without Microsoft Excel or LibreOffice.762MIT
Related MCP Connectors
MCP server for AI dialogue using various LLM models via AceDataCloud
MCP server providing access to the Scorecard API to evaluate and optimize LLM systems.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/manil2020/excel_mcp_server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server