Skip to main content
Glama

Workers MCP

Official
by cloudflare
import { WorkerEntrypoint } from 'cloudflare:workers' import { ProxyToSelf } from 'workers-mcp' export default class MyWorker extends WorkerEntrypoint<Env> { /** * A warm, friendly greeting from your new Workers MCP server. * @param name {string} the name of the person we are greeting. * @return {string} the contents of our greeting. */ sayHello(name: string) { return `Hello from an MCP Worker, ${name}!` } /** * @ignore **/ async fetch(request: Request): Promise<Response> { return new ProxyToSelf(this).fetch(request) } }

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/cloudflare/workers-mcp'

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