Skip to main content
Glama

Convex MCP server

Official
by get-convex
fileStorage.ts1.25 kB
import { query, mutation, action } from "./_generated/server"; import { v } from "convex/values"; export const generateUploadUrl = mutation(async ({ storage }) => { return await storage.generateUploadUrl(); }); export const getUrl = query({ args: { storageId: v.id("_storage") }, handler: async ({ storage }, { storageId }) => { return await storage.getUrl(storageId); }, }); export const storeFile = action({ args: { data: v.string() }, handler: async ({ storage }, { data }) => { return await storage.store(new Blob([data], { type: "text/plain" })); }, }); export const getFile = action({ args: { storageId: v.id("_storage") }, handler: async ({ storage }, { storageId }) => { const blob = await storage.get(storageId); return await blob!.text(); }, }); export const deleteById = mutation({ args: { storageId: v.id("_storage") }, handler: async ({ storage }, { storageId }) => { return await storage.delete(storageId); }, }); export const list = query({ handler: async ({ db }) => { return await db.system.query("_storage").collect(); }, }); export const get = query({ args: { id: v.id("_storage") }, handler: async ({ db }, { id }) => { return await db.system.get(id); }, });

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