Excel MCP Server

by bengbengbalabalabeng

1 stars
448 downloads
Not rated
GitHub

About

Excel MCP Server is a Java implementation of the Model Context Protocol (MCP) for reading Excel files. It provides tools to extract headers, row data, sheet names, and row counts from XLSX, XLS, and CSV files while enforcing workspace‑based path validation. The server is…

Details

Author
bengbengbalabalabeng
GitHub stars
1
Downloads
448
Categories
Other

- Read Excel files (XLSX, XLS, CSV) headers and data rows.
- Validate input paths against configured workspace directories.
- Support for multiple sheets and custom header‑row indices.
- Retrieve total data row count excluding headers.
- Built‑in performance caching for repeated file access.
- Clear or test cache availability via dedicated tools.

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Excel MCP Server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Build the server with JDK 17+ GraalVM and Maven 3.9.6+ using mvn clean package -DskipTests=true. Then configure Claude Desktop by adding a server entry to claude_desktop_config.json, setting the command to java with the JAR path and the environment variable MCP_WORKSPACES (comma‑separated allowed directories). Optional cache settings can be tuned with CACHE_INITIAL_CAPACITY, CACHE_MAXIMUM_SIZE, and CACHE_EXPIRE_AFTER_WRITE. The server exposes tools such as get_total_rows_number, get_sheet_names, read_head_spec, read_rows_spec, and cache control tools.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "excel mcp server": {
            "fastexcel-mcp-server": {
                "command": "java",
                "args": [
                    "-jar",
                    "<YOUR_PATH>/fastexcel-mcp-server-0.0.1-SNAPSHOT.jar"
                ],
                "env": {
                    "MCP_WORKSPACES": "<YOUR_MULTIPLE_WORKSPACES_SEPARATED_BY_COMMAS>",
                    "CACHE_INITIAL_CAPACITY": "[OPTIONAL] <MINIMUM_TOTAL_SIZE_FOR_THE_INTERNAL_DATA_STRUCTURES> <DEFAULT: 100>",
                    "CACHE_MAXIMUM_SIZE": "[OPTIONAL] <MAXIMUM_NUMBER_OF_ENTRIES_THE_CACHE_MAY_CONTAIN> <DEFAULT: 1000>",
                    "CACHE_EXPIRE_AFTER_WRITE": "[OPTIONAL] <LENGTH_OF_TIME_AFTER_AN_ENTRY_IS_CREATED_THAT_IT_SHOULD_BE_AUTOMATICALLY_REMOVED> <DEFAULT: 35s>"
                }
            }
        }
    }
}

McpServers

{
    "fastexcel-mcp-server": {
        "command": "java",
        "args": [
            "-jar",
            "<YOUR_PATH>/fastexcel-mcp-server-0.0.1-SNAPSHOT.jar"
        ],
        "env": {
            "MCP_WORKSPACES": "<YOUR_MULTIPLE_WORKSPACES_SEPARATED_BY_COMMAS>",
            "CACHE_INITIAL_CAPACITY": "[OPTIONAL] <MINIMUM_TOTAL_SIZE_FOR_THE_INTERNAL_DATA_STRUCTURES> <DEFAULT: 100>",
            "CACHE_MAXIMUM_SIZE": "[OPTIONAL] <MAXIMUM_NUMBER_OF_ENTRIES_THE_CACHE_MAY_CONTAIN> <DEFAULT: 1000>",
            "CACHE_EXPIRE_AFTER_WRITE": "[OPTIONAL] <LENGTH_OF_TIME_AFTER_AN_ENTRY_IS_CREATED_THAT_IT_SHOULD_BE_AUTOMATICALLY_REMOVED> <DEFAULT: 35s>"
        }
    }
}

FastExcel MCP Server

Java server implementing Model Context Protocol (MCP) for Excel operations with standardized header-to-column relationships.

Features

- Read Excel file (XLSX, XLS, CSV) headers and data rows.
- Validate input paths against configured workspaces.
- Support for multiple sheets and custom header rows.
- Retrieve total number of data rows (excluding headers).
- Built-in performance caching for faster repeated access.

Note: The server will only allow operations within directories specified via env: MCP_WORKSPACES.

API

Tools

- get_total_rows_number (with cache support)
- Get the total number of data rows (excluding the header row) in an Excel file.
- Inputs:
- excelPath (string): Absolute or relative path to the Excel file.
- headRowNumber (integer): Row number (1-based index) where the header is located.
- sheetName (string, optional): Name of the sheet to read. Defaults to the first sheet if empty.
- Returns the total count of data rows as an integer.

- get_sheet_names (with cache support)
- Retrieve all sheet names and their indices from an Excel file.
- Inputs:
- excelPath (string): Absolute or relative path to the Excel file.
- Returns a list of json objects containing sheet number and sheet name.

- read_head_spec (with cache support)
- Parse and return the header information from an Excel file.
- Inputs:
- excelPath (string): Absolute or relative path to the Excel file.
- headRowNumber (integer): Row number (1-based index) where the header is located.
- sheetName (string, optional): Name of the sheet to read. Defaults to the first sheet if empty.
- Returns a sorted list of json objects containing column index and header titles.

- read_rows_spec (with cache support)
- Parse and return the data rows from an Excel file with header association.
- Inputs:
- excelPath (string): Absolute or relative path to the Excel file.
- headRowNumber (integer): Row number (1-based index) where the header is located.
- readRowNumbers (integer, optional): Number of data rows to read (excludes header). If null, reads all rows.
- sheetName (string, optional): Name of the sheet to read. Defaults to the first sheet if empty.
- Returns a list of json containing row data linked to their headers.

- cache_clear
- Clear all cached Excel file data from memory.
- Returns true when cache is cleared successfully.

- test_cache_available
- Test if the specified Excel file is available in cache.
- Inputs:
- excelPath (string): Absolute or relative path to the Excel file.
- Returns a json object indicating cache status and file MD5 hash:
- cached: boolean indicating if file is cached
- result: string containing file MD5 hash information

Usage with Claude Desktop

Add this to your claude_desktop_config.json:

Java

{
  "mcpServers": {
    "fastexcel-mcp-server": {
      "command": "java",
      "args": [
        "-jar",
        "<YOUR_PATH>/fastexcel-mcp-server-0.0.1-SNAPSHOT.jar"
      ],
      "env": {
        "MCP_WORKSPACES": "<YOUR_MULTIPLE_WORKSPACES_SEPARATED_BY_COMMAS>",
        "CACHE_INITIAL_CAPACITY": "[OPTIONAL] <MINIMUM_TOTAL_SIZE_FOR_THE_INTERNAL_DATA_STRUCTURES> <DEFAULT: 100>",
        "CACHE_MAXIMUM_SIZE": "[OPTIONAL] <MAXIMUM_NUMBER_OF_ENTRIES_THE_CACHE_MAY_CONTAIN> <DEFAULT: 1000>",
        "CACHE_EXPIRE_AFTER_WRITE": "[OPTIONAL] <LENGTH_OF_TIME_AFTER_AN_ENTRY_IS_CREATED_THAT_IT_SHOULD_BE_AUTOMATICALLY_REMOVED> <DEFAULT: 35s>"
      }
    }
  }
}

Build

Required

- JDK 17+ GraalVM
- Maven 3.9.6+

Java build:

mvn clean package -DskipTests=true

License

This MCP server is licensed under the Apache License 2.0. For more details, please see the LICENSE file in the project repository.

---

If you need further customization or integration details, let me know!

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.