digital-samba-mcp-server
Version:
Digital Samba MCP Server - Model Context Protocol server for Digital Samba's video conferencing API
52 lines • 1.97 kB
TypeScript
/**
* Digital Samba MCP Server - Shared Core
*
* This module contains the shared server logic that is used by both HTTP and STDIO transports.
* It provides a unified interface for creating the MCP server with consistent functionality
* across different transport modes.
*
* @module server-core
* @author Digital Samba Team
* @version 1.0.0
*/
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
import { MemoryCache } from './cache.js';
import { ServerOptions } from './index.js';
/**
* Configuration for creating the shared server core
*/
export interface ServerCoreConfig {
/** API key for Digital Samba API (required for STDIO mode) */
apiKey?: string;
/** Base URL for Digital Samba API */
apiUrl?: string;
/** Cache instance to use */
cache?: MemoryCache;
/** Whether to enable webhook functionality */
enableWebhooks?: boolean;
/** Webhook secret for verification */
webhookSecret?: string;
/** Webhook endpoint path */
webhookEndpoint?: string;
/** Server options from the main configuration */
serverOptions?: Partial<ServerOptions>;
}
/**
* Create a shared MCP server core with consistent functionality
*
* This function creates the base MCP server and sets up all the core functionality
* that should be available regardless of transport type (HTTP or STDIO).
*
* @param config - Configuration for the server core
* @returns The configured MCP server instance
*/
export declare function createServerCore(config: ServerCoreConfig): McpServer;
/**
* Utility function to merge server options with defaults
*/
export declare function mergeServerOptions(provided: Partial<ServerOptions>, defaults: Partial<ServerOptions>): Partial<ServerOptions>;
/**
* Utility function to validate required configuration for different modes
*/
export declare function validateServerConfig(config: ServerCoreConfig, mode: 'http' | 'stdio'): void;
//# sourceMappingURL=server-core.d.ts.map