# nicholasjacob1990/sei-mcp architecture

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

- Interactive diagram: https://gitdiagram.com/nicholasjacob1990/sei-mcp
- Repository: https://github.com/nicholasjacob1990/sei-mcp

## Overview

SEI-MCP exposes SEI automation as MCP tools, with commands executed either through a Chrome-extension WebSocket bridge or a Playwright driver. A separate HTTP entry point adds remote MCP access, authentication/licensing, OAuth pages, and Stripe checkout. The README also documents process, document, signature, status, screenshot, and page-state operations; these are represented by the tool and automation subsystems. Some implementation paths were not excerpted, so uncertain driver internals and optional integrations are not connected.

Main entry points: [`src/http-server.ts`](https://github.com/nicholasjacob1990/sei-mcp/blob/master/src/http-server.ts) (HTTP MCP server), [`src/server.ts`](https://github.com/nicholasjacob1990/sei-mcp/blob/master/src/server.ts) (MCP server), [`src/websocket/server.ts`](https://github.com/nicholasjacob1990/sei-mcp/blob/master/src/websocket/server.ts) (WebSocket bridge), [`src/tools/index.ts`](https://github.com/nicholasjacob1990/sei-mcp/blob/master/src/tools/index.ts) (Tool dispatcher)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["MCP and HTTP entry"]
  node_stdio_server["MCP server<br/>[server.ts]"]
  node_http_server["HTTP MCP server<br/>[http-server.ts]"]
end

subgraph group_tools["Tool orchestration"]
  node_tool_catalog["Tool definitions<br/>[all-tools.ts]"]
  node_tool_dispatch["Tool dispatcher<br/>[index.ts]"]
end

subgraph group_automation["SEI automation"]
  node_playwright["Playwright driver<br/>[manager.ts]"]
  node_hybrid_client["Hybrid SEI client<br/>[hybrid-client.ts]"]
  node_soap_client["SOAP client<br/>[soap-client.ts]"]
  node_selectors["SEI selectors<br/>[selectors.ts]"]
end

subgraph group_bridge["Extension sessions"]
  node_ws_server["WebSocket bridge<br/>[server.ts]"]
  node_session_manager[("Session manager<br/>[session-manager.ts]")]
  node_remote_proxy["Remote proxy<br/>[remote-proxy.ts]"]
end

subgraph group_http_services["HTTP services"]
  node_auth["Authentication<br/>[auth.ts]"]
  node_pages["OAuth pages<br/>[pages.ts]"]
  node_stripe["Stripe checkout<br/>[stripe.ts]"]
end

node_mcp_client(("MCP client"))
node_http_client(("HTTP client"))
node_sei{{"SEI system"}}
node_chrome_extension(("Chrome extension"))

node_mcp_client -->|"sends requests"| node_stdio_server
node_stdio_server -->|"lists tools"| node_tool_catalog
node_stdio_server -->|"dispatches tools"| node_tool_dispatch
node_stdio_server -->|"starts bridge"| node_ws_server
node_stdio_server -->|"creates driver"| node_playwright
node_http_client -->|"sends requests"| node_http_server
node_http_server -->|"starts bridge"| node_ws_server
node_http_server -->|"checks access"| node_auth
node_http_server -->|"creates checkout"| node_stripe
node_http_server -.->|"serves pages"| node_pages
node_http_server -.->|"dispatches tools"| node_tool_dispatch
node_tool_dispatch -->|"sends commands"| node_ws_server
node_tool_dispatch -->|"runs automation"| node_playwright
node_chrome_extension -->|"connects by WebSocket"| node_ws_server
node_ws_server -->|"registers sessions"| node_session_manager
node_hybrid_client -->|"calls SOAP"| node_soap_client
node_soap_client -->|"sends SOAP requests"| node_sei
node_playwright -.->|"automates browser"| node_sei

click node_stdio_server "https://github.com/nicholasjacob1990/sei-mcp/blob/master/src/server.ts"
click node_http_server "https://github.com/nicholasjacob1990/sei-mcp/blob/master/src/http-server.ts"
click node_tool_catalog "https://github.com/nicholasjacob1990/sei-mcp/blob/master/src/tools/all-tools.ts"
click node_tool_dispatch "https://github.com/nicholasjacob1990/sei-mcp/blob/master/src/tools/index.ts"
click node_playwright "https://github.com/nicholasjacob1990/sei-mcp/blob/master/src/playwright/manager.ts"
click node_hybrid_client "https://github.com/nicholasjacob1990/sei-mcp/blob/master/src/sei/hybrid-client.ts"
click node_soap_client "https://github.com/nicholasjacob1990/sei-mcp/blob/master/src/sei/soap-client.ts"
click node_selectors "https://github.com/nicholasjacob1990/sei-mcp/blob/master/src/sei/selectors.ts"
click node_ws_server "https://github.com/nicholasjacob1990/sei-mcp/blob/master/src/websocket/server.ts"
click node_session_manager "https://github.com/nicholasjacob1990/sei-mcp/blob/master/src/sessions/session-manager.ts"
click node_remote_proxy "https://github.com/nicholasjacob1990/sei-mcp/blob/master/src/remote-proxy.ts"
click node_auth "https://github.com/nicholasjacob1990/sei-mcp/blob/master/src/http/auth.ts"
click node_pages "https://github.com/nicholasjacob1990/sei-mcp/blob/master/src/http/pages.ts"
click node_stripe "https://github.com/nicholasjacob1990/sei-mcp/blob/master/src/http/stripe.ts"

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_stdio_server,node_http_server,node_mcp_client,node_http_client toneBlue
class node_tool_catalog,node_tool_dispatch toneAmber
class node_playwright,node_hybrid_client,node_soap_client,node_selectors toneMint
class node_ws_server,node_session_manager,node_remote_proxy toneRose
class node_auth,node_pages,node_stripe,node_sei,node_chrome_extension toneIndigo
```

## Components

### MCP and HTTP entry

- [MCP server](https://github.com/nicholasjacob1990/sei-mcp/blob/master/src/server.ts): `src/server.ts`
- [HTTP MCP server](https://github.com/nicholasjacob1990/sei-mcp/blob/master/src/http-server.ts): `src/http-server.ts`

### Tool orchestration

- [Tool definitions](https://github.com/nicholasjacob1990/sei-mcp/blob/master/src/tools/all-tools.ts): `src/tools/all-tools.ts`
- [Tool dispatcher](https://github.com/nicholasjacob1990/sei-mcp/blob/master/src/tools/index.ts): `src/tools/index.ts`

### SEI automation

- [Playwright driver](https://github.com/nicholasjacob1990/sei-mcp/blob/master/src/playwright/manager.ts): `src/playwright/manager.ts`
- [Hybrid SEI client](https://github.com/nicholasjacob1990/sei-mcp/blob/master/src/sei/hybrid-client.ts): `src/sei/hybrid-client.ts`
- [SOAP client](https://github.com/nicholasjacob1990/sei-mcp/blob/master/src/sei/soap-client.ts): `src/sei/soap-client.ts`
- [SEI selectors](https://github.com/nicholasjacob1990/sei-mcp/blob/master/src/sei/selectors.ts): `src/sei/selectors.ts`

### Extension sessions

- [WebSocket bridge](https://github.com/nicholasjacob1990/sei-mcp/blob/master/src/websocket/server.ts): `src/websocket/server.ts`
- [Session manager](https://github.com/nicholasjacob1990/sei-mcp/blob/master/src/sessions/session-manager.ts): `src/sessions/session-manager.ts`
- [Remote proxy](https://github.com/nicholasjacob1990/sei-mcp/blob/master/src/remote-proxy.ts): `src/remote-proxy.ts`

### HTTP services

- [Authentication](https://github.com/nicholasjacob1990/sei-mcp/blob/master/src/http/auth.ts): `src/http/auth.ts`
- [OAuth pages](https://github.com/nicholasjacob1990/sei-mcp/blob/master/src/http/pages.ts): `src/http/pages.ts`
- [Stripe checkout](https://github.com/nicholasjacob1990/sei-mcp/blob/master/src/http/stripe.ts): `src/http/stripe.ts`

### Other components

- **MCP client**
- **HTTP client**
- **SEI system**
- **Chrome extension**

## Connections

- MCP client → MCP server: sends requests (evidence: `src/server.ts`)
- MCP server → Tool definitions: lists tools (evidence: `src/server.ts`)
- MCP server → Tool dispatcher: dispatches tools (evidence: `src/server.ts`)
- MCP server → WebSocket bridge: starts bridge (evidence: `src/server.ts`)
- MCP server → Playwright driver: creates driver (evidence: `src/server.ts`)
- HTTP client → HTTP MCP server: sends requests (evidence: `src/http-server.ts`)
- HTTP MCP server → WebSocket bridge: starts bridge (evidence: `src/http-server.ts`)
- HTTP MCP server → Authentication: checks access (evidence: `src/http-server.ts`)
- HTTP MCP server → Stripe checkout: creates checkout (evidence: `src/http-server.ts`)
- HTTP MCP server → OAuth pages: serves pages (evidence: `src/http-server.ts`)
- HTTP MCP server → Tool dispatcher: dispatches tools (evidence: `src/http-server.ts`)
- Tool dispatcher → WebSocket bridge: sends commands (evidence: `src/tools/index.ts`)
- Tool dispatcher → Playwright driver: runs automation (evidence: `src/tools/index.ts`)
- Chrome extension → WebSocket bridge: connects by WebSocket (evidence: `src/websocket/server.ts`)
- WebSocket bridge → Session manager: registers sessions (evidence: `src/websocket/server.ts`)
- Hybrid SEI client → SOAP client: calls SOAP (evidence: `src/sei/hybrid-client.ts`)
- SOAP client → SEI system: sends SOAP requests (evidence: `src/sei/soap-client.ts`)
- Playwright driver → SEI system: automates browser
