# brightwing-systems-llc/mcp-manager architecture

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

- Interactive diagram: https://gitdiagram.com/brightwing-systems-llc/mcp-manager
- Repository: https://github.com/brightwing-systems-llc/mcp-manager

## Overview

Brightwing is a desktop control plane for finding, installing, authenticating, proxying, filtering, and governing MCP servers across AI tools. The main workflow runs from the app UI through its shared state and Tauri bridge into Rust commands, which manage tool configs and persistent state. OAuth, proxying, credential storage, and governance are distinct product stages. Edges are limited to documented README behavior or relationships visible in excerpts and SOURCE INDEX references; some backend wiring is unsampled and is therefore omitted or marked unverified.

Main entry points: [`src/lib/tauri.ts`](https://github.com/brightwing-systems-llc/mcp-manager/blob/main/src/lib/tauri.ts) (Tauri Bridge), [`src/App.tsx`](https://github.com/brightwing-systems-llc/mcp-manager/blob/main/src/App.tsx) (App Shell), [`src-tauri/src/oauth/flow.rs`](https://github.com/brightwing-systems-llc/mcp-manager/blob/main/src-tauri/src/oauth/flow.rs) (OAuth Flow), [`src-tauri/src/lib.rs`](https://github.com/brightwing-systems-llc/mcp-manager/blob/main/src-tauri/src/lib.rs) (Governance Commands)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Desktop Control Plane"]
  node_app["App Shell<br/>[App.tsx]"]
  node_state["UI State<br/>[store.ts]"]
  node_bridge["Tauri Bridge<br/>[tauri.ts]"]
  node_dashboard["Server Dashboard<br/>[Dashboard.tsx]"]
end

subgraph group_install["Discovery and Installation"]
  node_search["Server Search<br/>[Search.tsx]"]
  node_installer["Install Server<br/>[InstallDialog.tsx]"]
  node_addserver["Add Server<br/>[AddServer.tsx]"]
  node_tooldefs["Tool Definitions<br/>[definitions.rs]"]
  node_configread["Tool Detection<br/>[reader.rs]"]
  node_configwrite["Tool Config Writer<br/>[writer.rs]"]
  node_scoreboard["MCP Scoreboard"]
  node_aiapps["AI Tool Configs"]
end

subgraph group_auth["Authentication and Proxy"]
  node_oauthui["OAuth Connect<br/>[OAuthConnect.tsx]"]
  node_oauthflow["OAuth Flow<br/>[flow.rs]"]
  node_oauthdiscovery["OAuth Discovery<br/>[discovery.rs]"]
  node_oauthexchange["Token Exchange<br/>[exchange.rs]"]
  node_proxyui["Proxy Management<br/>[ProxyServers.tsx]"]
  node_proxydaemon["Proxy Daemon"]
  node_vault[("Encrypted Vault")]
end

subgraph group_policy["Governance"]
  node_governanceui["Governance UI<br/>[Governance.tsx]"]
  node_governance["Governance Commands<br/>[lib.rs]"]
end

subgraph group_runtime["Rust Runtime and State"]
  node_db[("SQLite Database<br/>[queries.rs]")]
  node_cli["bw CLI<br/>[bw.rs]"]
end

node_user(("Desktop User"))

node_user -->|"uses"| node_app
node_app -->|"loads data"| node_state
node_app -->|"shows view"| node_dashboard
node_app -->|"shows view"| node_search
node_app -->|"shows view"| node_installer
node_app -->|"shows view"| node_addserver
node_state -->|"invokes commands"| node_bridge
node_search -->|"searches servers"| node_state
node_scoreboard -->|"supplies results"| node_search
node_installer -.->|"offers auth"| node_oauthui
node_addserver -->|"offers auth"| node_oauthui
node_dashboard -->|"registers proxy"| node_bridge
node_bridge -.->|"requests tool metadata"| node_tooldefs
node_configread -->|"uses definitions"| node_tooldefs
node_configwrite -->|"uses definitions"| node_tooldefs
node_configwrite -->|"writes configs"| node_aiapps
node_oauthui -->|"starts OAuth"| node_bridge
node_bridge -.->|"requests OAuth commands"| node_oauthflow
node_oauthflow -->|"discovers metadata"| node_oauthdiscovery
node_oauthflow -->|"exchanges code"| node_oauthexchange
node_oauthflow -->|"reads metadata"| node_db
node_oauthflow -->|"stores tokens"| node_vault
node_proxyui -.->|"manages daemon"| node_bridge
node_proxydaemon -.->|"retrieves credentials"| node_vault
node_proxydaemon -->|"proxies requests"| node_aiapps
node_governanceui -->|"sends policy actions"| node_bridge
node_bridge -.->|"invokes commands"| node_governance
node_governance -->|"records allowlist"| node_db
node_governance -->|"checks install policy"| node_aiapps
node_cli -->|"uses shared proxy"| node_proxydaemon

click node_app "https://github.com/brightwing-systems-llc/mcp-manager/blob/main/src/App.tsx"
click node_state "https://github.com/brightwing-systems-llc/mcp-manager/blob/main/src/store.ts"
click node_bridge "https://github.com/brightwing-systems-llc/mcp-manager/blob/main/src/lib/tauri.ts"
click node_dashboard "https://github.com/brightwing-systems-llc/mcp-manager/blob/main/src/components/Dashboard.tsx"
click node_search "https://github.com/brightwing-systems-llc/mcp-manager/blob/main/src/components/Search.tsx"
click node_installer "https://github.com/brightwing-systems-llc/mcp-manager/blob/main/src/components/InstallDialog.tsx"
click node_addserver "https://github.com/brightwing-systems-llc/mcp-manager/blob/main/src/components/AddServer.tsx"
click node_tooldefs "https://github.com/brightwing-systems-llc/mcp-manager/blob/main/src-tauri/src/tools/definitions.rs"
click node_configread "https://github.com/brightwing-systems-llc/mcp-manager/blob/main/src-tauri/src/config/reader.rs"
click node_configwrite "https://github.com/brightwing-systems-llc/mcp-manager/blob/main/src-tauri/src/config/writer.rs"
click node_oauthui "https://github.com/brightwing-systems-llc/mcp-manager/blob/main/src/components/OAuthConnect.tsx"
click node_oauthflow "https://github.com/brightwing-systems-llc/mcp-manager/blob/main/src-tauri/src/oauth/flow.rs"
click node_oauthdiscovery "https://github.com/brightwing-systems-llc/mcp-manager/blob/main/src-tauri/src/oauth/discovery.rs"
click node_oauthexchange "https://github.com/brightwing-systems-llc/mcp-manager/blob/main/src-tauri/src/oauth/exchange.rs"
click node_proxyui "https://github.com/brightwing-systems-llc/mcp-manager/blob/main/src/components/ProxyServers.tsx"
click node_proxydaemon "https://github.com/brightwing-systems-llc/mcp-manager/blob/main/src-tauri/src/bin/brightwing_proxy.rs"
click node_vault "https://github.com/brightwing-systems-llc/mcp-manager/blob/main/src-tauri/crates/proxy-common/src/stronghold_vault.rs"
click node_governanceui "https://github.com/brightwing-systems-llc/mcp-manager/blob/main/src/components/Governance.tsx"
click node_governance "https://github.com/brightwing-systems-llc/mcp-manager/blob/main/src-tauri/src/lib.rs"
click node_db "https://github.com/brightwing-systems-llc/mcp-manager/blob/main/src-tauri/src/db/queries.rs"
click node_cli "https://github.com/brightwing-systems-llc/mcp-manager/blob/main/src-tauri/src/bin/bw.rs"

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_app,node_state,node_bridge,node_dashboard,node_user toneBlue
class node_search,node_installer,node_addserver,node_tooldefs,node_configread,node_configwrite,node_scoreboard,node_aiapps toneAmber
class node_oauthui,node_oauthflow,node_oauthdiscovery,node_oauthexchange,node_proxyui,node_proxydaemon,node_vault toneMint
class node_governanceui,node_governance toneRose
class node_db,node_cli toneIndigo
```

## Components

### Desktop Control Plane

- [App Shell](https://github.com/brightwing-systems-llc/mcp-manager/blob/main/src/App.tsx): `src/App.tsx`
- [UI State](https://github.com/brightwing-systems-llc/mcp-manager/blob/main/src/store.ts): `src/store.ts`
- [Tauri Bridge](https://github.com/brightwing-systems-llc/mcp-manager/blob/main/src/lib/tauri.ts): `src/lib/tauri.ts`
- [Server Dashboard](https://github.com/brightwing-systems-llc/mcp-manager/blob/main/src/components/Dashboard.tsx): `src/components/Dashboard.tsx`

### Discovery and Installation

- [Server Search](https://github.com/brightwing-systems-llc/mcp-manager/blob/main/src/components/Search.tsx): `src/components/Search.tsx`
- [Install Server](https://github.com/brightwing-systems-llc/mcp-manager/blob/main/src/components/InstallDialog.tsx): `src/components/InstallDialog.tsx`
- [Add Server](https://github.com/brightwing-systems-llc/mcp-manager/blob/main/src/components/AddServer.tsx): `src/components/AddServer.tsx`
- [Tool Definitions](https://github.com/brightwing-systems-llc/mcp-manager/blob/main/src-tauri/src/tools/definitions.rs): `src-tauri/src/tools/definitions.rs`
- [Tool Detection](https://github.com/brightwing-systems-llc/mcp-manager/blob/main/src-tauri/src/config/reader.rs): `src-tauri/src/config/reader.rs`
- [Tool Config Writer](https://github.com/brightwing-systems-llc/mcp-manager/blob/main/src-tauri/src/config/writer.rs): `src-tauri/src/config/writer.rs`
- **MCP Scoreboard**
- **AI Tool Configs**

### Authentication and Proxy

- [OAuth Connect](https://github.com/brightwing-systems-llc/mcp-manager/blob/main/src/components/OAuthConnect.tsx): `src/components/OAuthConnect.tsx`
- [OAuth Flow](https://github.com/brightwing-systems-llc/mcp-manager/blob/main/src-tauri/src/oauth/flow.rs): `src-tauri/src/oauth/flow.rs`
- [OAuth Discovery](https://github.com/brightwing-systems-llc/mcp-manager/blob/main/src-tauri/src/oauth/discovery.rs): `src-tauri/src/oauth/discovery.rs`
- [Token Exchange](https://github.com/brightwing-systems-llc/mcp-manager/blob/main/src-tauri/src/oauth/exchange.rs): `src-tauri/src/oauth/exchange.rs`
- [Proxy Management](https://github.com/brightwing-systems-llc/mcp-manager/blob/main/src/components/ProxyServers.tsx): `src/components/ProxyServers.tsx`
- [Proxy Daemon](https://github.com/brightwing-systems-llc/mcp-manager/blob/main/src-tauri/src/bin/brightwing_proxy.rs): `src-tauri/src/bin/brightwing_proxy.rs`
- [Encrypted Vault](https://github.com/brightwing-systems-llc/mcp-manager/blob/main/src-tauri/crates/proxy-common/src/stronghold_vault.rs): `src-tauri/crates/proxy-common/src/stronghold_vault.rs`

### Governance

- [Governance UI](https://github.com/brightwing-systems-llc/mcp-manager/blob/main/src/components/Governance.tsx): `src/components/Governance.tsx`
- [Governance Commands](https://github.com/brightwing-systems-llc/mcp-manager/blob/main/src-tauri/src/lib.rs): `src-tauri/src/lib.rs`

### Rust Runtime and State

- [SQLite Database](https://github.com/brightwing-systems-llc/mcp-manager/blob/main/src-tauri/src/db/queries.rs): `src-tauri/src/db/queries.rs`
- [bw CLI](https://github.com/brightwing-systems-llc/mcp-manager/blob/main/src-tauri/src/bin/bw.rs): `src-tauri/src/bin/bw.rs`

### Other components

- **Desktop User**

## Connections

- Desktop User → App Shell: uses (evidence: `README.md`)
- App Shell → UI State: loads data (evidence: `src/App.tsx`)
- App Shell → Server Dashboard: shows view (evidence: `src/App.tsx`)
- App Shell → Server Search: shows view (evidence: `src/App.tsx`)
- App Shell → Install Server: shows view (evidence: `src/App.tsx`)
- App Shell → Add Server: shows view (evidence: `src/App.tsx`)
- UI State → Tauri Bridge: invokes commands (evidence: `src/store.ts`)
- Server Search → UI State: searches servers (evidence: `src/components/Search.tsx`)
- MCP Scoreboard → Server Search: supplies results (evidence: `README.md`)
- Install Server → OAuth Connect: offers auth (evidence: `src/components/InstallDialog.tsx`)
- Add Server → OAuth Connect: offers auth (evidence: `src/components/AddServer.tsx`)
- Server Dashboard → Tauri Bridge: registers proxy (evidence: `src/components/Dashboard.tsx`)
- Tauri Bridge → Tool Definitions: requests tool metadata
- Tool Detection → Tool Definitions: uses definitions (evidence: `src-tauri/src/config/reader.rs`)
- Tool Config Writer → Tool Definitions: uses definitions (evidence: `src-tauri/src/config/writer.rs`)
- Tool Config Writer → AI Tool Configs: writes configs (evidence: `README.md`)
- OAuth Connect → Tauri Bridge: starts OAuth (evidence: `src/components/OAuthConnect.tsx`)
- Tauri Bridge → OAuth Flow: requests OAuth commands
- OAuth Flow → OAuth Discovery: discovers metadata (evidence: `src-tauri/src/oauth/flow.rs`)
- OAuth Flow → Token Exchange: exchanges code (evidence: `src-tauri/src/oauth/flow.rs`)
- OAuth Flow → SQLite Database: reads metadata (evidence: `src-tauri/src/oauth/flow.rs`)
- OAuth Flow → Encrypted Vault: stores tokens (evidence: `src-tauri/src/oauth/flow.rs`)
- Proxy Management → Tauri Bridge: manages daemon
- Proxy Daemon → Encrypted Vault: retrieves credentials
- Proxy Daemon → AI Tool Configs: proxies requests (evidence: `README.md`)
- Governance UI → Tauri Bridge: sends policy actions (evidence: `src/components/Governance.tsx`)
- Tauri Bridge → Governance Commands: invokes commands
- Governance Commands → SQLite Database: records allowlist (evidence: `src-tauri/src/lib.rs`)
- Governance Commands → AI Tool Configs: checks install policy (evidence: `README.md`)
- bw CLI → Proxy Daemon: uses shared proxy (evidence: `README.md`)
