MCP File Analyzer MCP Server

Local setup required. This server has to be cloned and prepared on your machine before you register it in Claude Code.
1

Set the server up locally

Run this once to clone and prepare the server before adding it to Claude Code.

Run in terminal
pip install mcp>=1.0.0 pandas>=2.0.0 pyarrow>=10.0.0
2

Register it in Claude Code

After the local setup is done, run this command to point Claude Code at the built server.

Run in terminal
claude mcp add mcp-file-analyzer -- node "<FULL_PATH_TO_MCP>/dist/index.js"

Replace <FULL_PATH_TO_MCP>/dist/index.js with the actual folder you prepared in step 1.

README.md

Analyze CSV and Parquet files using natural language with Claude

MCP File Analyzer: Complete Setup & Usage Guide

This guide will walk you through setting up a Model Context Protocol (MCP) server that can analyze CSV and Parquet files, and connecting it to Claude Desktop for natural language data analysis.

🎯 What You'll Build

A powerful data analysis tool that allows Claude to:

  • 📊 Read and analyze CSV/Parquet files
  • 📈 Generate statistical summaries
  • 👀 Show data previews and structure
  • 🔧 Create sample datasets
  • 💬 Answer natural language questions about your data

What is MCP?

Model Context Protocol (MCP) is a standardized way to connect AI assistants like Claude to external tools and data sources. It allows you to:

  • 🔐 Give Claude access to your local files (securely)
  • 🛠️ Create custom tools that Claude can use
  • 🔄 Build reusable AI workflows
  • 🏠 Keep your data secure and local (no API keys needed!)

Quick Start

⚡ For the Impatient

# Clone or create project directory
mkdir mcp-file-analyzer && cd mcp-file-analyzer

# Set up virtual environment
python3 -m venv .venv && source .venv/bin/activate

# Install dependencies
pip install mcp>=1.0.0 pandas>=2.0.0 pyarrow>=10.0.0

# Create and test the server (copy main.py and client.py from this repo)
python main.py  # Start server (Ctrl+C to stop)
python client.py  # Test the connection

# Configure Claude Desktop (see detailed steps below)

Prerequisites

Before you begin, make sure you have:

  • Python 3.8 or higher installed
  • pip (Python package manager)
  • Claude Desktop installed (download here)
  • macOS, Windows, or Linux (Claude Desktop support varies)

Check your Python version:

python3 --version  # Should be 3.8+

Project Setup

Step 1: Create Project and Virtual Environment

# Create project directory
mkdir mcp-file-analyzer
cd mcp-file-analyzer

# Create virtual environment
python3 -m venv .venv

# Activate virtual environment
# On macOS/Linux:
source .venv/bin/activate
# On Windows:
.venv\Scripts\activate

Step 2: Install Dependencies

Create requirements.txt:

# Core dependencies for MCP File Analyzer
mcp>=1.0.0
pandas>=2.0.0
pyarrow>=10.0.0

# HTTP client dependencies (optional)
httpx>=0.27.0

# Development dependencies (optional)
# pytest>=7.0.0
# black>=23.0.0
# flake8>=6.0.0

Install dependencies:

pip install -r requirements.txt

Step 3: Create Project Files

Your project needs these core files:

  1. main.py - The MCP server
  2. client.py - Testing client
  3. requirements.txt - Dependencies
  4. run_mcp_server.sh - Launcher script for Claude Desktop
  5. claude_desktop_config.json - Claude Desktop configuration

Step 4: Create Helper Scripts

Create activate_env.sh for easy environment activation:

#!/bin/bash
echo "🚀 Activating virtual environment..."
source .venv/bin/activate
echo "✅ Virtual environment activated!"
echo "📦 Installed packages:"
pip list --format=columns
echo ""
echo "🎯 Quick start commands:"
echo "  - Run MCP server: python main.py"
echo "  - Run demo client: python client.py"
echo "  - Interactive client: python client.py interactive"

Make it executable:

chmod +x activate_env.sh

Claude Desktop Integration

🎯 Method 1: Direct Integration (Recommended)

Step 1: Create Launcher Script

Create run_mcp_server.sh:

#!/bin/bash
# MCP Server Launcher for Claude Desktop

# Get the directory where this script is located
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )"

# Change to the script directory
cd "$SCRIPT_DIR"

# Activate the virtual environment
source .venv/bin/activate

# Run the MCP server
python main.py

Make it executable:

chmod +x run_mcp_server.sh
Step 2: Create Claude Desktop Configuration

Create claude_desktop_config.json:

{
  "mcpServers": {
    "file_analyzer": {
      "command": "/ABSOLUTE/PATH/TO/YOUR/PROJECT/run_mcp_server.sh",
      "args": []
    }
  }
}

Important: Replace /ABSOLUTE/PATH/TO/YOUR/PROJECT with your actual project path. Get it with:

pwd  # Copy this output
Step 3: Install Configuration in Claude Desktop

Copy the configuration to Claude Desktop:

macOS:

cp claude_desktop_config.json ~/Library/Application\ Support/Claude/claude_desktop_config.json

Windows:

copy claude_desktop_config.json %APPDATA%\Claude\claude_desktop_config.json

Linux:

cp claude_desktop_config.json ~/.config/clau

Tools (2)

analyze_fileProvides statistical summaries and structure exploration for CSV or Parquet files.
preview_dataShows a preview of the data contained within a file.

Configuration

claude_desktop_config.json
{"mcpServers": {"file_analyzer": {"command": "/ABSOLUTE/PATH/TO/YOUR/PROJECT/run_mcp_server.sh", "args": []}}}

Try it

Analyze the sales_data.csv file and provide a statistical summary of the columns.
Show me a preview of the first 10 rows of my data.parquet file.
What is the structure of the dataset in user_logs.csv?
Can you summarize the distribution of values in the 'price' column of my dataset?

Frequently Asked Questions

What are the key features of MCP File Analyzer?

Read and analyze CSV and Parquet files. Generate statistical summaries of datasets. Display data previews and file structure. Create sample datasets. Answer natural language questions about local data.

What can I use MCP File Analyzer for?

Quickly exploring the contents of large CSV files without opening spreadsheet software. Performing ad-hoc statistical analysis on local Parquet data files. Validating data structure and column types before importing into a database. Generating sample data for testing applications.

How do I install MCP File Analyzer?

Install MCP File Analyzer by running: pip install mcp>=1.0.0 pandas>=2.0.0 pyarrow>=10.0.0

What MCP clients work with MCP File Analyzer?

MCP File Analyzer works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep MCP File Analyzer docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare