# euron-sde-team/euron-mcp-hub architecture

> Architecture diagram of the GitHub repository euron-sde-team/euron-mcp-hub, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-26). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/euron-sde-team/euron-mcp-hub
- Repository: https://github.com/euron-sde-team/euron-mcp-hub

## Overview

Euron MCPHub is an MCP server registry and policy-enforcing gateway, with a web dashboard for administration and call review. Operators register upstream servers, manage clients and keys, and configure per-client access; MCP clients call the unified endpoint, where tools are exposed by policy and calls are proxied and audited. The README documents discovery, health checks, encrypted secrets, constraints, rate limits, redaction, and audit analytics. Source excerpts show application wiring and several backend dependencies; some dashboard-to-API and unsampled domain links are therefore omitted or marked unverified.

Main entry points: [`apps/api/src/mcphub/services/gateway.py`](https://github.com/euron-sde-team/euron-mcp-hub/blob/main/apps/api/src/mcphub/services/gateway.py) (Call gateway), [`apps/api/src/mcphub/api/router.py`](https://github.com/euron-sde-team/euron-mcp-hub/blob/main/apps/api/src/mcphub/api/router.py) (Management routes), [`apps/api/src/mcphub/services/clients.py`](https://github.com/euron-sde-team/euron-mcp-hub/blob/main/apps/api/src/mcphub/services/clients.py) (Client and key admin), [`apps/api/src/mcphub/gateway/server.py`](https://github.com/euron-sde-team/euron-mcp-hub/blob/main/apps/api/src/mcphub/gateway/server.py) (MCP endpoint)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_management["Management API"]
  node_api_app["API application<br/>[main.py]"]
  node_api_routes["Management routes<br/>[router.py]"]
  node_auth["Authentication<br/>[auth.py]"]
end

subgraph group_catalog["Registry and policy"]
  node_server_catalog["Server catalog<br/>[servers.py]"]
  node_discovery["Discovery and health<br/>[discovery.py]"]
  node_client_admin["Client and key admin<br/>[clients.py]"]
  node_policy["Access policy<br/>[engine.py]"]
  node_tool_views["Tool views<br/>[views.py]"]
end

subgraph group_runtime["Gateway runtime"]
  node_gateway_endpoint["MCP endpoint<br/>[server.py]"]
  node_gateway_logic["Call gateway<br/>[gateway.py]"]
  node_upstream_pool["Connection pool<br/>[pool.py]"]
  node_vault["Secret management<br/>[vault.py]"]
  node_call_audit["Call audit log<br/>[call_log.py]"]
  node_database[("Relational database<br/>[session.py]")]
  node_cache["Cache and limits<br/>[cache.py]"]
end

subgraph group_web["Web dashboard"]
  node_web_ui["Admin dashboard"]
  node_web_api["Web API client<br/>[api.ts]"]
end

node_operator(("Operator"))
node_mcp_client(("MCP client"))
node_upstream["MCP servers"]

node_operator -->|"administers"| node_web_ui
node_web_ui -.->|"uses"| node_web_api
node_web_api -.->|"requests"| node_api_routes
node_operator -->|"manages"| node_api_routes
node_api_app -->|"mounts"| node_api_routes
node_api_app -->|"mounts"| node_gateway_endpoint
node_api_routes -->|"delegates"| node_auth
node_api_routes -->|"delegates"| node_client_admin
node_api_routes -.->|"delegates"| node_server_catalog
node_server_catalog -.->|"requests checks"| node_discovery
node_client_admin -.->|"persists"| node_database
node_client_admin -->|"invalidates"| node_cache
node_mcp_client -->|"calls"| node_gateway_endpoint
node_gateway_endpoint -->|"dispatches"| node_gateway_logic
node_gateway_logic -->|"checks access"| node_policy
node_gateway_logic -->|"builds tools"| node_tool_views
node_gateway_logic -.->|"calls upstream"| node_upstream_pool
node_upstream_pool -.->|"connects"| node_upstream
node_gateway_logic -.->|"injects secrets"| node_vault
node_gateway_logic -->|"records calls"| node_call_audit
node_call_audit -.->|"writes"| node_database
node_gateway_logic -->|"reads state"| node_cache

click node_api_app "https://github.com/euron-sde-team/euron-mcp-hub/blob/main/apps/api/src/mcphub/main.py"
click node_api_routes "https://github.com/euron-sde-team/euron-mcp-hub/blob/main/apps/api/src/mcphub/api/router.py"
click node_auth "https://github.com/euron-sde-team/euron-mcp-hub/blob/main/apps/api/src/mcphub/services/auth.py"
click node_web_ui "https://github.com/euron-sde-team/euron-mcp-hub/tree/main/apps/web/src/components"
click node_web_api "https://github.com/euron-sde-team/euron-mcp-hub/blob/main/apps/web/src/lib/api.ts"
click node_server_catalog "https://github.com/euron-sde-team/euron-mcp-hub/blob/main/apps/api/src/mcphub/services/servers.py"
click node_discovery "https://github.com/euron-sde-team/euron-mcp-hub/blob/main/apps/api/src/mcphub/services/discovery.py"
click node_client_admin "https://github.com/euron-sde-team/euron-mcp-hub/blob/main/apps/api/src/mcphub/services/clients.py"
click node_policy "https://github.com/euron-sde-team/euron-mcp-hub/blob/main/apps/api/src/mcphub/policy/engine.py"
click node_tool_views "https://github.com/euron-sde-team/euron-mcp-hub/blob/main/apps/api/src/mcphub/services/views.py"
click node_gateway_endpoint "https://github.com/euron-sde-team/euron-mcp-hub/blob/main/apps/api/src/mcphub/gateway/server.py"
click node_gateway_logic "https://github.com/euron-sde-team/euron-mcp-hub/blob/main/apps/api/src/mcphub/services/gateway.py"
click node_upstream_pool "https://github.com/euron-sde-team/euron-mcp-hub/blob/main/apps/api/src/mcphub/upstream/pool.py"
click node_vault "https://github.com/euron-sde-team/euron-mcp-hub/blob/main/apps/api/src/mcphub/integrations/vault.py"
click node_call_audit "https://github.com/euron-sde-team/euron-mcp-hub/blob/main/apps/api/src/mcphub/services/call_log.py"
click node_database "https://github.com/euron-sde-team/euron-mcp-hub/blob/main/apps/api/src/mcphub/db/session.py"
click node_cache "https://github.com/euron-sde-team/euron-mcp-hub/blob/main/apps/api/src/mcphub/services/cache.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_api_app,node_api_routes,node_auth,node_mcp_client toneBlue
class node_server_catalog,node_discovery,node_client_admin,node_policy,node_tool_views toneAmber
class node_gateway_endpoint,node_gateway_logic,node_upstream_pool,node_vault,node_call_audit,node_database,node_cache,node_upstream toneMint
class node_web_ui,node_web_api toneRose
class node_operator toneIndigo
```

## Components

### Management API

- [API application](https://github.com/euron-sde-team/euron-mcp-hub/blob/main/apps/api/src/mcphub/main.py): `apps/api/src/mcphub/main.py`
- [Management routes](https://github.com/euron-sde-team/euron-mcp-hub/blob/main/apps/api/src/mcphub/api/router.py): `apps/api/src/mcphub/api/router.py`
- [Authentication](https://github.com/euron-sde-team/euron-mcp-hub/blob/main/apps/api/src/mcphub/services/auth.py): `apps/api/src/mcphub/services/auth.py`

### Registry and policy

- [Server catalog](https://github.com/euron-sde-team/euron-mcp-hub/blob/main/apps/api/src/mcphub/services/servers.py): `apps/api/src/mcphub/services/servers.py`
- [Discovery and health](https://github.com/euron-sde-team/euron-mcp-hub/blob/main/apps/api/src/mcphub/services/discovery.py): `apps/api/src/mcphub/services/discovery.py`
- [Client and key admin](https://github.com/euron-sde-team/euron-mcp-hub/blob/main/apps/api/src/mcphub/services/clients.py): `apps/api/src/mcphub/services/clients.py`
- [Access policy](https://github.com/euron-sde-team/euron-mcp-hub/blob/main/apps/api/src/mcphub/policy/engine.py): `apps/api/src/mcphub/policy/engine.py`
- [Tool views](https://github.com/euron-sde-team/euron-mcp-hub/blob/main/apps/api/src/mcphub/services/views.py): `apps/api/src/mcphub/services/views.py`

### Gateway runtime

- [MCP endpoint](https://github.com/euron-sde-team/euron-mcp-hub/blob/main/apps/api/src/mcphub/gateway/server.py): `apps/api/src/mcphub/gateway/server.py`
- [Call gateway](https://github.com/euron-sde-team/euron-mcp-hub/blob/main/apps/api/src/mcphub/services/gateway.py): `apps/api/src/mcphub/services/gateway.py`
- [Connection pool](https://github.com/euron-sde-team/euron-mcp-hub/blob/main/apps/api/src/mcphub/upstream/pool.py): `apps/api/src/mcphub/upstream/pool.py`
- [Secret management](https://github.com/euron-sde-team/euron-mcp-hub/blob/main/apps/api/src/mcphub/integrations/vault.py): `apps/api/src/mcphub/integrations/vault.py`
- [Call audit log](https://github.com/euron-sde-team/euron-mcp-hub/blob/main/apps/api/src/mcphub/services/call_log.py): `apps/api/src/mcphub/services/call_log.py`
- [Relational database](https://github.com/euron-sde-team/euron-mcp-hub/blob/main/apps/api/src/mcphub/db/session.py): `apps/api/src/mcphub/db/session.py`
- [Cache and limits](https://github.com/euron-sde-team/euron-mcp-hub/blob/main/apps/api/src/mcphub/services/cache.py): `apps/api/src/mcphub/services/cache.py`

### Web dashboard

- [Admin dashboard](https://github.com/euron-sde-team/euron-mcp-hub/tree/main/apps/web/src/components): `apps/web/src/components`
- [Web API client](https://github.com/euron-sde-team/euron-mcp-hub/blob/main/apps/web/src/lib/api.ts): `apps/web/src/lib/api.ts`

### Other components

- **Operator**
- **MCP client**
- **MCP servers**

## Connections

- Operator → Admin dashboard: administers (evidence: `README.md`)
- Admin dashboard → Web API client: uses
- Web API client → Management routes: requests
- Operator → Management routes: manages (evidence: `README.md`)
- API application → Management routes: mounts (evidence: `apps/api/src/mcphub/main.py`)
- API application → MCP endpoint: mounts (evidence: `apps/api/src/mcphub/main.py`)
- Management routes → Authentication: delegates
- Management routes → Client and key admin: delegates
- Management routes → Server catalog: delegates
- Server catalog → Discovery and health: requests checks
- Client and key admin → Relational database: persists
- Client and key admin → Cache and limits: invalidates (evidence: `apps/api/src/mcphub/services/clients.py`)
- MCP client → MCP endpoint: calls (evidence: `README.md`)
- MCP endpoint → Call gateway: dispatches (evidence: `apps/api/src/mcphub/gateway/server.py`)
- Call gateway → Access policy: checks access (evidence: `apps/api/src/mcphub/services/gateway.py`)
- Call gateway → Tool views: builds tools (evidence: `apps/api/src/mcphub/services/gateway.py`)
- Call gateway → Connection pool: calls upstream
- Connection pool → MCP servers: connects
- Call gateway → Secret management: injects secrets
- Call gateway → Call audit log: records calls (evidence: `apps/api/src/mcphub/services/gateway.py`)
- Call audit log → Relational database: writes
- Call gateway → Cache and limits: reads state (evidence: `apps/api/src/mcphub/services/gateway.py`)
