# yigitkonur/mcp-parasut architecture

> Architecture diagram of the GitHub repository yigitkonur/mcp-parasut, 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/yigitkonur/mcp-parasut
- Repository: https://github.com/yigitkonur/mcp-parasut

## Overview

This monorepo provides a typed Paraşüt REST API SDK and an MCP server that exposes accounting operations to AI clients. The main workflow is an MCP client calling a registered tool; the server dispatches it to a domain handler, which uses the shared SDK client to access Paraşüt and formats a response. The SDK also serves direct Node.js callers. The graph includes the documented HTTP/OAuth server mode and major accounting domains. Some relationships and capabilities are based on README or source-index references; unsampled tool implementations are not assumed to call specific SDK resources.

Main entry points: [`packages/parasut-node-sdk/src/client/ParasutClient.ts`](https://github.com/yigitkonur/mcp-parasut/blob/main/packages/parasut-node-sdk/src/client/ParasutClient.ts) (Paraşüt SDK client), [`packages/parasut-mcp-server/src/tools/index.ts`](https://github.com/yigitkonur/mcp-parasut/blob/main/packages/parasut-mcp-server/src/tools/index.ts) (Tool registry), [`packages/parasut-mcp-server/src/server.ts`](https://github.com/yigitkonur/mcp-parasut/blob/main/packages/parasut-mcp-server/src/server.ts) (MCP server entry), [`packages/parasut-mcp-server/src/client.ts`](https://github.com/yigitkonur/mcp-parasut/blob/main/packages/parasut-mcp-server/src/client.ts) (SDK client singleton)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_mcp["MCP server"]
  node_mcp_server["MCP server entry<br/>[server.ts]"]
  node_http_server["HTTP transport server<br/>[http.ts]"]
  node_mcp_config["Server configuration<br/>[config.ts]"]
  node_tool_registry["Tool registry<br/>[index.ts]"]
  node_mcp_client["SDK client singleton<br/>[client.ts]"]
  node_response_format["Tool responses and errors<br/>[response.ts]"]
end

subgraph group_sdk["SDK runtime"]
  node_sdk_client["Paraşüt SDK client<br/>[ParasutClient.ts]"]
  node_http_transport["HTTP transport<br/>[HttpTransport.ts]"]
  node_query_builder["Query builder<br/>[QueryBuilder.ts]"]
  node_rate_limiter["Rate limiter<br/>[RateLimiter.ts]"]
  node_retry_handler["Retry handler<br/>[RetryHandler.ts]"]
  node_resource_base["Resource CRUD base<br/>[BaseResource.ts]"]
  node_job_tracking["Async job tracking<br/>[trackableJobs.ts]"]
  node_sdk_errors["SDK error types<br/>[errors.ts]"]
end

subgraph group_domains["Accounting domains"]
  node_contacts_tools["Contact tools<br/>[contacts.ts]"]
  node_invoice_tools["Sales invoice tools<br/>[invoices.ts]"]
  node_bill_tools["Purchase bill tools<br/>[bills.ts]"]
  node_edoc_tools["E-document tools<br/>[edocuments.ts]"]
  node_finance_tools["Financial tools<br/>[financial.ts]"]
  node_inventory_tools["Inventory tools<br/>[inventory.ts]"]
  node_product_tools["Product tools<br/>[products.ts]"]
  node_organization_tools["Organization tools<br/>[organization.ts]"]
  node_sales_resources["Sales resources<br/>[salesInvoices.ts]"]
  node_purchase_resources["Purchase resources<br/>[purchaseBills.ts]"]
  node_contact_resources["Contact resources<br/>[contacts.ts]"]
  node_catalog_resources["Products and inventory<br/>[products.ts]"]
  node_edoc_resources["E-document resources<br/>[eInvoices.ts]"]
  node_financial_resources["Financial resources<br/>[transactions.ts]"]
end

subgraph group_auth["Authentication and delivery"]
  node_oauth_server["OAuth endpoints<br/>[oauth.ts]"]
  node_sdk_oauth["OAuth manager<br/>[OAuth.ts]"]
end

node_ai_client(("MCP client"))
node_parasut_api{{"Paraşüt API"}}

node_ai_client -->|"calls tools"| node_mcp_server
node_mcp_server -->|"loads config"| node_mcp_config
node_mcp_server -->|"initializes client"| node_mcp_client
node_mcp_server -->|"dispatches calls"| node_tool_registry
node_mcp_server -->|"starts HTTP mode"| node_http_server
node_ai_client -.->|"uses HTTP mode"| node_http_server
node_http_server -->|"loads config"| node_mcp_config
node_http_server -->|"uses OAuth routes"| node_oauth_server
node_tool_registry -->|"dispatches tools"| node_contacts_tools
node_tool_registry -->|"dispatches tools"| node_invoice_tools
node_tool_registry -->|"dispatches tools"| node_bill_tools
node_tool_registry -->|"dispatches tools"| node_edoc_tools
node_tool_registry -->|"dispatches tools"| node_finance_tools
node_tool_registry -->|"dispatches tools"| node_inventory_tools
node_tool_registry -->|"dispatches tools"| node_product_tools
node_tool_registry -->|"dispatches tools"| node_organization_tools
node_mcp_client -->|"creates SDK client"| node_sdk_client
node_contacts_tools -->|"uses shared client"| node_mcp_client
node_invoice_tools -->|"uses shared client"| node_mcp_client
node_edoc_tools -->|"uses shared client"| node_mcp_client
node_contacts_tools -->|"formats responses"| node_response_format
node_invoice_tools -->|"formats responses"| node_response_format
node_edoc_tools -->|"formats responses"| node_response_format
node_sdk_client -->|"manages authentication"| node_sdk_oauth
node_sdk_client -->|"sends API requests"| node_http_transport
node_sdk_client -->|"limits requests"| node_rate_limiter
node_sdk_client -->|"retries requests"| node_retry_handler
node_sdk_client -->|"exposes resources"| node_sales_resources
node_sdk_client -->|"exposes resources"| node_purchase_resources
node_sdk_client -->|"exposes resources"| node_contact_resources
node_sdk_client -->|"exposes resources"| node_catalog_resources
node_sdk_client -->|"exposes resources"| node_edoc_resources
node_sdk_client -->|"exposes job tracking"| node_job_tracking
node_sdk_client -->|"exposes resources"| node_financial_resources
node_resource_base -->|"sends CRUD requests"| node_http_transport
node_resource_base -->|"builds queries"| node_query_builder
node_job_tracking -->|"polls job status"| node_http_transport
node_http_transport -->|"creates API errors"| node_sdk_errors
node_parasut_api -.->|"serves REST API"| node_http_transport
node_sdk_oauth -.->|"authenticates requests"| node_parasut_api

click node_mcp_server "https://github.com/yigitkonur/mcp-parasut/blob/main/packages/parasut-mcp-server/src/server.ts"
click node_http_server "https://github.com/yigitkonur/mcp-parasut/blob/main/packages/parasut-mcp-server/src/http.ts"
click node_mcp_config "https://github.com/yigitkonur/mcp-parasut/blob/main/packages/parasut-mcp-server/src/config.ts"
click node_oauth_server "https://github.com/yigitkonur/mcp-parasut/blob/main/packages/parasut-mcp-server/src/oauth.ts"
click node_tool_registry "https://github.com/yigitkonur/mcp-parasut/blob/main/packages/parasut-mcp-server/src/tools/index.ts"
click node_contacts_tools "https://github.com/yigitkonur/mcp-parasut/blob/main/packages/parasut-mcp-server/src/tools/contacts.ts"
click node_invoice_tools "https://github.com/yigitkonur/mcp-parasut/blob/main/packages/parasut-mcp-server/src/tools/invoices.ts"
click node_bill_tools "https://github.com/yigitkonur/mcp-parasut/blob/main/packages/parasut-mcp-server/src/tools/bills.ts"
click node_edoc_tools "https://github.com/yigitkonur/mcp-parasut/blob/main/packages/parasut-mcp-server/src/tools/edocuments.ts"
click node_finance_tools "https://github.com/yigitkonur/mcp-parasut/blob/main/packages/parasut-mcp-server/src/tools/financial.ts"
click node_inventory_tools "https://github.com/yigitkonur/mcp-parasut/blob/main/packages/parasut-mcp-server/src/tools/inventory.ts"
click node_product_tools "https://github.com/yigitkonur/mcp-parasut/blob/main/packages/parasut-mcp-server/src/tools/products.ts"
click node_organization_tools "https://github.com/yigitkonur/mcp-parasut/blob/main/packages/parasut-mcp-server/src/tools/organization.ts"
click node_mcp_client "https://github.com/yigitkonur/mcp-parasut/blob/main/packages/parasut-mcp-server/src/client.ts"
click node_response_format "https://github.com/yigitkonur/mcp-parasut/blob/main/packages/parasut-mcp-server/src/utils/response.ts"
click node_sdk_client "https://github.com/yigitkonur/mcp-parasut/blob/main/packages/parasut-node-sdk/src/client/ParasutClient.ts"
click node_sdk_oauth "https://github.com/yigitkonur/mcp-parasut/blob/main/packages/parasut-node-sdk/src/client/OAuth.ts"
click node_http_transport "https://github.com/yigitkonur/mcp-parasut/blob/main/packages/parasut-node-sdk/src/client/HttpTransport.ts"
click node_query_builder "https://github.com/yigitkonur/mcp-parasut/blob/main/packages/parasut-node-sdk/src/client/QueryBuilder.ts"
click node_rate_limiter "https://github.com/yigitkonur/mcp-parasut/blob/main/packages/parasut-node-sdk/src/client/RateLimiter.ts"
click node_retry_handler "https://github.com/yigitkonur/mcp-parasut/blob/main/packages/parasut-node-sdk/src/client/RetryHandler.ts"
click node_resource_base "https://github.com/yigitkonur/mcp-parasut/blob/main/packages/parasut-node-sdk/src/resources/BaseResource.ts"
click node_sales_resources "https://github.com/yigitkonur/mcp-parasut/blob/main/packages/parasut-node-sdk/src/resources/salesInvoices.ts"
click node_purchase_resources "https://github.com/yigitkonur/mcp-parasut/blob/main/packages/parasut-node-sdk/src/resources/purchaseBills.ts"
click node_contact_resources "https://github.com/yigitkonur/mcp-parasut/blob/main/packages/parasut-node-sdk/src/resources/contacts.ts"
click node_catalog_resources "https://github.com/yigitkonur/mcp-parasut/blob/main/packages/parasut-node-sdk/src/resources/products.ts"
click node_edoc_resources "https://github.com/yigitkonur/mcp-parasut/blob/main/packages/parasut-node-sdk/src/resources/eInvoices.ts"
click node_job_tracking "https://github.com/yigitkonur/mcp-parasut/blob/main/packages/parasut-node-sdk/src/resources/trackableJobs.ts"
click node_financial_resources "https://github.com/yigitkonur/mcp-parasut/blob/main/packages/parasut-node-sdk/src/resources/transactions.ts"
click node_sdk_errors "https://github.com/yigitkonur/mcp-parasut/blob/main/packages/parasut-node-sdk/src/client/errors.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_mcp_server,node_http_server,node_mcp_config,node_tool_registry,node_mcp_client,node_response_format,node_ai_client toneBlue
class node_sdk_client,node_http_transport,node_query_builder,node_rate_limiter,node_retry_handler,node_resource_base,node_job_tracking,node_sdk_errors toneAmber
class node_contacts_tools,node_invoice_tools,node_bill_tools,node_edoc_tools,node_finance_tools,node_inventory_tools,node_product_tools,node_organization_tools,node_sales_resources,node_purchase_resources,node_contact_resources,node_catalog_resources,node_edoc_resources,node_financial_resources,node_parasut_api toneMint
class node_oauth_server,node_sdk_oauth toneRose
```

## Components

### MCP server

- [MCP server entry](https://github.com/yigitkonur/mcp-parasut/blob/main/packages/parasut-mcp-server/src/server.ts): `packages/parasut-mcp-server/src/server.ts`
- [HTTP transport server](https://github.com/yigitkonur/mcp-parasut/blob/main/packages/parasut-mcp-server/src/http.ts): `packages/parasut-mcp-server/src/http.ts`
- [Server configuration](https://github.com/yigitkonur/mcp-parasut/blob/main/packages/parasut-mcp-server/src/config.ts): `packages/parasut-mcp-server/src/config.ts`
- [Tool registry](https://github.com/yigitkonur/mcp-parasut/blob/main/packages/parasut-mcp-server/src/tools/index.ts): `packages/parasut-mcp-server/src/tools/index.ts`
- [SDK client singleton](https://github.com/yigitkonur/mcp-parasut/blob/main/packages/parasut-mcp-server/src/client.ts): `packages/parasut-mcp-server/src/client.ts`
- [Tool responses and errors](https://github.com/yigitkonur/mcp-parasut/blob/main/packages/parasut-mcp-server/src/utils/response.ts): `packages/parasut-mcp-server/src/utils/response.ts`

### SDK runtime

- [Paraşüt SDK client](https://github.com/yigitkonur/mcp-parasut/blob/main/packages/parasut-node-sdk/src/client/ParasutClient.ts): `packages/parasut-node-sdk/src/client/ParasutClient.ts`
- [HTTP transport](https://github.com/yigitkonur/mcp-parasut/blob/main/packages/parasut-node-sdk/src/client/HttpTransport.ts): `packages/parasut-node-sdk/src/client/HttpTransport.ts`
- [Query builder](https://github.com/yigitkonur/mcp-parasut/blob/main/packages/parasut-node-sdk/src/client/QueryBuilder.ts): `packages/parasut-node-sdk/src/client/QueryBuilder.ts`
- [Rate limiter](https://github.com/yigitkonur/mcp-parasut/blob/main/packages/parasut-node-sdk/src/client/RateLimiter.ts): `packages/parasut-node-sdk/src/client/RateLimiter.ts`
- [Retry handler](https://github.com/yigitkonur/mcp-parasut/blob/main/packages/parasut-node-sdk/src/client/RetryHandler.ts): `packages/parasut-node-sdk/src/client/RetryHandler.ts`
- [Resource CRUD base](https://github.com/yigitkonur/mcp-parasut/blob/main/packages/parasut-node-sdk/src/resources/BaseResource.ts): `packages/parasut-node-sdk/src/resources/BaseResource.ts`
- [Async job tracking](https://github.com/yigitkonur/mcp-parasut/blob/main/packages/parasut-node-sdk/src/resources/trackableJobs.ts): `packages/parasut-node-sdk/src/resources/trackableJobs.ts`
- [SDK error types](https://github.com/yigitkonur/mcp-parasut/blob/main/packages/parasut-node-sdk/src/client/errors.ts): `packages/parasut-node-sdk/src/client/errors.ts`

### Accounting domains

- [Contact tools](https://github.com/yigitkonur/mcp-parasut/blob/main/packages/parasut-mcp-server/src/tools/contacts.ts): `packages/parasut-mcp-server/src/tools/contacts.ts`
- [Sales invoice tools](https://github.com/yigitkonur/mcp-parasut/blob/main/packages/parasut-mcp-server/src/tools/invoices.ts): `packages/parasut-mcp-server/src/tools/invoices.ts`
- [Purchase bill tools](https://github.com/yigitkonur/mcp-parasut/blob/main/packages/parasut-mcp-server/src/tools/bills.ts): `packages/parasut-mcp-server/src/tools/bills.ts`
- [E-document tools](https://github.com/yigitkonur/mcp-parasut/blob/main/packages/parasut-mcp-server/src/tools/edocuments.ts): `packages/parasut-mcp-server/src/tools/edocuments.ts`
- [Financial tools](https://github.com/yigitkonur/mcp-parasut/blob/main/packages/parasut-mcp-server/src/tools/financial.ts): `packages/parasut-mcp-server/src/tools/financial.ts`
- [Inventory tools](https://github.com/yigitkonur/mcp-parasut/blob/main/packages/parasut-mcp-server/src/tools/inventory.ts): `packages/parasut-mcp-server/src/tools/inventory.ts`
- [Product tools](https://github.com/yigitkonur/mcp-parasut/blob/main/packages/parasut-mcp-server/src/tools/products.ts): `packages/parasut-mcp-server/src/tools/products.ts`
- [Organization tools](https://github.com/yigitkonur/mcp-parasut/blob/main/packages/parasut-mcp-server/src/tools/organization.ts): `packages/parasut-mcp-server/src/tools/organization.ts`
- [Sales resources](https://github.com/yigitkonur/mcp-parasut/blob/main/packages/parasut-node-sdk/src/resources/salesInvoices.ts): `packages/parasut-node-sdk/src/resources/salesInvoices.ts`
- [Purchase resources](https://github.com/yigitkonur/mcp-parasut/blob/main/packages/parasut-node-sdk/src/resources/purchaseBills.ts): `packages/parasut-node-sdk/src/resources/purchaseBills.ts`
- [Contact resources](https://github.com/yigitkonur/mcp-parasut/blob/main/packages/parasut-node-sdk/src/resources/contacts.ts): `packages/parasut-node-sdk/src/resources/contacts.ts`
- [Products and inventory](https://github.com/yigitkonur/mcp-parasut/blob/main/packages/parasut-node-sdk/src/resources/products.ts): `packages/parasut-node-sdk/src/resources/products.ts`
- [E-document resources](https://github.com/yigitkonur/mcp-parasut/blob/main/packages/parasut-node-sdk/src/resources/eInvoices.ts): `packages/parasut-node-sdk/src/resources/eInvoices.ts`
- [Financial resources](https://github.com/yigitkonur/mcp-parasut/blob/main/packages/parasut-node-sdk/src/resources/transactions.ts): `packages/parasut-node-sdk/src/resources/transactions.ts`

### Authentication and delivery

- [OAuth endpoints](https://github.com/yigitkonur/mcp-parasut/blob/main/packages/parasut-mcp-server/src/oauth.ts): `packages/parasut-mcp-server/src/oauth.ts`
- [OAuth manager](https://github.com/yigitkonur/mcp-parasut/blob/main/packages/parasut-node-sdk/src/client/OAuth.ts): `packages/parasut-node-sdk/src/client/OAuth.ts`

### Other components

- **MCP client**
- **Paraşüt API**

## Connections

- MCP client → MCP server entry: calls tools (evidence: `packages/parasut-mcp-server/src/server.ts`)
- MCP server entry → Server configuration: loads config (evidence: `packages/parasut-mcp-server/src/server.ts`)
- MCP server entry → SDK client singleton: initializes client (evidence: `packages/parasut-mcp-server/src/server.ts`)
- MCP server entry → Tool registry: dispatches calls (evidence: `packages/parasut-mcp-server/src/server.ts`)
- MCP server entry → HTTP transport server: starts HTTP mode (evidence: `packages/parasut-mcp-server/src/server.ts`)
- MCP client → HTTP transport server: uses HTTP mode
- HTTP transport server → Server configuration: loads config (evidence: `packages/parasut-mcp-server/src/http.ts`)
- HTTP transport server → OAuth endpoints: uses OAuth routes (evidence: `packages/parasut-mcp-server/src/http.ts`)
- Tool registry → Contact tools: dispatches tools (evidence: `packages/parasut-mcp-server/src/tools/index.ts`)
- Tool registry → Sales invoice tools: dispatches tools (evidence: `packages/parasut-mcp-server/src/tools/index.ts`)
- Tool registry → Purchase bill tools: dispatches tools (evidence: `packages/parasut-mcp-server/src/tools/index.ts`)
- Tool registry → E-document tools: dispatches tools (evidence: `packages/parasut-mcp-server/src/tools/index.ts`)
- Tool registry → Financial tools: dispatches tools (evidence: `packages/parasut-mcp-server/src/tools/index.ts`)
- Tool registry → Inventory tools: dispatches tools (evidence: `packages/parasut-mcp-server/src/tools/index.ts`)
- Tool registry → Product tools: dispatches tools (evidence: `packages/parasut-mcp-server/src/tools/index.ts`)
- Tool registry → Organization tools: dispatches tools (evidence: `packages/parasut-mcp-server/src/tools/index.ts`)
- SDK client singleton → Paraşüt SDK client: creates SDK client (evidence: `packages/parasut-mcp-server/src/client.ts`)
- Contact tools → SDK client singleton: uses shared client (evidence: `packages/parasut-mcp-server/src/tools/contacts.ts`)
- Sales invoice tools → SDK client singleton: uses shared client (evidence: `packages/parasut-mcp-server/src/tools/invoices.ts`)
- E-document tools → SDK client singleton: uses shared client (evidence: `packages/parasut-mcp-server/src/tools/edocuments.ts`)
- Contact tools → Tool responses and errors: formats responses (evidence: `packages/parasut-mcp-server/src/tools/contacts.ts`)
- Sales invoice tools → Tool responses and errors: formats responses (evidence: `packages/parasut-mcp-server/src/tools/invoices.ts`)
- E-document tools → Tool responses and errors: formats responses (evidence: `packages/parasut-mcp-server/src/tools/edocuments.ts`)
- Paraşüt SDK client → OAuth manager: manages authentication (evidence: `packages/parasut-node-sdk/src/client/ParasutClient.ts`)
- Paraşüt SDK client → HTTP transport: sends API requests (evidence: `packages/parasut-node-sdk/src/client/ParasutClient.ts`)
- Paraşüt SDK client → Rate limiter: limits requests (evidence: `packages/parasut-node-sdk/src/client/ParasutClient.ts`)
- Paraşüt SDK client → Retry handler: retries requests (evidence: `packages/parasut-node-sdk/src/client/ParasutClient.ts`)
- Paraşüt SDK client → Sales resources: exposes resources (evidence: `packages/parasut-node-sdk/src/client/ParasutClient.ts`)
- Paraşüt SDK client → Purchase resources: exposes resources (evidence: `packages/parasut-node-sdk/src/client/ParasutClient.ts`)
- Paraşüt SDK client → Contact resources: exposes resources (evidence: `packages/parasut-node-sdk/src/client/ParasutClient.ts`)
- Paraşüt SDK client → Products and inventory: exposes resources (evidence: `packages/parasut-node-sdk/src/client/ParasutClient.ts`)
- Paraşüt SDK client → E-document resources: exposes resources (evidence: `packages/parasut-node-sdk/src/client/ParasutClient.ts`)
- Paraşüt SDK client → Async job tracking: exposes job tracking (evidence: `packages/parasut-node-sdk/src/client/ParasutClient.ts`)
- Paraşüt SDK client → Financial resources: exposes resources (evidence: `packages/parasut-node-sdk/src/client/ParasutClient.ts`)
- Resource CRUD base → HTTP transport: sends CRUD requests (evidence: `packages/parasut-node-sdk/src/resources/BaseResource.ts`)
- Resource CRUD base → Query builder: builds queries (evidence: `packages/parasut-node-sdk/src/resources/BaseResource.ts`)
- Async job tracking → HTTP transport: polls job status (evidence: `packages/parasut-node-sdk/src/resources/trackableJobs.ts`)
- HTTP transport → SDK error types: creates API errors (evidence: `packages/parasut-node-sdk/src/client/HttpTransport.ts`)
- Paraşüt API → HTTP transport: serves REST API
- OAuth manager → Paraşüt API: authenticates requests
