Skip to main content
Glama

Convex MCP server

Official
by get-convex
messages.ts940 B
import { v } from "convex/values"; import { action, mutation, query } from "./_generated/server"; export const hello = action({ args: {}, handler: async () => { return "hello"; }, }); export const listMessages = query({ args: {}, handler: async (ctx) => { return await ctx.db.query("messages").take(10); }, }); export const insertMessage = mutation({ args: { channel: v.string(), text: v.string() }, handler: async (ctx, { channel, text }) => { return await ctx.db.insert("messages", { channel, text }); }, }); export const tryToPaginate = query({ args: {}, handler: async (ctx) => { return await ctx.db.query("messages").paginate({ cursor: null, numItems: 10, }); }, }); export const dateNow = query({ args: {}, handler: async () => { return Date.now(); }, }); export const mathRandom = query({ args: {}, handler: async () => { return Math.random(); }, });

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