Skip to main content
Glama
Soham-Donode

data-analysis-agent

by Soham-Donode
README.md
# MCP Data Analysis Agent

A production-ready natural-language data analysis system powered by MCP (Model Context Protocol).

## Features
- **Load & Inspect**: Load datasets in CSV, JSON, Excel, and Parquet formats.
- **Session Management**: Isolated, thread-safe, multi-dataset session tracking.
- **Security & Safety**: Path traversal prevention, file size limits, and memory guards.
- **Result Envelopes**: Structured JSON summaries returned to LLM clients.

## Installation & Running

```bash
uv venv .venv
source .venv/bin/activate
uv pip install -e .
```

Run unit tests:
```bash
pytest -v
```

## Running the MCP Server

### Method 1: Directly via Python / Virtualenv
```bash
.venv/bin/python -m data_agent.server
```

### Method 2: Connecting to Claude Desktop

On macOS, open or create your Claude Desktop configuration file at:
`~/Library/Application Support/Claude/claude_desktop_config.json`

Add the following entry:

```json
{
  "mcpServers": {
    "data-analysis-agent": {
      "command": "/Users/soham34/Projects/data-mcp/.venv/bin/python",
      "args": [
        "-m",
        "data_agent.server"
      ],
      "cwd": "/Users/soham34/Projects/data-mcp"
    }
  }
}
```

Restart Claude Desktop, and the tools (`load_dataset`, `list_sessions`, `get_dataset_info`, `preview_dataset`) will appear under the tools hammer icon.

TDQS

B3.4/5.0

Scored across 22 tools

Disambiguation4/5

Most tools have distinct read vs. mutate roles, and analysis tools target different operations. However, get_dataset_info and describe_dataset overlap in reporting missing values, and compute_statistic largely duplicates portions of describe_dataset, which could cause some misselection.

Naming Consistency4/5

The naming is predominantly verb_noun and easy to follow, such as load_dataset, drop_column, and create_visualization. A few tools like frequency_analysis, correlation_analysis, and group_analysis break the imperative pattern by using noun_analysis instead of a verb construction.

Tool Count3/5

At 22 tools, the server provides broad coverage but feels somewhat heavy for a data analysis agent. The count is justified by the range of cleaning, statistical, and visualization operations, yet several tools overlap closely enough that the surface could be trimmed to around 15-18 tools.

Completeness3/5

The server covers loading, session management, cleaning, statistics, and visualization well, but has notable gaps for common data analysis tasks like row filtering, sorting, adding/deriving columns, joining datasets, or reshaping. These missing operations will require agents to work around the tool surface or fail on common requests.

Maintenance

ActivitySlowing
ResponsivenessNo issues