The Excel MCP Server is a powerful Model Context Protocol server that allows AI agents to manipulate Excel files without requiring Microsoft Excel to be installed. This tool enables creating, reading, and modifying Excel workbooks with comprehensive support for formulas, formatting, charts, pivot tables, and more.
You can install the Excel MCP Server using UVX:
uvx excel-mcp-server stdio
The server supports three different transport methods, each with its own configuration requirements.
The simplest way to use the Excel MCP Server is with the stdio transport for local operation:
uvx excel-mcp-server stdio
Configure your application to connect to the server:
{
"mcpServers": {
"excel": {
"command": "uvx",
"args": ["excel-mcp-server", "stdio"]
}
}
}
For remote connections, the streamable HTTP transport is recommended:
uvx excel-mcp-server streamable-http
Configure your client to connect:
{
"mcpServers": {
"excel": {
"url": "http://localhost:8000/mcp",
}
}
}
Server-Sent Events transport is available but deprecated:
uvx excel-mcp-server sse
Client configuration:
{
"mcpServers": {
"excel": {
"url": "http://localhost:8000/sse",
}
}
}
When using SSE or Streamable HTTP, you must set the EXCEL_FILES_PATH
environment variable on the server side to specify where Excel files will be read from and written to.
Windows PowerShell example:
$env:EXCEL_FILES_PATH="E:\MyExcelFiles"
$env:FASTMCP_PORT="8007"
uvx excel-mcp-server streamable-http
Linux/macOS example:
EXCEL_FILES_PATH=/path/to/excel_files FASTMCP_PORT=8007 uvx excel-mcp-server streamable-http
Notes:
EXCEL_FILES_PATH
defaults to ./excel_files
FASTMCP_PORT
controls the server port (default: 8000)When using the stdio protocol, you don't need to set EXCEL_FILES_PATH
as the file path is provided with each tool call.
The Excel MCP Server offers a comprehensive set of Excel manipulation capabilities:
The server provides numerous tools for Excel manipulation. Here's a basic example of how you might use them to create a workbook and add data:
For complete documentation of all available tools and their parameters, refer to the full tools documentation at TOOLS.md on GitHub.
To add this MCP server to Claude Code, run this command in your terminal:
claude mcp add-json "excel-stdio" '{"command":"uvx","args":["excel-mcp-server","stdio"]}'
See the official Claude Code MCP documentation for more details.
There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json
file so that it is available in all of your projects.
If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json
file.
To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".
When you click that button the ~/.cursor/mcp.json
file will be opened and you can add your server like this:
{
"mcpServers": {
"excel-stdio": {
"command": "uvx",
"args": [
"excel-mcp-server",
"stdio"
]
}
}
}
To add an MCP server to a project you can create a new .cursor/mcp.json
file or add it to the existing one. This will look exactly the same as the global MCP server example above.
Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.
The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.
You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.
To add this MCP server to Claude Desktop:
1. Find your configuration file:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
~/.config/Claude/claude_desktop_config.json
2. Add this to your configuration file:
{
"mcpServers": {
"excel-stdio": {
"command": "uvx",
"args": [
"excel-mcp-server",
"stdio"
]
}
}
}
3. Restart Claude Desktop for the changes to take effect