Skip to main content
Glama

Convex MCP server

Official
by get-convex
messages.ts661 B
import { v } from "convex/values"; import { mutation } from "./_generated/server"; import { getCurrentUserIdOrThrow } from "./users"; export const send = mutation({ args: { body: v.string(), conversationId: v.id("conversations"), author: v.id("users"), id: v.string(), creationTime: v.number(), }, handler: async (ctx, args) => { const author = await getCurrentUserIdOrThrow(ctx); if (args.author !== author) { throw new Error("User does not match"); } // Send a new message. await ctx.db.insert("messages", { body: args.body, author, conversationId: args.conversationId, }); }, });

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