How akramiot/mcpmanager works
Project type and purpose
• MCPManager is a CLI‐driven management platform with an embedded REST API (“mcpm” commands and /api/v1 endpoints) designed to deploy, secure, and observe Model Context Protocol (MCP) servers across multiple container runtimes (Docker, Podman, Kubernetes).
File structure
• Top‐level:
• src/mcpmanager/cli – command‐line entrypoint and subcommands
• src/mcpmanager/api – HTTP server implementation
• src/mcpmanager/core – discovery, registry, model definitions, orchestration logic
• src/mcpmanager/runtime – adapters for Docker, Podman, Kubernetes
• src/mcpmanager/auth, certs, secrets, permissions, verification – security layers and policy enforcement
• src/mcpmanager/transport – communication protocols (stdio, SSE, HTTP proxies)
• src/mcpmanager/telemetry – OpenTelemetry instrumentation (metrics, tracing, middleware)
• Examples/Makefile/Dockerfile/pyproject.toml show this is a Python package with CLI, Docker‐friendly and Helm/K8s support.
README for additional insights
• RESTful API for server management, multi‐runtime support, Sigstore image verification, Cedar‐based policy evaluation, container isolation, observability via OpenTelemetry, and Kubernetes operator with CRDs.
1. CLI & Client Integrations (“mcpm” CLI, VS Code, Cursor)
2. API / Proxy Layer (src/mcpmanager/api/server.py)
3. Core Orchestrator (src/mcpmanager/core)
4. Security Services
– Auth & Middleware (auth/)
– Cert Manager & Validator (certs/)
– Secrets Manager (secrets/)
– Permissions Manager & Profiles (permissions/)
– Verification (Sigstore, Attestation, Policy) (verification/)
5. Runtime Adapters (runtime/)
– Docker
– Podman
– Kubernetes Operator (CRDs)
6. Transport Protocols (transport/ – stdio, SSE, HTTP proxy)
7. Observability (telemetry/ – metrics, tracing, logging)
8. External Services & Dependencies
– Docker/Podman daemons
– Kubernetes API server & etcd
– Sigstore
– Secret backends (1Password, encrypted store)
– Telemetry backends (Jaeger, Prometheus)
– Registry service (MCP server registry)
1. “Client Apps” → “API/Proxy”: HTTP(S) or CLI invocation
2. “API/Proxy” → “Auth & Middleware” → “Core Orchestrator”
3. “Core Orchestrator” ↔ “Registry/Discovery”
4. “Core Orchestrator” → calls into Security Services:
– Cert Manager (import, validate)
– Secrets Manager (fetch, store)
– Permissions Manager (enforce profile)
– Verification subsystem (Sigstore attestation)
5. “Core Orchestrator” → “Runtime Adapters” → communicates with Docker/Podman daemons or K8s API
6. “Runtime Adapters” → “MCP Servers” (containerized workloads)
7. Throughout all request paths, “Transport Protocols” handle client↔server streams and proxies
8. “Observability” sits as cross‐cutting concern: hooked into API, core, runtime, transport – exporting metrics and traces to Jaeger/Prometheus
c. Architectural patterns & design principles
• Modular package structure: each concern in its own subpackage
• Adapter pattern for runtimes and transports
• Middleware chain for auth and telemetry
• Manager classes orchestrating single responsibilities (certs, secrets, permissions)
• Pluggable backends (secret providers, telemetry, runtimes)
• Use of CRDs for Kubernetes operator
d. Relevant technologies/frameworks
• Python packaging: pyproject.toml, pip install mcpmanager[...]
• HTTP server framework (e.g., FastAPI or Flask) in api/server.py
• Docker SDK, Podman Python client, Kubernetes Python client
• Sigstore verification libraries
• Cedar policy evaluation engine
• OpenTelemetry Python SDK