Skip to main content
Glama

Sentry MCP

Official
by getsentry
mcp.ts1.41 kB
/** * Public MCP metadata endpoints under `/.mcp/*` for external documentation sites. * * Responds with pre-generated JSON payloads from @sentry/mcp-server. * Adds permissive CORS for easy cross-origin consumption. */ import { Hono } from "hono"; import TOOL_DEFINITIONS from "@sentry/mcp-server/toolDefinitions"; import PROMPT_DEFINITIONS from "@sentry/mcp-server/promptDefinitions"; import RESOURCE_DEFINITIONS from "@sentry/mcp-server/resourceDefinitions"; function withCors(json: unknown, status = 200) { const body = JSON.stringify(json); return new Response(body, { status, headers: { "Content-Type": "application/json; charset=utf-8", "Access-Control-Allow-Origin": "*", "Access-Control-Allow-Methods": "GET, OPTIONS", "Access-Control-Allow-Headers": "Content-Type", "Cache-Control": "public, max-age=300", // 5 minutes }, }); } export default new Hono() // CORS preflight .options("/*", (c) => withCors(null, 204)) // Index: advertise available endpoints .get("/", (c) => withCors({ endpoints: [ "/.mcp/tools.json", "/.mcp/prompts.json", "/.mcp/resources.json", ], }), ) // Tools .get("/tools.json", (c) => withCors(TOOL_DEFINITIONS)) // Prompts .get("/prompts.json", (c) => withCors(PROMPT_DEFINITIONS)) // Resources .get("/resources.json", (c) => withCors(RESOURCE_DEFINITIONS));

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/getsentry/sentry-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server