Skip to main content
Glama
index.ts895 B
import { McpAgent } from "agents/mcp"; import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; import { registerDocsTools } from './tools/docs'; import type { Env } from './context'; // Define our MCP agent with tools export class atprotoDocsMCP extends McpAgent { server = new McpServer({ name: "Authless Calculator", version: "1.0.0", }); public env:Env = this.env; async init() { registerDocsTools(this) } } export default { fetch(request: Request, env: Env, ctx: ExecutionContext) { const url = new URL(request.url); if (url.pathname === "/sse" || url.pathname === "/sse/message") { // @ts-ignore return atprotoDocsMCP.serveSSE("/sse").fetch(request, env, ctx); } if (url.pathname === "/mcp") { // @ts-ignore return atprotoDocsMCP.serve("/mcp").fetch(request, env, ctx); } return new Response("Not found", { status: 404 }); }, };

Latest Blog Posts

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/immber/mcp-atproto-docs'

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