MCP server
mdw mcp is a Model Context Protocol server for Meadow. It gives a coding agent tools to create sandboxes, run commands in them, read and write their files, build images, manage API keys, and read usage and cost.
Next step: add the server to your agent with the snippet for it below, then ask the agent to “list my Meadow sandboxes”.
The server is part of the mdw CLI. It runs on your machine, talks to the agent over standard input and output, and calls the Meadow API with the key in MEADOW_API_KEY. There is no hosted MCP endpoint yet.
Before you start
- You need a build of
mdwthat has the command. Runmdw helpand look for themcpline. Builds sent out before 2026-11-28 do not have it. Ask your Meadow contact for a current one. See Clients. - The server needs
MEADOW_API_KEY. Without it the server prints one line to standard error and exits with code 2.MEADOW_BASE_URLis optional and defaults tohttps://api.usemeadow.ai. - Give it a key with the scopes the work needs, and no more:
sandboxesfor the sandbox and image tools,modelsforlist_models,adminfor the key tools and for account-wide usage. See Authentication. An agent that only runs code in sandboxes needssandboxesalone.
Add it to your agent
Each snippet sets the two variables for the server. Replace mdw_... with your key, or use the form that reads it from your environment where the client has one.
Claude Code
Run claude mcp list to check. It prints meadow: mdw mcp - ✔ Connected.
To share the server with everyone who works in a repository, without a key in the file, add it with project scope. Claude Code fills ${MEADOW_API_KEY} from each person’s environment:
That writes .mcp.json in the repository root:
Claude Code asks each person to approve a server that comes from .mcp.json. Until you approve it in a claude session, claude mcp list shows it as Pending approval.
Claude Desktop
Open Settings, then Developer, then “Edit Config”. The file is ~/Library/Application Support/Claude/claude_desktop_config.json on macOS and %APPDATA%\Claude\claude_desktop_config.json on Windows. Add the server and restart Claude Desktop:
If Claude Desktop cannot find mdw, write the full path of the binary in command.
Cursor
Put this in .cursor/mcp.json in a project, or in ~/.cursor/mcp.json for every project. Cursor fills ${env:NAME} from your environment:
Codex CLI
That writes this to ~/.codex/config.toml:
VS Code
VS Code’s docs say that GitHub Copilot in VS Code reads .mcp.json in the workspace root, with a top-level mcpServers object, and fills ${NAME} from your environment. That is the file the Claude Code project command above writes, so one file can serve both. We have not run it in VS Code.
For every workspace, put the same mcpServers object in ~/.copilot/mcp-config.json.
VS Code’s docs mark the older .vscode/mcp.json file, with servers and inputs, as deprecated. Use it only if your VS Code version does not read .mcp.json.
What we ran
No tool call was made from inside any of these clients. Every tool except the three image tools create_image, get_image, and delete_image was called over standard input and output against the hosted beta on 2026-11-28 (UTC), with a plain MCP client.
Tools
Tool names follow the API’s operation names. The “Kind” column is what the server tells the client about each tool, through the annotations the protocol defines. Clients use it to decide when to ask you first.
A key without admin sees only its own usage.
Destructive tools
The title and the description of each destructive tool start with the word “Destructive”, and each one sets the protocol’s destructiveHint. Claude Code and other clients ask before they run a tool unless you allowed it. Keep that prompt on for these five.
exec_in_sandbox is marked destructive because a command can change or delete anything inside the sandbox. It cannot reach outside the sandbox, except over the network the sandbox is allowed to use. See Network rules.
Secrets
No tool returns a secret, with one exception. create_key returns the secret of the key it mints, once, and its description says so. The secret then sits in the agent’s conversation. If you do not want that, create keys yourself with mdw keys create.
These parts of the API are not offered as tools, because their responses carry secrets or because they take one as input: SSH access, exposed ports, projects (a project carries its webhook signing secret), stored provider keys, and private registry credentials. Use the API or the CLI for them.
Limits
exec_in_sandboxwaits for the command and returns at most the last 50,000 bytes of each ofstdoutandstderr.stdout_truncatedorstderr_truncatedsays when output was cut. The command is killed aftertimeout_seconds, 60 by default. For long commands usemdw exec --background. See Running commands.download_filereturns at most the first 100,000 bytes of a file and setstruncated. Text comes back as text, anything else as base64.create_sandboxwaits up to 300 seconds for the sandbox to start, andcreate_imageup to 600 seconds for its builds. If your client gives up on a tool call sooner, the create still continues: calllist_sandboxesand delete what you do not need.create_sandboxhas no GPU, port, SSH, webhook, or registry login fields.create_imagetakes Dockerfile text only. A Dockerfile that copies local files needsmdw images build. See Images and build contexts.- There is no tool that calls a model. The agent already has a model. To make your code call one, see Use your existing tools.
Errors
A failed API call comes back as a tool error that the agent can read, with the status, the error type, the message, and the request ID:
Errors explains each type.
What a session looks like
These are the results of tool calls made against the hosted beta on 2026-11-28 (UTC), in order: create a sandbox, run a command, write a file, read it back, delete the sandbox.
API reference
The tools call listModels, createSandbox, listSandboxes, getSandbox, execInSandbox, uploadFile, downloadFile, deleteSandbox, createImage, listImages, getImage, deleteImage, listKeys, createKey, revokeKey, getUsage, and listUsageRequests.