Excel MCP Server

Excel MCP Server

An MCP server that provides comprehensive Excel file operations, data analysis, and visualization capabilities for working with various spreadsheet formats like XLSX, CSV, and JSON.

Category
Visit Server

Tools

read_excel

Read an Excel file and return its contents as a string. Args: file_path: Path to the Excel file sheet_name: Name of the sheet to read (only for .xlsx, .xls) nrows: Maximum number of rows to read header: Row to use as header (0-indexed) Returns: String representation of the Excel data

write_excel

Write data to an Excel file. Args: file_path: Path to save the Excel file data: Data in CSV or JSON format sheet_name: Name of the sheet (for Excel files) format: Format of the input data ('csv' or 'json') Returns: Confirmation message

update_excel

Update an existing Excel file with new data. Args: file_path: Path to the Excel file to update data: New data in CSV or JSON format sheet_name: Name of the sheet to update (for Excel files) format: Format of the input data ('csv' or 'json') Returns: Confirmation message

analyze_excel

Perform statistical analysis on Excel data. Args: file_path: Path to the Excel file columns: Comma-separated list of columns to analyze (analyzes all numeric columns if None) sheet_name: Name of the sheet to analyze (for Excel files) Returns: JSON string with statistical analysis

filter_excel

Filter Excel data using a pandas query string. Args: file_path: Path to the Excel file query: Pandas query string (e.g., "Age > 30 and Department == 'Sales'") sheet_name: Name of the sheet to filter (for Excel files) Returns: Filtered data as string

pivot_table

Create a pivot table from Excel data. Args: file_path: Path to the Excel file index: Column to use as the pivot table index columns: Optional column to use as the pivot table columns values: Column to use as the pivot table values aggfunc: Aggregation function ('mean', 'sum', 'count', etc.) sheet_name: Name of the sheet to pivot (for Excel files) Returns: Pivot table as string

export_chart

Create a chart from Excel data and return as an image. Args: file_path: Path to the Excel file x_column: Column to use for x-axis y_column: Column to use for y-axis chart_type: Type of chart ('line', 'bar', 'scatter', 'hist') sheet_name: Name of the sheet to chart (for Excel files) Returns: Chart as image

data_summary

Generate a comprehensive summary of the data in an Excel file. Args: file_path: Path to the Excel file sheet_name: Name of the sheet to summarize (for Excel files) Returns: Comprehensive data summary as string

README

Excel MCP Server

An MCP server that provides comprehensive Excel file management and data analysis capabilities.

Features

  • Excel File Operations

    • Read multiple Excel formats (XLSX, XLS, CSV, TSV, JSON)
    • Write and update Excel files
    • Get file information and sheet names
  • Data Analysis

    • Summary statistics and descriptive analysis
    • Data quality assessment
    • Pivot tables
    • Filtering and querying data
  • Visualization

    • Generate charts and plots from Excel data
    • Create data previews
    • Export visualizations as images

Installation

  1. Create a new Python environment (recommended):
# Using uv (recommended)
uv init excel-mcp-server
cd excel-mcp-server
uv venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate

# Or using pip
python -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
  1. Install dependencies:
# Using uv
uv pip install -r requirements.txt

# Or using pip
pip install -r requirements.txt

Integration with Claude Desktop

  1. Install Claude Desktop
  2. Open Settings and go to the Developer tab
  3. Edit claude_desktop_config.json:
{
  "mcpServers": {
      "command": "uvx",
      "args": [
        "mcp-excel-server"
      ],
      "env": {
        "PYTHONPATH": "/path/to/your/python"
      }
  }
}

Available Tools

File Reading

  • read_excel: Read Excel files
  • get_excel_info: Get file details
  • get_sheet_names: List worksheet names

Data Analysis

  • analyze_excel: Perform statistical analysis
  • filter_excel: Filter data by conditions
  • pivot_table: Create pivot tables
  • data_summary: Generate comprehensive data summary

Data Visualization

  • export_chart: Generate charts
    • Supports line charts, bar charts, scatter plots, histograms

File Operations

  • write_excel: Write new Excel files
  • update_excel: Update existing Excel files

Available Resources

  • excel://{file_path}: Get file content
  • excel://{file_path}/info: Get file structure information
  • excel://{file_path}/preview: Generate data preview image

Prompt Templates

  • analyze_excel_data: Guided template for Excel data analysis
  • create_chart: Help create data visualizations
  • data_cleaning: Assist with data cleaning

Usage Examples

  • "Analyze my sales_data.xlsx file"
  • "Create a bar chart for product_sales.csv"
  • "Filter employees over 30 in employees.xlsx"
  • "Generate a pivot table of department sales"

Security Considerations

  • Read files only from specified paths
  • Limit file size
  • Prevent accidental file overwriting
  • Strictly control data transformation operations

Dependencies

  • pandas
  • numpy
  • matplotlib
  • seaborn

License

MIT License

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured