home / mcp / excel mcp server

Excel MCP Server

excel-mcp-server - 由 MCP工厂自动创建

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "bach-ai-tools-excel-mcp-server": {
      "url": "http://localhost:8000/sse",
      "headers": {
        "FASTMCP_PORT": "8017",
        "EXCEL_FILES_PATH": "YOUR_EXCEL_FILES_PATH"
      }
    }
  }
}

The Excel MCP Server lets you create, read, and modify Excel workbooks without Microsoft Excel installed. You can run it locally for fast, AI-assisted workbook manipulation or access it remotely to integrate Excel capabilities into your AI workflows.

How to use

You will use the server with an MCP client by choosing a transport that fits your environment. Local development is typically done with the stdio transport, which runs the server as a local process. For remote or distributed setups, use the streamable HTTP transport so you can connect over HTTP, or use the SSE transport if you need a server-sent events connection (note: SSE is deprecated). When you start the server with a transport, you can perform a wide range of Excel operations such as creating workbooks, reading data, applying formulas, formatting, and generating charts or pivot tables.

Key usage patterns include: launching the server locally for quick experiments, setting a shared path for Excel files when using HTTP transports, and pointing your client at the remote MCP URL to perform file operations from anywhere. If you choose the HTTP option, your client connects to the MCP endpoint over HTTP and sends requests to read or write Excel data. If you choose the stdio option, you run the server as a local process and pass commands directly from your client during execution.

How to install

Prerequisites: you need a Node.js-friendly environment so you can run the MCP runtime tooling. Install the MCP runner globally to make the excel-mcp-server available from any directory.

Install the MCP runner globally using your package manager, then start the server with the transport you prefer.

Step-by-step commands you can run locally:

# Install the MCP runtime globally
npm install -g uvx

# Start a local stdio server (for use inside your AI workflow)
uvx excel-mcp-server stdio

# (Optional) Start a local streamable HTTP server for remote access
# Ensure you set EXCEL_FILES_PATH and FASTMCP_PORT as needed
uvx excel-mcp-server streamable-http

Configuration and tips

Environment variables are used to control file paths and ports when using HTTP transports. Set EXCEL_FILES_PATH to the directory where Excel files are stored and FASTMCP_PORT to choose the listening port. If you are running in a Windows or Linux shell, you can export or set these variables before starting the server.

Example environment setup (HTTP transport): you place your Excel files at a chosen directory and start the server on a specific port.

Notes on transports

Stdio transport runs the server as a local process and uses the path provided by your client for each operation. Streamable HTTP offers remote connections by exposing a MCP endpoint over HTTP at a configurable URL. Server-Sent Events (SSE) is available but deprecated.

If you plan to access the server remotely, you typically provide a URL like http://localhost:8000/mcp for MCP requests or http://localhost:8000/sse for SSE connections. Ensure the corresponding environment variables are set on the server side for file handling.