# Use in Claude Code

We are very excited to write this document about Claude Code with Stata-MCP. At my daily research, Claude Code is one of the tools I use most often. 

If you have not installed it, you can visit [Claude Code](https://code.claude.com/docs/en/quickstart) to install it. 

> Requirements:  
> - [Stata](https://www.stata.com) 17+  
> - [uv](https://docs.astral.sh/uv/getting-started/installation/) or python 3.11+  
> - Claude Code

## Quickly Start
First, check whether Stata-MCP is compatible with your device by verifying each requirement. 

```bash
uvx stata-mcp --usable
```

Then, create your project. We suggest creating all the projects in the same directory. For example, we use `~/Documents/StataProjects` as the project directory.

```bash
cd ~/Documents/StataProjects
claude mcp add stata-mcp --env STATA_MCP_CWD=$(pwd) --scope project -- uvx --directory $(pwd) stata-mcp
```

> Advice: Please make sure the directory without any special characters like whitespace, emoji or Chinese characters.

Now the project has been created successfully. 
The project structure is as follows:

```text
my_first_project/            # Project directory
├── stata-mcp-folder/        # All the files generated by Stata-MCP
│   ├── stata-mcp-dofile/    # do-files
│   ├── stata-mcp-log/       # log files
│   ├── stata-mcp-result/    # Some command (like `outreg2`) results saved here
│   └── stata-mcp-tmp/       # Temporary files, like data info description
│   └── .gitignore           # git ignore file
└── CLAUDE.md                # The global instructions to limit the project

```
