# Convex — how to use (mcp.ai)

Connect your Convex account and use 19 tools for developer tools straight from your AI agent. Connect with your own API key. Backend-as-a-Service platform with real-time database, serverless functions, and built-in authentication.

## Option A — via MCP (recommended)
Remote MCP endpoint (HTTP, streamable): `https://api.mcp.ai/p_convex?ms=1787291280000`
Add it as a custom/remote MCP connector in your client (Claude, Cursor, VS Code…), then authenticate when prompted. Once connected, ask the agent to use the server's tools (e.g. `convex_create_deploy_key`).

## Option B — via direct REST API
Base URL: `https://api.mcp.ai/api/convex`
Auth: `Authorization: Bearer sk_live_…` — create a workspace API key at https://mcp.ai/settings/api-keys
Discover endpoints: `GET https://api.mcp.ai/api/convex/_endpoints`

### Endpoints
- `POST https://api.mcp.ai/api/convex/create/deploy/key` — Tool to create a deploy key for use with the Convex CLI. Use when you need to generate credentials for CLI-based development or deployment workflows. The generated key provides administrative access t
  - body: { name: string, deployment_name: string }
- `POST https://api.mcp.ai/api/convex/create/deployment` — Tool to create a new deployment for a Convex project. Use when you need to create a development, production, or custom deployment. Specify the deployment type and optional configuration like class, re
  - body: { type: string, class?: string, region?: string, reference?: string, project_id: integer }
- `POST https://api.mcp.ai/api/convex/create/project` — Tool to create a new project on a Convex team, optionally provisioning a dev or prod deployment. Use when you need to initialize a new Convex project in a team.
  - body: { team_id: integer, projectName: string, deploymentType?: string, deploymentClass?: string, deploymentRegion?: string }
- `POST https://api.mcp.ai/api/convex/delete/custom/domain` — Tool to remove a custom domain from a Convex deployment. Use when you need to delete a previously configured custom domain.
  - body: { domain: string, deployment_name: string, requestDestination: string }
- `POST https://api.mcp.ai/api/convex/delete/deployment` — Tool to delete a Convex deployment. Use when you need to permanently remove a deployment and all its data. WARNING: This action will delete all data and files in the deployment and cannot be undone.
  - body: { deployment_name: string }
- `POST https://api.mcp.ai/api/convex/delete/project` — Deletes a Convex project and all its deployments permanently. Use when you need to permanently remove a project and all associated data. This operation cannot be undone.
  - body: { project_id: integer }
- `POST https://api.mcp.ai/api/convex/execute/query/batch` — Tool to execute multiple Convex query functions in a single batch request. Use when you need to fetch data from multiple queries efficiently in one API call.
  - body: { queries: object[], deployment_url?: string }
- `POST https://api.mcp.ai/api/convex/get/deployment` — Tool to retrieve details about a Convex cloud deployment. Use when you need to get information about a specific deployment including its configuration, region, creation time, and status.
  - body: { deployment_name: string }
- `POST https://api.mcp.ai/api/convex/get/project/by/id` — Tool to retrieve detailed information about a specific Convex project by its ID. Use when you need to fetch project metadata including name, slug, team association, and creation time.
  - body: { project_id: integer }
- `POST https://api.mcp.ai/api/convex/get/project/by/slug` — Tool to retrieve a Convex project by its slug within a team. Use when you need to fetch project details using human-readable identifiers instead of numeric IDs.
  - body: { project_slug: string, team_id_or_slug: string }
- `POST https://api.mcp.ai/api/convex/get/query/timestamp` — Tool to get the latest timestamp for queries from Convex deployment. Use when you need to retrieve the current query timestamp from the Convex API.
  - body: { deployment_name: string }
- `POST https://api.mcp.ai/api/convex/get/token/details` — Tool to retrieve token details for the authenticated token. Returns the team ID for team tokens or project ID for project tokens. Especially useful after receiving a token from an OAuth flow to identi
- `POST https://api.mcp.ai/api/convex/list/deploy/keys` — Tool to list all deploy keys for a specified Convex deployment. Use when you need to view all authentication tokens that can be used to deploy to this deployment.
  - body: { deployment_name: string }
- `POST https://api.mcp.ai/api/convex/list/deployment/classes` — Tool to list available deployment classes for a Convex team. Use when you need to check which deployment classes are available for a specific team.
  - body: { team_id: string }
- `POST https://api.mcp.ai/api/convex/list/deployment/regions` — Tool to list available deployment regions for a Convex team. Use when you need to check which regions are available for deploying a team's backend.
  - body: { team_id: string }
- `POST https://api.mcp.ai/api/convex/list/deployments` — Tool to list all deployments for a Convex project. Use when you need to see all deployments (production, preview, or local) for a specific project.
  - body: { isDefault?: boolean, project_id: integer, includeLocal?: boolean, deploymentType?: string }
- `POST https://api.mcp.ai/api/convex/list/log/streams` — Tool to list all existing log stream configurations in a deployment. Use when you need to view configured log streaming destinations like Datadog, Webhook, Axiom, or Sentry.
- `POST https://api.mcp.ai/api/convex/list/projects` — Tool to list all projects for a specific Convex team. Use when you need to retrieve all projects associated with a team by team ID.
  - body: { team_id: integer }
- `POST https://api.mcp.ai/api/convex/update/deployment` — Tool to update properties of an existing Convex deployment. Use when you need to modify deployment settings such as dashboard edit confirmation or deployment reference. Only the fields provided in the
  - body: { reference?: string, deployment_name: string, dashboard_edit_confirmation?: boolean }

## Example prompts
- "What can I do in Convex?"
- "Show me a summary of my Convex account"

## More
- Page: https://mcp.ai/convex
- Agent spec (llms.txt): https://mcp.ai/convex/llms.txt
- Postman collection: https://mcp.ai/convex/postman.json
