StatsPAI
Econometrics and causal inference toolkit for agents, with Stata and R parity grades
- Pricing
- Open source
- Platforms
- CLI, Linux, macOS
- Runs
- Locally
- Version
- 1.43.1
- Listing updated
- 3 days ago
About StatsPAI
StatsPAI is an open-source MCP server for analytics and data. It runs locally on your machine and is started by your AI client.
The distinctive thing about StatsPAI is its evidence grading: each function says whether its numbers were checked against Stata or R on identical data, against a known truth, or not yet. The site's own count is 1,687 registered functions, of which 576 were compared with R or Stata and 452 against known truths, while many have no numerical check yet.
It is a Python package first: regression with robust and clustered errors, high-dimensional fixed effects, IV, staggered difference-in-differences, regression discontinuity, synthetic control, matching and double machine learning, with tables exported to Word, Excel and LaTeX. The bundled MCP server exposes the estimators to clients like Claude Code and Cursor.
Environment variables limit which directories the server reads data from and choose a core, curated or full tool list. It suits researchers who want an agent to run analyses reproducibly.
Install
Run in a terminal
claude mcp add statspai -- uvx statspaiAdd to claude_desktop_config.json
{
"mcpServers": {
"statspai": {
"command": "uvx",
"args": [
"statspai"
]
}
}
}Add to ~/.cursor/mcp.json
{
"mcpServers": {
"statspai": {
"command": "uvx",
"args": [
"statspai"
]
}
}
}Add to .vscode/mcp.json
{
"servers": {
"statspai": {
"type": "stdio",
"command": "uvx",
"args": [
"statspai"
]
}
}
}Add to ~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"statspai": {
"command": "uvx",
"args": [
"statspai"
]
}
}
}Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"statspai": {
"command": "uvx",
"args": [
"statspai"
]
}
}
}Configuration
STATSPAI_MCP_DATA_ROOTSDirectories the server may read data files from, separated by the OS path separator. Unset: any readable path.STATSPAI_MCP_PROFILESize of the advertised tool list: core, curated or full.
What it does
- Evidence grades
- Each function reports how its output was validated.
- Causal methods
- DiD, IV, RD, synthetic control, matching and DML.
- Schema-registered functions
- Every function has a machine-readable schema.
- Table export
- Results export to Word, Excel and LaTeX.
- Tool profiles
- Core, curated or full tool lists via an environment variable.
Good for
- Run staggered difference-in-differences with an agent
- Move a Stata workflow to Python
- Check how well a method has been validated
- Export regression tables for a paper
Pricing
Open source
Open-source Python package
Prices change. Check brycewang-stanford.github.io before you buy.
StatsPAI FAQ
How do I limit file access?
Set STATSPAI_MCP_DATA_ROOTS to the allowed directories.
How many tools are advertised?
Set STATSPAI_MCP_PROFILE to core, curated (default) or full.
How is correctness shown?
Functions carry an evidence grade against Stata, R or known truths.
Is StatsPAI free?
Yes. StatsPAI is open source, so you can use and self-host it for free.
How do I add StatsPAI to Claude Code?
Run this command in your terminal: claude mcp add statspai -- uvx statspai
What are the best alternatives to StatsPAI?
The closest alternatives to StatsPAI are Agent-Native Analytics, Google Ads + Meta Ads + SEO/GEO MCP, Tapetide - Indian Stock Market MCP, World Monitor and CompanyData.
Alternatives to StatsPAI

Agent-Native Analytics
MCP serverOpen-source analytics app where an AI agent builds charts and dashboards from your data
- Remote
- Open source
- 7.7K GitHub stars
- Analytics and data

Google Ads + Meta Ads + SEO/GEO MCP
MCP serverHosted MCP connector for managing Google Ads, Meta Ads, GA4 and Search Console from chat
- 8 tools
- Remote
- Freemium
- 8.1K GitHub stars
- Marketing and SEO

Tapetide - Indian Stock Market MCP
MCP serverIndian NSE and BSE stock market data for AI assistants through 48 MCP tools
- 17 tools
- Remote
- Freemium
- 150 GitHub stars
- Finance and payments

World Monitor
MCP serverLive geopolitical intelligence dashboard with an API and MCP server for agents
- Remote
- Freemium
- Analytics and data

CompanyData
MCP serverSearch and enrich company records from official registers via the CompanyData API
- 3 tools
- Remote
- Paid
- 3 GitHub stars
- Analytics and data

ChartAnt
MCP serverRemote MCP server returning charts, maps and dashboards as hosted PNG links
- 51 tools
- Remote
- Freemium
- Design and media