Coverage report: 60%

Files Functions Classes

coverage.py v7.9.1, created at 2025-06-22 16:34 +0100

File class statements missing excluded branches partial coverage
mcpgateway/__init__.py (no class) 8 0 0 0 0 100%
mcpgateway/admin.py (no class) 335 33 0 6 0 89%
mcpgateway/cache/__init__.py (no class) 3 0 0 0 0 100%
mcpgateway/cache/resource_cache.py CacheEntry 0 0 0 0 0 100%
mcpgateway/cache/resource_cache.py ResourceCache 36 27 0 10 2 24%
mcpgateway/cache/resource_cache.py (no class) 20 0 0 0 0 100%
mcpgateway/cache/session_registry.py SessionBackend 21 11 0 16 5 46%
mcpgateway/cache/session_registry.py SessionRegistry 352 289 0 122 23 18%
mcpgateway/cache/session_registry.py (no class) 43 4 0 0 0 91%
mcpgateway/cli.py (no class) 29 0 2 10 1 97%
mcpgateway/config.py Settings 34 10 0 14 5 69%
mcpgateway/config.py (no class) 155 49 0 22 1 60%
mcpgateway/db.py Base 0 0 0 0 0 100%
mcpgateway/db.py ToolMetric 0 0 0 0 0 100%
mcpgateway/db.py ResourceMetric 0 0 0 0 0 100%
mcpgateway/db.py ServerMetric 0 0 0 0 0 100%
mcpgateway/db.py PromptMetric 0 0 0 0 0 100%
mcpgateway/db.py Tool 18 17 0 4 0 5%
mcpgateway/db.py Resource 21 21 0 8 0 0%
mcpgateway/db.py ResourceSubscription 0 0 0 0 0 100%
mcpgateway/db.py Prompt 20 20 0 4 0 0%
mcpgateway/db.py Server 16 16 0 4 0 0%
mcpgateway/db.py Gateway 0 0 0 0 0 100%
mcpgateway/db.py SessionRecord 0 0 0 0 0 100%
mcpgateway/db.py SessionMessageRecord 0 0 0 0 0 100%
mcpgateway/db.py (no class) 276 24 2 12 2 88%
mcpgateway/federation/__init__.py (no class) 4 0 0 0 0 100%
mcpgateway/federation/discovery.py DiscoveredPeer 0 0 0 0 0 100%
mcpgateway/federation/discovery.py LocalDiscoveryService 12 4 0 4 1 69%
mcpgateway/federation/discovery.py DiscoveryService 123 89 0 36 5 27%
mcpgateway/federation/discovery.py (no class) 41 0 0 0 0 100%
mcpgateway/federation/forward.py ForwardingError 0 0 0 0 0 100%
mcpgateway/federation/forward.py ForwardingService 97 50 0 38 9 44%
mcpgateway/federation/forward.py (no class) 25 0 0 0 0 100%
mcpgateway/federation/manager.py FederationError 0 0 0 0 0 100%
mcpgateway/federation/manager.py FederationManager 156 99 0 32 8 35%
mcpgateway/federation/manager.py (no class) 31 0 0 0 0 100%
mcpgateway/handlers/__init__.py (no class) 2 0 0 0 0 100%
mcpgateway/handlers/sampling.py SamplingError 0 0 0 0 0 100%
mcpgateway/handlers/sampling.py SamplingHandler 72 15 0 44 13 74%
mcpgateway/handlers/sampling.py (no class) 15 0 0 0 0 100%
mcpgateway/main.py DocsAuthMiddleware 9 6 0 2 1 36%
mcpgateway/main.py MCPPathRewriteMiddleware 14 6 0 6 3 55%
mcpgateway/main.py (no class) 699 401 0 76 17 41%
mcpgateway/schemas.py BaseModelWithConfig 4 4 0 2 0 0%
mcpgateway/schemas.py BaseModelWithConfig.Config 0 0 0 0 0 100%
mcpgateway/schemas.py ToolMetrics 0 0 0 0 0 100%
mcpgateway/schemas.py ResourceMetrics 0 0 0 0 0 100%
mcpgateway/schemas.py ServerMetrics 0 0 0 0 0 100%
mcpgateway/schemas.py PromptMetrics 0 0 0 0 0 100%
mcpgateway/schemas.py JsonPathModifier 0 0 0 0 0 100%
mcpgateway/schemas.py AuthenticationValues 0 0 0 0 0 100%
mcpgateway/schemas.py ToolCreate 14 10 0 8 1 23%
mcpgateway/schemas.py ToolUpdate 14 10 0 8 1 23%
mcpgateway/schemas.py ToolRead 0 0 0 0 0 100%
mcpgateway/schemas.py ToolRead.Config 0 0 0 0 0 100%
mcpgateway/schemas.py ToolInvocation 0 0 0 0 0 100%
mcpgateway/schemas.py ToolResult 0 0 0 0 0 100%
mcpgateway/schemas.py ResourceCreate 0 0 0 0 0 100%
mcpgateway/schemas.py ResourceUpdate 0 0 0 0 0 100%
mcpgateway/schemas.py ResourceRead 0 0 0 0 0 100%
mcpgateway/schemas.py ResourceSubscription 0 0 0 0 0 100%
mcpgateway/schemas.py ResourceNotification 0 0 0 0 0 100%
mcpgateway/schemas.py PromptArgument 0 0 0 0 0 100%
mcpgateway/schemas.py PromptArgument.Config 0 0 0 0 0 100%
mcpgateway/schemas.py PromptCreate 0 0 0 0 0 100%
mcpgateway/schemas.py PromptUpdate 0 0 0 0 0 100%
mcpgateway/schemas.py PromptRead 0 0 0 0 0 100%
mcpgateway/schemas.py PromptInvocation 0 0 0 0 0 100%
mcpgateway/schemas.py GatewayCreate 28 23 0 16 2 16%
mcpgateway/schemas.py GatewayUpdate 28 23 0 16 2 16%
mcpgateway/schemas.py GatewayRead 20 20 0 12 0 0%
mcpgateway/schemas.py FederatedTool 0 0 0 0 0 100%
mcpgateway/schemas.py FederatedResource 0 0 0 0 0 100%
mcpgateway/schemas.py FederatedPrompt 0 0 0 0 0 100%
mcpgateway/schemas.py RPCRequest 0 0 0 0 0 100%
mcpgateway/schemas.py RPCResponse 0 0 0 0 0 100%
mcpgateway/schemas.py EventMessage 0 0 0 0 0 100%
mcpgateway/schemas.py AdminToolCreate 6 1 0 2 1 75%
mcpgateway/schemas.py AdminGatewayCreate 0 0 0 0 0 100%
mcpgateway/schemas.py StatusToggleRequest 0 0 0 0 0 100%
mcpgateway/schemas.py StatusToggleResponse 0 0 0 0 0 100%
mcpgateway/schemas.py ListFilters 0 0 0 0 0 100%
mcpgateway/schemas.py ServerCreate 3 0 0 2 0 100%
mcpgateway/schemas.py ServerUpdate 3 0 0 2 0 100%
mcpgateway/schemas.py ServerRead 12 4 0 8 4 60%
mcpgateway/schemas.py (no class) 325 0 0 0 0 100%
mcpgateway/services/__init__.py (no class) 5 0 0 0 0 100%
mcpgateway/services/completion_service.py CompletionError 0 0 0 0 0 100%
mcpgateway/services/completion_service.py CompletionService 52 6 0 26 2 90%
mcpgateway/services/completion_service.py (no class) 18 0 0 0 0 100%
mcpgateway/services/gateway_service.py GatewayError 0 0 0 0 0 100%
mcpgateway/services/gateway_service.py GatewayNotFoundError 0 0 0 0 0 100%
mcpgateway/services/gateway_service.py GatewayNameConflictError 7 1 0 2 1 78%
mcpgateway/services/gateway_service.py GatewayConnectionError 0 0 0 0 0 100%
mcpgateway/services/gateway_service.py GatewayService 323 187 0 108 17 39%
mcpgateway/services/gateway_service.py (no class) 59 3 0 0 0 95%
mcpgateway/services/logging_service.py LoggingService 41 5 0 10 0 90%
mcpgateway/services/logging_service.py (no class) 14 0 0 0 0 100%
mcpgateway/services/prompt_service.py PromptError 0 0 0 0 0 100%
mcpgateway/services/prompt_service.py PromptNotFoundError 0 0 0 0 0 100%
mcpgateway/services/prompt_service.py PromptNameConflictError 7 1 0 2 1 78%
mcpgateway/services/prompt_service.py PromptValidationError 0 0 0 0 0 100%
mcpgateway/services/prompt_service.py PromptService 217 85 0 70 17 56%
mcpgateway/services/prompt_service.py (no class) 46 0 0 0 0 100%
mcpgateway/services/resource_service.py ResourceError 0 0 0 0 0 100%
mcpgateway/services/resource_service.py ResourceNotFoundError 0 0 0 0 0 100%
mcpgateway/services/resource_service.py ResourceURIConflictError 7 1 0 2 1 78%
mcpgateway/services/resource_service.py ResourceValidationError 0 0 0 0 0 100%
mcpgateway/services/resource_service.py ResourceService 241 195 0 82 6 17%
mcpgateway/services/resource_service.py (no class) 54 0 0 0 0 100%
mcpgateway/services/root_service.py RootServiceError 0 0 0 0 0 100%
mcpgateway/services/root_service.py RootService 48 6 0 10 0 90%
mcpgateway/services/root_service.py (no class) 21 0 0 0 0 100%
mcpgateway/services/server_service.py ServerError 0 0 0 0 0 100%
mcpgateway/services/server_service.py ServerNotFoundError 0 0 0 0 0 100%
mcpgateway/services/server_service.py ServerNameConflictError 7 1 0 2 1 78%
mcpgateway/services/server_service.py ServerService 186 64 0 70 22 66%
mcpgateway/services/server_service.py (no class) 41 0 0 0 0 100%
mcpgateway/services/tool_service.py ToolError 0 0 0 0 0 100%
mcpgateway/services/tool_service.py ToolNotFoundError 0 0 0 0 0 100%
mcpgateway/services/tool_service.py ToolNameConflictError 7 1 0 2 1 78%
mcpgateway/services/tool_service.py ToolValidationError 0 0 0 0 0 100%
mcpgateway/services/tool_service.py ToolInvocationError 0 0 0 0 0 100%
mcpgateway/services/tool_service.py ToolService 258 135 0 82 20 47%
mcpgateway/services/tool_service.py (no class) 56 0 0 0 0 100%
mcpgateway/translate.py _PubSub 15 0 0 4 0 100%
mcpgateway/translate.py StdIOEndpoint 35 2 3 8 3 88%
mcpgateway/translate.py (no class) 108 28 2 8 1 73%
mcpgateway/transports/__init__.py (no class) 5 0 0 0 0 100%
mcpgateway/transports/base.py Transport 0 0 0 0 0 100%
mcpgateway/transports/base.py (no class) 13 0 0 0 0 100%
mcpgateway/transports/sse_transport.py SSETransport 55 15 0 10 4 71%
mcpgateway/transports/sse_transport.py (no class) 22 0 0 0 0 100%
mcpgateway/transports/stdio_transport.py StdioTransport 41 17 0 8 1 63%
mcpgateway/transports/stdio_transport.py (no class) 14 0 0 0 0 100%
mcpgateway/transports/streamablehttp_transport.py EventEntry 0 0 0 0 0 100%
mcpgateway/transports/streamablehttp_transport.py InMemoryEventStore 26 0 0 12 1 97%
mcpgateway/transports/streamablehttp_transport.py SessionManagerWrapper 21 16 0 4 1 24%
mcpgateway/transports/streamablehttp_transport.py (no class) 95 30 0 10 2 66%
mcpgateway/transports/websocket_transport.py WebSocketTransport 55 16 0 16 5 68%
mcpgateway/transports/websocket_transport.py (no class) 16 0 0 0 0 100%
mcpgateway/types.py Role 0 0 0 0 0 100%
mcpgateway/types.py LogLevel 0 0 0 0 0 100%
mcpgateway/types.py TextContent 0 0 0 0 0 100%
mcpgateway/types.py JSONContent 0 0 0 0 0 100%
mcpgateway/types.py ImageContent 0 0 0 0 0 100%
mcpgateway/types.py ResourceContent 0 0 0 0 0 100%
mcpgateway/types.py PromptReference 0 0 0 0 0 100%
mcpgateway/types.py ResourceReference 0 0 0 0 0 100%
mcpgateway/types.py CompleteRequest 0 0 0 0 0 100%
mcpgateway/types.py CompleteResult 0 0 0 0 0 100%
mcpgateway/types.py Implementation 0 0 0 0 0 100%
mcpgateway/types.py ModelHint 0 0 0 0 0 100%
mcpgateway/types.py ModelPreferences 0 0 0 0 0 100%
mcpgateway/types.py ClientCapabilities 0 0 0 0 0 100%
mcpgateway/types.py ServerCapabilities 0 0 0 0 0 100%
mcpgateway/types.py InitializeRequest 0 0 0 0 0 100%
mcpgateway/types.py InitializeRequest.Config 0 0 0 0 0 100%
mcpgateway/types.py InitializeResult 0 0 0 0 0 100%
mcpgateway/types.py InitializeResult.Config 0 0 0 0 0 100%
mcpgateway/types.py Message 0 0 0 0 0 100%
mcpgateway/types.py SamplingMessage 0 0 0 0 0 100%
mcpgateway/types.py CreateMessageResult 0 0 0 0 0 100%
mcpgateway/types.py PromptArgument 0 0 0 0 0 100%
mcpgateway/types.py Prompt 0 0 0 0 0 100%
mcpgateway/types.py PromptResult 0 0 0 0 0 100%
mcpgateway/types.py Tool 0 0 0 0 0 100%
mcpgateway/types.py ToolResult 0 0 0 0 0 100%
mcpgateway/types.py Resource 0 0 0 0 0 100%
mcpgateway/types.py ResourceTemplate 0 0 0 0 0 100%
mcpgateway/types.py ListResourceTemplatesResult 0 0 0 0 0 100%
mcpgateway/types.py ListResourceTemplatesResult.Config 0 0 0 0 0 100%
mcpgateway/types.py FileUrl 3 1 0 2 1 60%
mcpgateway/types.py Root 0 0 0 0 0 100%
mcpgateway/types.py ProgressToken 0 0 0 0 0 100%
mcpgateway/types.py Progress 0 0 0 0 0 100%
mcpgateway/types.py JSONRPCRequest 0 0 0 0 0 100%
mcpgateway/types.py JSONRPCResponse 0 0 0 0 0 100%
mcpgateway/types.py JSONRPCError 0 0 0 0 0 100%
mcpgateway/types.py SSEEvent 0 0 0 0 0 100%
mcpgateway/types.py WebSocketMessage 0 0 0 0 0 100%
mcpgateway/types.py ResourceUpdateNotification 0 0 0 0 0 100%
mcpgateway/types.py ResourceListChangedNotification 0 0 0 0 0 100%
mcpgateway/types.py PromptListChangedNotification 0 0 0 0 0 100%
mcpgateway/types.py ToolListChangedNotification 0 0 0 0 0 100%
mcpgateway/types.py CancelledNotification 0 0 0 0 0 100%
mcpgateway/types.py ProgressNotification 0 0 0 0 0 100%
mcpgateway/types.py LoggingNotification 0 0 0 0 0 100%
mcpgateway/types.py FederatedTool 0 0 0 0 0 100%
mcpgateway/types.py FederatedResource 0 0 0 0 0 100%
mcpgateway/types.py FederatedPrompt 0 0 0 0 0 100%
mcpgateway/types.py Gateway 0 0 0 0 0 100%
mcpgateway/types.py (no class) 208 0 0 0 0 100%
mcpgateway/utils/create_jwt_token.py (no class) 54 0 27 10 0 100%
mcpgateway/utils/services_auth.py (no class) 33 0 0 6 0 100%
mcpgateway/utils/verify_credentials.py (no class) 45 1 0 12 2 95%
mcpgateway/validation/__init__.py (no class) 2 0 0 0 0 100%
mcpgateway/validation/jsonrpc.py JSONRPCError 9 0 0 2 0 100%
mcpgateway/validation/jsonrpc.py (no class) 49 9 0 32 9 78%
mcpgateway/version.py (no class) 126 89 0 16 0 26%
mcpgateway/wrapper.py (no class) 217 29 11 50 9 86%
Total   6126 2230 47 1224 235 60%

No items found using the specified filter.