# saidsurucu/yoktez-mcp architecture

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

- Interactive diagram: https://gitdiagram.com/saidsurucu/yoktez-mcp
- Repository: https://github.com/saidsurucu/yoktez-mcp

## Overview

YokTez MCP exposes YÖK National Thesis Center search and thesis-document access as MCP tools for LLM clients. The main workflow is an MCP request routed by the server to the API client, which queries YÖK and returns typed results; document requests additionally produce page-based Markdown from PDF content. The README also describes recent-thesis lists, department lookup/search, and rich metadata. The client, cache, and models excerpts establish internal layers; finer PDF-processing internals are not shown.

Main entry points: [`client.py`](https://github.com/saidsurucu/yoktez-mcp/blob/main/client.py) (YÖK API client), [`yoktez_mcp_server.py`](https://github.com/saidsurucu/yoktez-mcp/blob/main/yoktez_mcp_server.py) (FastMCP server), [`models.py`](https://github.com/saidsurucu/yoktez-mcp/blob/main/models.py) (Search results), [`cache.py`](https://github.com/saidsurucu/yoktez-mcp/blob/main/cache.py) (PDF cache)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["MCP interface"]
  node_server["FastMCP server"]
  node_search_tool["Detailed search"]
  node_recent_tool["Recent lists"]
  node_department_tools["Department tools"]
  node_details_tool["Thesis details"]
  node_document_tool["Document Markdown"]
end

subgraph group_access["Thesis access"]
  node_api_client["YÖK API client<br/>[client.py]"]
  node_yok["YÖK Thesis Center"]
  node_search_results["Search results<br/>[models.py]"]
  node_recent_results["Recent results<br/>[models.py]"]
  node_department_data["Department data<br/>[models.py]"]
  node_thesis_metadata["Thesis metadata<br/>[models.py]"]
  node_pdf_markdown["PDF page Markdown<br/>[models.py]"]
end

subgraph group_internals["Internal services"]
  node_cache[("PDF cache<br/>[cache.py]")]
  node_request_models["Request models<br/>[models.py]"]
end

node_mcp_user(("MCP client"))

node_mcp_user -->|"sends tools"| node_server
node_server -->|"registers tool"| node_search_tool
node_server -->|"registers tool"| node_recent_tool
node_server -->|"registers tools"| node_department_tools
node_server -->|"registers tool"| node_details_tool
node_server -->|"registers tool"| node_document_tool
node_search_tool -->|"calls search"| node_api_client
node_recent_tool -->|"calls list"| node_api_client
node_department_tools -->|"calls lookup"| node_api_client
node_details_tool -->|"calls details"| node_api_client
node_document_tool -->|"calls conversion"| node_api_client
node_api_client -->|"queries"| node_yok
node_api_client -->|"returns"| node_search_results
node_api_client -->|"returns"| node_recent_results
node_api_client -->|"returns"| node_department_data
node_api_client -->|"returns"| node_thesis_metadata
node_api_client -->|"returns"| node_pdf_markdown
node_search_tool -->|"builds request"| node_request_models
node_api_client -->|"uses cache"| node_cache

click node_server "https://github.com/saidsurucu/yoktez-mcp/blob/main/yoktez_mcp_server.py"
click node_search_tool "https://github.com/saidsurucu/yoktez-mcp/blob/main/yoktez_mcp_server.py"
click node_recent_tool "https://github.com/saidsurucu/yoktez-mcp/blob/main/yoktez_mcp_server.py"
click node_department_tools "https://github.com/saidsurucu/yoktez-mcp/blob/main/yoktez_mcp_server.py"
click node_details_tool "https://github.com/saidsurucu/yoktez-mcp/blob/main/yoktez_mcp_server.py"
click node_document_tool "https://github.com/saidsurucu/yoktez-mcp/blob/main/yoktez_mcp_server.py"
click node_api_client "https://github.com/saidsurucu/yoktez-mcp/blob/main/client.py"
click node_search_results "https://github.com/saidsurucu/yoktez-mcp/blob/main/models.py"
click node_recent_results "https://github.com/saidsurucu/yoktez-mcp/blob/main/models.py"
click node_department_data "https://github.com/saidsurucu/yoktez-mcp/blob/main/models.py"
click node_thesis_metadata "https://github.com/saidsurucu/yoktez-mcp/blob/main/models.py"
click node_pdf_markdown "https://github.com/saidsurucu/yoktez-mcp/blob/main/models.py"
click node_cache "https://github.com/saidsurucu/yoktez-mcp/blob/main/cache.py"
click node_request_models "https://github.com/saidsurucu/yoktez-mcp/blob/main/models.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_search_tool,node_recent_tool,node_department_tools,node_details_tool,node_document_tool,node_mcp_user toneBlue
class node_api_client,node_yok,node_search_results,node_recent_results,node_department_data,node_thesis_metadata,node_pdf_markdown toneAmber
class node_cache,node_request_models toneMint
```

## Components

### MCP interface

- [FastMCP server](https://github.com/saidsurucu/yoktez-mcp/blob/main/yoktez_mcp_server.py): `yoktez_mcp_server.py`
- [Detailed search](https://github.com/saidsurucu/yoktez-mcp/blob/main/yoktez_mcp_server.py): `yoktez_mcp_server.py`
- [Recent lists](https://github.com/saidsurucu/yoktez-mcp/blob/main/yoktez_mcp_server.py): `yoktez_mcp_server.py`
- [Department tools](https://github.com/saidsurucu/yoktez-mcp/blob/main/yoktez_mcp_server.py): `yoktez_mcp_server.py`
- [Thesis details](https://github.com/saidsurucu/yoktez-mcp/blob/main/yoktez_mcp_server.py): `yoktez_mcp_server.py`
- [Document Markdown](https://github.com/saidsurucu/yoktez-mcp/blob/main/yoktez_mcp_server.py): `yoktez_mcp_server.py`

### Thesis access

- [YÖK API client](https://github.com/saidsurucu/yoktez-mcp/blob/main/client.py): `client.py`
- **YÖK Thesis Center**
- [Search results](https://github.com/saidsurucu/yoktez-mcp/blob/main/models.py): `models.py`
- [Recent results](https://github.com/saidsurucu/yoktez-mcp/blob/main/models.py): `models.py`
- [Department data](https://github.com/saidsurucu/yoktez-mcp/blob/main/models.py): `models.py`
- [Thesis metadata](https://github.com/saidsurucu/yoktez-mcp/blob/main/models.py): `models.py`
- [PDF page Markdown](https://github.com/saidsurucu/yoktez-mcp/blob/main/models.py): `models.py`

### Internal services

- [PDF cache](https://github.com/saidsurucu/yoktez-mcp/blob/main/cache.py): `cache.py`
- [Request models](https://github.com/saidsurucu/yoktez-mcp/blob/main/models.py): `models.py`

### Other components

- **MCP client**

## Connections

- MCP client → FastMCP server: sends tools (evidence: `README.md`)
- FastMCP server → Detailed search: registers tool (evidence: `yoktez_mcp_server.py`)
- FastMCP server → Recent lists: registers tool (evidence: `README.md`)
- FastMCP server → Department tools: registers tools (evidence: `README.md`)
- FastMCP server → Thesis details: registers tool (evidence: `README.md`)
- FastMCP server → Document Markdown: registers tool (evidence: `README.md`)
- Detailed search → YÖK API client: calls search (evidence: `yoktez_mcp_server.py`)
- Recent lists → YÖK API client: calls list (evidence: `yoktez_mcp_server.py`)
- Department tools → YÖK API client: calls lookup (evidence: `yoktez_mcp_server.py`)
- Thesis details → YÖK API client: calls details (evidence: `yoktez_mcp_server.py`)
- Document Markdown → YÖK API client: calls conversion (evidence: `yoktez_mcp_server.py`)
- YÖK API client → YÖK Thesis Center: queries (evidence: `client.py`)
- YÖK API client → Search results: returns (evidence: `client.py`)
- YÖK API client → Recent results: returns (evidence: `client.py`)
- YÖK API client → Department data: returns (evidence: `client.py`)
- YÖK API client → Thesis metadata: returns (evidence: `client.py`)
- YÖK API client → PDF page Markdown: returns (evidence: `README.md`)
- Detailed search → Request models: builds request (evidence: `yoktez_mcp_server.py`)
- YÖK API client → PDF cache: uses cache (evidence: `client.py`)
