# bariskisir/izmirdammcp architecture

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

- Interactive diagram: https://gitdiagram.com/bariskisir/izmirdammcp
- Repository: https://github.com/bariskisir/izmirdammcp

## Overview

IzmirDamMcp exposes one MCP tool for retrieving Izmir dam status. A client sends a request through the HTTP app, FastMCP dispatches it to the tool, and the tool defaults the date to the current Istanbul date, fetches and caches IZSU data when needed, optionally filters by dam name, and returns the result. The README documents this capability; the graph follows the sampled server and HTTP-app wiring, while deployment details and unsampled behavior are omitted.

Main entry points: [`api/server.py`](https://github.com/bariskisir/izmirdammcp/blob/master/api/server.py) (Status tool), [`api/index.py`](https://github.com/bariskisir/izmirdammcp/blob/master/api/index.py) (HTTP app)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["MCP entry"]
  node_http_app["HTTP app<br/>[index.py]"]
  node_fastmcp["FastMCP runtime<br/>[server.py]"]
end

subgraph group_status["Status retrieval"]
  node_status_tool["Status tool<br/>[server.py]"]
  node_date_default["Date default<br/>[server.py]"]
  node_name_filter["Name filter<br/>[server.py]"]
  node_turkish_lower["Turkish lowercase<br/>[server.py]"]
end

subgraph group_sources["Data sources"]
  node_cache[("Date cache<br/>[server.py]")]
  node_izsu["IZSU API"]
end

node_client(("MCP client"))

node_client -->|"sends request"| node_http_app
node_http_app -->|"serves app"| node_fastmcp
node_fastmcp -->|"dispatches tool"| node_status_tool
node_status_tool -->|"defaults date"| node_date_default
node_status_tool -->|"reads or writes"| node_cache
node_status_tool -->|"fetches data"| node_izsu
node_status_tool -->|"filters results"| node_name_filter
node_name_filter -->|"normalizes names"| node_turkish_lower
node_status_tool -->|"returns result"| node_fastmcp

click node_http_app "https://github.com/bariskisir/izmirdammcp/blob/master/api/index.py"
click node_fastmcp "https://github.com/bariskisir/izmirdammcp/blob/master/api/server.py"
click node_status_tool "https://github.com/bariskisir/izmirdammcp/blob/master/api/server.py"
click node_date_default "https://github.com/bariskisir/izmirdammcp/blob/master/api/server.py"
click node_name_filter "https://github.com/bariskisir/izmirdammcp/blob/master/api/server.py"
click node_turkish_lower "https://github.com/bariskisir/izmirdammcp/blob/master/api/server.py"
click node_cache "https://github.com/bariskisir/izmirdammcp/blob/master/api/server.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_http_app,node_fastmcp,node_client toneBlue
class node_status_tool,node_date_default,node_name_filter,node_turkish_lower toneAmber
class node_cache,node_izsu toneMint
```

## Components

### MCP entry

- [HTTP app](https://github.com/bariskisir/izmirdammcp/blob/master/api/index.py): `api/index.py`
- [FastMCP runtime](https://github.com/bariskisir/izmirdammcp/blob/master/api/server.py): `api/server.py`

### Status retrieval

- [Status tool](https://github.com/bariskisir/izmirdammcp/blob/master/api/server.py): `api/server.py`
- [Date default](https://github.com/bariskisir/izmirdammcp/blob/master/api/server.py): `api/server.py`
- [Name filter](https://github.com/bariskisir/izmirdammcp/blob/master/api/server.py): `api/server.py`
- [Turkish lowercase](https://github.com/bariskisir/izmirdammcp/blob/master/api/server.py): `api/server.py`

### Data sources

- [Date cache](https://github.com/bariskisir/izmirdammcp/blob/master/api/server.py): `api/server.py`
- **IZSU API**

### Other components

- **MCP client**

## Connections

- MCP client → HTTP app: sends request
- HTTP app → FastMCP runtime: serves app
- FastMCP runtime → Status tool: dispatches tool
- Status tool → Date default: defaults date
- Status tool → Date cache: reads or writes
- Status tool → IZSU API: fetches data
- Status tool → Name filter: filters results
- Name filter → Turkish lowercase: normalizes names
- Status tool → FastMCP runtime: returns result
