Interfaces
MCP server
Server4Agent speaks the Model Context Protocol. Add it to your agent framework and the agent can provision and drive servers as native tools, no glue code.
Connect
Endpoint. The MCP server is served at
/api/mcp on your deployment. Use your deployment origin (e.g. https://your-app.vercel.app/api/mcp), or your custom domain once mapped.Point your framework's MCP client at our server and pass the agent's API key. Any MCP-capable runtime works.
mcp.config.json
{
"mcpServers": {
"server4agent": {
"url": "https://your-app.vercel.app/api/mcp",
"headers": { "Authorization": "Bearer $AGENTSERVER_KEY" }
}
}
}Tools
Once connected, the agent can call any of these tools. The headline is prompt, a freeform instruction the on-server agent plans and executes. The rest are the primitives it (or you) can reach for directly.
tools
// ── Server lifecycle ─────────────────────────────────────────
create_server // → { id, url } provision a new server
update_server // { server_id, task?, region?, key_label? }
delete_server // { server_id }
control_server // { server_id, action: start|stop|restart }
list_servers // → [ { id, task, status, url } ]
get_server // { server_id } status, usage, URL
// ── The "do anything" tool ───────────────────────────────────
prompt // { server_id, prompt } agent plans + executes
// → { run_id, status }
// ── Low-level primitives ─────────────────────────────────────
exec // { server_id, command } run a shell command
read_file // { server_id, path } → { content }
write_file // { server_id, path, content }
delete_file // { server_id, path }
list_files // { server_id } → { files: [...] }
// ── Structured project builds ────────────────────────────────
start_build // { server_id, goal } → { build_id, status }
get_build // { server_id, build_id } poll steps + artifacts
// ── Deploy ───────────────────────────────────────────────────
deploy // { server_id } → { url, status: "live" }Why MCP-first
Agents are the users. Exposing Server4Agent as MCP tools means the agent decides when it needs a server and gets one itself, mid-task, without a human or a separate integration step.
Next: REST API