@hoststack.dev/mcp
v0.15.0
Published
MCP server for HostStack — manage projects, services, deploys, databases, domains, DNS records, env vars, and cron jobs from any MCP-capable agent.
Downloads
387
Maintainers
Readme
@hoststack.dev/mcp
Model Context Protocol (MCP) server for HostStack — let Claude, Cursor, and any other MCP-capable agent deploy services, manage databases, rotate env vars, and read logs on your HostStack team.
Two ways to run it:
- Hosted (recommended) — point your client at
https://hoststack.dev/api/mcpwith a Bearer API key. No local install. - Local stdio —
npx -y @hoststack.dev/mcpruns the same server in-process and talks JSON-RPC over stdin/stdout.
Quick start
1. Get an API key
Open the dashboard at https://hoststack.dev/dashboard/settings/api-keys and create a key with full_access permission. The key is bound to a single team — every tool call operates on that team automatically; agents never need to pass teamId.
2. Wire it into your client
Claude Desktop
Add to ~/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
Add to ~/.cursor/mcp.json (or via 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/mcpOr — equivalently — use the hosted HTTP transport so credentials live only in your Claude Code config, not on disk:
claude mcp add --transport http hoststack https://hoststack.dev/api/mcp --header "Authorization: Bearer hs_live_..."Any other client (hosted)
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.
3. Generate config snippets
The CLI knows how to print config for the three big clients so you don't have to memorise the shape:
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 hs_live_your_api_key_here placeholder you can search-and-replace.
Tool inventory
60 tools, grouped by resource:
| Category | Read | Write |
| ----------------- | --------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------- |
| projects | list_projects, get_project | create_project, update_project |
| services | list_services, get_service, get_service_metrics, get_service_metrics_history, get_service_logs, get_service_logs_bulk | create_service, create_dev_environment, update_service, update_service_config, suspend_service, resume_service |
| deploys | list_deploys, get_deploy, get_deploy_logs, diagnose_deploy | trigger_deploy, cancel_deploy |
| environments | list_environments | create_environment, delete_environment, promote_deploy |
| databases | list_databases, get_database, get_database_cluster, query_database | update_database, upgrade_database_to_ha (use the dashboard for create/delete/credentials) |
| volumes | list_volumes | create_volume, update_volume, delete_volume |
| domains | list_domains | add_domain, verify_domain, remove_domain |
| dns | list_dns_zones, list_dns_records, get_dns_record | create_dns_record, update_dns_record, delete_dns_record |
| env-vars | list_env_vars | set_env_var, delete_env_var, bulk_set_env_vars |
| cron | list_cron_executions, get_cron_execution | — |
| notifications | list_notification_channels | create_notification_channel, update_notification_channel, delete_notification_channel, test_notification_channel |
| alerts | list_alerts | — |
| activity-log | list_activity_log | — |
| meta | get_me | — |
A few design notes worth knowing as a caller:
set_env_var/delete_env_varare key-based. You don't need an env-var ID; the MCP looks up the existing var by key first, then patches or deletes by ID under the hood.list_env_varsmasks secret values. Anything stored withis_secret: truecomes back as••••••. The masking happens server-side, so you can't accidentally leak a secret to the agent's context window.get_service_logsandget_deploy_logsare snapshots. Streaming logs over MCP isn't supported — re-call the tool to get newer entries. Use the dashboard's/dashboard/services/:id/logsfor live tails.- No
delete_projectordelete_service. Destructive cascades are dashboard-only — too risky for an agent to call. Creating is supported viacreate_service/create_dev_environment. - Telemetry, hosted only. When you use
https://hoststack.dev/api/mcp, we record one row per tool call (tool name, duration, ok/error, SHA-derived hash of input args — never the args themselves) for the analytics page and on-call alerts. Retained 30 days. The local stdio install records nothing.
Environment variables
| Var | Required | Default | Notes |
| --------------------- | -------- | ----------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| HOSTSTACK_API_KEY | yes | — | Bearer token. hs_live_… for prod, hs_test_… for the test team. |
| HOSTSTACK_BASE_URL | no | https://hoststack.dev | Override for self-hosted or staging. |
| HOSTSTACK_MCP_TRACE | no | unset | Set to 1 to emit one NDJSON line per tool call to stderr. Useful for 2> mcp-trace.log debugging without colliding with the JSON-RPC body on stdout. |
License
MIT — see LICENSE.
