Skip to main content

MCP server exposing stats-compass-core tools to LLMs like ChatGPT, Claude, and Gemini

Project description

stats-compass-mcp

MCP server that exposes stats-compass-core tools to LLMs like ChatGPT, Claude, and Gemini.

What is this?

This package turns the stats-compass-core toolkit into an MCP (Model Context Protocol) server. Once running, any MCP-compatible client (ChatGPT, Claude, Cursor, VS Code, etc.) can use your data analysis tools directly.

Installation

pip install stats-compass-mcp

⚠️ Important Note on Data Loading

Drag-and-drop file uploads are NOT supported. To load data, you must provide the absolute file path to the file on your local machine.

  • ✅ "Load the file at /Users/me/data.csv"
  • ❌ Dragging data.csv into the chat window

Quick Start

Start the server

stats-compass-mcp serve

Configure your MCP client

For Claude Desktop (Recommended)

The easiest way to run this server is using uvx (part of the uv toolkit), which downloads and runs the server in an isolated environment without installation.

Add this to your claude_desktop_config.json:

{
  "mcpServers": {
    "stats-compass": {
      "command": "uvx",
      "args": ["stats-compass-mcp", "serve"]
    }
  }
}

Manual Installation

If you prefer to install it globally:

pip install stats-compass-mcp

Then configure your client:

{
  "mcpServers": {
    "stats-compass": {
      "command": "stats-compass-mcp",
      "args": ["serve"]
    }
  }
}

Available Tools

Once connected, the following tools are available to LLMs:

Data Loading & Management

  • load_csv - Load CSV files into state
  • load_dataset - Load built-in sample datasets
  • list_dataframes - List all DataFrames in state
  • get_schema - Get column types and info
  • get_sample - Preview rows from a DataFrame

Data Cleaning

  • dropna - Remove missing values
  • apply_imputation - Fill missing values
  • dedupe - Remove duplicate rows
  • handle_outliers - Detect and handle outliers

Transforms

  • filter_dataframe - Filter rows by condition
  • groupby_aggregate - Group and aggregate data
  • pivot - Pivot tables
  • add_column - Add calculated columns
  • rename_columns - Rename columns
  • drop_columns - Remove columns

EDA & Statistics

  • describe - Summary statistics
  • correlations - Correlation matrix
  • hypothesis_tests - T-tests, chi-square, etc.
  • data_quality - Data quality report

Visualization

  • histogram - Distribution plots
  • scatter_plot - Scatter plots
  • bar_chart - Bar charts
  • lineplot - Line plots

Machine Learning

  • train_linear_regression - Linear regression
  • train_logistic_regression - Logistic regression
  • train_random_forest_classifier - Random forest classification
  • train_random_forest_regressor - Random forest regression
  • evaluate_model - Model evaluation metrics

Time Series (ARIMA)

  • check_stationarity - ADF/KPSS tests
  • fit_arima - Fit ARIMA models
  • forecast_arima - Generate forecasts
  • find_optimal_arima - Auto parameter search

How It Works

┌─────────────────────────────────────────────────────────────┐
│                    MCP Client                               │
│         (ChatGPT, Claude, Cursor, VS Code)                  │
└─────────────────────────┬───────────────────────────────────┘
                          │ MCP Protocol
                          ▼
┌─────────────────────────────────────────────────────────────┐
│                stats-compass-mcp                            │
│  ┌─────────────────────────────────────────────────────┐    │
│  │              MCP Server (this package)              │    │
│  │  • Registers tools from stats-compass-core          │    │
│  │  • Manages DataFrameState per session               │    │
│  │  • Converts tool results to MCP responses           │    │
│  └─────────────────────────────────────────────────────┘    │
│                          │                                  │
│                          ▼                                  │
│  ┌─────────────────────────────────────────────────────┐    │
│  │           stats-compass-core (PyPI)                 │    │
│  │  • DataFrameState (server-side state)               │    │
│  │  • 40+ deterministic tools                          │    │
│  │  • Pydantic schemas for all inputs/outputs          │    │
│  └─────────────────────────────────────────────────────┘    │
└─────────────────────────────────────────────────────────────┘

Development

# Clone and install
git clone https://github.com/oogunbiyi21/stats-compass-mcp.git
cd stats-compass-mcp
poetry install

# Run tests
poetry run pytest

# Run the server locally
poetry run stats-compass-mcp serve

Related Projects

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stats_compass_mcp-0.1.6.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

stats_compass_mcp-0.1.6-py3-none-any.whl (10.4 kB view details)

Uploaded Python 3

File details

Details for the file stats_compass_mcp-0.1.6.tar.gz.

File metadata

  • Download URL: stats_compass_mcp-0.1.6.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.12.5 Darwin/24.6.0

File hashes

Hashes for stats_compass_mcp-0.1.6.tar.gz
Algorithm Hash digest
SHA256 300fea84a980af76ba2bd247849cbc0da91986df7e35a1bccd722384b3d36966
MD5 a399ebc73127425709a6061f818000a0
BLAKE2b-256 73a442bd311b8a3ad6ea702702865b75275ea75f588dbf947dc2e12c735c2e4a

See more details on using hashes here.

File details

Details for the file stats_compass_mcp-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: stats_compass_mcp-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 10.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.12.5 Darwin/24.6.0

File hashes

Hashes for stats_compass_mcp-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 8c2c3a6eee67572eda8f680fc5a70aec3117fdaf4d161fc8914e6efc739f09d3
MD5 86d0599daa6414f43d4e48aaf7d7b814
BLAKE2b-256 1baa11eb7e4ea1fb654f6a9685b1cc36873edf612230dd8e16d0a6b30319f1b7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page