Skip to main content
Glama

日本語 README

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 xlwings

  • path — 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

get_excel_info

-

-

(none)

read_cells

OK

OK

range

write_cells

OK

OK

range, value

format_cells

OK

OK

range, format

execute_vba

OK

-

workbook, code

Requirements

  • Node.js 18+

  • Python 3.8+

  • xlwings (for live Excel mode — pip install xlwings)

  • Microsoft Excel (only needed for workbook mode and execute_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.txt

Configure 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 tools
execute_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.

ParametersJSON Schema
NameRequiredDescriptionDefault
workbookYesWorkbook name
codeYesVBA code to execute
sheetNoSheet to activate before execution

TDQS

A4.2/5.0
Behavior4/5

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.

Conciseness5/5

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.

Completeness4/5

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.

Parameters3/5

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.

Purpose5/5

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.

Usage Guidelines4/5

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}}).

ParametersJSON Schema
NameRequiredDescriptionDefault
workbookNoOpen workbook name (live Excel)
pathNoFile path to .xlsx (no Excel needed)
rangeYesCell range (e.g. "A1:C3")
formatYesFormatting options
sheetNoSheet name (default: active sheet)

TDQS

A3.9/5.0
Behavior3/5

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.

Conciseness5/5

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.

Completeness3/5

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.

Parameters3/5

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.

Purpose5/5

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.

Usage Guidelines4/5

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.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

B3.2/5.0
Behavior2/5

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.

Conciseness5/5

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.

Completeness3/5

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.

Parameters4/5

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.

Purpose4/5

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.

Usage Guidelines2/5

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
workbookNoOpen workbook name (live Excel)
pathNoFile path to .xlsx (no Excel needed)
rangeYesCell range (e.g. "A1" or "A1:C10")
sheetNoSheet name (default: active sheet)
formatsNoInclude cell formatting (default: false)
valuesOnlyNoReturn calculated values instead of formulas (default: false, returns formulas)

TDQS

A4.2/5.0
Behavior4/5

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.

Conciseness5/5

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.

Completeness4/5

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.

Parameters3/5

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.

Purpose5/5

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.

Usage Guidelines4/5

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
workbookNoOpen workbook name (live Excel)
pathNoFile path to .xlsx (no Excel needed)
rangeYesCell range (e.g. "A1" or "A1:B5")
valueYesValue(s) to write
sheetNoSheet name (default: active sheet)

TDQS

A4.1/5.0
Behavior3/5

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.

Conciseness5/5

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.

Completeness3/5

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.

Parameters4/5

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.

Purpose5/5

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.

Usage Guidelines4/5

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.

  1. 5 tool updatesv3.0.0
    • First observedexecute_vba
    • First observedformat_cells
    • First observedget_excel_info
    • First observedread_cells
    • First observedwrite_cells

TDQS

A4/5.0
Disambiguation5/5

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.

Naming Consistency5/5

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.

Tool Count5/5

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.

Completeness4/5

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

ActivityInactive
ResponsivenessNo issues

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

Related MCP Servers

Latest Blog Posts

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