# ramasamy-24-t/mcp-server architecture

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

- Interactive diagram: https://gitdiagram.com/ramasamy-24-t/mcp-server
- Repository: https://github.com/ramasamy-24-t/mcp-server

## Overview

This repository is a least-privilege MCP server exposing lookup, knowledge-search, escalation, workflow, and Sales-delegation tools to agents. The principal workflow is an agent request entering the MCP server, passing agent/tool authorization, then receiving a data lookup or delegated result. The graph preserves README-documented tool areas even where their implementation was not sampled; those links are documented capability boundaries, not claims about unseen calls. Source excerpts show Cosmos, Search, and embedding access, plus the Sales helper; unsampled details are omitted where wiring is uncertain.

Main entry points: [`server.py`](https://github.com/ramasamy-24-t/mcp-server/blob/main/server.py) (MCP Server), [`azure_clients.py`](https://github.com/ramasamy-24-t/mcp-server/blob/main/azure_clients.py) (Cosmos Data), [`sales_invoke.py`](https://github.com/ramasamy-24-t/mcp-server/blob/main/sales_invoke.py) (Sales Agent Invoke), [`permissions.py`](https://github.com/ramasamy-24-t/mcp-server/blob/main/permissions.py) (Tool Authorization)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["MCP Boundary"]
  node_mcp["MCP Server<br/>[server.py]"]
  node_auth["Tool Authorization<br/>[permissions.py]"]
end

subgraph group_lookups["Operational Lookups"]
  node_orders["Order / Account / Device<br/>[server.py]"]
  node_customer["Customer Memory / Interactions<br/>[server.py]"]
  node_transactions["Transaction Lookup<br/>[server.py]"]
  node_workflow["Workflow Lookup<br/>[server.py]"]
  node_cosmos[("Cosmos Data<br/>[azure_clients.py]")]
end

subgraph group_knowledge["Knowledge Tools"]
  node_policy["Policy Lookup<br/>[server.py]"]
  node_vector["Vector Search<br/>[server.py]"]
  node_cases["Resolved Case Search<br/>[server.py]"]
  node_search[("Azure AI Search<br/>[azure_clients.py]")]
  node_embeddings["Query Embeddings<br/>[azure_clients.py]"]
end

subgraph group_actions["Escalation And Sales"]
  node_escalation["Escalation Package<br/>[server.py]"]
  node_sales["Sales Agent Invoke<br/>[sales_invoke.py]"]
  node_n8n["Sales n8n Agents"]
end

node_agents(("Agents / Orchestrator"))

node_agents -->|"calls tools"| node_mcp
node_mcp -->|"checks access"| node_auth
node_mcp -->|"routes lookup"| node_orders
node_mcp -->|"routes lookup"| node_customer
node_mcp -->|"routes lookup"| node_transactions
node_mcp -->|"routes lookup"| node_workflow
node_orders -->|"queries"| node_cosmos
node_customer -->|"queries"| node_cosmos
node_transactions -->|"queries"| node_cosmos
node_mcp -->|"routes lookup"| node_policy
node_mcp -->|"routes search"| node_vector
node_mcp -->|"routes search"| node_cases
node_policy -->|"queries"| node_cosmos
node_vector -->|"creates query vector"| node_embeddings
node_vector -->|"searches index"| node_search
node_mcp -->|"routes creation"| node_escalation
node_escalation -->|"writes package"| node_cosmos
node_mcp -->|"delegates invoke"| node_sales
node_sales -->|"posts webhook"| node_n8n

click node_mcp "https://github.com/ramasamy-24-t/mcp-server/blob/main/server.py"
click node_auth "https://github.com/ramasamy-24-t/mcp-server/blob/main/permissions.py"
click node_orders "https://github.com/ramasamy-24-t/mcp-server/blob/main/server.py"
click node_customer "https://github.com/ramasamy-24-t/mcp-server/blob/main/server.py"
click node_transactions "https://github.com/ramasamy-24-t/mcp-server/blob/main/server.py"
click node_workflow "https://github.com/ramasamy-24-t/mcp-server/blob/main/server.py"
click node_cosmos "https://github.com/ramasamy-24-t/mcp-server/blob/main/azure_clients.py"
click node_policy "https://github.com/ramasamy-24-t/mcp-server/blob/main/server.py"
click node_vector "https://github.com/ramasamy-24-t/mcp-server/blob/main/server.py"
click node_cases "https://github.com/ramasamy-24-t/mcp-server/blob/main/server.py"
click node_search "https://github.com/ramasamy-24-t/mcp-server/blob/main/azure_clients.py"
click node_embeddings "https://github.com/ramasamy-24-t/mcp-server/blob/main/azure_clients.py"
click node_escalation "https://github.com/ramasamy-24-t/mcp-server/blob/main/server.py"
click node_sales "https://github.com/ramasamy-24-t/mcp-server/blob/main/sales_invoke.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_mcp,node_auth toneBlue
class node_orders,node_customer,node_transactions,node_workflow,node_cosmos toneAmber
class node_policy,node_vector,node_cases,node_search,node_embeddings toneMint
class node_escalation,node_sales,node_n8n toneRose
class node_agents toneIndigo
```

## Components

### MCP Boundary

- [MCP Server](https://github.com/ramasamy-24-t/mcp-server/blob/main/server.py): `server.py`
- [Tool Authorization](https://github.com/ramasamy-24-t/mcp-server/blob/main/permissions.py): `permissions.py`

### Operational Lookups

- [Order / Account / Device](https://github.com/ramasamy-24-t/mcp-server/blob/main/server.py): `server.py`
- [Customer Memory / Interactions](https://github.com/ramasamy-24-t/mcp-server/blob/main/server.py): `server.py`
- [Transaction Lookup](https://github.com/ramasamy-24-t/mcp-server/blob/main/server.py): `server.py`
- [Workflow Lookup](https://github.com/ramasamy-24-t/mcp-server/blob/main/server.py): `server.py`
- [Cosmos Data](https://github.com/ramasamy-24-t/mcp-server/blob/main/azure_clients.py): `azure_clients.py`

### Knowledge Tools

- [Policy Lookup](https://github.com/ramasamy-24-t/mcp-server/blob/main/server.py): `server.py`
- [Vector Search](https://github.com/ramasamy-24-t/mcp-server/blob/main/server.py): `server.py`
- [Resolved Case Search](https://github.com/ramasamy-24-t/mcp-server/blob/main/server.py): `server.py`
- [Azure AI Search](https://github.com/ramasamy-24-t/mcp-server/blob/main/azure_clients.py): `azure_clients.py`
- [Query Embeddings](https://github.com/ramasamy-24-t/mcp-server/blob/main/azure_clients.py): `azure_clients.py`

### Escalation And Sales

- [Escalation Package](https://github.com/ramasamy-24-t/mcp-server/blob/main/server.py): `server.py`
- [Sales Agent Invoke](https://github.com/ramasamy-24-t/mcp-server/blob/main/sales_invoke.py): `sales_invoke.py`
- **Sales n8n Agents**

### Other components

- **Agents / Orchestrator**

## Connections

- Agents / Orchestrator → MCP Server: calls tools (evidence: `README.md`)
- MCP Server → Tool Authorization: checks access (evidence: `server.py`)
- MCP Server → Order / Account / Device: routes lookup (evidence: `README.md`)
- MCP Server → Customer Memory / Interactions: routes lookup (evidence: `README.md`)
- MCP Server → Transaction Lookup: routes lookup (evidence: `README.md`)
- MCP Server → Workflow Lookup: routes lookup (evidence: `README.md`)
- Order / Account / Device → Cosmos Data: queries (evidence: `server.py`)
- Customer Memory / Interactions → Cosmos Data: queries (evidence: `server.py`)
- Transaction Lookup → Cosmos Data: queries (evidence: `server.py`)
- MCP Server → Policy Lookup: routes lookup (evidence: `README.md`)
- MCP Server → Vector Search: routes search (evidence: `README.md`)
- MCP Server → Resolved Case Search: routes search (evidence: `README.md`)
- Policy Lookup → Cosmos Data: queries (evidence: `server.py`)
- Vector Search → Query Embeddings: creates query vector (evidence: `server.py`)
- Vector Search → Azure AI Search: searches index (evidence: `server.py`)
- MCP Server → Escalation Package: routes creation (evidence: `README.md`)
- Escalation Package → Cosmos Data: writes package (evidence: `server.py`)
- MCP Server → Sales Agent Invoke: delegates invoke (evidence: `server.py`)
- Sales Agent Invoke → Sales n8n Agents: posts webhook (evidence: `sales_invoke.py`)
