Skip to main content
Glama
resources.ts626 B
import { FastMCP } from "fastmcp"; import * as services from "./services/index.js"; /** * Register all resources with the MCP server * @param server The FastMCP server instance */ export function registerResources(server: FastMCP) { // Example resource server.addResourceTemplate({ uriTemplate: "example://{id}", name: "Example Resource", mimeType: "text/plain", arguments: [ { name: "id", description: "Resource ID", required: true, }, ], async load({ id }) { return { text: `This is an example resource with ID: ${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/mingdaocloud/hap-mcp'

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