# yosefhayim/ebay-mcp architecture

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

- Interactive diagram: https://gitdiagram.com/yosefhayim/ebay-mcp
- Repository: https://github.com/yosefhayim/ebay-mcp

## Overview

eBay MCP is a local server that lets AI assistants invoke eBay Sell, Commerce, and Developer APIs. The main workflow starts at the server entry point, creates an MCP runtime, exposes registered tools, and routes tool handlers through the API facade and clients to eBay. OAuth supplies API credentials; schemas validate inputs, while tool UI mappings and skill generation provide additional assistant-facing capabilities. The README documents the broad API families; unsampled domain implementations are represented at their existing directory paths, with relationships omitted where source evidence was unavailable.

Main entry points: [`src/mcp/runtime.ts`](https://github.com/yosefhayim/ebay-mcp/blob/main/src/mcp/runtime.ts) (MCP runtime), [`src/index.ts`](https://github.com/yosefhayim/ebay-mcp/blob/main/src/index.ts) (Server entry), [`src/tools/registry.ts`](https://github.com/yosefhayim/ebay-mcp/blob/main/src/tools/registry.ts) (Tool registry), [`src/tools/categories`](https://github.com/yosefhayim/ebay-mcp/tree/main/src/tools/categories) (Tool categories)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_server["MCP Server"]
  node_entry["Server entry<br/>[index.ts]"]
  node_runtime["MCP runtime<br/>[runtime.ts]"]
  node_http["HTTP transport<br/>[httpTransport.ts]"]
end

subgraph group_auth["Authentication"]
  node_oauth["OAuth client<br/>[oauth.ts]"]
  node_token["Token verifier<br/>[tokenVerifier.ts]"]
end

subgraph group_tools["Tool Interface"]
  node_registry["Tool registry<br/>[registry.ts]"]
  node_categories["Tool categories"]
  node_schemas["Input schemas"]
end

subgraph group_apis["eBay API Domains"]
  node_facade["eBay API facade<br/>[ebaySellerApi.ts]"]
  node_client["REST API client<br/>[ebayApiClient.ts]"]
  node_feed["Inventory and feeds"]
  node_fulfillment["Orders and fulfillment<br/>[fulfillment.ts]"]
  node_marketing["Marketing and analytics"]
  node_otherdomains["Other API families"]
end

subgraph group_support["Assistant Support"]
  node_ui["Tool UI models<br/>[viewModels.ts]"]
  node_skills["Skill generation<br/>[index.ts]"]
end

node_assistant(("AI assistant"))
node_ebay(("eBay APIs"))

node_assistant -->|"starts server"| node_entry
node_entry -->|"creates runtime"| node_runtime
node_entry -.->|"supports HTTP"| node_http
node_assistant -->|"uses MCP"| node_runtime
node_runtime -->|"loads tools"| node_registry
node_registry -->|"registers families"| node_categories
node_categories -->|"invokes API"| node_facade
node_categories -->|"validates inputs"| node_schemas
node_runtime -->|"initializes API"| node_facade
node_facade -.->|"uses client"| node_client
node_client -->|"gets tokens"| node_oauth
node_http -->|"verifies tokens"| node_token
node_client -->|"sends requests"| node_ebay
node_feed -->|"accesses APIs"| node_ebay
node_fulfillment -->|"accesses APIs"| node_ebay
node_marketing -->|"accesses APIs"| node_ebay
node_otherdomains -->|"accesses APIs"| node_ebay
node_registry -->|"builds UI models"| node_ui
node_assistant -.->|"generates guidance"| node_skills

click node_entry "https://github.com/yosefhayim/ebay-mcp/blob/main/src/index.ts"
click node_runtime "https://github.com/yosefhayim/ebay-mcp/blob/main/src/mcp/runtime.ts"
click node_http "https://github.com/yosefhayim/ebay-mcp/blob/main/src/mcp/httpTransport.ts"
click node_oauth "https://github.com/yosefhayim/ebay-mcp/blob/main/src/auth/oauth.ts"
click node_token "https://github.com/yosefhayim/ebay-mcp/blob/main/src/auth/tokenVerifier.ts"
click node_registry "https://github.com/yosefhayim/ebay-mcp/blob/main/src/tools/registry.ts"
click node_categories "https://github.com/yosefhayim/ebay-mcp/tree/main/src/tools/categories"
click node_schemas "https://github.com/yosefhayim/ebay-mcp/tree/main/src/schemas"
click node_ui "https://github.com/yosefhayim/ebay-mcp/blob/main/src/tools/ui/viewModels.ts"
click node_skills "https://github.com/yosefhayim/ebay-mcp/blob/main/src/skills/index.ts"
click node_facade "https://github.com/yosefhayim/ebay-mcp/blob/main/src/api/ebaySellerApi.ts"
click node_client "https://github.com/yosefhayim/ebay-mcp/blob/main/src/api/client/ebayApiClient.ts"
click node_feed "https://github.com/yosefhayim/ebay-mcp/tree/main/src/api/listing-management"
click node_fulfillment "https://github.com/yosefhayim/ebay-mcp/blob/main/src/api/order-management/fulfillment.ts"
click node_marketing "https://github.com/yosefhayim/ebay-mcp/tree/main/src/api/marketing-and-promotions"
click node_otherdomains "https://github.com/yosefhayim/ebay-mcp/tree/main/src/api"

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_entry,node_runtime,node_http toneBlue
class node_oauth,node_token toneAmber
class node_registry,node_categories,node_schemas,node_ebay toneMint
class node_facade,node_client,node_feed,node_fulfillment,node_marketing,node_otherdomains toneRose
class node_ui,node_skills,node_assistant toneIndigo
```

## Components

### MCP Server

- [Server entry](https://github.com/yosefhayim/ebay-mcp/blob/main/src/index.ts): `src/index.ts`
- [MCP runtime](https://github.com/yosefhayim/ebay-mcp/blob/main/src/mcp/runtime.ts): `src/mcp/runtime.ts`
- [HTTP transport](https://github.com/yosefhayim/ebay-mcp/blob/main/src/mcp/httpTransport.ts): `src/mcp/httpTransport.ts`

### Authentication

- [OAuth client](https://github.com/yosefhayim/ebay-mcp/blob/main/src/auth/oauth.ts): `src/auth/oauth.ts`
- [Token verifier](https://github.com/yosefhayim/ebay-mcp/blob/main/src/auth/tokenVerifier.ts): `src/auth/tokenVerifier.ts`

### Tool Interface

- [Tool registry](https://github.com/yosefhayim/ebay-mcp/blob/main/src/tools/registry.ts): `src/tools/registry.ts`
- [Tool categories](https://github.com/yosefhayim/ebay-mcp/tree/main/src/tools/categories): `src/tools/categories`
- [Input schemas](https://github.com/yosefhayim/ebay-mcp/tree/main/src/schemas): `src/schemas`

### eBay API Domains

- [eBay API facade](https://github.com/yosefhayim/ebay-mcp/blob/main/src/api/ebaySellerApi.ts): `src/api/ebaySellerApi.ts`
- [REST API client](https://github.com/yosefhayim/ebay-mcp/blob/main/src/api/client/ebayApiClient.ts): `src/api/client/ebayApiClient.ts`
- [Inventory and feeds](https://github.com/yosefhayim/ebay-mcp/tree/main/src/api/listing-management): `src/api/listing-management`
- [Orders and fulfillment](https://github.com/yosefhayim/ebay-mcp/blob/main/src/api/order-management/fulfillment.ts): `src/api/order-management/fulfillment.ts`
- [Marketing and analytics](https://github.com/yosefhayim/ebay-mcp/tree/main/src/api/marketing-and-promotions): `src/api/marketing-and-promotions`
- [Other API families](https://github.com/yosefhayim/ebay-mcp/tree/main/src/api): `src/api`

### Assistant Support

- [Tool UI models](https://github.com/yosefhayim/ebay-mcp/blob/main/src/tools/ui/viewModels.ts): `src/tools/ui/viewModels.ts`
- [Skill generation](https://github.com/yosefhayim/ebay-mcp/blob/main/src/skills/index.ts): `src/skills/index.ts`

### Other components

- **AI assistant**
- **eBay APIs**

## Connections

- AI assistant → Server entry: starts server
- Server entry → MCP runtime: creates runtime (evidence: `src/index.ts`)
- Server entry → HTTP transport: supports HTTP
- AI assistant → MCP runtime: uses MCP
- MCP runtime → Tool registry: loads tools (evidence: `src/mcp/runtime.ts`)
- Tool registry → Tool categories: registers families (evidence: `src/tools/registry.ts`)
- Tool categories → eBay API facade: invokes API (evidence: `src/tools/categories/fulfillment.ts`)
- Tool categories → Input schemas: validates inputs (evidence: `src/tools/categories/fulfillment.ts`)
- MCP runtime → eBay API facade: initializes API (evidence: `src/mcp/runtime.ts`)
- eBay API facade → REST API client: uses client
- REST API client → OAuth client: gets tokens (evidence: `src/api/client/ebayApiClient.ts`)
- HTTP transport → Token verifier: verifies tokens (evidence: `src/mcp/httpTransport.ts`)
- REST API client → eBay APIs: sends requests
- Inventory and feeds → eBay APIs: accesses APIs
- Orders and fulfillment → eBay APIs: accesses APIs
- Marketing and analytics → eBay APIs: accesses APIs
- Other API families → eBay APIs: accesses APIs
- Tool registry → Tool UI models: builds UI models (evidence: `src/tools/registry.ts`)
- AI assistant → Skill generation: generates guidance
