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 ServerAnalyze the sales sheet and format the top row with a blue background"
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
A cross-platform MCP server for reading, writing, and formatting Excel files. Works with both open Excel workbooks (live) and closed .xlsx files (no Excel needed).
Two Modes
workbook— Operate on an open Excel workbook in real-time via xlwingspath— Edit closed .xlsx files directly using pure Python (preserves images, charts, and all embedded content)
Related MCP server: xlwings Excel MCP Server
Tools
Tool | workbook | path | Required |
| - | - | (none) |
| OK | OK | range |
| OK | OK | range, value |
| OK | OK | range, format |
| OK | - | workbook, code |
Requirements
Node.js 18+
Python 3.8+
xlwings (for live Excel mode —
pip install xlwings)Microsoft Excel (only needed for
workbookmode andexecute_vba)
Works on Windows and macOS. The path mode also works on Linux.
Installation
git clone https://github.com/kousunh/excel-mcp-server.git
cd excel-mcp-server
npm install
pip install -r scripts/requirements.txtConfigure MCP Client
Add to your MCP client config (Claude Desktop, Cursor, etc.):
{
"mcpServers": {
"excel-mcp": {
"command": "node",
"args": ["/path/to/excel-mcp-server/src/index.js"]
}
}
}To use a specific Python executable, set the EXCEL_MCP_PYTHON environment variable:
{
"mcpServers": {
"excel-mcp": {
"command": "node",
"args": ["/path/to/excel-mcp-server/src/index.js"],
"env": {
"EXCEL_MCP_PYTHON": "/path/to/python"
}
}
}
}Usage
Closed files (path mode)
read_cells path="/data/report.xlsx" range="A1:D20" formats=true
write_cells path="/data/report.xlsx" range="A1:C3" value=[["Name","Age","City"],["Alice",30,"NYC"],["Bob",25,"LA"]]
format_cells path="/data/report.xlsx" range="A1:C1" format={"bold":true,"backgroundColor":"#4472C4","fontColor":"#FFFFFF"}No Excel installation required. Images, charts, and shapes are preserved.
Open workbooks (workbook mode)
get_excel_info
read_cells workbook="Sales.xlsx" range="B2:F10"
write_cells workbook="Sales.xlsx" range="G2" value="=SUM(B2:F2)"
execute_vba workbook="Sales.xlsx" code="Range(\"A1:G10\").AutoFilter"Requires Excel to be running with the workbook open.
License
MIT
Available Tools
5 toolsexecute_vbaA
Execute VBA code in an open workbook (live Excel only, cannot use with closed files). Code is wrapped in a Sub automatically if needed. MsgBox calls are stripped. Temp modules are cleaned up after execution.
| Name | Required | Description | Default |
|---|---|---|---|
| workbook | Yes | Workbook name | |
| code | Yes | VBA code to execute | |
| sheet | No | Sheet to activate before execution |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes key behaviors: code is automatically wrapped in a Sub if needed, MsgBox calls are stripped, and temp modules are cleaned up after execution. This adds valuable context beyond basic execution, though it could mention permissions or error handling.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is appropriately sized and front-loaded, with three concise sentences that each add value: stating the core action, specifying constraints, and detailing behavioral traits. There is no wasted text, and it efficiently communicates essential information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (executing code in Excel) and no annotations or output schema, the description is mostly complete. It covers purpose, constraints, and behavioral traits, but could improve by mentioning return values or error scenarios. It adequately supports agent usage without being exhaustive.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents all three parameters (workbook, code, sheet). The description does not add meaning beyond the schema, such as examples or format details for parameters. Baseline 3 is appropriate as the schema handles parameter documentation adequately.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the specific action ('Execute VBA code') and resource ('in an open workbook'), distinguishing it from sibling tools like format_cells or read_cells. It specifies the scope ('live Excel only, cannot use with closed files'), making the purpose unambiguous and distinct.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context on when to use this tool ('live Excel only, cannot use with closed files'), but does not explicitly mention when not to use it or name alternatives among sibling tools. It implies usage for executing VBA code in active workbooks, which is helpful but lacks explicit exclusions or comparisons.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
format_cellsA
Apply formatting to cells. Use "workbook" for live Excel, or "path" for a .xlsx file on disk (no Excel needed, preserves images/charts). Options: bold, italic, underline, fontSize, fontName, fontColor, backgroundColor, textAlign (left/center/right), verticalAlign (top/middle/bottom), numberFormat, wrapText, borders ({top/bottom/left/right/inside/outside: {style, color}}).
| Name | Required | Description | Default |
|---|---|---|---|
| workbook | No | Open workbook name (live Excel) | |
| path | No | File path to .xlsx (no Excel needed) | |
| range | Yes | Cell range (e.g. "A1:C3") | |
| format | Yes | Formatting options | |
| sheet | No | Sheet name (default: active sheet) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It does reveal important behavioral traits: the distinction between live Excel and file-based operations, and that file-based operations preserve images/charts. However, it doesn't disclose whether this is a destructive operation (likely yes, since it applies formatting), what permissions might be needed, error conditions, or performance characteristics.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is efficiently structured with zero wasted words. The first sentence states the core purpose, the second provides crucial usage guidance, and the third comprehensively lists all formatting options with helpful examples. Every sentence earns its place by adding distinct, valuable information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a formatting tool with 5 parameters (including complex nested objects), no annotations, and no output schema, the description does reasonably well by explaining the workbook/path distinction and listing formatting options. However, it doesn't cover important contextual aspects like what happens if formatting conflicts exist, whether changes are reversible, what the tool returns, or error handling for invalid ranges/formats.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents all parameters thoroughly. The description adds value by clarifying the practical distinction between 'workbook' and 'path' parameters and listing all formatting options with examples (like hex colors and border structure), but doesn't provide significant semantic information beyond what's already in the well-documented schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description starts with a clear, specific verb ('Apply formatting') and resource ('to cells'), immediately distinguishing this from sibling tools like read_cells or write_cells. It explicitly states the formatting action rather than just restating the tool name, making the purpose immediately understandable.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context about when to use different input modes ('workbook' for live Excel vs 'path' for .xlsx files), including the practical implication that 'path' doesn't require Excel and preserves images/charts. However, it doesn't explicitly state when to choose this tool over alternatives like write_cells or how it relates to execute_vba for more complex formatting.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_excel_infoB
Get Excel running status, open workbooks, and their sheets.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It states what information is retrieved but doesn't describe traits like whether it requires specific permissions, if it's read-only (implied by 'Get'), potential rate limits, or error handling. This leaves gaps in understanding the tool's operational behavior.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that front-loads the key action ('Get') and resources. There is no wasted text, and it directly communicates the tool's function without unnecessary elaboration, making it highly concise and well-structured.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's low complexity (0 parameters, no output schema, no annotations), the description is adequate but has clear gaps. It covers the purpose but lacks details on usage guidelines, behavioral traits, and output format, which could hinder an agent's ability to use it effectively in more complex scenarios.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has 0 parameters with 100% schema description coverage, so the schema fully documents the lack of inputs. The description adds no parameter information, which is appropriate here, and it implies the tool operates without inputs to fetch general status. This aligns well with the schema, justifying a baseline score above minimum.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose with specific verbs ('Get') and resources ('Excel running status, open workbooks, and their sheets'), making it easy to understand what information will be retrieved. However, it doesn't explicitly differentiate from sibling tools like 'read_cells', which might also provide information about sheets, leaving room for minor ambiguity.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is provided on when to use this tool versus alternatives. For example, it doesn't clarify if this is for general status checks versus specific data retrieval from cells (as with 'read_cells'), or mention any prerequisites like requiring Excel to be open. The description implies usage but lacks explicit context or exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
read_cellsA
Read cell formulas/values from a range. By default returns formulas where they exist. Use "workbook" for an open Excel workbook, or "path" for a .xlsx file on disk (no Excel needed, preserves images/charts). Set valuesOnly=true to get calculated values instead of formulas. Set formats=true to include formatting details.
| Name | Required | Description | Default |
|---|---|---|---|
| workbook | No | Open workbook name (live Excel) | |
| path | No | File path to .xlsx (no Excel needed) | |
| range | Yes | Cell range (e.g. "A1" or "A1:C10") | |
| sheet | No | Sheet name (default: active sheet) | |
| formats | No | Include cell formatting (default: false) | |
| valuesOnly | No | Return calculated values instead of formulas (default: false, returns formulas) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It effectively describes key traits: it's a read operation (implied by 'Read'), supports two modes (live Excel vs. file-based), preserves images/charts in file mode, and defaults to returning formulas. It could improve by mentioning error handling or performance limits, but it covers essential behavior well.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is front-loaded with the core purpose and efficiently structured into sentences that each add value: the first states the action, the second explains parameter choices, and the third details optional behaviors. There is no wasted text, making it concise and well-organized.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the complexity of a read tool with 6 parameters and no output schema, the description is mostly complete. It covers the tool's purpose, parameter usage, and behavioral aspects. However, it doesn't describe the return format (e.g., structure of the output), which is a gap since there's no output schema, slightly reducing completeness.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents all parameters thoroughly. The description adds some context by explaining the 'workbook' vs. 'path' distinction and the effect of 'valuesOnly' and 'formats', but this mostly reinforces schema details rather than providing significant new meaning. Baseline 3 is appropriate as the schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb ('Read') and resource ('cell formulas/values from a range'), specifying what the tool does. It distinguishes from siblings like 'write_cells' (write vs. read) and 'format_cells' (formatting vs. reading content), making the purpose specific and differentiated.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context on when to use certain parameters (e.g., use 'workbook' for open Excel, 'path' for files on disk, and set 'valuesOnly=true' for calculated values). However, it lacks explicit guidance on when to use this tool versus alternatives like 'get_excel_info' or 'execute_vba', so it doesn't fully cover sibling differentiation.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
write_cellsA
Write values to a cell or range. Use "workbook" for live Excel, or "path" for a .xlsx file on disk (no Excel needed, preserves images/charts). Accepts a single value, a flat array, or a 2D array.
| Name | Required | Description | Default |
|---|---|---|---|
| workbook | No | Open workbook name (live Excel) | |
| path | No | File path to .xlsx (no Excel needed) | |
| range | Yes | Cell range (e.g. "A1" or "A1:B5") | |
| value | Yes | Value(s) to write | |
| sheet | No | Sheet name (default: active sheet) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions that using 'path' preserves images/charts, which adds useful context beyond basic writing. However, it lacks details on permissions, error handling, or side effects like overwriting existing data, leaving gaps in transparency for a mutation tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is front-loaded with the core purpose and efficiently explains key usage details in two sentences. Every sentence adds necessary information without redundancy, making it appropriately sized and easy to parse.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity as a mutation tool with no annotations and no output schema, the description is somewhat complete but has gaps. It covers purpose and parameter usage well but lacks details on behavioral aspects like error conditions or return values, which are important for safe invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the baseline is 3. The description adds value by clarifying the semantics of 'workbook' vs. 'path' for different use cases and specifying acceptable value types (single, flat array, 2D array), which enhances understanding beyond the schema's technical definitions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Write values') and the resource ('to a cell or range'), specifying the tool's function. It distinguishes from siblings like 'read_cells' by focusing on writing, and from 'format_cells' by handling data input rather than styling, making the purpose specific and well-differentiated.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context on when to use this tool by explaining the choice between 'workbook' for live Excel and 'path' for file-based operations, which helps in selecting the appropriate parameter. However, it does not explicitly state when not to use it or name alternatives like 'execute_vba' for more complex tasks, leaving some guidance implicit.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
5 tool updates
v3.0.0- First observed
execute_vba - First observed
format_cells - First observed
get_excel_info - First observed
read_cells - First observed
write_cells
TDQS
Each tool has a clearly distinct purpose with no overlap: execute_vba runs code, format_cells applies styling, get_excel_info retrieves metadata, read_cells extracts data, and write_cells inserts data. The descriptions explicitly differentiate between live Excel and file-based operations where applicable, eliminating ambiguity.
All tool names follow a consistent verb_noun pattern (execute_vba, format_cells, get_excel_info, read_cells, write_cells) with clear, descriptive verbs. There are no deviations in style or convention, making the set predictable and easy to understand.
With 5 tools, this server is well-scoped for basic Excel operations, covering execution, formatting, information retrieval, reading, and writing. Each tool earns its place without redundancy, and the count is appropriate for the domain, avoiding both excessive complexity and oversimplification.
The toolset provides solid coverage for core Excel workflows, including CRUD-like operations (read/write), formatting, and automation (VBA). Minor gaps exist, such as no explicit tools for managing sheets (e.g., create/delete sheets) or advanced features like charts, but agents can likely work around these with the available tools.
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 Connectors
Open, inspect, filter, edit and convert xlsx and csv files from your AI chat. Processing is local.
Structured financial modeling for AI agents: build, version, audit models, export to Excel.
Connect AI assistants to Google Sheets through controlled tools for reading and updating rows.
AI access to Quadratic spreadsheets: open files, run Python/SQL, query connected databases.
Related MCP Servers
- AlicenseAqualityCmaintenanceEnables AI agents to directly create, read, edit, and save Excel (.xlsx) spreadsheets using natural language through the Model Context Protocol, supporting cells, sheets, formatting, and formulas without writing Python code.215MIT
- FlicenseBqualityCmaintenanceEnables Excel automation via natural language, providing session-based workbook management, data manipulation, formulas, charts, and formatting through the Model Context Protocol.29-
- AlicenseNot gradedqualityBmaintenanceEnables AI assistants to automate Microsoft Excel tasks such as reading/writing cells, formatting, creating charts, and managing sheets through natural language using the Model Context Protocol.1Apache 2.0
- AlicenseNot gradedqualityBmaintenanceEnables AI agents to read, write, analyze, and transform Excel spreadsheets (.xlsx) through the Model Context Protocol.MIT
Appeared in Searches
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/kousunh/Excel-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server