Stata MCP Server (macOS)
@mkprevo
About Stata MCP Server (macOS)
MCP server for stata do file
Basic information
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"stata-mcp-server": {
"command": "node",
"args": [
"dist/index.js",
"2>",
"server.log"
]
}
}
}Tools
No tools detected
We auto-extract tools from the README. The maintainer can list them under a ## Tools heading to populate this section.
Overview
What is Stata MCP Server (macOS)?
A Model Context Protocol (MCP) server for managing and running Stata .do files, integrated with Claude Desktop. It is built for macOS users who want to interact with Stata through natural language commands via Claude.
How to use Stata MCP Server (macOS)?
After installing, restart Claude Desktop completely. Then use natural language prompts such as “Read the test.do file and show me” or “Run only lines 10 through 15 of the test_sample.do file.” The server supports reading, writing, editing, generating templates, and executing .do files or selected line ranges. Configuration is stored in the Claude Desktop settings file.
Key features of Stata MCP Server (macOS)
- List .do files in a directory
- Read and write .do files with automatic backup
- Edit specific sections: add variables, analysis, or custom inserts
- Generate .do file templates using AI
- Run entire .do files or selected lines only
Use cases of Stata MCP Server (macOS)
- Quickly inspect and retrieve the contents of an existing .do file
- Create a new .do file for a statistical analysis (e.g., education vs. income)
- Add a logistic regression block to an analysis file via natural language
- Test specific lines of a .do file without running the whole script
- List all .do files in the current working directory for project management
FAQ from Stata MCP Server (macOS)
What dependencies are required?
You need Node.js (for the server) and StataBE for macOS installed at the correct path. The server also requires Claude Desktop.
Where are my Stata files and backups stored?
The working directory defaults to /Users/username/Documents/Stata. When files are modified, automatic backups are saved in $STATA_WORKSPACE/.stata-backups/ with timestamps.
What platforms does it support?
The server is explicitly designed for macOS only, as indicated in the project name and Stata path examples.
How do I troubleshoot if Claude Desktop doesn't recognize the server?
Restart Claude Desktop completely and verify the configuration file path: /Users/username/Library/Application Support/Claude/claude_desktop_config.json. Ensure the server’s project path and Stata path are correct.
Can I run only part of a .do file?
Yes. Use the run_do_selected_lines tool. Specify a line range (e.g., lines 5 through 10); the server creates a temporary .do file with necessary settings, runs it in Stata, and cleans up automatically.
More Other MCP servers
IDA Pro MCP
mrexodiaAI-powered reverse engineering assistant that bridges IDA Pro with language models through MCP.

Sequential Thinking
modelcontextprotocolModel Context Protocol Servers
Production-ready MCP integrations for AI applications
Klavis-AIKlavis AI: MCP integration platforms that let AI agents use tools reliably at any scale
MaxKB
1Panel-dev🔥 MaxKB is an open-source platform for building enterprise-grade agents. 强大易用的开源企业级智能体平台。
Maestro
mobile-dev-incPainless E2E Automation for Mobile and Web
Comments