import { Server } from '@modelcontextprotocol/sdk/server/index.js'; import type { RunOptions } from './commands/run.js'; type ServerOptions = RunOptions; /** * Initializes and starts the OpenZiti MCP server to provide AI assistants * with secure, controlled access to OpenZiti Controller Management API capabilities. * * This server acts as a secure bridge between AI models and OpenZiti Controller Management APIs, * enforcing proper authentication, authorization, and validation at every step. * The server validates credentials before any operations and continuously * monitors token validity during operation to prevent security issues. * * Security architecture: * - Initial user-friendly validation occurs in `run.ts` with detailed CLI feedback * - Startup validation here provides a secondary checkpoint * - Continuous validation during tool calls ensures credentials remain valid * - Token expiration checking prevents use of expired credentials * * This multi-layered approach balances security requirements with developer * experience by providing appropriate feedback at each stage. * * Key responsibilities include: * - Securing access to OpenZiti Controller Management API * - Validating user credentials and token expiration * - Automatically refreshing invalid configurations when possible * - Exposing selected tools based on user permissions and preferences * - Handling MCP protocol requests through configured transports * * @param {ServerOptions} [options] - Optional configuration for tool filtering and read-only mode * @returns {Promise} The initialized MCP server instance * @throws {Error} If configuration validation fails or server setup encounters errors */ export declare function startServer(options?: ServerOptions): Promise>; export {};