CSV Analyzer MCP Server

CSV Analyzer MCP Server

csv_analyzer_mcp_server•byjuanmaalt

An MCP server that accepts raw CSV content and returns structured statistics and analysis tools in JSON or Markdown.

License: Not specified•Runtime: Awaiting documentation review•Category: databases storage

WHAT IT DOES

  • •Performs full statistical analysis of a CSV, returning per-column summaries including type, null rate, unique count, and type-specific stats.
  • •Returns the first N rows of a CSV as a Markdown table for inspecting structure and values.
  • •Filters rows by a column condition and returns the result as a CSV string that can be chained into further analysis.
  • •Detects outliers in numeric columns using IQR or z-score methods.

BEST FOR

  • •Asking an AI assistant to analyze CSV data and identify columns with the most nulls.
  • •Chaining filtering and analysis, such as filtering by a condition then analyzing the subset.
  • •Comparing two CSV files by schema, row content, or both to detect changes between dataset versions.

ABOUT CSV_ANALYZER_MCP_SERVER

CSV Analyzer MCP Server is cataloged as an MCP server attributed to juanmaalt. An MCP server that accepts raw CSV content and returns structured statistics and analysis tools in JSON or Markdown. It is categorized under databases storage. See the capability inspector for recorded interfaces and their independent review status; consult upstream documentation for the current interface.

HOW TO INSTALL

Installation configuration is not reviewed. No executable setup is offered for this entry; inspect the source repository before proceeding.

LICENSE

Catalog license label: Not specified. Check the source repository's current license and terms before using, modifying or distributing this software.

能力检查器

能力定义尚未审核。未核验的采集内容不会作为可信接口展示。

Tools (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Resources (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

Prompts (0)

暂无可展示的已审核记录。这不表示上游不支持此能力。

NEWSLETTER - COMING LATER

Newsletter subscriptions are not open yet

Email delivery is not connected. This page does not collect email addresses or create subscriptions.

Browse the registry for current listings instead.

Community Reviews

Coming later

Reviews for CSV Analyzer MCP Server are not available yet

Review publishing and storage are not connected. This page does not collect or publish ratings or comments, including after sign-in.

FREQUENTLY ASKED QUESTIONS

What output formats does the analysis support?

Results can be returned as structured JSON for programmatic use or as Markdown for readable summaries.

What delimiters can be used when parsing CSV content?

Comma, semicolon, tab, pipe, or any custom separator is supported.

Does the server accept file paths or raw CSV content?

It accepts raw CSV text content rather than file paths.

上游原版 README

在 GitHub 查看同一版本原文

README.md · b0d2b9a5e38c · 采集于 2026-11-13 13:21:00 UTC

保留上游原文,不做 AI 改写。为安全起见过滤脚本、表单和不安全链接。

当前显示最后一次成功采集的文档快照,请以来源页面为准。

CSV Analyzer MCP Server

A lightweight MCP server that exposes CSV analysis as tools callable by any MCP-compatible client.

Pass raw CSV content, get back structured statistics — row counts, type detection, null rates, duplicates, distributions, outlier detection, and more — in JSON or Markdown.


What is MCP?

The Model Context Protocol is an open standard that lets AI assistants call external tools. This server exposes CSV analysis as MCP tools, so you can ask Claude things like "analyze this CSV and tell me which columns have the most nulls" or "filter rows where revenue > 10000 and then analyze the result" and get back real computed results.


Features

  • Column-level analysis — type detection, null rate, unique values, min/max/avg/median/std, quartiles, most repeated values, date ranges
  • Frequency distribution — ranked value counts with percentages for any column
  • Outlier detection — IQR and z-score methods across all numeric columns
  • Row filtering — filter by column condition and chain into further analysis
  • Data preview — inspect the first N rows as a Markdown table before analyzing
  • CSV comparison — diff two files by schema, row content, or both
  • Data cleaning — optional deduplication and null-row removal before analysis
  • Dual output formats — structured JSON for programmatic use or Markdown for readable summaries
  • Custom delimiters — comma, semicolon, tab, pipe, or any separator
  • Content-based — accepts raw CSV text, not file paths, making it safe and compatible with remote environments

Installation

Prerequisites: Python ≥ 3.12 and uv

git clone https://github.com/juanmaalt/csv_analyzer_mcp_server.git
cd csv_analyzer_mcp_server
uv sync

Connecting to an MCP Client

Claude Desktop

Add the following to your claude_desktop_config.json (usually at ~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

{
  "mcpServers": {
    "csv_analyzer": {
      "command": "uv",
      "args": [
        "run",
        "--directory",
        "/absolute/path/to/csv_analyzer_mcp_server",
        "python",
        "main.py"
      ]
    }
  }
}

Cursor / VS Code (MCP extension)

{
  "mcp": {
    "servers": {
      "csv_analyzer": {
        "command": "uv",
        "args": [
          "run",
          "--directory",
          "/absolute/path/to/csv_analyzer_mcp_server",
          "python",
          "main.py"
        ]
      }
    }
  }
}

Restart the client after saving the configuration. All tools will appear in the available tools list.


Available Tools

analyze_csv

Full statistical analysis of a CSV file. Returns per-column summaries including type, null rate, unique count, and type-specific stats.

ParameterTypeDefaultDescription
csv_contentstrrequiredFull CSV text content (not a file path)
delimiterstr","Character separating values
remove_duplicatesboolTrueDrop exact duplicate rows before analysis
remove_non_valid_databoolTrueDrop rows with missing/empty fields before analysis
output_formatstr"json""json" or "markdown"

JSON output structure:

{
  "total_rows": 38,
  "rows_removed": 2,
  "columns": {
    "age": {
      "null_count": "N/A",
      "null_percentage": "N/A",
      "duplicate_count": "N/A",
      "unique_values": 22,
      "type": "int",
      "min": 19,
      "max": 74,
      "avg": 43.5,
      "median": 42.0,
      "std": 14.2,
      "q25": 31.0,
      "q75": 57.0
    },
    "plan_type": {
      "null_count": "N/A",
      "null_percentage": "N/A",
      "duplicate_count": "N/A",
      "unique_values": 3,
      "type": "string",
      "most_repeated_value": "Premium",
      "top_values": [
        {"value": "Premium", "count": 18},
        {"value": "Basic", "count": 12},
        {"value": "Enterprise", "count": 8}
      ]
    }
  }
}

get_csv_preview

Returns the first N rows of a CSV as a Markdown table. Useful for inspecting structure and values before running a full analysis. No cleaning is applied.

ParameterTypeDefaultDescription
csv_contentstrrequiredFull CSV text content
delimiterstr","Character separating values
n_rowsint5Number of rows to return

Example output:

| customer_id | age | plan_type | monthly_fee |
| --- | --- | --- | --- |
| 1001 | 34 | Premium | 49.99 |
| 1002 | 27 | Basic | 19.99 |

filter_csv

Filters rows by a column condition and returns the result as a CSV string. The output can be passed directly into analyze_csv or any other tool.

ParameterTypeDefaultDescription
csv_contentstrrequiredFull CSV text content
columnstrrequiredColumn name to filter on
operatorstrrequiredOne of: >, <, >=, <=, ==, !=, contains
valuestrrequiredValue to compare against (auto-cast to column type)
delimiterstr","Character separating values

Supported operators:

OperatorBehavior
> < >= <=Numeric comparison
== !=Equality (works on any type)
containsCase-insensitive substring match on string columns

get_column_distribution

Returns a ranked frequency table for a specific column — how many times each value appears and what percentage of rows it represents.

ParameterTypeDefaultDescription
csv_contentstrrequiredFull CSV text content
columnstrrequiredColumn name to analyze
delimiterstr","Character separating values
top_nint10Maximum number of values to return

Example output:

[
  {"value": "Premium", "count": 18, "percentage": 45.0},
  {"value": "Basic", "count": 12, "percentage": 30.0},
  {"value": "Enterprise", "count": 8, "percentage": 20.0}
]

detect_outliers

Finds rows with outlier values in numeric columns using IQR or z-score. Returns the flagged rows with the column name, value, and reason.

ParameterTypeDefaultDescription
csv_contentstrrequiredFull CSV text content
delimiterstr","Character separating values
methodstr"iqr""iqr" or "zscore"
columnslist[str]NoneSpecific columns to check. If omitted, all numeric columns are checked

Methods:

  • iqr — flags values outside Q1 - 1.5 * IQR and Q3 + 1.5 * IQR
  • zscore — flags values more than 3 standard deviations from the mean

Example output:

[
  {"row_index": 4, "column": "monthly_fee", "value": 999.99, "reason": "outside IQR bounds [10.5, 89.3]"},
  {"row_index": 21, "column": "age", "value": 3, "reason": "outside IQR bounds [22.0, 68.0]"}
]

compare_csvs

Compares two CSV files by schema (column differences) and/or row content. Useful for detecting changes between versions of the same dataset.

ParameterTypeDefaultDescription
csv_content_astrrequiredFull CSV text content of the first file
csv_content_bstrrequiredFull CSV text content of the second file
delimiterstr","Character separating values in both files
modestr"both""schema", "rows", or "both"

Example output (mode="both"):

{
  "schema": {
    "columns_only_in_a": ["notes"],
    "columns_only_in_b": ["region"],
    "common_columns": ["client", "revenue", "date"]
  },
  "rows": {
    "total_rows_a": 25,
    "total_rows_b": 28,
    "rows_only_in_a": 4,
    "rows_only_in_b": 7,
    "common_rows": 21
  }
}

Composing Tools

Tools are designed to chain together. Some useful patterns:

# Preview first, then analyze
get_csv_preview → analyze_csv

# Filter a subset, then analyze it
filter_csv (churned == True) → analyze_csv

# Check distribution before deciding how to filter
get_column_distribution → filter_csv → analyze_csv

# Find outliers, then filter them out and re-analyze
detect_outliers → filter_csv (!= outlier_value) → analyze_csv

Configuration

Settings are loaded from the .env file at the project root:

VariableDefaultDescription
MAX_ROWS_TO_ANALYZE500Maximum rows processed per request
DEFAULT_OUTPUT_FORMATmarkdownFallback output format
MAX_PREVIEW_ROWS10Number of preview rows in summaries
NULL_THRESHOLD_WARNING0.3Null rate above which a warning is surfaced
OUTLIER_STDDEV_CUTOFF3.0Z-score cutoff for outlier detection

Project Structure

csv_analyzer_mcp_server/
├── core/
│   ├── loader.py        # CSV string → pandas DataFrame
│   ├── analyzer.py      # Per-column statistics, distribution, outlier detection, comparison
│   ├── formatter.py     # JSON / Markdown output, table preview
│   └── transformer.py   # Column name normalization, row filtering
├── config/
│   └── settings.py      # Environment-based configuration
├── data/                # Sample CSV files for testing
├── main.py              # MCP server entry point — all tool definitions
├── pyproject.toml       # Project metadata and dependencies
└── .env                 # Local configuration (not committed)

Sample Data

Three sample CSV files are included in data/ for testing:

FileRowsDescription
sample_data_usage.csv40Telecom customer usage (age, plan, data, churn)
sample_heart_checks.csv40Medical records (cholesterol, BP, diabetes, heart disease)
sample_project_revenue.csv25Project billing with intentional missing values

Install configuration

Are you the maintainer?

Claim this server with your GitHub account to request manual ownership verification.

README Embed Badge
Markdown

Link to the catalog listing for CSV Analyzer MCP Server from your README. This badge does not certify ownership, compatibility or security.

[![MCP catalog listing](https://img.shields.io/badge/MCP-awesome--mcp-orange?style=flat-square)](https://awesome-mcp.com/servers/csv_analyzer_mcp_server)

REPOSITORY STATS

GitHub StarsUnavailable
ForksUnavailable

Public repository statistics could not be verified. Check the configured source address; unavailable counts are not zero.

下载与拉取统计

来源、范围和时段分别列出;不相加,不代表安装人数、活跃用户或安全审核。

尚无已审核的包 / 镜像标识,暂不展示下载统计。

Related databases storage MCP Servers

Alternative and complementary servers in the same category

View all in databases storage →
AIStor MCP server
mcp-server-aistor•minio

This is a Model Context Protocol (MCP) server for interacting with AIStor object stores.

Repository stats unavailable
Databases & Storage
InfluxDB v2 MCP Server
influxdb-mcp-server•idoru

A Model Context Protocol (MCP) server that exposes access to an InfluxDB v2 instance using the InfluxDB OSS API v2.

Repository stats unavailable
Databases & Storage