ContainerAgent is a stateless Streamable HTTP MCP server. It proxies container
operations to an upstream agent service and Base64-encodes request and response
payloads.
The project provides two entry points:
server.js: a standalone Node.js HTTP server.deno-server.js: a web-standard Deno handler exported as a default function.server.js.deno-server.js.API_URL environment
variable. No upstream endpoint is embedded in the source code.Install the Node.js dependencies:
npm install
Set API_URL in the deployment environment, then start the server:
npm start
The MCP endpoint is exposed at /mcp.
| Variable | Required | Default | Description |
|---|---|---|---|
API_URL | Yes | None | Upstream agent action endpoint. |
HOST | No | 0.0.0.0 | HTTP bind address. |
PORT | No | 8080 | HTTP listening port. |
deno-server.js exports the request handler directly:
export default async function handler(request) {
// Returns a web-standard Response.
}
Configure API_URL as a deployment environment variable. The host platform
must route MCP requests to /mcp.
execute_command(command): executes a shell command in the container and
returns its output.read_file(path, start_line = 1, end_line?): reads an inclusive, one-based
line range from a UTF-8 text file.write_file(path, content, mode = "insert" | "replace", start_line?, end_line?):
inserts content or replaces an inclusive line range.Start the Node.js server and run the MCP protocol client:
npm test
Use MCP_URL to point the test client at a different MCP deployment. The test
initializes the server, lists its tools, executes a command, and reads a file.
API_URL in the deployment environment rather than source control.