Skip to main content
Glama
dataframe-detective-mcp

dataframe-detective-mcp

by Giorgio089

dataframe-detective-mcp

An MCP server that lets any MCP client (Claude Desktop, Claude Code, Cursor, ...) load tabular files, profile them and answer questions with sandboxed pandas code. Extracted from the Mistral Data Detective multi-agent project. The client's own LLM writes the pandas code; the server only validates and executes it.

Tool

What it does

load_dataset(path, name?, clean_numbers=True)

Load CSV/TSV/Excel/JSON/Parquet from the allowed root; converts "1.234,50 €" / "12%" to numbers

list_datasets / unload_dataset

Manage datasets held in memory (max. 20)

describe_dataset(name)

Schema, ranges, example values, first rows

profile_dataset(name)

Missing values, duplicates, outliers, correlations, skew, top/bottom categories (via dataframe-autoprofile)

query_dataset(name, code, timeout_seconds?)

Run pandas code in a restricted subprocess (via safe-pandas-exec); answer goes into result

Install & configure

pip install git+https://github.com/Giorgio089/dataframe-detective-mcp

Claude Desktop / Claude Code config:

{
  "mcpServers": {
    "dataframe-detective": {
      "command": "dataframe-detective-mcp",
      "env": { "DDMCP_ROOT": "/path/to/your/data" }
    }
  }
}

Env var

Default

Meaning

DDMCP_ROOT

current directory

Only files below this directory can be loaded (symlinks are resolved)

DDMCP_MAX_FILE_MB

50

Maximum file size

Related MCP server: Pandas-MCP Server

Security

Files outside DDMCP_ROOT and unknown file types are refused. Code from query_dataset is validated and run in a resource-limited subprocess, which is defence in depth and not a hard security boundary; see the security notes in safe-pandas-exec. Do not point this at data or clients you do not trust without additional isolation (container, no network).

MIT licensed.

Available Tools

6 tools
describe_datasetC

Schema, dtypes, value ranges and first rows of a loaded dataset.

Inputs: name (required). Returns: result

list_datasetsA

List the datasets currently loaded in memory.

Inputs: no named parameters. Returns: result

load_datasetB

Load a CSV/TSV/Excel/JSON/Parquet file under the allowed root and keep it in memory.

With clean_numbers=True, columns such as "1.234,50 €" or "12%" are converted to numbers. Returns the dataset name and its schema.

Inputs: path (required), name, clean_numbers. Returns: result

profile_datasetC

Rule-based findings: missing values, duplicates, outliers, strong correlations, skew, top/bottom categories.

Inputs: name (required). Returns: result

query_datasetA

Run pandas code against a dataset in a restricted subprocess.

df, pd and np are preloaded. Do not import anything. Put the answer, as a string, in a variable called result. Use f-strings (str.format is blocked). Example: result = df.groupby('channel')['revenue'].sum().sort_values(ascending=False).head(5).to_string()

Inputs: code (required), name (required), timeout_seconds. Returns: result

unload_datasetC

Remove a dataset from memory.

Inputs: name (required). Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.3/5.0

    Scored across 6 tools

    Disambiguation4/5

    Each tool has a fairly distinct role: load/unload/list manage dataset lifecycle, describe vs profile inspect content, and query runs arbitrary code. The main ambiguity is between describe_dataset and profile_dataset, which both summarize a dataset, though the descriptions differentiate schema/stats from rule-based findings.

    Naming Consistency5/5

    All tools follow a strict verb_noun snake_case pattern (load_dataset, list_datasets, unload_dataset, describe_dataset, profile_dataset, query_dataset). The naming is predictable and the resource (dataset) is constant across tools.

    Tool Count5/5

    Six tools is well-scoped for an in-memory dataframe analysis server. Each tool covers a distinct lifecycle or inspection action with no obvious redundancy or bloat.

    Completeness4/5

    The surface covers the full load/list/describe/profile/query/unload lifecycle and query_dataset acts as an escape hatch for arbitrary analysis. Minor gaps exist around exporting/saving results or persisting derived datasets, but core workflows are covered.

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      C
      maintenance
      Enables data analysis on CSV/Excel files using pandas. Supports profiling, column interpretation, sandboxed code execution, and interactive chart generation.
      4
      1
      MIT
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables querying CSV or Excel data using natural language through MCP tools, running pandas operations on an uploaded dataset.
      -