AI & tools
MCP server
Connect Claude, Cursor and other AI agents to HostBase through the Model Context Protocol.
HostBase runs a remote MCP (Model Context Protocol) server, so AI assistants can manage your projects: list and create them, run SQL, deploy Edge Functions, manage branches and PITR.
| Parameter | Value |
|---|---|
| URL | https://host.ulewicz.space/api/mcp |
| Transport | Streamable HTTP |
| Authentication | Authorization: Bearer hb_pat_... |
1. Create a token
Go to Account → Access tokens and create a token. It is shown only once — copy it right away.
2. Configure your client
Claude Code
claude mcp add --transport http hostbase https://host.ulewicz.space/api/mcp --header "Authorization: Bearer hb_pat_..."
Claude Desktop
Claude Desktop connects to remote servers through the mcp-remote bridge. In claude_desktop_config.json:
{
"mcpServers": {
"hostbase": {
"command": "npx",
"args": [
"-y", "mcp-remote",
"https://host.ulewicz.space/api/mcp",
"--header", "Authorization: Bearer hb_pat_..."
]
}
}
}
Cursor
In .cursor/mcp.json in your project (or globally in ~/.cursor/mcp.json):
{
"mcpServers": {
"hostbase": {
"url": "https://host.ulewicz.space/api/mcp",
"headers": { "Authorization": "Bearer hb_pat_..." }
}
}
}
Available tools
| Tool | Description |
|---|---|
list_organizations, list_projects, get_project | Organizations (with plan), projects, project details: status, region, compute size, API URL. |
create_project, delete_project | Create a project (name, organization_slug, region, compute_size); delete requires confirm_name (owner or admin). |
get_project_keys | API URL and the anon key. |
pause_project, restore_project | Pause and resume a project. |
execute_sql | Run SQL against the project (ref, query); owner, admin or developer. |
list_branches, create_branch, delete_branch, merge_branch | Database branching; merge_branch supports dry_run. |
get_pitr, restore_pitr | Point-in-time recovery; restore requires confirm_ref. |
list_edge_functions, get_edge_function, deploy_edge_function, delete_edge_function | Manage Edge Functions. |
list_function_secrets, set_function_secrets | Function secrets (names only when listing). |
list_edge_function_versions, rollback_edge_function | Deploy history and rollback. |
get_network_restrictions, set_network_restrictions, custom domain and move_project tools | Network allowlist, custom domains and moving projects between regions. |
Example prompts
- "Show my HostBase projects and their status."
- "Create a project shop-staging in Warsaw in the acme organization."
- "Give me the URL and anon key of shop-staging and add them to .env.local."
- "Create a products table with RLS in shop-staging and add 3 sample products."
- "Write and deploy a send-email function in shop-staging that sends mail through Resend, then set the RESEND_API_KEY secret."
Security
- A token carries your account's permissions — treat it like a password and never commit it.
- MCP tools never return the
service_rolekey or the database password. execute_sqlruns with database-owner privileges — review the queries your agent wants to run before approving them.- Delete unused tokens in the dashboard — revocation is immediate.