MCP server exposing stats-compass-core tools to LLMs like ChatGPT, Claude, and Gemini
Project description
stats-compass-mcp
A stateful, MCP-compatible toolkit of pandas-based data tools for AI-powered data analysis.
⚠️ Status: Early developer release (v0.2)
Optimized for Claude models
Gemini and GPT tool calling may be inconsistent.
stats-compass-mcp
Stats Compass MCP turns the stats-compass-core toolkit into an MCP server that AI agents can call in a reproducible, stateful way across workflows.
What is this?
This package turns the stats-compass-core toolkit into an MCP (Model Context Protocol) server. Once running, any MCP-compatible client can use your data analysis tools directly.
Client Compatibility
| Client | Status | Notes |
|---|---|---|
| Claude Desktop | ✅ Supported | Recommended. Best tool selection. |
| VS Code Copilot Chat | ✅ Supported | Native MCP integration. |
| Cursor | ⚠️ Experimental | Pending official MCP release. |
| GPT / ChatGPT | ⚠️ Partial | Tool calling may be inconsistent with large toolsets. |
| Gemini | ⚠️ Unstable | May throw errors with complex schemas. |
Installation
pip install stats-compass-mcp
Prerequisite: The MCP configurations below use
uvx, which requires uv to be installed.
⚠️ 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.csvinto the chat window
Quick Start
Local Mode (Recommended for most users)
Start the server via stdio for direct use with Claude Desktop or VS Code:
stats-compass-mcp run
Remote/HTTP Mode (For Docker/hosting)
Start the server as an HTTP endpoint:
stats-compass-mcp serve --port 8000
Configure Your MCP Client
Claude Desktop
Auto-configure:
stats-compass-mcp install --client claude
To also add a remote server config:
stats-compass-mcp install --client claude --remote-url http://localhost:8000/mcp
Or manually add to claude_desktop_config.json:
{
"mcpServers": {
"stats-compass": {
"command": "uvx",
"args": ["stats-compass-mcp", "run"]
}
}
}
VS Code (GitHub Copilot)
Auto-configure:
stats-compass-mcp install --client vscode
To also add a remote server config:
stats-compass-mcp install --client vscode --remote-url http://localhost:8000/mcp
Or manually add to your VS Code mcp.json:
{
"servers": {
"stats-compass": {
"command": "uvx",
"args": ["stats-compass-mcp", "run"]
}
}
}
Claude Code (CLI)
claude mcp add stats-compass -- uvx stats-compass-mcp run
Remote Server Mode
For multi-client setups, Docker deployments, or running the server on a different machine, use HTTP mode:
stats-compass-mcp serve --port 8000
Docker
docker build -t stats-compass-mcp .
docker run -p 8000:8000 stats-compass-mcp
Configure Clients for Remote Mode
VS Code (Direct HTTP)
VS Code can connect directly to HTTP MCP servers:
{
"servers": {
"stats-compass": {
"url": "http://localhost:8000/mcp"
}
}
}
Claude Desktop (via mcp-proxy)
Claude Desktop only supports stdio. Use mcp-proxy to bridge:
{
"mcpServers": {
"stats-compass": {
"command": "uvx",
"args": ["mcp-proxy", "--transport", "streamablehttp", "http://localhost:8000/mcp"]
}
}
}
Remote Server Benefits
- Session isolation: Each client gets its own isolated session
- Multi-client support: Multiple clients can connect simultaneously
- Deployment flexibility: Run on a remote machine or container
Environment Variables
| Variable | Default | Description |
|---|---|---|
STATS_COMPASS_PORT |
8000 |
Server port |
STATS_COMPASS_HOST |
0.0.0.0 |
Server host |
STATS_COMPASS_MAX_SESSIONS |
100 |
Maximum concurrent sessions |
STATS_COMPASS_MEMORY_LIMIT_MB |
500 |
Memory limit per session (MB) |
Available Tools
Once connected, 30+ tools are available:
Data Loading & Management
load_csv- Load CSV filesload_excel- Load Excel filesload_dataset- Load built-in sample datasetslist_dataframes- List all DataFrames in sessionget_schema- Get column types and infoget_sample- Preview rows from a DataFrame
Data Cleaning
execute_cleaning_tool- Access all cleaning sub-tools:drop_na- Remove missing valuesimpute- Fill missing valuesdedupe- Remove duplicateshandle_outliers- Detect and handle outliers
Transforms
execute_transform_tool- Access all transform sub-tools:filter- Filter rows by conditiongroupby- Group and aggregatepivot- Pivot tablesadd_column- Calculated columnsencode- Categorical encoding
EDA & Statistics
execute_eda_tool- Access all EDA sub-tools:describe- Summary statisticscorrelations- Correlation matrixhypothesis_test- T-tests, chi-square, etc.data_quality- Quality report
Visualization
execute_plot_tool- Access all plot sub-tools:histogram- Distribution plotsscatter- Scatter plotsbar- Bar chartsline- Line plotsconfusion_matrix- Classification confusion matrixroc_curve- ROC curvesprecision_recall_curve- PR curvesfeature_importance- Feature importance charts
Machine Learning
execute_ml_tool- Access all ML sub-tools:train_model- Train classifiers/regressorsevaluate- Model evaluationpredict- Make predictions
Workflows (High-Level)
run_eda_report_workflow- Complete EDA reportrun_preprocessing_workflow- Data cleaning pipelinerun_classification_workflow- Full classification pipelinerun_regression_workflow- Full regression pipelinerun_timeseries_workflow- ARIMA forecasting
CLI Commands
# Start local server (stdio)
stats-compass-mcp run
# Start HTTP server
stats-compass-mcp serve --port 8000
# List all tools
stats-compass-mcp list-tools
# Install for Claude Desktop or VS Code
stats-compass-mcp install --client claude
stats-compass-mcp install --client vscode
Development
# Clone the repo
git clone https://github.com/oogunbiyi21/stats-compass-mcp.git
cd stats-compass-mcp
# Install dependencies
poetry install
# Run tests
poetry run pytest
# Run locally
poetry run stats-compass-mcp run
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file stats_compass_mcp-0.2.0.tar.gz.
File metadata
- Download URL: stats_compass_mcp-0.2.0.tar.gz
- Upload date:
- Size: 20.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.3 CPython/3.12.5 Darwin/24.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1e4ce77e3b9a2e5e4d528ed5813ed228ca0d2a92cd7999bc35501d1697de678f
|
|
| MD5 |
73099fb513daaedc9b8098c7cdda5202
|
|
| BLAKE2b-256 |
a675a1cf7c985ed128013862f5b773a9b82fb51aab2584058e4f67c36ca858ad
|
File details
Details for the file stats_compass_mcp-0.2.0-py3-none-any.whl.
File metadata
- Download URL: stats_compass_mcp-0.2.0-py3-none-any.whl
- Upload date:
- Size: 23.5 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f81a5208f31aaef92fc4fddad13e31815df892a3aa3297b85035acddc692135f
|
|
| MD5 |
6c02b53d91f0525c8bc2e786a6ec485e
|
|
| BLAKE2b-256 |
cd8b94a838e091a793fc520c207d812a6e805605a8c0f2cc719050c7acd565d8
|