Back to MCP Catalog

Convex MCP Server

Cloud PlatformsJavaScript
Interact with Convex deployments, tables, functions, and data through AI agents
Available Tools

status

Lists available Convex deployments and returns a deployment selector for use in subsequent calls

tables

Lists all tables in a deployment along with their declared and inferred schemas

data

Paginates through documents in a specified table

runOneoffQuery

Executes a sandboxed JavaScript query against the deployment's data

functionSpec

Lists all functions in a deployment along with their types and visibility

run

Executes a specified function in the deployment

envList

Lists all environment variables for a deployment

envGet

Gets the value of a specific environment variable

envSet

Sets the value of an environment variable

envRemove

Removes an environment variable from a deployment

Convex's MCP server enables AI agents to interact with your Convex deployments through a standardized interface. It supports introspecting tables and functions, executing queries and mutations, and even writing one-off sandboxed queries to analyze data safely. Since Convex queries are fully sandboxed and can't write to the database without explicit permission, it's safe to let AI agents explore and analyze your data through code. This makes it particularly powerful for ad-hoc data analysis, schema suggestions, and function execution without risking data integrity.

Overview

Convex MCP Server allows AI agents to interact with your Convex deployments, providing access to database tables, functions, and environment variables. This integration enables AI assistants to help you analyze data, execute functions, and manage your Convex applications.

Installation

For Cursor

  1. Ensure you're using Cursor version 0.47.5 or later (check under "Cursor > About Cursor" on macOS)
  2. Go to "Cursor Settings > MCP"
  3. Click on "Add new global MCP server"
  4. Add the Convex configuration to your mcp.json
  5. Make sure the "convex" server is enabled (it should appear green in the settings)

For Other Agents

While primarily tested with Cursor on macOS, the Convex MCP server should work with other agents like Windsurf and Claude Desktop using the same command. The configuration may vary slightly depending on the agent.

Usage

After installation, your AI assistant can:

  1. List and select deployments using the status tool
  2. Explore table schemas and data with the tables and data tools
  3. Write and execute one-off queries with runOneoffQuery
  4. View function specifications with functionSpec
  5. Execute functions using the run tool
  6. Manage environment variables with the env tools

The workflow typically starts with the agent calling status to get a deployment selector, which is then used in subsequent calls to identify which deployment to work with.

Capabilities

The Convex MCP server is particularly useful for:

  • Exploring and analyzing your database structure
  • Writing ad-hoc queries to answer questions about your data
  • Executing functions to test or demonstrate functionality
  • Suggesting schema improvements based on actual data patterns
  • Managing environment variables across deployments

Since Convex queries are sandboxed, AI agents can safely write and execute code without risking data corruption or unintended side effects.

Related MCPs

AWS CLI
Cloud PlatformsPython

Execute AWS CLI commands securely through AI assistants

Kubernetes
Cloud PlatformsGo

Connect to and manage Kubernetes clusters through natural language

Cloudflare
Cloud PlatformsTypeScript

A Model Context Protocol server for Cloudflare services

About Model Context Protocol

Model Context Protocol (MCP) allows AI models to access external tools and services, extending their capabilities beyond their training data.

Generate Cursor Documentation

Save time on coding by generating custom documentation and prompts for Cursor IDE.