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.

ParameterValue
URLhttps://host.ulewicz.space/api/mcp
TransportStreamable HTTP
AuthenticationAuthorization: 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

ToolDescription
list_organizations, list_projects, get_projectOrganizations (with plan), projects, project details: status, region, compute size, API URL.
create_project, delete_projectCreate a project (name, organization_slug, region, compute_size); delete requires confirm_name (owner or admin).
get_project_keysAPI URL and the anon key.
pause_project, restore_projectPause and resume a project.
execute_sqlRun SQL against the project (ref, query); owner, admin or developer.
list_branches, create_branch, delete_branch, merge_branchDatabase branching; merge_branch supports dry_run.
get_pitr, restore_pitrPoint-in-time recovery; restore requires confirm_ref.
list_edge_functions, get_edge_function, deploy_edge_function, delete_edge_functionManage Edge Functions.
list_function_secrets, set_function_secretsFunction secrets (names only when listing).
list_edge_function_versions, rollback_edge_functionDeploy history and rollback.
get_network_restrictions, set_network_restrictions, custom domain and move_project toolsNetwork 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_role key or the database password.
  • execute_sql runs with database-owner privileges — review the queries your agent wants to run before approving them.
  • Delete unused tokens in the dashboard — revocation is immediate.