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:
Ben
2025-12-18 03:16:49 +00:00
commit 18b76b673b
19 changed files with 2080 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
"""Configuration management using pydantic-settings."""
from pydantic_settings import BaseSettings, SettingsConfigDict
class Settings(BaseSettings):
"""Application settings loaded from environment variables."""
model_config = SettingsConfigDict(
env_prefix="NPM_",
env_file=".env",
env_file_encoding="utf-8",
extra="ignore",
)
# NPM API Configuration
api_url: str = "http://localhost:81/api"
identity: str = ""
secret: str = ""
# MCP Server Configuration
mcp_host: str = "0.0.0.0"
mcp_port: int = 8000
mcp_transport: str = "stdio" # "stdio" or "http"
settings = Settings()