csv-analyzer

csv-analyzer

A local MCP server for analyzing CSV files from your filesystem, particularly suited for chatbot conversation logs. Allows listing, reading, filtering, merging, and statistical analysis of CSV data via natural language.

Category
Visit Server

README

CSV Analyzer MCP Server (Local)

A local Model Context Protocol (MCP) server for analyzing CSV files directly from your filesystem. Specifically designed for chatbot conversation logs analysis, such as analyzing customer support logs, chatbot interactions, and any conversational data stored in CSV format.

Features

  • šŸ“ List CSV files in directories
  • šŸ“– Read and analyze conversation logs
  • āœļø Create and write analysis reports
  • āž• Append data for custom log addition
  • šŸ” Filter and query specific logs
  • šŸ”— Merge multiple log files from different time periods
  • šŸ“Š Statistical analysis of conversation metrics
  • šŸ’¬ Conversational insights by custom topics (e.g. product area), user intent, sentiment
  • šŸ¤– AI-guided prompts for analysis workflows

Why Local?

This server uses local file access (not remote HTTP), which means:

  • āœ… Direct filesystem access - just provide file paths
  • āœ… Works with large CSV files efficiently
  • āœ… No file upload/download needed
  • āœ… Better security - files stay on your machine
  • āœ… Simpler setup - no ports or networking
  • āœ… Perfect for personal CSV analysis

Installation

Prerequisites

  • Python 3.8 or higher
  • Claude Desktop app

Step 1: Clone or Download

# Clone repository
git clone https://github.com/YOUR_USERNAME/csv-mcp-server.git
cd csv-mcp-server

# Or download and extract the ZIP file

Step 2: Create Virtual Environment

# Create virtual environment
python -m venv venv

# Activate it
# On macOS/Linux:
source venv/bin/activate

# On Windows:
venv\Scripts\activate

Step 3: Install Dependencies

pip install -r requirements.txt

Step 4: Test the Server with MCP Inspector

npx @modelcontextprotocol/inspector python server.py

Configuration

Add to Claude Desktop

  1. Find your config file location:

    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%\Claude\claude_desktop_config.json
  2. Edit the config file (create if it doesn't exist):

{
  "mcpServers": {
    "csv-analyzer": {
      "command": "python",
      "args": ["/absolute/path/to/csv-mcp-server/server.py"]
    }
  }
}

Important: Replace /absolute/path/to/csv-mcp-server/server.py with your actual path!

Example paths:

  • macOS: /Users/yourname/projects/csv-mcp-server/server.py
  • Windows: C:\\Users\\yourname\\projects\\csv-mcp-server\\server.py
  1. Restart Claude Desktop

  2. Verify it's working:

    • Look for the šŸ”Ø (hammer) icon in Claude Desktop
    • You should see "csv-analyzer" listed with available tools

Usage Examples

Once configured, you can interact with CSV files naturally in Claude or Cursor:

Example 1: List CSV Files

You: Show me all CSV files in my Downloads folder

Claude: [Uses list_csv_files tool]
I found 5 CSV files in your Downloads folder:
- chatbot_logs.csv (1,234 rows, 8 columns, 2.3 MB)
- customer_data.csv (5,678 rows, 12 columns, 4.1 MB)
...

Example 2: Analyze a CSV

You: Analyze ~/Documents/chatbot_logs.csv

Claude: [Uses analyze_csv tool]
I've analyzed your chatbot_logs data. Here are the key findings:

šŸ“Š Dataset Overview:
- 1,234 rows Ɨ 8 columns
- Date range: July 2025 - September 2025
- File size: 2.3 MB

šŸ” Key Insights:
1. Overall Satisfaction Rate: 94% (thumbs up)
2. Dissatisfaction Rate: 6% (thumbs down)
3. Most Common Positive Feedback: Performance optimization guidance (6 instances)
4. Most Common Negative Feedback: Need for more examples/code implementations
...

Example 3: Filter and Save

You: Filter chatbot_logs.csv where feedback = negative and save to logs_negative_feedback.csv

Claude: [Uses filter_csv tool]
Filtered data:
- Original rows: 1,234
- Filtered rows: 187 (15.2%)
- Saved to: ~/Documents/logs_negative_feedback.csv

Example 4: Merge Files

You: Merge customer_data.csv and chatbot_logs.csv on customer_id

Claude: [Uses merge_csvs tool]
Successfully merged files:
- customer_data.csv: 500 rows
- chatbot_logs.csv: 1,234 rows  
- Merged result: 1,234 rows
- Saved to: merged_output.csv

Available Tools

File Operations

Tool Description
list_csv_files List all CSV files in a directory
read_csv Read data from a CSV file
write_csv Create and write a new CSV file
append_csv Append rows to existing CSV
create_csv Create new CSV with headers
get_csv_info Get detailed file information

Analysis Tools

Tool Description
analyze_csv Comprehensive statistical analysis
categorize_by_product Keyword based categorization (e.g. Product area)
filter_csv Filter data with conditions
merge_csvs Merge two CSV files

Analysis Prompts

Prompt Description
analyze_csv_data Complete workflow for CSV analysis
create_report_from_csv Generate professional data report
compare_csvs Compare two CSV files
clean_csv_data Guide through data cleaning process

Advanced Usage

Custom Analysis Workflows

You can create custom analysis workflows by chaining multiple tools:

You: I want to analyze all CSV files in my Downloads folder, 
find the ones with sales data, filter for amounts over $1000, 
and create a summary report.

Claude: [Will use multiple tools in sequence:
1. list_csv_files to find all CSVs
2. read_csv to peek at each file
3. filter_csv on relevant files
4. analyze_csv for statistics
5. Create formatted report]

Working with Large Files

For large CSV files (>100MB), the server:

  • Reads data efficiently with pandas
  • Can limit rows returned
  • Analyzes without loading all data
  • Provides streaming statistics

Tips:

  • Use rows parameter to limit data read
  • Filter large files before analysis
  • Save filtered results to new files

Data Cleaning Workflow

Use the clean_csv_data prompt for guided cleaning:

You: Help me clean my messy sales data at ~/messy_sales.csv

Claude: [Uses clean_csv_data prompt]
I'll analyze the data and guide you through cleaning it.

Step 1: Initial Assessment...
Found these issues:
- 23 duplicate rows (1.8%)
- Missing values in "amount" column (5%)
- Inconsistent date formats

Step 2: Recommended Fixes...
[Provides detailed recommendations]

[Once approved, creates cleaned version]

Security & Privacy

Data Privacy

  • āœ… All data stays on your local machine
  • āœ… No data sent to external servers
  • āœ… Files accessed only via Claude Desktop
  • āœ… No internet connection required

File Permissions

The server can:

  • āœ… Read CSV files you have access to
  • āœ… Write new files in writable directories
  • āŒ Cannot access system files
  • āŒ Cannot modify without explicit command

Best Practices

  1. Keep sensitive data local - perfect use case for this tool
  2. Use separate folder for analysis outputs
  3. Review changes before overwriting files
  4. Backup important data before cleaning operations

Development

Project Structure

csv-mcp-server/
ā”œā”€ā”€ server.py              # Main server implementation
ā”œā”€ā”€ requirements.txt       # Python dependencies
ā”œā”€ā”€ README.md             # This file
ā”œā”€ā”€ .gitignore            # Git ignore rules
ā”œā”€ā”€ venv/                 # Virtual environment (not in git)
ā”œā”€ā”€ analysis/             # Sample analysis outputs
└── test_data/            # Sample files 

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