# bevren/trendyol-market-mcp architecture

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

- Interactive diagram: https://gitdiagram.com/bevren/trendyol-market-mcp
- Repository: https://github.com/bevren/trendyol-market-mcp

## Overview

This repository is an MCP server exposing Trendyol seller-account operations as tools. The principal workflow is an MCP client invoking a tool, the server validating inputs and dispatching to a Trendyol client, and that client making authenticated HTTP requests to Trendyol. Product, order, claims, finance, invoices, Q&A, webhooks, and stage test tools are distinct capability areas. Tool registration and client calls are sampled; several domain-specific registrations are documented but their implementation details were not sampled.

Main entry points: [`src/index.ts`](https://github.com/bevren/trendyol-market-mcp/blob/main/src/index.ts) (Tool server), [`src/trendyol.ts`](https://github.com/bevren/trendyol-market-mcp/blob/main/src/trendyol.ts) (Trendyol client), [`src/enums.ts`](https://github.com/bevren/trendyol-market-mcp/blob/main/src/enums.ts) (Domain constants)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_mcp["MCP interface"]
  node_server["Tool server<br/>[index.ts]"]
  node_session["Session tools<br/>[index.ts]"]
end

subgraph group_catalog["Catalog and content"]
  node_product["Product tools<br/>[index.ts]"]
  node_reference["Brand and reference tools<br/>[index.ts]"]
  node_video["Video tools<br/>[index.ts]"]
end

subgraph group_operations["Seller operations"]
  node_orders["Order and address tools<br/>[index.ts]"]
  node_claims["Claims tools<br/>[index.ts]"]
  node_finance["Finance tools<br/>[index.ts]"]
  node_invoices["Invoice tools<br/>[index.ts]"]
  node_questions["Customer Q&amp;A tools<br/>[index.ts]"]
  node_webhooks["Webhook tools<br/>[index.ts]"]
  node_stage["Stage test tools<br/>[index.ts]"]
end

subgraph group_client["API client"]
  node_constants["Domain constants<br/>[enums.ts]"]
  node_api_client["Trendyol client<br/>[trendyol.ts]"]
end

node_seller(("Seller / MCP user"))
node_mcp_host(("MCP host"))
node_trendyol_api["Trendyol Seller API"]

node_seller -.->|"invokes tools"| node_mcp_host
node_mcp_host -->|"uses stdio"| node_server
node_server -->|"registers"| node_session
node_server -->|"registers"| node_product
node_server -->|"registers"| node_reference
node_server -->|"registers"| node_video
node_server -.->|"registers"| node_orders
node_server -.->|"registers"| node_claims
node_server -.->|"registers"| node_finance
node_server -.->|"registers"| node_invoices
node_server -.->|"registers"| node_questions
node_server -.->|"registers"| node_webhooks
node_server -.->|"registers"| node_stage
node_server -->|"dispatches"| node_api_client
node_server -->|"imports"| node_constants
node_api_client -->|"sends HTTP"| node_trendyol_api

click node_server "https://github.com/bevren/trendyol-market-mcp/blob/main/src/index.ts"
click node_session "https://github.com/bevren/trendyol-market-mcp/blob/main/src/index.ts"
click node_product "https://github.com/bevren/trendyol-market-mcp/blob/main/src/index.ts"
click node_reference "https://github.com/bevren/trendyol-market-mcp/blob/main/src/index.ts"
click node_video "https://github.com/bevren/trendyol-market-mcp/blob/main/src/index.ts"
click node_orders "https://github.com/bevren/trendyol-market-mcp/blob/main/src/index.ts"
click node_claims "https://github.com/bevren/trendyol-market-mcp/blob/main/src/index.ts"
click node_finance "https://github.com/bevren/trendyol-market-mcp/blob/main/src/index.ts"
click node_invoices "https://github.com/bevren/trendyol-market-mcp/blob/main/src/index.ts"
click node_questions "https://github.com/bevren/trendyol-market-mcp/blob/main/src/index.ts"
click node_webhooks "https://github.com/bevren/trendyol-market-mcp/blob/main/src/index.ts"
click node_stage "https://github.com/bevren/trendyol-market-mcp/blob/main/src/index.ts"
click node_constants "https://github.com/bevren/trendyol-market-mcp/blob/main/src/enums.ts"
click node_api_client "https://github.com/bevren/trendyol-market-mcp/blob/main/src/trendyol.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_server,node_session,node_seller toneBlue
class node_product,node_reference,node_video toneAmber
class node_orders,node_claims,node_finance,node_invoices,node_questions,node_webhooks,node_stage,node_trendyol_api toneMint
class node_constants,node_api_client toneRose
class node_mcp_host toneIndigo
```

## Components

### MCP interface

- [Tool server](https://github.com/bevren/trendyol-market-mcp/blob/main/src/index.ts): `src/index.ts`
- [Session tools](https://github.com/bevren/trendyol-market-mcp/blob/main/src/index.ts): `src/index.ts`

### Catalog and content

- [Product tools](https://github.com/bevren/trendyol-market-mcp/blob/main/src/index.ts): `src/index.ts`
- [Brand and reference tools](https://github.com/bevren/trendyol-market-mcp/blob/main/src/index.ts): `src/index.ts`
- [Video tools](https://github.com/bevren/trendyol-market-mcp/blob/main/src/index.ts): `src/index.ts`

### Seller operations

- [Order and address tools](https://github.com/bevren/trendyol-market-mcp/blob/main/src/index.ts): `src/index.ts`
- [Claims tools](https://github.com/bevren/trendyol-market-mcp/blob/main/src/index.ts): `src/index.ts`
- [Finance tools](https://github.com/bevren/trendyol-market-mcp/blob/main/src/index.ts): `src/index.ts`
- [Invoice tools](https://github.com/bevren/trendyol-market-mcp/blob/main/src/index.ts): `src/index.ts`
- [Customer Q&A tools](https://github.com/bevren/trendyol-market-mcp/blob/main/src/index.ts): `src/index.ts`
- [Webhook tools](https://github.com/bevren/trendyol-market-mcp/blob/main/src/index.ts): `src/index.ts`
- [Stage test tools](https://github.com/bevren/trendyol-market-mcp/blob/main/src/index.ts): `src/index.ts`

### API client

- [Domain constants](https://github.com/bevren/trendyol-market-mcp/blob/main/src/enums.ts): `src/enums.ts`
- [Trendyol client](https://github.com/bevren/trendyol-market-mcp/blob/main/src/trendyol.ts): `src/trendyol.ts`

### Other components

- **Seller / MCP user**
- **MCP host**
- **Trendyol Seller API**

## Connections

- Seller / MCP user → MCP host: invokes tools (evidence: `README.md`)
- MCP host → Tool server: uses stdio (evidence: `src/index.ts`)
- Tool server → Session tools: registers (evidence: `src/index.ts`)
- Tool server → Product tools: registers (evidence: `src/index.ts`)
- Tool server → Brand and reference tools: registers (evidence: `src/index.ts`)
- Tool server → Video tools: registers (evidence: `src/index.ts`)
- Tool server → Order and address tools: registers (evidence: `README.md`)
- Tool server → Claims tools: registers (evidence: `README.md`)
- Tool server → Finance tools: registers (evidence: `README.md`)
- Tool server → Invoice tools: registers (evidence: `README.md`)
- Tool server → Customer Q&A tools: registers (evidence: `README.md`)
- Tool server → Webhook tools: registers (evidence: `README.md`)
- Tool server → Stage test tools: registers (evidence: `README.md`)
- Tool server → Trendyol client: dispatches (evidence: `src/index.ts`)
- Tool server → Domain constants: imports (evidence: `src/index.ts`)
- Trendyol client → Trendyol Seller API: sends HTTP (evidence: `src/trendyol.ts`)
