Connect an agent in a few minutes.
Hosted MCP is the primary experience. REST, SDK, and CLI are thin adapters over the same control plane.
Hosted MCP
Add the remote server. Your client opens OnDemandDB for email/password or passkey sign-in and explicit OAuth consent; no API key belongs in this configuration.
mcp.json
{
"mcpServers": {
"ondemanddb": {
"url": "https://mcp.ondemanddb.app/mcp"
}
}
}CLI
Inspect the installer, verify the signed release, then authenticate through your browser.
terminal
curl -fsSLO https://ondemanddb.app/install-cli.sh
less install-cli.sh
sh install-cli.sh
ondemanddb auth login
ondemanddb database list
ondemanddb database context pull DB_ID --directory ./db-context
ondemanddb sql DB_ID --command "select current_date"Work with context deliberately
Use get_database_context before making assumptions about a database. Context does not automatically enter a prompt, install itself, or become trusted instructions. A push requires the ETag you reviewed: --if-match ETAG.
HTTP API
The versioned endpoint is https://api.ondemanddb.app. MCP and API tokens have different audiences and are not interchangeable.
terminal
curl https://api.ondemanddb.app/v1/databases \
-H "Authorization: Bearer $ONDEMANDDB_API_KEY"