Skip to main content
Glama
Navneet1710

csv-mcp-server

by Navneet1710

šŸš€ CSV MCP Server — Bring Your Data to Life in Claude

Why This Matters

If you've ever tried to analyze CSV files in Claude.ai, you know the pain — it can't read your files directly. You end up:

  • Copying and pasting CSV snippets (and hitting character limits)

  • Uploading your data to other tools

  • Manually describing what's inside your CSV

That's time-consuming and breaks your workflow.

Related MCP server: mix_server

Enter the CSV MCP Server

This lightweight connector lets Claude directly access and analyze your local CSV files — privately, efficiently, and in real time.

With it, you can simply say:

"Claude, show me all customers from New York with purchases over $1000,"

and Claude will query your actual file.

What This Server Does

Once connected, Claude can:

āœ… List your local CSV files

āœ… Preview structure and sample data

āœ… Run queries using natural language or Pandas syntax

āœ… Generate quick summaries (mean, median, count, etc.)

āœ… Handle large datasets — all without sending data online

Everything runs locally — your files never leave your system.

Why It's Different

  • Local-first & private: your data stays on your device

  • Fast: built using FastMCP

  • Extendable: easily add Excel, TSV, or custom logic

  • Seamless: Claude becomes your personal data assistant

Quick Start

Requirements

  • Python 3.11 or higher

  • Claude Desktop app

  • uv (recommended package manager)

1. Clone the Repository

git clone https://github.com/Navneet1710/csv_mcp_server.git
cd csv_mcp_server
uv init .

2. Install Dependencies

Using uv, add the required packages:

uv add fastmcp
uv add pandas

3. Set Your CSV Directory

Open main.py and edit line 14 to match where your CSV files are stored:

CSV_DIRECTORY = Path.home() / "Documents" / "csv_files"  # customize this if needed

4. Run the Server

Start the MCP server with:

uv run main.py

For development or inspection mode (to see tools, logs, and capabilities):

uv run fastmcp dev main.py

Connecting to Claude Desktop

Open your Claude configuration file:

OS

Path

Windows

%APPDATA%\Claude\claude_desktop_config.json

macOS

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

Linux

~/.config/Claude/claude_desktop_config.json

Add this MCP server entry:

"csv-analyzer": {
      "command": uv,
      "args": [
        "--directory",
        "path\\to\\csv_mcp_server",
        "run",
        "main.py"
      ]
}

Save and restart Claude Desktop.

Using It Inside Claude

Once connected, try commands like:

List all CSVs

"What CSV files are available?"

Preview a file

"Show me the first few rows of sales_data.csv."

Run queries

"From customer_data.csv, show all entries where purchase > 500."

Summarize data

"Give me the average revenue in financial_report.csv."

Analyze relationships

"Find the correlation between 'age' and 'satisfaction_score' in survey_results.csv."

Tools and Resources

Type

Name

Description

Resource

csv://list

Lists all available CSV files

Resource

csv://{filename}

Preview a CSV (first 10 rows)

Tool

read_csv(filename, rows)

Read full or partial CSV data

Tool

get_csv_info(filename)

Get metadata and structure

Tool

query_csv(filename, query)

Filter data using Pandas query syntax

Tool

get_csv_statistics(filename, column)

Compute descriptive statistics

Default Folder Structure

By default, CSV files live in:

Documents/
└── csv_files/
    ā”œā”€ā”€ sales_data.csv
    ā”œā”€ā”€ customer_info.csv
    ā”œā”€ā”€ inventory.csv
    └── financial_report.csv

Customization

  • Change CSV directory → edit CSV_DIRECTORY in main.py

  • Add support for Excel/TSV → update the file-reading logic

  • Create your own tools → add new @mcp.tool() functions for custom analysis

Troubleshooting

"Directory does not exist"

→ Make sure the path exists or create it:

mkdir -p ~/Documents/csv_files

"File not found"

→ Check spelling and ensure the file is inside your configured directory.

Claude doesn't detect the server

→ Restart Claude Desktop and confirm the config file path.

Permission issues

→ Ensure Claude has read access to the directory (run as admin on Windows if needed).

Debugging

Run directly:

uv run main.py

Contributing

Got an idea or improvement? Contributions are welcome!

  1. Fork this repo

  2. Create a feature branch

  3. Add your changes

  4. Submit a pull request

License

Open source — use, modify, and share freely.

Built With

  • FastMCP — for fast, local MCP integration

  • pandas — for data manipulation and statistics

  • Anthropic's MCP — for connecting Claude to your environment


Turn Claude Into Your Personal Data Analyst

Set this up once — and from then on, you can explore and analyze your CSVs right inside Claude.

No uploads, no manual parsing, no limits.

Run it locally. Keep your data private. Get instant insights.

Make sure you don't forget to star the repo

Available Tools

4 tools
get_csv_infoC

Get detailed information about a CSV file

Args: filename: Name of the CSV file

ParametersJSON Schema
NameRequiredDescriptionDefault
filenameYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

C2.4/5.0
Behavior1/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations and no description of behavioral traits (e.g., read safety, error behavior, side effects), the agent has no insight into tool behavior. The description is purely functional with no disclosure.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise, consisting of a single sentence and a parameter list. While not verbose, it sacrifices informative content for brevity, providing only the bare minimum.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given an output schema exists, the description does not explain what information is returned (e.g., encoding, column count, row count). The sibling tools suggest different data focuses, but the description does not align with the available context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The only parameter 'filename' has 0% schema description coverage. The description repeats the parameter name as 'Name of the CSV file,' adding negligible meaning beyond the parameter name itself. It does not specify format, constraints, or examples.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool retrieves detailed information about a CSV file, distinguishing it from siblings like get_csv_statistics (statistical data) and read_csv (raw content). However, it lacks specifics on what constitutes 'detailed information.'

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives (e.g., get_csv_statistics, query_csv). The description does not mention prerequisites, limitations, or context of use.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_csv_statisticsC

Get statistical summary of a CSV file or specific column

Args: filename: Name of the CSV file column: Optional specific column name to analyze

ParametersJSON Schema
NameRequiredDescriptionDefault
filenameYes
columnNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, and the description only states the function without disclosing behavior such as error handling, file existence requirements, or whether it modifies data. Minimal behavioral insight.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Description is short and includes an Args section. Efficiently conveys the core purpose, though could be more structured with separate sentences for each parameter.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Has an output schema, so return value details are not required, but the description does not mention what statistics are computed. Fails to contextualize among sibling tools.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema has 0% description coverage, so the description adds basic semantics for filename and column parameters, but lacks details like path format or valid column names.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it provides a statistical summary of a CSV file or specific column. It distinguishes from siblings like get_csv_info by mentioning 'statistical summary', though it could specify what statistics are included.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives like get_csv_info, query_csv, or read_csv. Does not specify prerequisites or scenarios where this tool is appropriate.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

query_csvA

Query a CSV file using pandas query syntax

Args: filename: Name of the CSV file query: Pandas query string (e.g., "age > 30 and city == 'NYC'")

ParametersJSON Schema
NameRequiredDescriptionDefault
filenameYes
queryYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations, so description carries full burden. Discloses query syntax and provides example, but omits error handling, performance considerations, or behavior on missing data.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Highly concise: single sentence for purpose, then structured Args block. No wasted words; front-loaded with key information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Simple tool with output schema present; description covers core functionality. Could mention return format or edge cases, but sufficient for typical use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage 0%, description adds meaning: 'Name of the CSV file' clarifies filename, and query includes an example. Adequately compensates for lack of schema descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clear verb 'Query' and resource 'CSV file' with specific method 'pandas query syntax'. Distinct from siblings like get_csv_info, get_csv_statistics, read_csv.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Implied usage for filtering data, but no explicit guidance on when to use this tool over siblings. Lacks exclusions or alternative recommendations.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

read_csvA

Read a CSV file and return its contents

Args: filename: Name of the CSV file to read rows: Optional number of rows to return (returns all if not specified)

ParametersJSON Schema
NameRequiredDescriptionDefault
filenameYes
rowsNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.5/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided. Description covers basic behavior (read and return) but omits details like encoding, error handling, performance implications, or file format assumptions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Extremely concise with no wasted words. Purpose stated first, then parameter descriptions. Front-loaded and efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given an output schema exists, the description adequately covers core functionality. Minor gaps: encoding, delimiter, error behavior. Sibling tools not addressed but acceptable for a read operation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage 0%, but description adds meaningful context: filename explained as 'Name of the CSV file' and rows as 'Optional number of rows to return (returns all if not specified)'. Compensates well for missing schema descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states it reads a CSV file and returns contents. Does not explicitly distinguish from siblings like get_csv_info or query_csv, but the purpose is evident.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides minimal guidance: mentions optional row limit but no when-to-use vs alternatives. No context on when to choose this over query_csv or get_csv_info.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 4 tool updatesv0.1.0
    • First observedget_csv_info
    • First observedget_csv_statistics
    • First observedquery_csv
    • First observedread_csv

TDQS

B3.4/5.0
Disambiguation5/5

Each tool has a clear, distinct purpose: metadata (get_csv_info), statistics (get_csv_statistics), query/filtering (query_csv), and raw data retrieval (read_csv). No overlapping functionality.

Naming Consistency5/5

All tool names follow a consistent verb_noun pattern with snake_case, using 'get_csv_' for info and statistics, and straightforward verbs for the others.

Tool Count5/5

4 tools is a well-scoped set for a CSV server, covering the essential read operations without unnecessary bloat.

Completeness3/5

The tool surface covers read operations comprehensively but lacks write or edit capabilities (e.g., create, update, delete rows or columns), which limits full CRUD coverage.

Maintenance

ActivityInactive
ResponsivenessNo issues

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    B
    quality
    D
    maintenance
    Enables users to analyze local Excel and CSV files through natural language queries and a web dashboard while keeping data local. It supports saving specific analyses as reusable tools and building a custom analytics toolkit within Claude Desktop.
    10
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables AI assistants to interact with local CSV and Parquet data files through natural language queries, facilitating tasks like summarizing datasets or retrieving specific information.
    5
    -
  • F
    license
    B
    quality
    D
    maintenance
    Enables Claude to answer natural language questions about your Apple Health data by analyzing local CSV exports, supporting metrics like steps, heart rate, sleep, and more.
    6
    2
    -

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Navneet1710/csv_mcp_server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server