You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: apps/docs/content/docs/mcp/index.mdx
+26Lines changed: 26 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,6 +5,8 @@ description: Model Context Protocol server for AI agent integration.
5
5
6
6
The `@sandchest/mcp` package is a [Model Context Protocol](https://modelcontextprotocol.io/) server that gives AI agents access to Sandchest sandboxes. It works with any MCP-compatible client including Claude, Cursor, and Windsurf.
7
7
8
+
For most agent requests, the best default is `sandbox_run_project`: one tool call that creates a sandbox, loads the project, installs dependencies, runs the command, and returns a replay URL.
9
+
8
10
## Installation
9
11
10
12
```bash
@@ -15,6 +17,19 @@ bun add @sandchest/mcp
15
17
16
18
The MCP server requires a `SANDCHEST_API_KEY` environment variable.
17
19
20
+
If you want agents to upload local code with tools like `sandbox_run_project` or `sandbox_upload_dir`, also set `SANDCHEST_MCP_ALLOWED_PATHS` to one or more approved local roots.
This writes the MCP config to `~/.claude/mcp.json`, allow-lists your local workspace for upload tools, and installs the Sandchest skill so Claude Code is more likely to choose `sandbox_run_project` first.
32
+
18
33
### Claude Desktop
19
34
20
35
Add to your Claude Desktop MCP config (`~/Library/Application Support/Claude/claude_desktop_config.json`):
@@ -55,11 +70,22 @@ Add to your Cursor MCP settings:
55
70
56
71
With the MCP server, AI agents can:
57
72
73
+
- Run a repo command in a fresh sandbox with one tool call
58
74
- Create isolated sandboxes to run code safely
59
75
- Execute commands and inspect results
60
76
- Upload and download files
61
77
- Fork sandboxes for experimentation
62
78
- Use persistent sessions for multi-step workflows
63
79
- Access replay URLs for sharing
64
80
81
+
## Recommended workflow
82
+
83
+
Use these defaults in order:
84
+
85
+
1. For "run this command in a new sandbox" requests, use `sandbox_run_project`.
86
+
2. For repeated work, check `sandbox_list` and fork an existing prepared sandbox.
87
+
3. Drop to `sandbox_create`, `sandbox_git_clone`, `sandbox_upload_dir`, and sessions only when you need fine-grained control.
88
+
89
+
For Claude Code, also install the bundled Sandchest skill. It reinforces the same decision tree and reduces the odds of the agent falling back to manual multi-step setup for one-shot tasks.
90
+
65
91
See the [Tools Reference](/docs/mcp/tools) for the complete list.
0 commit comments