# redward42/flight-mcp architecture

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

- Interactive diagram: https://gitdiagram.com/redward42/flight-mcp
- Repository: https://github.com/redward42/flight-mcp

## Overview

This small MCP server lets a client request flight options by route and date. The registered search tool builds SerpAPI parameters, fetches Google Flights data, formats up to five results, and returns them through the server. The source shows this flow in one file; no separate storage or other product stages are present.

Main entry points: [`flight.py`](https://github.com/RedWARd42/flight-mcp/blob/master/flight.py) (Flight MCP server)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_mcp["MCP server"]
  node_server["Flight MCP server<br/>[flight.py]"]
end

subgraph group_search["Flight search"]
  node_tool["Search flights tool<br/>[flight.py]"]
  node_fetch["SerpAPI fetch<br/>[flight.py]"]
  node_format["Flight formatter<br/>[flight.py]"]
end

node_client(("MCP client"))
node_serpapi["SerpAPI"]

node_client -->|"requests search"| node_server
node_server -->|"registers tool"| node_tool
node_tool -->|"fetches data"| node_fetch
node_fetch -->|"requests flights"| node_serpapi
node_tool -->|"formats results"| node_format
node_server -->|"returns results"| node_client

click node_server "https://github.com/RedWARd42/flight-mcp/blob/master/flight.py"
click node_tool "https://github.com/RedWARd42/flight-mcp/blob/master/flight.py"
click node_fetch "https://github.com/RedWARd42/flight-mcp/blob/master/flight.py"
click node_format "https://github.com/RedWARd42/flight-mcp/blob/master/flight.py"

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_server,node_client toneBlue
class node_tool,node_fetch,node_format toneAmber
class node_serpapi toneMint
```

## Components

### MCP server

- [Flight MCP server](https://github.com/RedWARd42/flight-mcp/blob/master/flight.py): `flight.py`

### Flight search

- [Search flights tool](https://github.com/RedWARd42/flight-mcp/blob/master/flight.py): `flight.py`
- [SerpAPI fetch](https://github.com/RedWARd42/flight-mcp/blob/master/flight.py): `flight.py`
- [Flight formatter](https://github.com/RedWARd42/flight-mcp/blob/master/flight.py): `flight.py`

### Other components

- **MCP client**
- **SerpAPI**

## Connections

- MCP client → Flight MCP server: requests search (evidence: `README.md`)
- Flight MCP server → Search flights tool: registers tool (evidence: `flight.py`)
- Search flights tool → SerpAPI fetch: fetches data (evidence: `flight.py`)
- SerpAPI fetch → SerpAPI: requests flights (evidence: `flight.py`)
- Search flights tool → Flight formatter: formats results (evidence: `flight.py`)
- Flight MCP server → MCP client: returns results (evidence: `flight.py`)
