mirror of
https://github.com/b3nw/nginx-proxy-manager-mcp.git
synced 2026-06-15 00:59:40 -05:00
feat: Initial NPM MCP server implementation
- NpmClient with JWT auth and auto-refresh - FastMCP server with 5 tools (list_proxy_hosts, get_proxy_host_details, get_system_health, search_audit_logs, list_certificates) - Docker support with multi-stage build using uv - Supports stdio and streamable HTTP transports - GitHub Actions for tests and Docker builds
This commit is contained in:
@@ -0,0 +1,33 @@
|
||||
"""Custom exceptions for NPM API client."""
|
||||
|
||||
|
||||
class NpmClientError(Exception):
|
||||
"""Base exception for NPM client errors."""
|
||||
|
||||
pass
|
||||
|
||||
|
||||
class NpmAuthenticationError(NpmClientError):
|
||||
"""Raised when authentication fails."""
|
||||
|
||||
pass
|
||||
|
||||
|
||||
class NpmConnectionError(NpmClientError):
|
||||
"""Raised when connection to NPM fails."""
|
||||
|
||||
pass
|
||||
|
||||
|
||||
class NpmNotFoundError(NpmClientError):
|
||||
"""Raised when a resource is not found."""
|
||||
|
||||
pass
|
||||
|
||||
|
||||
class NpmApiError(NpmClientError):
|
||||
"""Raised for general API errors."""
|
||||
|
||||
def __init__(self, message: str, status_code: int | None = None):
|
||||
super().__init__(message)
|
||||
self.status_code = status_code
|
||||
Reference in New Issue
Block a user