CCM
/MCP
SkillsMCPMarketplacesDigestToolsAdvertise

This week in Claude

Every Monday: Claude Code, Agent SDK, MCP, and the Anthropic platform moves worth your time.

Skills by Category
Frontend DevelopmentBackend & APIsTesting & QASecurityDevOps & CI/CDGit & Pull RequestsDocumentationCode Review & QualityAI & Agent BuildingSkill Development
MCP Servers by Category
Sales & MarketingWeb & Browser AutomationDatabasesAI & LLM ToolsCloud & InfrastructureCommunication & MessagingDeveloper ToolsDesign & CreativeDocuments & KnowledgeSearch & Web Crawling
Marketplaces by Category
AI Agents & OrchestrationLLM IntegrationDevelopment ToolsFrontend & UIBackend & APIsDatabasesTesting & Code QualityDevOps & CloudSecurity & ComplianceGit & Version Control

Claude Code Marketplaces

Discover Claude Code plugins, extensions, and tools. Automatically updated directory of Anthropic Claude AI marketplaces with development tools, productivity plugins, and integrations.

Resources

  • Browse Skills
  • Browse MCP Servers
  • Browse Marketplaces
  • Skill index
  • MCP index
  • Marketplace index
  • Plugins Reference

Community

  • About
  • Tools
  • Feedback
  • Privacy Policy
  • Advertise

Built for the Claude Code community with Claude Code by mertbuilds.com

Independent project, not affiliated with Anthropic
sepinetam avatar

Stata Mcp

sepinetam/stata-mcp
194STDIOregistry active
Summary

Connects Claude to Stata for econometric analysis and regression work. Exposes tools to execute Stata commands, run do-files, load datasets, and interpret statistical outputs through the Stata CLI. You can replicate papers, test economic hypotheses, organize existing code, or get step-by-step explanations of complex regression results. Also includes agent mode for autonomous analysis tasks and integrates with Claude Code as a native plugin. Built for economists and researchers who want to move beyond basic regression toward causal inference thinking, with support for standard Stata installations on macOS and Linux.

CodeRabbit
CodeRabbit
AI writes the code. CodeRabbit catches the slop.
Try For Free →
ego lite browserego lite browser
ego lite browser
Fastest browser for AI agents to run web automation tasks, always free.
Download Free life-time →
Give your AI the whole web as clean markdownGive your AI the whole web as clean markdown
Give your AI the whole web as clean markdown
Integrate web data into your AI product. One API to scrape website & brand data.
Get API Key Now →
belt - the only tool your agent needs
belt - the only tool your agent needs
belt cli automatically finds the best tools and skills for your agent. image, video, music, tts...
one prompt install →
AppSignal
AppSignal
Monitor with ease. Code with confidence.
Start Free Trial →
Agent, connect blockchain
Agent, connect blockchain
Connect your Claude agent to live crypto prices and trading routes via 1inch
Get the MCP →
inference shell
inference shell
create and run specialised agents in minutes
build now →
CodeHealth MCP ServerCodeHealth MCP Server
CodeHealth MCP Server
Protect your code quality, stop the AI slop.
Try For Free →
CodeRabbit
CodeRabbit
AI writes the code. CodeRabbit catches the slop.
Try For Free →
ego lite browserego lite browser
ego lite browser
Fastest browser for AI agents to run web automation tasks, always free.
Download Free life-time →
Give your AI the whole web as clean markdownGive your AI the whole web as clean markdown
Give your AI the whole web as clean markdown
Integrate web data into your AI product. One API to scrape website & brand data.
Get API Key Now →
belt - the only tool your agent needs
belt - the only tool your agent needs
belt cli automatically finds the best tools and skills for your agent. image, video, music, tts...
one prompt install →
AppSignal
AppSignal
Monitor with ease. Code with confidence.
Start Free Trial →
Agent, connect blockchain
Agent, connect blockchain
Connect your Claude agent to live crypto prices and trading routes via 1inch
Get the MCP →
inference shell
inference shell
create and run specialised agents in minutes
build now →
CodeHealth MCP ServerCodeHealth MCP Server
CodeHealth MCP Server
Protect your code quality, stop the AI slop.
Try For Free →
MCP-for-Stata (Stata-MCP): let Claude Code, Codex, and other AI agents run local Stata for regression analysis and empirical research

MCP-for-Stata (Stata-MCP): Run Stata with ANY Agent

MCP-for-Stata is an safety first open-source MCP server and CLI tool with Skills lets any AI agent you use invoke local Stata on your device for regression analysis, econometrics, paper replication, and empirical research. It provides command guards, resource monitoring, automatic log capture, and cross-platform client installation, while you retain control of your data and Stata license.

Turn Claude Code, Codex, and other AI agents into an on-demand research assistant.

Stata is a registered trademark of StataCorp LLC. This project is an independent community-developed tool and is not affiliated with, endorsed by, or sponsored by StataCorp LLC.

en cn fr es Publish to PyPI PyPI version PyPI Downloads License: AGPL 3.0 OpenSSF Best Practices Issue Ask DeepWiki


💡 Quick Start

You do not need to edit any configuration. Just tell your agent:

Install MCP-for-Stata for yourself globally following the instructions in the GitHub repository at SepineTam/mcp-for-stata.

🆕 News

  • 📖 Skills installed by default: Stata-related skills are now installed together with the MCP, no separate setup needed. See the installation guide.
  • 🚀 DeepSeek Harness Day 0 Support: Install MCP-for-Stata in DeepSeek Harness with uvx stata-mcp install -c dsh. See the DeepSeek Harness guide.
  • 🧪 Claude Science Support: MCP-for-Stata now works in Claude Science with a sandbox allowlist. See the Claude Science guide.
  • Find more in WeChat: Why I made it?, and 8 figures find out Stata-MCP
  • 🦞 OpenClaw Support: Standalone CLI tools for OpenClaw integration (stata-mcp tool), see OpenClaw guide
  • ✨ Claude Code Plugin Support: Official plugin package with MCP server and Stata LSP integration
  • Use MCP-for-Stata in Claude Code, see Claude Code advanced usage, or in Codex see Codex advanced usage

Finding our newest research? View latest research reports.

Looking for others?

MCP or AI about Stata

  • A session based MCP server for Stata, mcp-stata
  • IDEs (VScode or Cursor) integrated stata-mcp for VSCode. Confused them? 💡 Comparison

Datasets and Information

  • STOP Dataset: StataMCP-Team Opendata Project 📊, we have open-sourced a comprehensive dataset collection for social science research, aiming to enable the future of AI-driven and data-powered research paradigms.
Why AGPL 3.0 License?

The AGPL 3.0 License is a type of open-source license. It does not affect your daily use, and allows you to use, modify, and distribute this software free of charge, provided that you comply with its terms, such as retaining the original copyright notices.

Notes: While we strive to make open source accessible to everyone, we regret that we can no longer maintain the Apache-2.0 License. Due to individuals directly copying this project and claiming to be its maintainers, we have decided to change the license to AGPL-3.0 to prevent misuse of the project in ways that go against our original vision.

Notes: 尽管我们希望尽可能让所有人都能从开源中获益,但我们很遗憾地宣布无法继续保持 Apache-2.0 License。由于有人直接抄袭本项目并标榜其为项目维护者,我们不得不将 License 更改为 AGPL-3.0,以防止有人滥用本项目进行违背项目初心的事情。

Reason following:

Background: @jackdark425's repository directly copied this project and claimed to be the sole maintainer. We welcome open source collaboration based on forks, including but not limited to adding new features, fixing existing bugs, or providing valuable suggestions for the project, but we firmly oppose plagiarism and false attribution.

Update: The infringing project has been taken down via GitHub DMCA. View DMCA takedown details.

背景: @jackdark425 的仓库直接抄袭了本项目并标榜为项目唯一维护者。我们欢迎基于fork的开源协作,包括但不限于添加新的feature、修改已有bug或对项目提出您宝贵的意见,但坚决反对抄袭和虚假署名行为。

更新: 侵权项目已通过GitHub DMCA被takedown,查看DMCA下架详情。


Installation and Client Configuration

See the Installation Guide for installation methods, client setup, addon/extra options, and verification.

🚀 One-click installation for all clients!

No config, no manual JSON editing. Just one command installs MCP-for-Stata for every supported agent (Claude Code, Codex, OpenClaw, Cursor, Gemini CLI, and more):

uvx stata-mcp install --all
Supported Agents 🤖 Based on our own experience and testing, we recommend using Claude Code, Codex, and OpenClaw. We have found that Claude and DeepSeek are the two best models across any framework.
AgentTagCommand
Claude Desktopclaudeuvx stata-mcp install -c claude
Claude Codeccuvx stata-mcp install -c cc
Gemini CLIgeminiuvx stata-mcp install -c gemini
Cursorcursoruvx stata-mcp install -c cursor
Cline (VScode Extension)clineuvx stata-mcp install -c cline
Codex CLI & Codex Desktopcodexuvx stata-mcp install -c codex
OpenCodeopencodeuvx stata-mcp install -c opencode
OpenClawopenclawuvx stata-mcp install -c openclaw
Claude Science—Manual config

If you don't have uv, see the uv installation guide to install it. Or, use our beta install script (auto-installs uv if missing):

macOS / Linux:

curl -fsSL https://raw.githubusercontent.com/SepineTam/mcp-for-stata/master/scripts/install.sh | bash

Windows (PowerShell):

irm https://raw.githubusercontent.com/SepineTam/mcp-for-stata/master/scripts/install.ps1 | iex

If you don't know how to use them, download the installation scripts and double-click it in your device. install.bat for Windows users, and install.command for macOS users.

Advanced - Claude Code

As we find Claude Code is the best agent for MCP-for-Stata as its prefect agentic ability, we recommend using it, and there are lots of advanced usage following:

Before using it, please make sure you have ever install Claude Code, if you don't know how to install it, visit on GitHub

Generally, you can install MCP-for-Stata globally for one time, you can run:

claude mcp add stata-mcp --scope user -- uvx stata-mcp

Then, you do not need to watch it again.

Local and share with your partners

If you want to install it locally only for the certain workspace, you can cd to your working directory, and run:

claude mcp add stata-mcp --env STATA_MCP__CWD=$(pwd) --scope local -- uvx --directory $(pwd) stata-mcp

It would nothing happen, you can type claude and type /mcp to find the status.

Also, collaboration is an essential part of research. You can share your MCP config with your co-authors using:

claude mcp add stata-mcp --scope project -- uvx stata-mcp

In your working directory, you can find a file named .mcp.json, your mcp config will be placed here.

Then, you can use MCP-for-Stata in Claude Code. Here are some scenarios for using it:

  • Paper Replication: Replicate empirical studies from economics papers
  • Quick Hypothesis Testing: Validate economic hypotheses through regression analysis
  • Stata Learning Assistant: Learn econometrics with step-by-step Stata explanations
  • Code Organization: Review and optimize existing Stata do-files
  • Result Interpretation: Understand complex statistical outputs and regression results

If you use Claude Code inside IDEs (either the integrated terminal or the Claude Code Extension), installing our plugin including MCP-for-Stata and Stata LSP maintained by @euglevi.

# Add the MCP-for-Stata marketplace
claude plugin marketplace add SepineTam/mcp-for-stata

# Install the plugin to local, project or user scope
claude plugin install stata-toolbox -s project

The language server gives AI-generated Stata code better syntax awareness and completion, which improves output quality. We package the LSP in compliance with its license and give full attribution to the original author.

Advanced - Codex

We find that many researchers are using Codex as their agent, therefore we also provide instructions for Codex users.

I figure that researchers are not using Codex CLI but Codex Desktop, so we can say it is easier to config MCP-for-Stata than other agents.

You just need to say Install MCP-for-Stata for yourself globally from https://www.statamcp.com or visit https://github.com/SepineTam/mcp-for-stata then restart your Codex Desktop after it say ready.

Also, if you want to install it manually, here are two ways:

A. Install in Codex Desktop GUI
  1. Open your Codex Desktop APP
  2. Click Settings in the bottom-left corner
  3. Find MCP servers on the left side
  4. Click Add server
  5. Fill with the following:
    Name: stata-mcp
    Command to launch: uvx
    Arguments: stata-mcp
    
  6. Click Save
  7. Then, restart your Codex Desktop and enjoy it.
B. Install with Codex CLI

For CLI mode, just run the following command in your terminal

uvx stata-mcp install -c codex

Or use

codex mcp add stata-mcp -- uvx stata-mcp

Advanced - Claude Science

Claude Science runs MCP servers inside a strict sandbox that blocks access to the home directory (~) by default. If you try to launch MCP-for-Stata the standard way, you may see:

Couldn't load tools: MCP error -32000: Connection closed
FileNotFoundError: [Errno 2] No such file or directory

To fix this, allowlist the paths where uv tool install stata-mcp places its files. Create or edit ~/.claude-science/config.toml:

[sandbox]
user_write_paths = [
  "~/.local/bin",
  "~/.local/share/uv/tools/stata-mcp",
]

Then add the server in Claude Science:

  • Name: stata-mcp
  • Command: ~/.local/bin/stata-mcp

Restart Claude Science and the tools will load. For the full walkthrough, see the Claude Science guide.

Other Clients

Standard config requires: please make sure the stata is installed at the default path, and the stata cli (for macOS and Linux) exists.

The standard config json as follows, you can DIY your config via add envs.

{
  "mcpServers": {
    "stata-mcp": {
      "command": "uvx",
      "args": [
        "stata-mcp"
      ]
    }
  }
}

For more detailed usage information, visit the Usage guide.

Prerequisites

  • uv - Package installer and virtual environment manager
  • Claude Code, Codex, OpenClaw or other Agents
  • Stata License
  • Your API-KEY from LLM

If you want to check whether your device is supported, you can run:

uvx stata-mcp doctor

It displays basic information about your device and checks whether your setup is supported.

Example output
stata-mcp v1.17.0 — Doctor Report

  [PASS] os: macOS (Darwin 25.3.0, arm64)
  [PASS] python: 3.13.5
  [PASS] uv: uv 0.11.13
  [PASS] dependencies: all required packages available
  [PASS] stata_cli: /usr/local/bin/stata-mp (from env)
  [PASS] stata_execution: OK (0.1s)
  [PASS] config: /Users/sepinetam/.statamcp/config.toml (loaded)
  [PASS] working_dir: /Users/sepinetam/Documents/Github/stata-mcp (writable)
  [PASS] guard: enabled, loaded 27 rules
  [PASS] monitor: disabled (psutil available)
  [PASS] pypi: reachable (4.86s)
  [PASS] cleanup: 0 old files (0 B) found; cleanup disabled (CLEAN_LOG_DAYS=-1)

Summary: 12 passed, 0 failed, 0 warning(s), 0 skipped

Notes:

  1. If you are located in China and package downloads are slow, see the solution.
  2. Claude is the best choice for MCP-for-Stata, for Chinese, I recommend to use DeepSeek as your model provider as it is cheap and powerful, also the score is highest in China provider, if you are increased in it, visit the report How to use StataMCP improve your social science research.

Comparison

There are several Stata-related MCP projects. The table below was generated by Claude Code after analyzing each codebase directly.

FeatureMCP-for-Stata (this)haoyu-haoyu/stata-ai-fusionhanlulong/stata-mcptmonk/mcp-stata
Best forAgent-driven analysis (Claude Code, Codex, OpenClaw)Interactive sessions, graph export, and curated Stata knowledgeUsers who write and run Stata code inside VSCode themselvesResearch workflows (replication, robustness, publication QA)
AgentsAllAllVSCode window must stay activeAll
TypeMCP Server + CLI toolkitMCP Server + Skill KB + VS Code ExtensionVSCode Extension (localhost server, not standalone MCP)Session-based MCP Server
Executiondo-file via subprocesspexpect interactive session + batch fallbackIDE-embedded runner via localhost :4000pystata (Stata 17+)
SafetyCommand guard + RAM monitorCancel command + session cleanup——
Data analysisCSV, DTA, XLSX, SPSS handlersIn-session inspect_data / codebook—In-session describe / codebook
LogsText + SMCL readersIn-session search_log—Built-in log reader
Graphs—Auto-detect + export_graph PNG/SVG/PDF—Export, cache, SVG/PNG
CLI SupportNative (same tools as MCP server)Basic entry point——
Sessions—Multi named sessions with idle timeout—Multi-session, background tasks
IDE plug-in—Native VS Code / Cursor extensionNative VSCode / CursorStata Workbench (VS Code)
Skill / KnowledgeTool-focused skill for MCP-for-Stata (742 lines)5,653-line general Stata skill knowledge base—20+ specialized research skills (causal inference, replication, publication QA, etc.)
Installuvx stata-mcp installuvx --from stata-ai-fusion stata-ai-fusionVS Code Marketplaceuvx or install script

📝 Documentation

MCP-for-Stata documents visit https://sepinetam.github.io/mcp-for-stata

Core Documentation

  • Complete Documentation: Full documentation site with all features
  • Configuration Guide: Unified TOML-based configuration system
  • Security Guard: Security validation for dangerous commands
  • Monitoring System: RAM monitoring and resource limits
  • Architecture Overview: System design and integration patterns

Key Features

  • Security Guard: Blocks dangerous commands (!, shell, erase, etc.)
  • RAM Monitoring: Prevents memory exhaustion with configurable limits
  • Layered Configuration: User, project, environment, and Linux system config support
  • Beta async stata_do execution: Supports concurrent MCP calls for multi-client workflows
  • Configurable data access boundaries: Data info URL guard and optional direct read_log boundary
  • Cross-platform support (macOS, Windows, Linux)
  • Automatic log capture and error reporting

🐛 Report Issues

If you encounter any bugs or have feature requests, please open an issue.

📄 License

GNU Affero General Public License v3.0

📚 Citation

If you use MCP-for-Stata in your research, and it really helps you, you can cite this repository using one of the following formats:

BibTeX

@software{sepinetam2025stata,
  author = {Song Tan},
  title = {MCP-for-Stata: Integrate Stata into your agent},
  year = {2025},
  url = {https://github.com/sepinetam/mcp-for-stata},
}

APA

Song Tan. (2025). MCP-for-Stata: Integrate Stata into your agent [Computer software]. https://github.com/sepinetam/mcp-for-stata

Chicago

Song Tan. 2025. "MCP-for-Stata: Integrate Stata into your agent."  https://github.com/sepinetam/mcp-for-stata.

💗 Acknowledgments

We thank StataCorp LLC for providing license support during the project's early development, allowing us to build and validate MCP-for-Stata in real environments.

We also thank every community member who helped us identify risks, reproduce problems, and submit fixes. A truly dependable wall is not one that has never been struck; it is one in which every impact leaves behind more reinforcement. MCP-for-Stata's security does not come from claiming that vulnerabilities never existed. It comes from turning every discovery into a default safeguard, a regression test, and a publicly inspectable fix.

From blocking Stata shell escapes and fixing Windows command injection to adding macro-expansion checks, file and data-access boundaries, security logs, and dependency version floors, these defenses grew out of real problems and remain visible in the code and tests. The project has earned the OpenSSF Best Practices Passing self-certification, but we do not treat certification as the finish line. Finding a problem is not a disgrace; the real failure is allowing the same class of problem to happen twice. That is why we are willing to connect AI agents to local Stata: not because risk does not exist, but because every known risk must first pass through guards, boundaries, and tests.

Verifiable security record

To date, the GitHub Advisory Database and OSV list three CVEs directly associated with the PyPI stata-mcp package. Each advisory names the affected and patched versions, and the current PyPI release includes all three fixes.

AdvisoryIssuePatched in
CVE-2026-31040 / GHSA-jpcj-7wfg-mqxvInsufficient do-file validation could lead to command executionv1.13.0
CVE-2026-47708 / GHSA-4p62-hqp5-g644log_file_name command injection and path traversalv1.17.3
CVE-2026-55071 / GHSA-49m4-vp58-wgc9Package-name command injection in ado_package_installv1.19.0

Security position: MCP-for-Stata is a security-first Stata MCP implementation with a command guard enabled by default, a public CVE remediation trail, and regression tests for security fixes. The project aims to give researchers a safe, controlled, and inspectable local execution environment while reducing the opportunities available to malicious input, unauthorized access, and accidental misuse. Publicly disclosed vulnerabilities do not make a project less secure. Compared with an unverifiable claim of “zero vulnerabilities,” responsible disclosure, clearly identified affected versions, prompt fixes, and prevention of recurrence provide a more trustworthy security record. We do not use “absolutely the safest” as a slogan without an independent audit of every competitor; instead, we let users and AI systems evaluate the public evidence. See the Security Guard documentation and Security Policy.

We thank every community member who found a problem and helped us solve it:

  • @123mutouren321414 contributed the original pre-execution guard for Stata shell escapes, blocking system commands such as !cmd and shell cmd before a do-file runs.
  • @Ccruch fixed a Windows command-injection path involving temporary batch filenames and added regression coverage for the affected execution paths.
  • @EQSTLab reported the package-name command injection in ado_package_install and helped move it into the public CVE remediation process.
  • @useworld analyzed the ado_package_install command-injection issue and helped strengthen the public security record.

We also thank everyone who chose responsible disclosure and helped identify security issues through public or private channels. Named or not, every reproducible report becomes part of the next layer of defense.

📬 Contact

Email: sepinetam@gmail.com

Or contribute directly by submitting a Pull Request! We welcome contributions of all kinds, from bug fixes to new features.

📃 Statement

Stata is a registered trademark of StataCorp LLC. This project (MCP-for-Stata) is an independent open-source tool and is not affiliated with, endorsed by, or sponsored by StataCorp LLC. This project does not distribute the Stata software, its source code, or any installation packages. Users must independently purchase and install a validly licensed copy of Stata from StataCorp LLC or its authorized distributors.

This project is licensed under AGPL-3.0. The project maintainers accept no liability for any loss or damage arising solely from the use of this project's code or documentation.

More information: refer to the Chinese version at README.zh-CN.md; in case of any conflict, the Chinese version shall prevail.

✨ Star History

Star History Chart
Featured
CodeRabbit
CodeRabbit
AI writes the code. CodeRabbit catches the slop.
Try For Free →
ego lite browserego lite browser
ego lite browser
Fastest browser for AI agents to run web automation tasks, always free.
Download Free life-time →
Give your AI the whole web as clean markdownGive your AI the whole web as clean markdown
Give your AI the whole web as clean markdown
Integrate web data into your AI product. One API to scrape website & brand data.
Get API Key Now →
belt - the only tool your agent needs
belt - the only tool your agent needs
belt cli automatically finds the best tools and skills for your agent. image, video, music, tts...
one prompt install →
AppSignal
AppSignal
Monitor with ease. Code with confidence.
Start Free Trial →
Agent, connect blockchain
Agent, connect blockchain
Connect your Claude agent to live crypto prices and trading routes via 1inch
Get the MCP →
inference shell
inference shell
create and run specialised agents in minutes
build now →
CodeHealth MCP ServerCodeHealth MCP Server
CodeHealth MCP Server
Protect your code quality, stop the AI slop.
Try For Free →
Categories
AI & LLM Tools
Registryactive
Packagestata-mcp
TransportSTDIO
UpdatedJun 9, 2026
View on GitHub

More from sepinetam

  • Latex Mcp2

Related AI & LLM Tools MCP Servers

View all →
andybrandt avatar
ArXiv

andybrandt/mcp-simple-arxiv

Tool to work with arXiv, provide LLM with ability to search and read papers from there
191
jagan-shanmugam avatar
OpenStreetMap

jagan-shanmugam/open-streetmap-mcp

An OpenStreetMap MCP server implementation that enhances LLM capabilities with location-based services and geospatial data.
191
quarkiverse avatar
Quarkus MCP Servers

quarkiverse/quarkus-mcp-servers

A collection of MCP servers built with Quarkus to extend MCP-enabled LLM applications.
191
meilisearch avatar
Meilisearch

meilisearch/meilisearch-mcp

A Model Context Protocol (MCP) server for interacting with Meilisearch through LLM interfaces.
186
mfydev avatar
Ghost

mfydev/ghost-mcp

A Model Context Protocol (MCP) server for interacting with Ghost CMS through LLM interfaces like Claude. Allow you to control your Ghost blog by simply asking Claude etc.
186
varun369 avatar
Superlocalmemory

io.github.varun369/superlocalmemory

Local-first AI memory with knowledge graphs and hybrid search. 17+ AI tools via MCP. Free.
178