Price Per TokenPrice Per Token
Excel MCP Server

Excel MCP Server

by msaltnet

GitHub 4 242 uses Remote
0

About

Excel MCP Server enables AI coding assistants to search, read, and analyze Excel spreadsheets stored locally on your computer. It provides intelligent file discovery and data extraction capabilities that transform complex workbook contents into structured formats for AI processing. Key capabilities: - Recursive directory scanning to locate .xlsx and .xls files across your local file system - Full content extraction from individual worksheets with conversion to JSON format - Text search across spreadsheet cells to quickly find specific values and data - Metadata retrieval including file paths, sizes, and modification timestamps - Configurable security controls that restrict access to designated working directories - Multi-worksheet support for accessing specific sheets or entire workbooks

README

Excel Search MCP

A Model Context Protocol (MCP) server for searching and reading Excel files from your local PC

[](https://smithery.ai/) [](https://python.org) [](LICENSE) [](https://modelcontextprotocol.io/)

한국어 문서 | English Documentation

📋 Project Overview

This project provides a Model Context Protocol (MCP) server that enables AI models to search and read Excel files from your local PC. It allows AI clients supporting MCP (such as Claude Desktop, Cursor) to directly search and analyze Excel files through a standardized interface.

🎯 Key Features

  • Excel File Search: Recursively search for Excel files in specified directories
  • File Metadata: Provide comprehensive metadata including file paths, sizes, modification dates
  • Data Extraction: Convert Excel file contents to JSON format for AI consumption
  • Text Search: Search for specific text within Excel files
  • Multi-worksheet Support: Handle multiple worksheets and individual worksheet access
  • Security Controls: Restrict file access through work directory limitations
  • 🏗️ Architecture

    System Diagram

    ┌─────────────────┐    ┌─────────────────┐    ┌─────────────────┐
    │   AI Client     │◄──►│  MCP Server     │◄──►│  Excel Files    │
    │   (Claude, etc) │    │  (Python)       │    │  (.xlsx, .xls)  │
    └─────────────────┘    └─────────────────┘    └─────────────────┘
                                  │
                                  ▼
                           ┌─────────────────┐
                           │  File System    │
                           │  (Directory     │
                           │   Scanning)     │
                           └─────────────────┘
    

    Core Components

    1. MCP Server Core (src/server.py) - MCP protocol implementation - Client communication management - Request/response handling

    2. Excel Processor (src/excel_processor.py) - Excel file reading/parsing - Worksheet data extraction - JSON conversion logic

    3. File Scanner (src/file_scanner.py) - Recursive directory scanning - Excel file filtering - File metadata collection

    4. Config Manager (src/config_manager.py) - Configuration file management - Security policy enforcement - Work directory restrictions

    🛠️ Technology Stack

  • Language: Python 3.8+
  • MCP Framework: mcp (Model Context Protocol)
  • Excel Processing: openpyxl, pandas
  • File System: pathlib, os
  • Data Conversion: json
  • Logging: logging
  • Testing: pytest
  • 📁 Project Structure

    excel-search-mcp/
    ├── src/
    │   ├── __init__.py
    │   ├── server.py              # MCP server main
    │   ├── excel_processor.py     # Excel file processing
    │   ├── file_scanner.py        # File scanning
    │   ├── config_manager.py      # Configuration management
    │   └── data_formatter.py      # Data formatting
    ├── tests/
    │   ├── test_server.py
    │   └── test_simple.py
    ├── sample/                    # Sample Excel files
    ├── requirements.txt
    ├── pyproject.toml
    ├── config.json               # Configuration file
    └── README.md
    

    🚀 Installation & Setup

    1. Install Dependencies

    pip install -r requirements.txt
    

    2. Configure Settings

    Create a config.json file to set your work directory:

    {
      "work_directory": "/path/to/your/excel/files",
      "excel": {
        "supported_extensions": [".xlsx", ".xls", ".xlsm", ".xlsb"],
        "max_file_size_mb": 100,
        "max_files_per_search": 1000,
        "recursive_search": true
      }
    }
    

    3. MCP Client Configuration

    #### Claude Desktop Configuration (claude_desktop_config.json)

    {
      "mcpServers": {
        "excel-search-mcp": {
          "command": "python",
          "args": ["C:/path/to/excel-search-mcp/src/server.py"],
          "env": {}
        }
      }
    }
    

    #### Cursor Configuration (cursor_mcp_config.json)

    {
      "mcpServers": {
        "excel-search-mcp": {
          "command": "python",
          "args": ["C:/path/to/excel-search-mcp/src/server.py"]
        }
      }
    }
    

    📊 Available Tools

    1. list_excel_files

    Returns a list of Excel files in the specified directory.

    Parameters: None (uses work_directory from config file)

    Return Value:

    {
      "success": true,
      "directory": "/path/to/directory",
      "total_files": 5,
      "scanned_files": 100,
      "files": [
        {
          "file_path": "/path/to/file.xlsx",
          "file_name": "file.xlsx",
          "file_size": 1024000,
          "modified_time": "2024-01-01T12:00:00Z",
          "created_time": "2024-01-01T10:00:00Z",
          "extension": ".xlsx"
        }
      ],
      "supported_extensions": [".xlsx", ".xls", ".xlsm", ".xlsb"]
    }
    

    2. read_excel_data

    Reads Excel file data and converts it to JSON format.

    Parameters:

  • file_path (required): Absolute path to the Excel fi
  • Related MCP Servers

    AI Research Assistant

    AI Research Assistant

    hamid-vakilzadeh

    AI Research Assistant provides comprehensive access to millions of academic papers through the Semantic Scholar and arXiv databases. This MCP server enables AI coding assistants to perform intelligent literature searches, citation network analysis, and paper content extraction without requiring an API key. Key features include: - Advanced paper search with multi-filter support by year ranges, citation thresholds, field of study, and publication type - Title matching with confidence scoring for finding specific papers - Batch operations supporting up to 500 papers per request - Citation analysis and network exploration for understanding research relationships - Full-text PDF extraction from arXiv and Wiley open-access content (Wiley TDM token required for institutional access) - Rate limits of 100 requests per 5 minutes with options to request higher limits through Semantic Scholar

    Web & Search
    12 8
    Linkup

    Linkup

    LinkupPlatform

    Linkup is a real-time web search and content extraction service that enables AI assistants to search the web and retrieve information from trusted sources. It provides source-backed answers with citations, making it ideal for fact-checking, news gathering, and research tasks. Key features of Linkup: - Real-time web search using natural language queries to find current information, news, and data - Page fetching to extract and read content from any webpage URL - Search depth modes: Standard for direct-answer queries and Deep for complex research across multiple sources - Source-backed results with citations and context from relevant, trustworthy websites - JavaScript rendering support for accessing dynamic content on JavaScript-heavy pages

    Web & Search
    2 24
    Math-MCP

    Math-MCP

    EthanHenrickson

    Math-MCP is a computation server that enables Large Language Models (LLMs) to perform accurate numerical calculations through the Model Context Protocol. It provides precise mathematical operations via a simple API to overcome LLM limitations in arithmetic and statistical reasoning. Key features of Math-MCP: - Basic arithmetic operations: addition, subtraction, multiplication, division, modulo, and bulk summation - Statistical analysis functions: mean, median, mode, minimum, and maximum calculations - Rounding utilities: floor, ceiling, and nearest integer rounding - Trigonometric functions: sine, cosine, tangent, and their inverses with degrees and radians conversion support

    Developer Tools
    22 81