dev-mcps/dev-server-mcp/services.localhost.json

30 lines
1.3 KiB
JSON

{
"_comment": [
"A first end-to-end configuration, deliberately dependency-free.",
"",
"'node-app' runs whatever server.js the execution wrote, with node alone and no install step.",
"That is the point: npm ci needs a lockfile, so the shortest honest loop for an agent starting",
"from an empty directory is a server built on node's own http module. Once that works, move to",
"services.example.json, where execution-web installs a real dependency tree.",
"",
"The service reads its port from PORT as well as from the argument, because an agent writing a",
"server from scratch is more likely to reach for process.env.PORT than to parse argv."
],
"services": {
"node-app": {
"command": "node",
"args": ["server.js", "${port}"],
"cwd": ".",
"workspaceMode": "execution",
"agentInstructions": "For an empty workspace, create server.js in the workspace root. It is started with Node and must serve the page on host 0.0.0.0 using process.env.PORT. After a successful start, navigate only to the publicUrl returned by start_service.",
"publicUrl": "http://dev-server-worker:${port}",
"healthUrl": "http://127.0.0.1:${port}/",
"startupTimeoutMs": 20000,
"shutdownTimeoutMs": 5000,
"env": {
"PORT": "${port}"
}
}
}
}