NestJS MCP - v1.0.1
    Preparing search index...

    Error mapping interceptor - transforms errors into consistent MCP exceptions Maps common error types to appropriate MCP error codes

    @Injectable()
    class MyToolProvider {
    @UseMCPInterceptors(ErrorMappingInterceptor)
    @MCPTool({ name: 'my_tool', description: 'Tool with error mapping' })
    async myTool() {
    throw new Error('Database connection failed');
    // Will be mapped to MCPException with appropriate code
    }
    }

    Implements

    Index

    Constructors

    Methods

    Constructors

    Methods