Skip to main content
Glama
tool.interface.ts750 B
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js"; import { HttpClient } from "../utils/http-client.js"; export interface Tool { /** * Starts the tool by initializing and registering all MCP tools */ start(): void; } export abstract class BaseTool implements Tool { constructor( protected readonly server: McpServer, protected readonly httpClient: HttpClient ) {} /** * Starts the tool by initializing all MCP tools */ public start(): void { this.initTools(); } /** * Initialize and register the tools with the MCP server * @protected This method should only be called by the start() method */ protected abstract initTools(): void; }

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/kevyder/banrepco_mcp'

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