@juspay/neurolink
Version:
Universal AI Development Platform with working MCP integration, multi-provider support, voice (TTS/STT/realtime), and professional CLI. 58+ external MCP servers discoverable, multimodal file processing, RAG pipelines. Build, test, and deploy AI applicatio
61 lines (60 loc) • 1.94 kB
TypeScript
/**
* NeuroLink MCP Server Factory
* Factory-First Architecture: MCP servers create tools for internal orchestration
* Compatible with MCP patterns for seamless integration
*/
import type { MCPServerDomainCategory, NeuroLinkMCPTool, NeuroLinkMCPServer, MCPServerConfig } from "../types/index.js";
/**
* Create MCP Server Factory Function
*
* Core factory function for creating MCP servers.
* Follows Factory-First architecture where tools are internal implementation.
*
* @param config Server configuration with minimal required fields
* @returns Fully configured MCP server ready for tool registration
*
* @example
* ```typescript
* const aiCoreServer = createMCPServer({
* id: 'neurolink-ai-core',
* title: 'NeuroLink AI Core',
* description: 'Core AI provider tools',
* category: 'aiProviders'
* });
*
* aiCoreServer.registerTool({
* name: 'generate',
* description: 'Generate text using AI providers',
* execute: async (params, context) => {
* // Tool implementation
* return { success: true, data: result };
* }
* });
* ```
*/
export declare function createMCPServer(config: MCPServerConfig): NeuroLinkMCPServer;
/**
* Utility function to validate tool interface using centralized validation
* Ensures proper async patterns and type safety
*/
export declare function validateTool(tool: NeuroLinkMCPTool): boolean;
/**
* Utility function to get server info
*/
export declare function getServerInfo(server: NeuroLinkMCPServer): {
id: string;
title: string;
description?: string;
category?: MCPServerDomainCategory;
toolCount: number;
capabilities: string[];
};
/**
* Async utility function to validate all tools in a server
* Ensures all registered tools follow proper async patterns
*/
export declare function validateServerTools(server: NeuroLinkMCPServer): Promise<{
isValid: boolean;
invalidTools: string[];
errors: string[];
}>;