sandfort-mcp
A stdio MCP server for a running Sandfort instance. It exposes sandbox operations as MCP tools, so an agent can create a sandbox, run code and commands, move files and take snapshots.
Sandfort is a self-hosted sandbox platform for running AI-generated code. The Sandfort server is source-available (FSL-1.1-Apache-2.0). This package is licensed Apache-2.0.
Install
pip install sandfort-mcp
or run it without installing:
uvx sandfort-mcp
Python 3.12 or newer is required. The package depends on mcp>=2 and sandfort-sdk.
Configure
Two environment variables are required. The server exits with status 2 and a message on stderr when either one is missing.
| Variable | Meaning |
|---|---|
SANDFORT_BASE_URL |
Base URL of your Sandfort server, for example http://127.0.0.1:8000 |
SANDFORT_API_KEY |
A Sandfort API key (it starts with sf_) |
Example entry for an MCP client that takes a JSON config:
{
"mcpServers": {
"sandfort": {
"command": "uvx",
"args": ["sandfort-mcp"],
"env": {
"SANDFORT_BASE_URL": "http://127.0.0.1:8000",
"SANDFORT_API_KEY": "sf_..."
}
}
}
}
Tools
Sandboxes and snapshots:
create_sandbox: create a sandbox and wait until it is startedlist_sandboxes: list live sandboxes (destroyed and deleting ones are left out)delete_sandbox: delete a sandbox by idcreate_snapshot: create a named snapshot from a sandbox
Running code:
run_code: run a code snippet in a sandboxrun_command: run a shell command in a sandbox
Files:
upload_text_file: write a UTF-8 text filedownload_text_file: read a UTF-8 text fileupload_binary_file: write a file from base64 contentdownload_binary_file: read a file as base64list_directory: list a directory (at most 1000 entries, with atruncatedflag)stat_path: describe one file, directory or symlinkmake_directory: create a directory, with missing parents by defaultdelete_path: delete a file or directory (recursiveis off by default)
Tool errors are returned as text in the form error: <message>.
Limits
- A reachable Sandfort server and an API key are required. This package does not start a server.
- File downloads and binary uploads are limited to 1 MiB. Larger files are refused. Base64 inflates the payload by about a third.
- The transport is stdio only. There is no HTTP transport.
- The server acts with the scopes of the API key it is given.
Links
- Website: https://sandfort.dev
- Source: https://github.com/malinele/sandfort
Metadata
Release files for sandfort-mcp 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sandfort_mcp-0.1.0.tar.gz | 9.2 kB | Without provenance | Details for sandfort_mcp-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sandfort_mcp-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for sandfort_mcp-0.1.0-py3-none-any.whl |
Total release size: 19.0 kB
Release files / sandfort_mcp-0.1.0.tar.gz
| Download URL | sandfort_mcp-0.1.0.tar.gz |
|---|---|
| Size | 9.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b620cd05e1d46c1be29fbaa50de48da286addd0b1e238eed73514af06545cf81
|
|
BLAKE2b-256 checksum How to use checksums |
58a167003e63c4a2b5dfa700f0802e9dca7620e5a99a72031c5c6ab5fa01e1ee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.13
|
Release files / sandfort_mcp-0.1.0-py3-none-any.whl
| Download URL | sandfort_mcp-0.1.0-py3-none-any.whl |
|---|---|
| Size | 9.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8b0b2ccdfd8f6fd8c94f3159e0ce4d5e8bd0297c9d3c8a3938a07b64a584b0f0
|
|
BLAKE2b-256 checksum How to use checksums |
a129b94d3e96d08dbb6844e3f8ce789f72242541bce5824be422ee42f184a648
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.13
|
Security for sandfort-mcp 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.