MCP-Server for Data Analysis
LindseyyyLi
README
MCP-Server for Data Analysis
This server mainly focuses on the tools. FastMCP is used to define and run the server, as well as to expose each tool as an endpoint.
Features
- Read excel file from the desktop
- Perform descriptive analysis
- Create plots (i.e. bar chart, pie chart, line chart, scatter plot, histogram and box plot)
Tools
Listing Excel
Fileslist_excel_files(): Scans the desktop for .xlsx and .xls files and returns a list of filenames.
Reading Excel Files
read_excel_file(filename, sheet_name=None): Reads the specified Excel file from the desktop. By default, reads the first sheet if sheet_name is not provided. Returns basic info about rows, columns, a preview of the first 5 rows, and data types.
Analyzing Excel Files
analyze_excel_data(filename, sheet_name=None): Computes descriptive statistics for numeric, categorical, and date columns. Also calculates a correlation matrix for numeric columns if applicable.
Chart Generation
Each of these tools reads from an Excel file and generates a plot using Matplotlib. The plots are returned as Image objects (in-memory PNG data) and can be handled downstream by whichever client is interacting with the MCP server.
create_bar_chart(filename, x_column, y_column, sheet_name=None, title=None, limit=10)
create_pie_chart(filename, labels_column, values_column, sheet_name=None, title=None, limit=8)
create_line_chart(filename, x_column, y_columns, sheet_name=None, title=None)
create_scatter_plot(filename, x_column, y_column, color_column=None, sheet_name=None, title=None)
create_histogram(filename, column, bins=10, sheet_name=None, title=None)
create_box_plot(filename, columns, sheet_name=None, title=None)
MCP Server
When the script is run directly (i.e., python excel_analytics_server.py), it starts the FastMCP server and registers all the tools above. These tools can then be called by a client that supports the MCP interface.
Usage with Claude Desktop
Prerequisites
- Download Claude Desktop
Step 1: Adding MCP to your python project
# Install uv
curl -LsSf https://astral.sh/uv/install.sh | sh
# Create a new project directory
uv init data_analysis_tool
cd data_analysis_tool
# Create and activate a virtual environment
uv venv
source .venv/bin/activate
# Install dependencies
uv add "mcp[cli]" httpx
Step 2: Create the MCP Server
- Place the file excel_analytics_server.py under the directory data_analysis_tool
- Run
pip install "mcp[cli]" pandas matplotlib openpyxl
Step 3: Test the Server
mcp dev excel_analytics_server.py
Step 4: Connect MCP to Claude
- Add this to your claude_desktop_config.json
"data_analysis_tool": {
"command": "/Users/username/.local/bin/uv", # remember to change the username
"args": [
"--directory",
"xxx/data_analysis_tool", # change it to the directory of data_analysis_tool
"run",
"excel_analytics_server.py"
]
}
Step 5: Done!
- Try it in Claude!
Sample 1:
Sample 2:
Sample 3:
Recommended Servers
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.
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.
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.
mixpanel
Connect to your Mixpanel data. Query events, retention, and funnel data from Mixpanel analytics.

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.

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.
Vectorize
Vectorize MCP server for advanced retrieval, Private Deep Research, Anything-to-Markdown file extraction and text chunking.
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.
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
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.