MCP servers
MCP servers give the agent more tools: a database, a documentation search, a lab system. In code flower they come
only from config.yaml on the computer that starts the sandbox, under mcp_servers:, and
every sandbox’s agent gets them. The agent cannot add servers itself.
A server at a URL
Section titled “A server at a URL”mcp_servers: docs: url: https://mcp.example.org/mcp transport: http # the default; sse works for Claude Code and OpenCode only headers: { Authorization: "Bearer <token>" }A command in the sandbox
Section titled “A command in the sandbox”The command runs inside the sandbox (stdio), so it must be installed there:
mcp_servers: files: command: files-mcp # on the sandbox's PATH, or a full path args: [--root, /codeflower-state/workspace] env: { TOKEN: "<token>" }Install it into the project’s environment, which persists: uv pip install <package> for a Python server (the
command lands in the project’s venv, on PATH), or npm install --prefix /codeflower-state/env/mcp <package> for a
Node one, with the full path /codeflower-state/env/mcp/node_modules/.bin/<command> as command. The agent can do
this for you. Prefer an installed command to npx/uvx, which download the server at every start.
- Names are 1 to 32 letters, digits,
-or_. - A server with
envorheadersusually holds a token: config.yaml must then not be readable by other users (chmod 600 ~/.codeflower/config.yaml), or code flower refuses to start. - Restart the sandbox after a change; the list is read when it starts.
- A server that fails to start is left out, and the chat says so.
- With network isolation, the host of each
urlserver is allowed by itself. A server on a private address, and whatever acommandserver connects to, need lines in the allowlist file.