Home / MCP / Excel MCP Server

Excel MCP Server

Provides read and write access to local Excel files (.xlsx/.xls) for MCP-enabled LLM clients.

other
Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
    "mcpServers": {
        "excel_op": {
            "command": "java",
            "args": [
                "-Dspring.ai.mcp.server.stdio=true",
                "-Dspring.main.web-application-type=none",
                "-Dfile.encoding=UTF-8",
                "-jar",
                "{your_path}/mcp-excel-server-0.0.1-SNAPSHOT.jar"
            ]
        }
    }
}

You can run an MCP server that lets your AI models read from and write to local Excel files. This enables dynamic, tool-assisted interactions with your spreadsheets, expanding what your LLM can do beyond static knowledge.

How to use

Run the MCP Excel server as a standard MCP endpoint. Your MCP client can then issue read and write operations against local Excel files. The server responds with JSON representations of spreadsheet data and accepts JSON to update cells.

How to install

Prerequisites: make sure you have Java 17 or newer installed on your system.

1. Build the project to create the executable jar.

mvn clean package -Dmaven.test.skip=true

Configuration and start

Configure the MCP server as a stdio endpoint to run locally. Use the provided Java command to start the server with your jar. Replace {your_path} with the actual path to the built jar on your machine.

{
  "mcpServers": {
    "excel_op": {
      "name": "Excel操作",
      "type": "stdio",
      "description": "",
      "isActive": true,
      "command": "java",
      "args": [
        "-Dspring.ai.mcp.server.stdio=true",
        "-Dspring.main.web-application-type=none",
        "-Dfile.encoding=UTF-8",
        "-jar",
        "{your_path}/mcp-excel-server-0.0.1-SNAPSHOT.jar"
      ]
    }
  }
}

Security and maintenance notes

Keep your Java runtime updated and restrict access to the MCP endpoint as needed. Regularly rebuild and restart the server after updating the jar to ensure you are running the latest fixes.

Examples and tips

- Use the server to read an Excel file by issuing a read operation with the appropriate file path and sheet name, then parse the returned JSON to extract data for your downstream tasks.

- To write data, prepare a JSON payload with the target sheet and cell updates, then send it to the MCP endpoint to apply changes to the local Excel file.

Available tools

read_excel

Reads data from a specified Excel file and returns the contents in JSON format, including sheet name, row/column structure, and cell values.

write_excel

Writes JSON-provided data to a specified Excel file, updating cells and sheets as described in the payload.