Queries Convex database using the Convex MCP server. Use when checking data in the database, listing tables, running queries, or inspecting Convex deployments.
Use the Convex MCP tools to interact with the database.
status first to get the deployment selectortables to see available tables and their schemasdata to paginate through documents in a tablerunOneoffQuery for read-only JavaScript queries| 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 |
// 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;