# amirwebd3v/flowcv-mcp architecture

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

- Interactive diagram: https://gitdiagram.com/amirwebd3v/flowcv-mcp
- Repository: https://github.com/amirwebd3v/flowcv-mcp

## Overview

FlowCV MCP Server + CLI lets a user or AI assistant manage FlowCV resumes and related work through FlowCV’s session-cookie-authenticated API. The CLI routes commands to domain handlers; those handlers call the shared API client. The MCP server is a separate tool interface over that client. Authentication obtains and persists a session cookie. The README documents broad capabilities, but the MCP server implementation and most command handlers were not excerpted, so those branches rely on documented capabilities and indexed module references rather than detailed inspection.

Main entry points: [`src/cli.ts`](https://github.com/amirwebd3v/flowcv-mcp/blob/master/src/cli.ts) (CLI Router), [`src/api-client.ts`](https://github.com/amirwebd3v/flowcv-mcp/blob/master/src/api-client.ts) (FlowCV API Client), [`src/cli/auth-flow.ts`](https://github.com/amirwebd3v/flowcv-mcp/blob/master/src/cli/auth-flow.ts) (Login Flow), [`src/index.ts`](https://github.com/amirwebd3v/flowcv-mcp/blob/master/src/index.ts) (MCP Tools)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interfaces["User Interfaces"]
  node_cli["CLI Router<br/>[cli.ts]"]
  node_mcp["MCP Tools<br/>[index.ts]"]
  node_clioutput["CLI Output<br/>[output.ts]"]
end

subgraph group_workflows["Resume Workflows"]
  node_resume["Resume Management<br/>[resume.ts]"]
  node_content["Resume Content<br/>[entry.ts]"]
  node_sections["Section Settings<br/>[section.ts]"]
  node_personal["Personal Details<br/>[personal.ts]"]
  node_design["Design Customization<br/>[design.ts]"]
  node_templates["Template Operations<br/>[template.ts]"]
  node_letters["Cover Letters<br/>[letter.ts]"]
end

subgraph group_support["Account and Extensions"]
  node_ai["AI Features<br/>[ai.ts]"]
  node_publishing["Publishing<br/>[publish.ts]"]
  node_tracker["Job Tracker<br/>[tracker.ts]"]
  node_images["Image Search<br/>[image.ts]"]
end

subgraph group_integration["Authentication and API"]
  node_authcmd["Auth Commands<br/>[auth.ts]"]
  node_authflow["Login Flow<br/>[auth-flow.ts]"]
  node_config[("CLI Config<br/>[config.ts]")]
  node_mcpconfig[("Workspace Config<br/>[mcp-config.ts]")]
  node_api["FlowCV API Client<br/>[api-client.ts]"]
end

node_user(("User / Assistant"))
node_flowcv{{"FlowCV Service"}}

node_user -->|"runs commands"| node_cli
node_user -->|"uses tools"| node_mcp
node_cli -->|"dispatches"| node_resume
node_cli -->|"dispatches"| node_content
node_cli -->|"dispatches"| node_sections
node_cli -->|"dispatches"| node_personal
node_cli -->|"dispatches"| node_design
node_cli -->|"dispatches"| node_templates
node_cli -->|"dispatches"| node_letters
node_cli -->|"dispatches"| node_ai
node_cli -->|"dispatches"| node_publishing
node_cli -->|"dispatches"| node_tracker
node_cli -->|"dispatches"| node_images
node_cli -->|"dispatches"| node_authcmd
node_cli -->|"formats output"| node_clioutput
node_authcmd -->|"starts login"| node_authflow
node_authflow -->|"saves cookie"| node_config
node_authflow -->|"verifies session"| node_api
node_config -->|"reads workspace cookie"| node_mcpconfig
node_api -->|"persists cookie"| node_mcpconfig
node_mcp -->|"calls"| node_api
node_resume -->|"requests data"| node_api
node_content -->|"reads and writes"| node_api
node_sections -->|"updates sections"| node_api
node_personal -->|"updates details"| node_api
node_design -->|"updates design"| node_api
node_templates -->|"requests templates"| node_api
node_letters -->|"manages letters"| node_api
node_ai -->|"requests AI"| node_api
node_publishing -->|"publishes resumes"| node_api
node_tracker -->|"manages applications"| node_api
node_images -->|"searches images"| node_api
node_api -->|"sends API requests"| node_flowcv

click node_cli "https://github.com/amirwebd3v/flowcv-mcp/blob/master/src/cli.ts"
click node_mcp "https://github.com/amirwebd3v/flowcv-mcp/blob/master/src/index.ts"
click node_resume "https://github.com/amirwebd3v/flowcv-mcp/blob/master/src/cli/commands/resume.ts"
click node_content "https://github.com/amirwebd3v/flowcv-mcp/blob/master/src/cli/commands/entry.ts"
click node_sections "https://github.com/amirwebd3v/flowcv-mcp/blob/master/src/cli/commands/section.ts"
click node_personal "https://github.com/amirwebd3v/flowcv-mcp/blob/master/src/cli/commands/personal.ts"
click node_design "https://github.com/amirwebd3v/flowcv-mcp/blob/master/src/cli/commands/design.ts"
click node_templates "https://github.com/amirwebd3v/flowcv-mcp/blob/master/src/cli/commands/template.ts"
click node_letters "https://github.com/amirwebd3v/flowcv-mcp/blob/master/src/cli/commands/letter.ts"
click node_ai "https://github.com/amirwebd3v/flowcv-mcp/blob/master/src/cli/commands/ai.ts"
click node_publishing "https://github.com/amirwebd3v/flowcv-mcp/blob/master/src/cli/commands/publish.ts"
click node_tracker "https://github.com/amirwebd3v/flowcv-mcp/blob/master/src/cli/commands/tracker.ts"
click node_images "https://github.com/amirwebd3v/flowcv-mcp/blob/master/src/cli/commands/image.ts"
click node_authcmd "https://github.com/amirwebd3v/flowcv-mcp/blob/master/src/cli/commands/auth.ts"
click node_authflow "https://github.com/amirwebd3v/flowcv-mcp/blob/master/src/cli/auth-flow.ts"
click node_config "https://github.com/amirwebd3v/flowcv-mcp/blob/master/src/cli/config.ts"
click node_mcpconfig "https://github.com/amirwebd3v/flowcv-mcp/blob/master/src/mcp-config.ts"
click node_api "https://github.com/amirwebd3v/flowcv-mcp/blob/master/src/api-client.ts"
click node_clioutput "https://github.com/amirwebd3v/flowcv-mcp/blob/master/src/cli/output.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_cli,node_mcp,node_clioutput,node_user toneBlue
class node_resume,node_content,node_sections,node_personal,node_design,node_templates,node_letters toneAmber
class node_ai,node_publishing,node_tracker,node_images toneMint
class node_authcmd,node_authflow,node_config,node_mcpconfig,node_api toneRose
class node_flowcv toneIndigo
```

## Components

### User Interfaces

- [CLI Router](https://github.com/amirwebd3v/flowcv-mcp/blob/master/src/cli.ts): `src/cli.ts`
- [MCP Tools](https://github.com/amirwebd3v/flowcv-mcp/blob/master/src/index.ts): `src/index.ts`
- [CLI Output](https://github.com/amirwebd3v/flowcv-mcp/blob/master/src/cli/output.ts): `src/cli/output.ts`

### Resume Workflows

- [Resume Management](https://github.com/amirwebd3v/flowcv-mcp/blob/master/src/cli/commands/resume.ts): `src/cli/commands/resume.ts`
- [Resume Content](https://github.com/amirwebd3v/flowcv-mcp/blob/master/src/cli/commands/entry.ts): `src/cli/commands/entry.ts`
- [Section Settings](https://github.com/amirwebd3v/flowcv-mcp/blob/master/src/cli/commands/section.ts): `src/cli/commands/section.ts`
- [Personal Details](https://github.com/amirwebd3v/flowcv-mcp/blob/master/src/cli/commands/personal.ts): `src/cli/commands/personal.ts`
- [Design Customization](https://github.com/amirwebd3v/flowcv-mcp/blob/master/src/cli/commands/design.ts): `src/cli/commands/design.ts`
- [Template Operations](https://github.com/amirwebd3v/flowcv-mcp/blob/master/src/cli/commands/template.ts): `src/cli/commands/template.ts`
- [Cover Letters](https://github.com/amirwebd3v/flowcv-mcp/blob/master/src/cli/commands/letter.ts): `src/cli/commands/letter.ts`

### Account and Extensions

- [AI Features](https://github.com/amirwebd3v/flowcv-mcp/blob/master/src/cli/commands/ai.ts): `src/cli/commands/ai.ts`
- [Publishing](https://github.com/amirwebd3v/flowcv-mcp/blob/master/src/cli/commands/publish.ts): `src/cli/commands/publish.ts`
- [Job Tracker](https://github.com/amirwebd3v/flowcv-mcp/blob/master/src/cli/commands/tracker.ts): `src/cli/commands/tracker.ts`
- [Image Search](https://github.com/amirwebd3v/flowcv-mcp/blob/master/src/cli/commands/image.ts): `src/cli/commands/image.ts`

### Authentication and API

- [Auth Commands](https://github.com/amirwebd3v/flowcv-mcp/blob/master/src/cli/commands/auth.ts): `src/cli/commands/auth.ts`
- [Login Flow](https://github.com/amirwebd3v/flowcv-mcp/blob/master/src/cli/auth-flow.ts): `src/cli/auth-flow.ts`
- [CLI Config](https://github.com/amirwebd3v/flowcv-mcp/blob/master/src/cli/config.ts): `src/cli/config.ts`
- [Workspace Config](https://github.com/amirwebd3v/flowcv-mcp/blob/master/src/mcp-config.ts): `src/mcp-config.ts`
- [FlowCV API Client](https://github.com/amirwebd3v/flowcv-mcp/blob/master/src/api-client.ts): `src/api-client.ts`

### Other components

- **User / Assistant**
- **FlowCV Service**

## Connections

- User / Assistant → CLI Router: runs commands (evidence: `README.md`)
- User / Assistant → MCP Tools: uses tools (evidence: `README.md`)
- CLI Router → Resume Management: dispatches (evidence: `src/cli.ts`)
- CLI Router → Resume Content: dispatches (evidence: `src/cli.ts`)
- CLI Router → Section Settings: dispatches (evidence: `src/cli.ts`)
- CLI Router → Personal Details: dispatches (evidence: `src/cli.ts`)
- CLI Router → Design Customization: dispatches (evidence: `src/cli.ts`)
- CLI Router → Template Operations: dispatches (evidence: `src/cli.ts`)
- CLI Router → Cover Letters: dispatches (evidence: `src/cli.ts`)
- CLI Router → AI Features: dispatches (evidence: `src/cli.ts`)
- CLI Router → Publishing: dispatches (evidence: `src/cli.ts`)
- CLI Router → Job Tracker: dispatches (evidence: `src/cli.ts`)
- CLI Router → Image Search: dispatches (evidence: `src/cli.ts`)
- CLI Router → Auth Commands: dispatches (evidence: `src/cli.ts`)
- CLI Router → CLI Output: formats output (evidence: `src/cli.ts`)
- Auth Commands → Login Flow: starts login (evidence: `src/cli/commands/auth.ts`)
- Login Flow → CLI Config: saves cookie (evidence: `src/cli/auth-flow.ts`)
- Login Flow → FlowCV API Client: verifies session (evidence: `src/cli/auth-flow.ts`)
- CLI Config → Workspace Config: reads workspace cookie (evidence: `src/cli/config.ts`)
- FlowCV API Client → Workspace Config: persists cookie (evidence: `src/api-client.ts`)
- MCP Tools → FlowCV API Client: calls (evidence: `src/index.ts`)
- Resume Management → FlowCV API Client: requests data (evidence: `src/cli/commands/resume.ts`)
- Resume Content → FlowCV API Client: reads and writes (evidence: `src/cli/commands/entry.ts`)
- Section Settings → FlowCV API Client: updates sections (evidence: `src/cli/commands/section.ts`)
- Personal Details → FlowCV API Client: updates details (evidence: `src/cli/commands/personal.ts`)
- Design Customization → FlowCV API Client: updates design (evidence: `src/cli/commands/design.ts`)
- Template Operations → FlowCV API Client: requests templates (evidence: `src/cli/commands/template.ts`)
- Cover Letters → FlowCV API Client: manages letters (evidence: `src/cli/commands/letter.ts`)
- AI Features → FlowCV API Client: requests AI (evidence: `src/cli/commands/ai.ts`)
- Publishing → FlowCV API Client: publishes resumes (evidence: `src/cli/commands/publish.ts`)
- Job Tracker → FlowCV API Client: manages applications (evidence: `src/cli/commands/tracker.ts`)
- Image Search → FlowCV API Client: searches images (evidence: `src/cli/commands/image.ts`)
- FlowCV API Client → FlowCV Service: sends API requests (evidence: `src/api-client.ts`)
