MCP Server
Connect Claude, Cursor, and any other MCP-capable agent to your HostStack team. 113 tools cover projects, services and dev boxes, deploys, environments, databases (incl. provisioning, read-only SQL and HA cluster ops), volumes, resource links, your own enrolled machines, domains and authoritative DNS records, env vars, cron, notification channels, alert events, runtime and build logs, and the team activity audit.
create_environment with type:"development" makes a project deploy target (alongside production/staging), not a cloud terminal. For an AI Dev Environment there are three, by where the box comes from: create_dev_environment (a bare box inside a project), create_standalone_dev_environment (one in the team's Development home, from a repo or blank, with optional companion databases), and spin_up_dev_environment (a running clone of an existing service, its env vars and its database) — see the Dev Environments guide.Two ways to run it
Hosted — point your client at https://hoststack.dev/api/mcp with a Bearer API key. Nothing to install.
Local stdio — npx -y @hoststack.dev/mcp runs the same server on your machine and talks JSON-RPC over stdin/stdout. Identical tool surface; no telemetry sent back.
Get an API key
Open /dashboard/settings/api-keys and create a key with full_access permission. The key is bound to a single team, so agents never need to pass teamId — every tool call operates on that team automatically.
Wire it into your client
Claude Desktop
Edit ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
{
"mcpServers": {
"hoststack": {
"command": "npx",
"args": ["-y", "@hoststack.dev/mcp"],
"env": {
"HOSTSTACK_API_KEY": "hs_live_..."
}
}
}
}Cursor
Edit ~/.cursor/mcp.json or use Settings → MCP:
{
"hoststack": {
"command": "npx",
"args": ["-y", "@hoststack.dev/mcp"],
"env": {
"HOSTSTACK_API_KEY": "hs_live_..."
}
}
}Claude Code
claude mcp add hoststack --env HOSTSTACK_API_KEY=hs_live_... -- npx -y @hoststack.dev/mcpHosted (any client)
POST https://hoststack.dev/api/mcp
Authorization: Bearer hs_live_...
Content-Type: application/jsonThe endpoint speaks the streamable-HTTP MCP transport. Stateless — every request is independent; no session bookkeeping.
Generate config snippets
The CLI knows the shape each client expects, so you don't have to memorise it:
npx @hoststack.dev/mcp --print-config claude-desktop
npx @hoststack.dev/mcp --print-config cursor
npx @hoststack.dev/mcp --print-config claude-codeIf HOSTSTACK_API_KEY is set in your shell, it gets baked into the snippet; otherwise you'll see a placeholder.
Tool inventory
projectsserviceslogsdeploysenvironmentsdatabasesvolumesresource-linksmachinesdomainsdnsenv-varscronalertserrorsuptimeanalyticsdev-tasksactivity-loggithubsupportmetaDesign notes
- Key-based env-var ops.
set_env_varanddelete_env_vartake a key, not an ID — the MCP looks up the existing var by key first, then patches or deletes. - Secret values stay masked.
list_env_varsreturns••••••for any row stored as a secret. Masking happens on the API server, so secrets never reach the agent. - Logs are snapshots.
get_service_logsandget_deploy_logsreturn a tail (default 200 lines, max 1000); re-call to get newer entries. For live tails, use the dashboard's logs page. - One deliberate gap: the project cascade. There is no
delete_project— deleting a project takes every service, database, domain and volume under it with it, and that is a confirmation a person should give in the dashboard. Everything one level down an agent can do:delete_service,delete_database,delete_volumeanddelete_environmentare all registered, so an agent asked to tear down what it created can.
Telemetry
When you use the hosted transport, we record one row per tool call: tool name, duration, ok/error, and a non-reversible hash of the input args — never the args themselves. Used for the analytics page and on-call alerts on tool error spikes. Retained 30 days, then deleted by a daily cron.
The local stdio install records nothing on our side. Set HOSTSTACK_MCP_TRACE=1 to emit NDJSON traces to your own stderr for local debugging.
Environment variables
HOSTSTACK_API_KEY — required. hs_live_… for prod, hs_test_… for the test team.HOSTSTACK_BASE_URL — optional override. Default https://hoststack.dev.HOSTSTACK_MCP_TRACE — set to 1 for NDJSON per-tool-call traces on stderr (local only, never sent to HostStack).Next: SDK Reference · CLI Reference