Skip to main content
Glama

Convex MCP server

Official
by get-convex
applicationErrors.tsx861 B
import { ConvexError } from "convex/values"; import { useMutation } from "convex/react"; import { api } from "../convex/_generated/api"; export function MyApp() { const doSomething = useMutation(api.myFunctions.mutateSomething); const handleSomething = async () => { try { await doSomething({ a: 1, b: 2 }); } catch (error) { const errorMessage = // Check whether the error is an application error error instanceof ConvexError ? // Access data and cast it to the type we expect (error.data as { message: string }).message : // Must be some developer error, // and prod deployments will not // reveal any more information about it // to the client "Unexpected error occurred"; // do something with `errorMessage` } }; // ... }

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