Skip to main content
Glama
index.ts1.24 kB
/** * Tools Registry * Manages the registration of all API tools with the MCP server * * 工具注册表 * 管理所有API工具在MCP服务器上的注册 */ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js'; import { registerPublicTools } from './public.js'; import { registerPrivateTools } from './private.js'; import { registerConfigTools } from './config.js'; import { log, LogLevel } from '../utils/logging.js'; /** * Register all tools with the MCP server * @param server MCP server instance * * 向MCP服务器注册所有工具 * @param server MCP服务器实例 */ export function registerAllTools(server: McpServer) { try { // Register public API tools registerPublicTools(server); log(LogLevel.INFO, "Public API tools registered successfully"); // Register private API tools registerPrivateTools(server); log(LogLevel.INFO, "Private API tools registered successfully"); // Register configuration tools registerConfigTools(server); log(LogLevel.INFO, "Configuration tools registered successfully"); } catch (error) { log(LogLevel.ERROR, `Error registering tools: ${error instanceof Error ? error.message : String(error)}`); throw error; } }

Implementation Reference

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/doggybee/mcp-server-ccxt'

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