Skip to content

Architectural diagrams

Anahita Goljahani edited this page Feb 4, 2026 · 10 revisions

This page contains architectural diagrams as specified by the C4 model.

The C4 model is a framework for visualizing the architecture of software systems in a clear and structured way. It provides a hierarchical set of diagrams that describe a system at multiple levels of abstraction, making it easier for both technical and non-technical stakeholders to understand. The model focuses on four levels:

  • Context Diagram – Shows the system’s interactions with users, external systems, and the environment.
  • Container Diagram – Breaks the system into containers (applications, services, databases), highlighting responsibilities and technology choices.
  • Component Diagram – Details the internal components of each container and how they collaborate.
  • Code (or Class) Diagram – Provides a detailed view of the implementation, showing classes, interfaces, and relationships.

It also supports dynamic (communication) diagrams to illustrate how elements interact at runtime, helping teams understand both structure and behavior clearly.

For this project, the following diagrams are provided in this page:

System Context Diagrams of the MCP Server

Setup with no authorization for MCP server access

The first setup is the simplest one, with no authentication: it can be used when the MCP server is not publicly accessible (for example when it is deployed in the user's pc) and the Downstream API System either doesn't require authentication or an access token has already been issued to the user (refer to BACKEND_API_AUTH and BACKEND_AUTH_TOKEN configuration parameters).

In this setup it is important to configure the MCP Server for DNS Rebinding protection (refer to MCP_SERVER_DNS_REBINDING_PROTECTION_ALLOWED_HOSTS and MCP_SERVER_DNS_REBINDING_PROTECTION_ALLOWED_ORIGINS configuration parameters).

C4-context-1

Setup with authorization for MCP server access

This is a setup with authentication only on the side of the MCP Server. It can be used when the MCP server is publicly accessible (for example when it is deployed in a Cloud) and the Downstream Server doesn't require authentication or an access token has already been issued for it.

In this setup it is important to configure the MCP Server for TLS (TLS_CERT_PATH and TLS_KEY_PATH).

C4-context-2

Setup with authorization for MCP server access and token exchange for Downstream API access

C4-context-3

Container Diagram of the MCP Server

The Container diagram for the MCP server is trivial since the MCP Server system is made just by one container.

C4-container-3

Component Diagram of the MCP Server

C4-component-3

Container Diagrams for Claude Desktop

C4-container-CD-1
C4-container-CD-3

Container Diagrams of the MCP Inspector

MCP Inspector in Direct mode

C4-container-IND-1
C4-container-IND-3

MCP Inspector in Proxy mode

C4-container-INP-1
C4-container-INP-3

Dynamic Diagrams

MCP-diagrams-Dynamic-phase-1
MCP-diagrams-Dynamic-Phase-2
MCP-diagrams-Dynamic-Phase-3

Code Module Dependencies

Module-Dependencies