Excel MCP Server

Excel MCP Server

Enables seamless reading, writing, and analyzing of Excel files through Model Context Protocol, with features for worksheet management, structure analysis, and automated caching.

zhiwei5576

Research & Data
Visit Server

README

Excel MCP Server

npm smithery badge 简体中文 | English

Excel file processing server based on Model Context Protocol (MCP), providing functionalities for reading, writing, and analyzing Excel files.

Features

  • 📖 Read Excel Files

    • Get worksheet list
    • Read specific worksheet data
    • Read all worksheets data
  • ✍️ Write Excel Files

    • Create new Excel files
    • Write to specific worksheet
    • Support multiple worksheets
  • 🔍 Analyze Excel Structure

    • Analyze worksheet structure
    • Export structure to new file
  • 💾 Cache Management

    • Automatic file content caching
    • Scheduled cache cleanup
    • Manual cache clearing
  • 📝 Log Management

    • Automatic operation logging
    • Periodic log cleanup

Installation

Installing via Smithery

To install excel-mcp-server for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install @zhiwei5576/excel-mcp-server --client claude

Installing Manually

Installing via NPM excel-mcp-server can be automatically installed by adding the following configuration to the MCP servers configuration.

Windows Platform:

{
  "mcpServers": {
    "excel": {
        "command": "cmd",
        "args": ["/c", "npx", "--yes", "@zhiweixu/excel-mcp-server"],
        "env": {
            "LOG_PATH": "[set an accessible absolute path]"
        }
    }
}

Other Platforms:

{
  "mcpServers": {
    "excel": {
        "command": "npx",
        "args": ["--yes", "@zhiweixu/excel-mcp-server"],
        "env": {
            "LOG_PATH": "[set an accessible absolute path]"
        }
    }
}

Note: LOG_PATH is optional. If not set, logs will be stored in the 'logs' folder under the application root directory.

API Tools

Structure Tools

  1. analyzeExcelStructure

    • Function: Get Excel file structure including sheet list and column headers in JSON format
    • Parameters:
      • fileAbsolutePath: Absolute path of the Excel file
      • headerRows: Number of header rows (default: 1)
  2. exportExcelStructure

    • Function: Export Excel file structure (sheets and headers) to a new Excel template file
    • Parameters:
      • sourceFilePath: Source Excel file path
      • targetFilePath: Target Excel file path
      • headerRows: Number of header rows (default: 1)

Read Tools

  1. readSheetNames

    • Function: Get all sheet names from the Excel file
    • Parameters:
      • fileAbsolutePath: Absolute path of the Excel file
  2. readDataBySheetName

    • Function: Get data from a specific sheet in the Excel file
    • Parameters:
      • fileAbsolutePath: Absolute path of the Excel file
      • sheetName: Name of the sheet to read
      • headerRow: Header row number (default: 1)
      • dataStartRow: Data start row number (default: 2)
  3. readSheetData

    • Function: Get data from all sheets in the Excel file
    • Parameters:
      • fileAbsolutePath: Absolute path of the Excel file
      • headerRow: Header row number (default: 1)
      • dataStartRow: Data start row number (default: 2)

Write Tools

  1. writeDataBySheetName

    • Function: Write data to a specific sheet in the Excel file (overwrites if sheet exists)
    • Parameters:
      • fileAbsolutePath: Absolute path of the Excel file
      • sheetName: Name of the sheet to write
      • data: Array of data to write
  2. writeSheetData

    • Function: Create a new Excel file with provided data
    • Parameters:
      • fileAbsolutePath: Absolute path for the new Excel file
      • data: Object containing multiple sheet data

Cache Tools

  1. clearFileCache
    • Function: Clear cached data for the specified Excel file
    • Parameters:
      • fileAbsolutePath: Absolute path of the Excel file to clear from cache

Configuration

  • Cache Configuration

    • Cache expiration time: 1 hour
    • Cache cleanup interval: 4 hours
  • Log Configuration

    • Log retention days: 7 days
    • Cleanup interval: 24 hours

Dependencies

  • @modelcontextprotocol/sdk: ^1.7.0
  • xlsx: ^0.18.5
  • typescript: ^5.8.2

Development Dependencies

  • @types/node: ^22.13.10
  • nodemon: ^3.1.9
  • ts-node: ^10.9.2

License

This project is licensed under the MIT License. This means you are free to:

  • Use the software for commercial or non-commercial purposes

  • Modify the source code

  • Distribute original or modified code Requirements:

  • Retain the original copyright notice

  • No liability can be claimed against the authors for software use For detailed license information,please see the LICENSE file.

Recommended Servers

Crypto Price & Market Analysis MCP Server

Crypto Price & Market Analysis MCP Server

A Model Context Protocol (MCP) server that provides comprehensive cryptocurrency analysis using the CoinCap API. This server offers real-time price data, market analysis, and historical trends through an easy-to-use interface.

Featured
TypeScript
MCP PubMed Search

MCP PubMed Search

Server to search PubMed (PubMed is a free, online database that allows users to search for biomedical and life sciences literature). I have created on a day MCP came out but was on vacation, I saw someone post similar server in your DB, but figured to post mine.

Featured
Python
dbt Semantic Layer MCP Server

dbt Semantic Layer MCP Server

A server that enables querying the dbt Semantic Layer through natural language conversations with Claude Desktop and other AI assistants, allowing users to discover metrics, create queries, analyze data, and visualize results.

Featured
TypeScript
mixpanel

mixpanel

Connect to your Mixpanel data. Query events, retention, and funnel data from Mixpanel analytics.

Featured
TypeScript
Sequential Thinking MCP Server

Sequential Thinking MCP Server

This server facilitates structured problem-solving by breaking down complex issues into sequential steps, supporting revisions, and enabling multiple solution paths through full MCP integration.

Featured
Python
Nefino MCP Server

Nefino MCP Server

Provides large language models with access to news and information about renewable energy projects in Germany, allowing filtering by location, topic (solar, wind, hydrogen), and date range.

Official
Python
Vectorize

Vectorize

Vectorize MCP server for advanced retrieval, Private Deep Research, Anything-to-Markdown file extraction and text chunking.

Official
JavaScript
Mathematica Documentation MCP server

Mathematica Documentation MCP server

A server that provides access to Mathematica documentation through FastMCP, enabling users to retrieve function documentation and list package symbols from Wolfram Mathematica.

Local
Python
kb-mcp-server

kb-mcp-server

An MCP server aimed to be portable, local, easy and convenient to support semantic/graph based retrieval of txtai "all in one" embeddings database. Any txtai embeddings db in tar.gz form can be loaded

Local
Python
Research MCP Server

Research MCP Server

The server functions as an MCP server to interact with Notion for retrieving and creating survey data, integrating with the Claude Desktop Client for conducting and reviewing surveys.

Local
Python