Skip to main content
Glama

Convex MCP server

Official
by get-convex
foods.ts1.12 kB
import { v } from "convex/values"; import { action, mutation, query } from "./_generated/server"; import { EXAMPLE_DATA } from "../foodData"; import { api } from "./_generated/api"; export const populate = action({ args: {}, handler: async (ctx) => { for (const doc of EXAMPLE_DATA) { await ctx.runMutation(api.foods.insertRow, { cuisine: doc.cuisine, theLetterA: doc.theLetterA, bOrC: doc.bOrC, description: doc.description, embedding: doc.embedding, }); } }, }); export const insertRow = mutation({ args: { description: v.string(), cuisine: v.string(), theLetterA: v.string(), bOrC: v.string(), embedding: v.array(v.float64()), }, handler: async (ctx, args) => { await ctx.db.insert("foods", args); }, }); export const queryDocs = query({ args: { ids: v.array(v.id("foods")), }, handler: async (ctx, args) => { const result = []; for (const id of args.ids) { const current = await ctx.db.get(id); if (current) { result.push(current); } } return result; }, });

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