- Add intelligent protocol version negotiation (2024-11-05 for n8n, 2025-03-26 for standard clients) - Fix memory leak potential with async cleanup and connection close handling - Enhance error sanitization for production environments - Add schema validation for n8n nested output workaround - Improve Docker security with unpredictable UIDs/GIDs - Create n8n-friendly tool descriptions to reduce schema validation errors - Add comprehensive protocol negotiation test suite Addresses code review feedback: - Protocol version inconsistency resolved - Memory management improved - Error information leakage fixed - Docker security enhanced 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
39 lines
780 B
TypeScript
39 lines
780 B
TypeScript
export interface MCPServerConfig {
|
|
port: number;
|
|
host: string;
|
|
authToken?: string;
|
|
}
|
|
|
|
export interface ToolDefinition {
|
|
name: string;
|
|
description: string;
|
|
inputSchema: {
|
|
type: string;
|
|
properties: Record<string, any>;
|
|
required?: string[];
|
|
additionalProperties?: boolean | Record<string, any>;
|
|
};
|
|
outputSchema?: {
|
|
type: string;
|
|
properties: Record<string, any>;
|
|
required?: string[];
|
|
additionalProperties?: boolean | Record<string, any>;
|
|
};
|
|
}
|
|
|
|
export interface ResourceDefinition {
|
|
uri: string;
|
|
name: string;
|
|
description?: string;
|
|
mimeType?: string;
|
|
}
|
|
|
|
export interface PromptDefinition {
|
|
name: string;
|
|
description?: string;
|
|
arguments?: Array<{
|
|
name: string;
|
|
description?: string;
|
|
required?: boolean;
|
|
}>;
|
|
} |