Convex MCP Server
Use the Convex MCP tools to interact with the database.
Workflow
- Get deployment: Run
statusfirst to get the deployment selector - Explore schema: Use
tablesto see available tables and their schemas - Browse data: Use
datato paginate through documents in a table - Custom queries: Use
runOneoffQueryfor read-only JavaScript queries
Available Tools
| Tool | Purpose |
|---|---|
status |
Get deployment selector (run first) |
tables |
List tables with schemas |
data |
Paginate through table documents |
runOneoffQuery |
Execute read-only JS queries |
functionSpec |
Get metadata about deployed functions |
run |
Execute deployed Convex functions |
logs |
Fetch recent function execution logs |
Example Queries
// runOneoffQuery: Count documents in a table
const count = await db.query("users").collect();
return count.length;
// runOneoffQuery: Filter documents
const active = await db.query("users")
.filter(q => q.eq(q.field("status"), "active"))
.collect();
return active;
Converted and distributed by TomeVault — claim your Tome and manage your conversions.