aigroup-stata-mcp
Verified Safeby jackdark425
Overview
A Stata integration server based on Model Context Protocol (MCP) that allows AI assistants to execute Stata scripts, fetch data information, and run statistical analysis.
Installation
uvx aigroup-stata-mcpEnvironment Variables
- STATA_CLI
- stata_cli
- STATA-MCP-CLIENT
- STATA_MCP_CWD
- STATA-MCP-CWD
Security Notes
The server utilizes `subprocess.Popen` and `pexpect` with `shell=True` for executing Stata commands. While this is necessary for its core function, it introduces a potential risk of shell injection if LLM-generated Stata code or file paths contain malicious shell commands. File operations such as `read_file`, `write_dofile`, `append_dofile`, and `load_figure` allow the LLM to interact with arbitrary file paths. Although `mk_dir` employs `pathvalidate` for sanitization, other file-related tools do not show explicit path sanitization against traversal attacks, which could potentially allow access or modification of files outside the intended working directory if an LLM is compromised. No hardcoded secrets were identified.
Similar Servers
us-census-bureau-data-api-mcp
The MCP Server provides a standardized API for AI assistants (LLMs) to access and process U.S. Census Bureau data and geography information, enabling data retrieval and analysis through an agent-like interface.
mcp-stata
Connects AI agents to a local Stata installation for executing commands, analyzing data, generating visualizations, and inspecting results.
powerdrill-mcp
An MCP server for AI-driven data analysis by providing tools to interact with Powerdrill datasets using natural language questions and managing data sources, jobs, and sessions.
stata-workbench
A VS Code compatible extension that enables running Stata code directly from the editor, displaying output and graphs, and allowing AI agents to interact with Stata through an MCP server backend.