Skip to main content
Glama

Convex MCP server

Official
by get-convex
counter.ts681 B
import { Id } from "./_generated/dataModel"; import { mutation, query } from "./_generated/server"; export const get = query( async ({ db }, { counter }: { counter: Id<"counters"> }) => { const doc = await db.get(counter); if (!doc) throw new Error("no counter found"); return doc.count; }, ); export const create = mutation(async ({ db }) => { return await db.insert("counters", { count: 0 }); }); export const increment = mutation( async ({ db }, { counter }: { counter: Id<"counters"> }) => { const doc = await db.get(counter); if (!doc) throw new Error("no counter found"); return await db.replace(counter, { count: doc.count + 1 }); }, );

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/get-convex/convex-backend'

If you have feedback or need assistance with the MCP directory API, please join our Discord server