Cover image
Try Now
2025-02-20

A Model Context Protocol (MCP) server for reading Excel files with automatic chunking and pagination support. Built with SheetJS and TypeScript.

3 years

Works with Finder

1

Github Watches

3

Github Forks

15

Github Stars

MCP Excel Reader

smithery badge A Model Context Protocol (MCP) server for reading Excel files with automatic chunking and pagination support. Built with SheetJS and TypeScript, this tool helps you handle large Excel files efficiently by automatically breaking them into manageable chunks.

Excel Reader MCP server

Features

  • 📊 Read Excel files (.xlsx, .xls) with automatic size limits
  • 🔄 Automatic chunking for large datasets
  • 📑 Sheet selection and row pagination
  • 📅 Proper date handling
  • ⚡ Optimized for large files
  • 🛡️ Error handling and validation

Installation

Installing via Smithery

To install Excel Reader for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install @ArchimedesCrypto/excel-reader-mcp-chunked --client claude

As an MCP Server

  1. Install globally:
npm install -g @archimdescrypto/excel-reader
  1. Add to your MCP settings file (usually at ~/.config/claude/settings.json or equivalent):
{
  "mcpServers": {
    "excel-reader": {
      "command": "excel-reader",
      "env": {}
    }
  }
}

For Development

  1. Clone the repository:
git clone https://github.com/ArchimdesCrypto/mcp-excel-reader.git
cd mcp-excel-reader
  1. Install dependencies:
npm install
  1. Build the project:
npm run build

Usage

Usage

The Excel Reader provides a single tool read_excel with the following parameters:

interface ReadExcelArgs {
  filePath: string;      // Path to Excel file
  sheetName?: string;    // Optional sheet name (defaults to first sheet)
  startRow?: number;     // Optional starting row for pagination
  maxRows?: number;      // Optional maximum rows to read
}

// Response format
interface ExcelResponse {
  fileName: string;
  totalSheets: number;
  currentSheet: {
    name: string;
    totalRows: number;
    totalColumns: number;
    chunk: {
      rowStart: number;
      rowEnd: number;
      columns: string[];
      data: Record<string, any>[];
    };
    hasMore: boolean;
    nextChunk?: {
      rowStart: number;
      columns: string[];
    };
  };
}

Basic Usage

When used with Claude or another MCP-compatible AI:

Read the Excel file at path/to/file.xlsx

The AI will use the tool to read the file, automatically handling chunking for large files.

Features

  1. Automatic Chunking

    • Automatically splits large files into manageable chunks
    • Default chunk size of 100KB
    • Provides metadata for pagination
  2. Sheet Selection

    • Read specific sheets by name
    • Defaults to first sheet if not specified
  3. Row Pagination

    • Control which rows to read with startRow and maxRows
    • Get next chunk information for continuous reading
  4. Error Handling

    • Validates file existence and format
    • Provides clear error messages
    • Handles malformed Excel files gracefully

Extending with SheetJS Features

The Excel Reader is built on SheetJS and can be extended with its powerful features:

Available Extensions

  1. Formula Handling

    // Enable formula parsing
    const wb = XLSX.read(data, {
      cellFormula: true,
      cellNF: true
    });
    
  2. Cell Formatting

    // Access cell styles and formatting
    const styles = Object.keys(worksheet)
      .filter(key => key[0] !== '!')
      .map(key => ({
        cell: key,
        style: worksheet[key].s
      }));
    
  3. Data Validation

    // Access data validation rules
    const validation = worksheet['!dataValidation'];
    
  4. Sheet Features

    • Merged Cells: worksheet['!merges']
    • Hidden Rows/Columns: worksheet['!rows'], worksheet['!cols']
    • Sheet Protection: worksheet['!protect']

For more features and detailed documentation, visit the SheetJS Documentation.

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

相关推荐

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Khalid kalib
  • Write professional emails

  • Gil kaminski
  • Make sure you are post-ready before you post on social media

  • https://tovuti.be
  • Oede knorrepot die vasthoudt an de goeie ouwe tied van 't boerenleven

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • momi
  • Provides initial medical assessments and advice.

  • WILLIAM JOEL FOTEPING
  • Friendly music guide for 60s-2000s songs, with links to listen online.

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • Yasir Eryilmaz
  • AI scriptwriting assistant for short, engaging video content.

  • huahuayu
  • A unified API gateway for integrating multiple etherscan-like blockchain explorer APIs with Model Context Protocol (MCP) support for AI assistants.

  • deemkeen
  • control your mbot2 with a power combo: mqtt+mcp+llm

  • zhaoyunxing92
  • 本项目是一个钉钉MCP(Message Connector Protocol)服务,提供了与钉钉企业应用交互的API接口。项目基于Go语言开发,支持员工信息查询和消息发送等功能。

  • justmywyw
  • Short and sweet example MCP server / client implementation for Tools, Resources and Prompts.

  • KasarLabs
  • Build powerful and secure AI Agents powered by Starknet.

    Reviews

    1 (1)
    Avatar
    user_2r75MJXK
    2025-04-16

    As a dedicated user of MCP applications, I can say that excel-reader-mcp by ArchimedesCrypto is a fantastic tool! It seamlessly reads Excel files and integrates perfectly with my workflows. The ease of use and efficiency make it a must-have for anyone dealing with data management. Highly recommended! Check it out here: https://github.com/ArchimedesCrypto/excel-reader-mcp.