@jinzcdev/leetcode-mcp-server
Version:
MCP Server for LeetCode API (supports leetcode.com and leetcode.cn)
25 lines (24 loc) • 1.17 kB
TypeScript
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
import { RegistryBase } from "../../common/registry-base.js";
import { LeetCodeBaseService } from "../../leetcode/leetcode-base-service.js";
/**
* Base registry class for LeetCode tools that provides site type detection and authentication status checks.
* This abstract class defines the framework for registering different categories of tools based on
* site version (Global or CN) and authentication requirements.
*/
export declare abstract class ToolRegistry extends RegistryBase {
protected server: McpServer;
protected leetcodeService: LeetCodeBaseService;
/**
* Creates a new tool registry instance.
*
* @param server - The MCP server instance to register tools with
* @param leetcodeService - The LeetCode service implementation to use for API calls
*/
constructor(server: McpServer, leetcodeService: LeetCodeBaseService);
/**
* Registers all applicable tools based on site version and authentication status.
* This method follows a specific registration sequence to ensure proper tool organization.
*/
registerTools(): void;
}