Skip to main content
Glama

Convex MCP server

Official
by get-convex
script.js927 B
const CONVEX_URL = "http://localhost:8000"; // These JSDoc type annotations help VS Code find types. /** @type {import("convex/browser")["ConvexClient"]} */ const ConvexClient = convex.ConvexClient; const client = new ConvexClient(CONVEX_URL); /** @type {import("./convex/_generated/api")["api"]} */ const api = convex.anyApi; client.onUpdate(api.messages.list, {}, (messages) => { console.log(messages); const container = document.querySelector(".messages"); container.innerHTML = ""; for (const message of messages.reverse()) { const li = document.createElement("li"); li.textContent = `${message.author}: ${message.body}`; container.appendChild(li); } }); document.querySelector("form").addEventListener("submit", (e) => { e.preventDefault(); const inp = e.target.querySelector("input"); client.mutation(api.messages.send, { body: inp.value, author: "me", }); inp.value = ""; });

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