# mizcausevic-dev/mcp-session-recorder architecture

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

- Interactive diagram: https://gitdiagram.com/mizcausevic-dev/mcp-session-recorder
- Repository: https://github.com/mizcausevic-dev/mcp-session-recorder

## Overview

MCP Session Recorder is a FastAPI application for reviewing recorded MCP runs, their approval and evidence posture, and replay priority. Operators enter through HTML pages or JSON endpoints; handlers call the session service, which derives dashboard, inventory, approval, replay, sharing, auth-posture, sample, and recollection results from the bundled session data. The HTML surfaces include replay controls. The render source excerpt is partial, so the graph avoids asserting details about how replay data is supplied to those controls.

Main entry points: [`app/main.py`](https://github.com/mizcausevic-dev/mcp-session-recorder/blob/main/app/main.py) (FastAPI routes), [`app/data/sample_session_data.json`](https://github.com/mizcausevic-dev/mcp-session-recorder/blob/main/app/data/sample_session_data.json) (Sample sessions), [`app/render.py`](https://github.com/mizcausevic-dev/mcp-session-recorder/blob/main/app/render.py) (HTML pages), [`app/services/session_service.py`](https://github.com/mizcausevic-dev/mcp-session-recorder/blob/main/app/services/session_service.py) (Dashboard summary)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Application entry"]
  node_fastapi["FastAPI routes<br/>[main.py]"]
  node_session_api["Session APIs<br/>[main.py]"]
end

subgraph group_surfaces["Operator surfaces"]
  node_html_pages["HTML pages<br/>[render.py]"]
end

subgraph group_analysis["Session analysis"]
  node_dashboard["Dashboard summary<br/>[session_service.py]"]
  node_inventory["Session inventory<br/>[session_service.py]"]
  node_approvals["Approval board<br/>[session_service.py]"]
  node_replay["Replay priorities<br/>[session_service.py]"]
  node_sharing["Sharing matrix<br/>[session_service.py]"]
  node_auth_posture["Auth posture<br/>[session_service.py]"]
  node_recollection["Session recollection<br/>[session_service.py]"]
  node_sample_payload["Sample payload<br/>[session_service.py]"]
end

subgraph group_records["Session records"]
  node_session_data["Sample sessions"]
end

node_operator(("Operator"))
node_api_client(("API client"))

node_operator -->|"requests pages"| node_fastapi
node_api_client -->|"requests data"| node_session_api
node_fastapi -->|"renders pages"| node_html_pages
node_fastapi -->|"calls summary"| node_dashboard
node_fastapi -->|"calls inventory"| node_inventory
node_fastapi -->|"calls approvals"| node_approvals
node_fastapi -->|"calls replay"| node_replay
node_fastapi -->|"calls sharing"| node_sharing
node_fastapi -->|"calls posture"| node_auth_posture
node_fastapi -->|"calls recollection"| node_recollection
node_fastapi -->|"calls sample"| node_sample_payload
node_html_pages -->|"reads summary"| node_dashboard
node_html_pages -->|"reads sessions"| node_inventory
node_html_pages -->|"reads approvals"| node_approvals
node_html_pages -->|"reads replay data"| node_replay
node_html_pages -->|"reads shares"| node_sharing
node_dashboard -->|"reads records"| node_session_data
node_inventory -->|"reads records"| node_session_data
node_approvals -->|"reads records"| node_session_data
node_replay -->|"reads records"| node_session_data
node_sharing -->|"reads records"| node_session_data
node_auth_posture -->|"reads records"| node_session_data
node_recollection -->|"ranks records"| node_session_data
node_sample_payload -->|"reads records"| node_session_data

click node_fastapi "https://github.com/mizcausevic-dev/mcp-session-recorder/blob/main/app/main.py"
click node_html_pages "https://github.com/mizcausevic-dev/mcp-session-recorder/blob/main/app/render.py"
click node_session_api "https://github.com/mizcausevic-dev/mcp-session-recorder/blob/main/app/main.py"
click node_dashboard "https://github.com/mizcausevic-dev/mcp-session-recorder/blob/main/app/services/session_service.py"
click node_inventory "https://github.com/mizcausevic-dev/mcp-session-recorder/blob/main/app/services/session_service.py"
click node_approvals "https://github.com/mizcausevic-dev/mcp-session-recorder/blob/main/app/services/session_service.py"
click node_replay "https://github.com/mizcausevic-dev/mcp-session-recorder/blob/main/app/services/session_service.py"
click node_sharing "https://github.com/mizcausevic-dev/mcp-session-recorder/blob/main/app/services/session_service.py"
click node_auth_posture "https://github.com/mizcausevic-dev/mcp-session-recorder/blob/main/app/services/session_service.py"
click node_recollection "https://github.com/mizcausevic-dev/mcp-session-recorder/blob/main/app/services/session_service.py"
click node_sample_payload "https://github.com/mizcausevic-dev/mcp-session-recorder/blob/main/app/services/session_service.py"
click node_session_data "https://github.com/mizcausevic-dev/mcp-session-recorder/blob/main/app/data/sample_session_data.json"

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_fastapi,node_session_api,node_api_client toneBlue
class node_html_pages toneAmber
class node_dashboard,node_inventory,node_approvals,node_replay,node_sharing,node_auth_posture,node_recollection,node_sample_payload toneMint
class node_session_data toneRose
class node_operator toneIndigo
```

## Components

### Application entry

- [FastAPI routes](https://github.com/mizcausevic-dev/mcp-session-recorder/blob/main/app/main.py): `app/main.py`
- [Session APIs](https://github.com/mizcausevic-dev/mcp-session-recorder/blob/main/app/main.py): `app/main.py`

### Operator surfaces

- [HTML pages](https://github.com/mizcausevic-dev/mcp-session-recorder/blob/main/app/render.py): `app/render.py`

### Session analysis

- [Dashboard summary](https://github.com/mizcausevic-dev/mcp-session-recorder/blob/main/app/services/session_service.py): `app/services/session_service.py`
- [Session inventory](https://github.com/mizcausevic-dev/mcp-session-recorder/blob/main/app/services/session_service.py): `app/services/session_service.py`
- [Approval board](https://github.com/mizcausevic-dev/mcp-session-recorder/blob/main/app/services/session_service.py): `app/services/session_service.py`
- [Replay priorities](https://github.com/mizcausevic-dev/mcp-session-recorder/blob/main/app/services/session_service.py): `app/services/session_service.py`
- [Sharing matrix](https://github.com/mizcausevic-dev/mcp-session-recorder/blob/main/app/services/session_service.py): `app/services/session_service.py`
- [Auth posture](https://github.com/mizcausevic-dev/mcp-session-recorder/blob/main/app/services/session_service.py): `app/services/session_service.py`
- [Session recollection](https://github.com/mizcausevic-dev/mcp-session-recorder/blob/main/app/services/session_service.py): `app/services/session_service.py`
- [Sample payload](https://github.com/mizcausevic-dev/mcp-session-recorder/blob/main/app/services/session_service.py): `app/services/session_service.py`

### Session records

- [Sample sessions](https://github.com/mizcausevic-dev/mcp-session-recorder/blob/main/app/data/sample_session_data.json): `app/data/sample_session_data.json`

### Other components

- **Operator**
- **API client**

## Connections

- Operator → FastAPI routes: requests pages
- API client → Session APIs: requests data
- FastAPI routes → HTML pages: renders pages
- FastAPI routes → Dashboard summary: calls summary
- FastAPI routes → Session inventory: calls inventory
- FastAPI routes → Approval board: calls approvals
- FastAPI routes → Replay priorities: calls replay
- FastAPI routes → Sharing matrix: calls sharing
- FastAPI routes → Auth posture: calls posture
- FastAPI routes → Session recollection: calls recollection
- FastAPI routes → Sample payload: calls sample
- HTML pages → Dashboard summary: reads summary
- HTML pages → Session inventory: reads sessions
- HTML pages → Approval board: reads approvals
- HTML pages → Replay priorities: reads replay data
- HTML pages → Sharing matrix: reads shares
- Dashboard summary → Sample sessions: reads records
- Session inventory → Sample sessions: reads records
- Approval board → Sample sessions: reads records
- Replay priorities → Sample sessions: reads records
- Sharing matrix → Sample sessions: reads records
- Auth posture → Sample sessions: reads records
- Session recollection → Sample sessions: ranks records
- Sample payload → Sample sessions: reads records
