Skip to main content
Glama
Mingwei2

data-explore

by Mingwei2

MCP Data Exploration Server

An MCP (Model Context Protocol) server that provides dataset exploration and analysis tools for any LLM client. The server performs actual data analysis and returns formatted results, eliminating the need for users to write or execute code.

Features

  • Dataset Analysis: Comprehensive summary, correlation analysis, distribution analysis, and missing value detection

  • Data Cleaning: Automated cleaning operations with detailed results

  • Statistical Testing: Normality tests, correlation significance tests, and t-tests

  • MCP Compatible: Works with any MCP-compatible client (Claude Desktop, custom clients, etc.)

Related MCP server: mcp-csv-analyst

Quick Start

The fastest way to get started:

# 1. Navigate to project directory
cd /path/to/mcp-data-explore

# 2. Install dependencies
uv sync

# 3. Add MCP server to Claude Code (project scope - shared with team)
claude mcp add data-explore -s project -- uv --directory . run python main.py

# 4. Start Claude Code
claude

# 5. Try it out in Claude Code
# "Analyze the test_data.csv file"
# "What's the correlation between age and salary?"

Installation

Prerequisites

  • Python 3.13 or higher

  • uv package manager

Setup

  1. Clone or download this repository:

git clone <repository-url>
cd mcp-data-explore
  1. Install dependencies:

uv sync
  1. Test the server:

python main.py

Connecting to MCP Clients

Claude Code

Claude Code has excellent built-in MCP support. Here's how to connect:

  1. Project MCP Configuration (Recommended)

    The project already includes a .mcp.json file that's shared with everyone:

    {
      "mcpServers": {
        "data-explore": {
          "command": "uv",
          "args": [
            "--directory",
            ".",
            "run",
            "python",
            "main.py"
          ],
          "env": {}
        }
      }
    }

    This file is automatically detected by Claude Code when you start it in the project directory.

    Environment Variable Support in .mcp.json:

    You can use environment variables in your .mcp.json for flexibility:

    {
      "mcpServers": {
        "data-explore": {
          "command": "${UV_COMMAND:-uv}",
          "args": [
            "--directory",
            "${PROJECT_DIR:-.}",
            "run",
            "python",
            "main.py"
          ],
          "env": {
            "PYTHONPATH": "${CUSTOM_PYTHON_PATH:-}"
          }
        }
      }
    }

    Security Note: Claude Code will prompt for approval before using project-scoped servers from .mcp.json files for security.

  2. Using Claude Code CLI to Add MCP Server

    You can add the MCP server using Claude Code CLI commands:

    # Add MCP server to project scope (shared with team via .mcp.json)
    claude mcp add data-explore -s project -- uv --directory . run python main.py
    
    # Add MCP server to user scope (available across all your projects)
    claude mcp add data-explore -s user -- uv --directory /Users/ida/Documents/eric/mcp-data-explore run python main.py
    
    # Add MCP server to local scope (private to you in this project) - DEFAULT
    claude mcp add data-explore -- uv --directory . run python main.py
    # or explicitly specify local scope
    claude mcp add data-explore -s local -- uv --directory . run python main.py
    
    # Add with environment variables if needed
    claude mcp add data-explore -s project -e PYTHONPATH=/custom/path -- uv --directory . run python main.py

    MCP Server Management Commands:

    # List all configured MCP servers
    claude mcp list
    
    # Get details for a specific server
    claude mcp get data-explore
    
    # Remove an MCP server
    claude mcp remove data-explore
    
    # Reset project-scoped server approval choices
    claude mcp reset-project-choices
    
    # Import servers from Claude Desktop (macOS/WSL only)
    claude mcp add-from-claude-desktop
    
    # Add server from JSON configuration
    claude mcp add-json data-explore '{"type":"stdio","command":"uv","args":["--directory",".","run","python","main.py"],"env":{}}'
  3. Understanding MCP Server Scopes

    Claude Code supports three MCP server scopes with clear precedence:

    • local (default): Private to you in current project only

    • project: Shared with team via .mcp.json file (version controlled)

    • user: Available to you across all projects on your machine

    Scope Precedence: local > project > user (local overrides project, project overrides user)

    Choosing the Right Scope:

    • Local: Experimental configurations, sensitive credentials, personal development

    • Project: Team-shared tools, project-specific services, collaboration requirements

    • User: Personal utilities, development tools, cross-project services

    # View all MCP commands and help
    claude mcp --help
    
    # Check connection status of all servers (use /mcp command in Claude Code)
    /mcp
    
    # Configure server startup timeout (10 seconds example)
    MCP_TIMEOUT=10000 claude
  4. Start Claude Code

    # Start in project directory (automatically loads .mcp.json)
    cd /Users/ida/Documents/eric/mcp-data-explore
    claude
    
    # Claude Code will automatically detect and load the project MCP configuration
    # You can use the /mcp command within Claude Code to check server status
  5. Verify Connection

    Once connected, you should see the MCP tools available. Try asking:

    • "What MCP tools are available?"

    • "What MCP servers are connected?"

    • "Analyze the test_data.csv file"

    • "Show me the dataset summary for test_data.csv"

  6. Usage Examples with Claude Code

    You: "Analyze the test dataset in this directory"
    Claude Code: [Uses analyze_dataset tool] → Returns comprehensive analysis
    
    You: "What's the correlation between age and salary?"
    Claude Code: [Uses analyze_dataset with correlation type] → Returns correlation matrix
    
    You: "Clean my data by removing duplicates and filling nulls"
    Claude Code: [Uses clean_data tool] → Returns cleaning results
    
    You: "Test if the age column is normally distributed"
    Claude Code: [Uses statistical_summary tool] → Returns normality test results

Claude Desktop

  1. Install Claude Desktop

  2. Configure Claude Desktop

    Open your Claude Desktop configuration file:

    macOS/Linux:

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

    Windows:

    code %APPDATA%\Claude\claude_desktop_config.json
  3. Add Server Configuration

    Add the following to your claude_desktop_config.json:

    {
      "mcpServers": {
        "data-explore": {
          "command": "uv",
          "args": [
            "--directory", 
            "/ABSOLUTE/PATH/TO/mcp-data-explore",
            "run", 
            "python", 
            "main.py"
          ]
        }
      }
    }

    Important: Replace /ABSOLUTE/PATH/TO/mcp-data-explore with the actual absolute path to your project directory.

    Windows Example:

    {
      "mcpServers": {
        "data-explore": {
          "command": "uv",
          "args": [
            "--directory", 
            "C:\\\\Users\\\\YourName\\\\mcp-data-explore",
            "run", 
            "python", 
            "main.py"
          ]
        }
      }
    }
  4. Restart Claude Desktop

    Completely close and restart Claude Desktop for the changes to take effect.

  5. Verify Connection

    Look for the tools icon in Claude Desktop. You should see 3 available tools:

    • analyze_dataset

    • clean_data

    • statistical_summary

Other MCP Clients

For other MCP-compatible clients, use these connection details:

  • Transport: stdio

  • Command: uv --directory /path/to/mcp-data-explore run python main.py

  • Server Name: data-explore

Available Tools

1. analyze_dataset

Performs comprehensive dataset analysis.

Parameters:

  • dataset_path (required): Path to CSV file

  • analysis_type (optional): "summary", "correlation", "distribution", "missing_values" (default: "summary")

  • columns (optional): List of column names to analyze

Example Usage:

  • "Analyze the dataset at /path/to/data.csv"

  • "Show correlation analysis for the sales data"

  • "Check for missing values in my dataset"

2. clean_data

Performs data cleaning operations and shows results.

Parameters:

  • dataset_path (required): Path to CSV file

  • operations (required): List of operations - "remove_nulls", "fill_nulls", "remove_duplicates", "standardize_columns", "convert_types"

  • output_path (optional): Path to save cleaned dataset

Example Usage:

  • "Clean my dataset by removing null values and duplicates"

  • "Fill missing values and standardize column names"

  • "Optimize data types in my dataset"

3. statistical_summary

Performs statistical tests and analysis.

Parameters:

  • dataset_path (required): Path to CSV file

  • columns (optional): Specific columns to analyze

  • tests (optional): List of tests - "normality", "correlation_test", "ttest"

Example Usage:

  • "Run statistical tests on my dataset"

  • "Test if the age column follows a normal distribution"

  • "Check correlation significance between variables"

Example Usage

Once connected to your MCP client, you can ask natural language questions like:

  • "Analyze the dataset at /Users/me/sales_data.csv"

  • "What's the correlation between age and income in my data?"

  • "Clean my dataset by removing duplicates and filling missing values"

  • "Test if the revenue column is normally distributed"

  • "Show me distribution analysis for the price column"

The server will automatically:

  1. Load your CSV data

  2. Perform the requested analysis

  3. Return formatted results with insights and interpretations

Troubleshooting

Claude Code MCP Issues

  1. MCP Server Not Loading

    # Verify MCP server starts manually
    cd /Users/ida/Documents/eric/mcp-data-explore
    python main.py
    
    # Check server configuration
    claude mcp get data-explore
    
    # List all servers
    claude mcp list
  2. Tools Not Available

    • Ensure .mcp.json is in the project root for project scope

    • Check JSON syntax is valid (use claude mcp get data-explore)

    • Use /mcp command in Claude Code to check connection status

    • Try: "What MCP servers are connected?" or "What MCP tools are available?"

  3. Path Issues

    • Use relative paths ("--directory", ".") for project scope

    • Use absolute paths for user scope

    • Ensure uv is in your PATH: which uv

    • For Windows: May need cmd /c wrapper for some commands

  4. Security Approval Required

    • Claude Code prompts for approval before using project-scoped servers

    • Click "Allow" when prompted

    • Use claude mcp reset-project-choices to reset approval choices

  5. Debug MCP Connection

    # Test server directly with JSON-RPC
    echo '{"jsonrpc": "2.0", "method": "initialize", "params": {}, "id": 1}' | python main.py
    
    # Set debug timeout
    MCP_TIMEOUT=30000 claude

Server Not Appearing in Claude Desktop

  1. Check your JSON syntax in claude_desktop_config.json

  2. Ensure the path is absolute (not relative)

  3. Restart Claude Desktop completely

  4. Check Claude's logs: ~/Library/Logs/Claude/mcp*.log

Tool Calls Failing

  1. Verify the CSV file path exists and is accessible

  2. Check that the CSV file is properly formatted

  3. Ensure all required parameters are provided

  4. Look for error messages in the returned results

Import Errors

If you see module import errors:

uv sync  # Reinstall dependencies
python -c "import pandas; print('Dependencies OK')"  # Test imports

Development

Adding New Tools

  1. Add a new @mcp.tool() decorated async function in main.py

  2. Follow the existing pattern for error handling and input validation

  3. Update CLAUDE.md with the new tool specifications

  4. Test the tool before deploying

Extending Data Format Support

Currently supports CSV files. To add support for other formats:

  1. Modify the data loading logic in each tool

  2. Add format detection based on file extension

  3. Update tool documentation and examples

License

This project is open source. Feel free to modify and distribute according to your needs.

Available Tools

3 tools
analyze_datasetB

Analyze dataset and return actual results.

Args: dataset_path: Path to the dataset file (CSV format) analysis_type: Type of analysis - "summary", "correlation", "distribution", "missing_values" columns: Specific columns to analyze (if None, analyzes all columns)

ParametersJSON Schema
NameRequiredDescriptionDefault
columnsNo
dataset_pathYes
analysis_typeNosummary

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.2/5.0
Behavior2/5

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

No annotations are provided, so the description must disclose behavioral traits. It doesn't state whether the tool is read-only, how it handles errors, or any side effects. The phrase 'return actual results' is vague and adds no meaningful behavioral context.

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?

The description is brief, with a one-sentence summary followed by a clear Args list. It wastes no words and the structure is easy to scan.

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?

Given that an output schema exists, return value details may not be needed. However, the description lacks context about when to use this tool versus siblings, and it doesn't explain differences between analysis types or consequences of choosing one. It is minimally sufficient but not comprehensive.

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?

The schema has 0% description coverage, so the description compensates well by explaining each parameter: dataset_path format (CSV), approved analysis_type values, and the meaning of columns (None means all). This is valuable beyond the bare schema.

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's action ('Analyze dataset') and resource (dataset), with the Args section specifying supported analysis types (summary, correlation, distribution, missing_values). However, it does not differentiate from sibling tools like statistical_summary, which likely covers a subset of this functionality.

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?

There is no explicit guidance on when to use this tool versus alternatives. The description only documents parameters and provides a generic 'Analyze dataset and return actual results' without mentioning prerequisites, exclusions, or sibling tool comparisons.

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

clean_dataA

Perform data cleaning operations and return results.

Args: dataset_path: Path to the dataset file (CSV format) operations: List of cleaning operations - "remove_nulls", "fill_nulls", "remove_duplicates", "standardize_columns", "convert_types" output_path: Path to save cleaned dataset (optional)

ParametersJSON Schema
NameRequiredDescriptionDefault
operationsYes
output_pathNo
dataset_pathYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.8/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions 'return results' and an optional output_path, but does not disclose whether the original file is modified, what 'fill_nulls' fills with, or any potential destructive side effects. This is a significant gap for a tool that can alter 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?

The description is concise and well-structured, with a clear opening sentence and a compact parameter list. No unnecessary words or repetition; every sentence serves a purpose.

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?

The description covers parameters and purpose adequately, and an output schema exists to define return values. However, it lacks usage guidance (when vs. alternatives) and behavioral safety details (side effects, mutation), leaving the tool only partially complete for an agent to invoke with full confidence.

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

Parameters5/5

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

Schema coverage is 0%, yet the description fully compensates by explaining each parameter: dataset_path is CSV format, operations lists allowed values, and output_path is optional. This adds crucial meaning beyond the raw schema, enabling correct invocation.

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?

The description clearly states the tool performs data cleaning operations, enumerating specific operations like 'remove_nulls' and 'remove_duplicates'. This verb + resource combination is specific and implicitly distinguishes it from sibling tools (analyze_dataset, statistical_summary) which focus on analysis, not cleaning.

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?

The description implies usage when data cleaning is needed but provides no explicit guidance on when to choose this tool over alternatives. No when-not-to-use conditions or references to sibling tools are given, leaving the agent to infer suitability.

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

statistical_summaryA

Perform statistical analysis and return results.

Args: dataset_path: Path to the dataset file (CSV format)
columns: Specific columns to analyze (if None, analyzes all numeric columns) tests: Statistical tests to perform - "normality", "correlation_test", "ttest"

ParametersJSON Schema
NameRequiredDescriptionDefault
testsNo
columnsNo
dataset_pathYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.7/5.0
Behavior3/5

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

With no annotations, the description carries the burden for behavioral context. It clearly indicates a read/compute operation that returns results and mentions default analysis of all numeric columns. However, it does not disclose whether it modifies the input file, needs specific permissions, or how it handles missing values.

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?

The description is concise and front-loaded with the purpose, followed by an organized Args list. Every sentence adds needed information without verbosity.

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?

For a moderate-complexity tool with an output schema, the description covers parameters, default behavior, and test options. It does not address when it should be selected over sibling tools, but it provides enough information for invocation.

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

Parameters5/5

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

Schema description coverage is 0%, but the description explains every parameter in detail: dataset_path format, columns default behavior, and accepted tests values. This fully compensates for the schema's lack of 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?

The description states a specific operation ('Perform statistical analysis') and lists supported tests, making the purpose clear. However, it does not explicitly distinguish this tool from sibling 'analyze_dataset'.

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?

There is no guidance about when to use this tool versus 'analyze_dataset' or 'clean_data'. The parameters are documented, but the description never states appropriate contexts, prerequisites, or situations where alternatives should be used.

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. 3 tool updatesv0.1.0
    • First observedanalyze_dataset
    • First observedclean_data
    • First observedstatistical_summary

TDQS

A3.5/5.0
Disambiguation3/5

The tools clean_data and statistical_summary are fairly distinct, but analyze_dataset overlaps with statistical_summary in correlation and summary analyses. An agent might confuse which tool to use for correlation analysis between the two. Some descriptions help clarify the intent.

Naming Consistency4/5

Most tools follow a verb_noun pattern (analyze_dataset, clean_data), but statistical_summary deviates as an adjective_noun phrase. This is a minor inconsistency that could confuse prediction of tool names.

Tool Count4/5

Three tools is on the low side but fits the focused domain. Each tool covers a broad category of operations, which keeps the surface manageable. The count seems appropriate for a simple data exploration server.

Completeness4/5

Core data exploration tasks are covered: analyzing, cleaning, and statistical testing. Missing capabilities like data preview or visualization are minor and can be worked around. The overlap between analyze_dataset and statistical_summary leaves some statistical tests only in one tool, but the surface is generally complete.

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
    A
    quality
    Not graded
    maintenance
    An MCP server that enables AI assistants to load, query, and analyze local CSV files using tools for filtering, aggregation, and grouping. It provides capabilities to describe schemas, calculate statistics, and sample data directly from CSV files.
    6
    -
  • F
    license
    Not graded
    quality
    D
    maintenance
    An MCP server for data analysis and visualization supporting CSV and Excel files. It enables users to generate statistical summaries and create multi-dimensional charts like heatmaps and bar plots through natural language.
    -
  • F
    license
    Not graded
    quality
    D
    maintenance
    An MCP server that enables the analysis of CSV and Parquet files by providing tools for statistical summaries, data previews, and structure exploration. It allows users to query local datasets and create sample data using natural language.
    -

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/Mingwei2/mcp-data-explore'

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