Skip to main content
Glama
setup.ts612 B
import type { FastifyInstance } from "fastify"; import mcpPlugin from "../src/index.ts"; import type { McpPluginOptions } from "../src/types.ts"; export async function setupFastify( fastify: FastifyInstance, setup?: (fastify: FastifyInstance) => void, options?: Partial<McpPluginOptions> ) { await fastify.register(mcpPlugin, { name: "Test API", description: "API for testing", ...options, }); setup?.(fastify); await fastify.ready(); await fastify.listen({ port: 0 }); const address = `http://localhost:${(fastify.server.address() as any).port}`; return { address, }; }

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/AdirAmsalem/mcp-it'

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