Excel

Provides a configurable MCP server to automate Excel operations, including data analysis, editing, formatting, borders, VBA, and workbook management.
  • javascript

2

GitHub Stars

javascript

Language

4 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "kousunh-excel-mcp-server": {
      "command": "node",
      "args": [
        "C:/path/to/excel-mcp-server/src/index.js"
      ],
      "env": {
        "YOUR_API_KEY": "YOUR_API_KEY"
      }
    }
  }
}

You can run a dedicated MCP server to manage and automate Excel workbooks from your preferred client. This server exposes a structured workflow for inspecting data, editing cells, applying formatting and borders, executing VBA, and managing multiple workbooks, all within a consistent, scriptable interface.

How to use

Use an MCP client to connect to the local MCP server and perform Excel operations through a clear, prioritized workflow. Start by inspecting the current workbook to understand data structure, then perform edits, styling, and borders as needed. Finish with a final check to verify layout and formatting. You can switch between open workbooks, navigate sheets, and run VBA when custom logic is required.

How to install

Prerequisites you need before installing:

  • Windows OS (required for COM integration) or a compatible environment for your setup
  • Microsoft Excel installed and running
  • Node.js 18 or higher
  • Python 3.8 or higher Then follow these steps to set up the MCP server and connect your clients.
  1. Clone the MCP server repository and move into the directory.
git clone https://github.com/kousunh/excel-mcp-server.git
cd excel-mcp-server
  1. Run the setup script to create a Python virtual environment and install dependencies.
setup.bat
.\setup.bat
./setup.sh
  1. Configure your MCP client to point to the local server. Use the examples below as a template and adjust the paths to match your environment.
{
  "mcpServers": {
    "excel-mcp": {
      "command": "node",
      "args": ["C:/path/to/excel-mcp-server/src/index.js"],
      "env": {},
      "cwd": "C:/path/to/excel-mcp-server"
    }
  }
}
  1. If you use Cursor, add a similar configuration to Cursor settings to launch the server locally.
{
  "mcpServers": {
    "Excel-mcp": {
      "command": "node",
      "args": [
        "C:\\path\\to\\excel-mcp-server\\src\\index.js"
      ]
    }
  }
}

Additional configuration notes

Two built-in local configurations are provided as templates. Use them as starting points and tailor paths to your environment. The server runs locally and communicates through your MCP client, enabling you to manage Excel workbooks without exposing remote endpoints.

Security and environment

  • The MCP server operates only on local Excel files unless you explicitly enable network sharing in your environment.
  • VBA code runs in temporary modules and is automatically cleaned up after execution.
  • A Python virtual environment isolates dependencies.
  • No network access or external file operations are performed by the server unless you configure otherwise.

Troubleshooting

  • If Excel is not found or no workbooks are open, ensure Excel is running and a workbook is loaded before starting operations.
  • For long operations, timeouts may be extended to accommodate large spreadsheets.
  • If VBA execution fails, verify that the Trust Center settings allow programmatic access to the VBA project object model.

Notes

This server supports a prioritized workflow and a comprehensive set of operations for data analysis, cell editing, formatting, borders, VBA execution, and workbook navigation. Always verify changes with the final formatting check to ensure consistency across your workbook.

Tools and capabilities

The MCP server exposes a set of tools aligned with practical Excel tasks, including: essential_inspect_excel_data, essential_check_excel_format, edit_cells, set_cell_formats, set_cell_borders, get_open_workbooks, set_active_workbook, get_all_sheet_names, navigate_to_sheet, get_excel_status, and execute_vba.

Available tools

essential_inspect_excel_data

Analyzes Excel data structure and content to understand current state, sheet structure, data types, and content. Works with both open and closed files.

essential_check_excel_format

Verifies layout and formatting after any changes. Used repeatedly to check different ranges and ensure consistency.

edit_cells

Edits single cells or ranges with optimized performance for large data operations.

set_cell_formats

Applies comprehensive formatting to cell ranges, including font colors, backgrounds, bold/italic/underline, font size, font name, and text alignment.

set_cell_borders

Applies detailed border styling to cell ranges with various styles and colors for top, bottom, left, right, inside, and outside positions.

get_open_workbooks

Lists all currently open Excel workbooks.

set_active_workbook

Switches between open workbooks.

get_all_sheet_names

Lists all sheets in a workbook.

navigate_to_sheet

Switches to a specific sheet.

get_excel_status

Checks if Excel is running and responsive.

execute_vba

Executes custom VBA code in Excel by creating a temporary Sub procedure, handling errors, and cleaning up afterward.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational