excel-mcp-server

A Model Context Protocol server for Excel file manipulation

GitHub Stars

2,252

User Rating

Not Rated

Favorites

0

Views

101

Forks

252

Issues

28

Installation
Difficulty
Intermediate
Estimated Time
10-20 minutes
Requirements
Python: 3.7 or higher
pip: Latest version

Installation

Installation

Prerequisites

Please specify required software and versions:
Python: 3.7 or higher
pip: Latest version

Installation Steps

1. Clone Repository

bash
git clone https://github.com/haris-musa/excel-mcp-server.git
cd excel-mcp-server

2. Install Dependencies

bash
pip install -r requirements.txt

3. Start Server

bash
uvx excel-mcp-server stdio

Troubleshooting

Common Issues

Issue: Server won't start Solution: Check Python version and reinstall dependencies. Issue: Excel files are not being read Solution: Ensure the EXCEL_FILES_PATH environment variable is set correctly.

Configuration

Configuration

Basic Configuration

Environment Variables

Set the EXCEL_FILES_PATH environment variable to specify where the server reads and writes Excel files.
bash
export EXCEL_FILES_PATH="/path/to/excel/files"

Port Configuration

Set the FASTMCP_PORT environment variable to control the port the server listens on (default is 8000).
bash
export FASTMCP_PORT="8000"

Examples

Examples

Basic Usage

Here are basic usage examples for the MCP server:

Starting the Server

bash
uvx excel-mcp-server stdio

Manipulating Excel Files

python
import requests

response = requests.post('http://localhost:8000/mcp/call', json={
    'tool': 'create_workbook',
    'parameters': {'filename': 'example.xlsx'}
})
print(response.json())

Use Cases

Automate data analysis using AI agents.
Create scripts to bulk format large sets of Excel data.
Develop applications that dynamically generate Excel files based on user input.
Build tools to validate Excel files for data integrity.