# nishit-luhadia30/mcp architecture

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

- Interactive diagram: https://gitdiagram.com/nishit-luhadia30/mcp
- Repository: https://github.com/nishit-luhadia30/mcp

## Overview

This repository combines a conversational LangGraph assistant with independent Gmail and Google Calendar MCP servers. The user enters a request through the agent, which discovers server tools and binds them to its model; the relevant server dispatches a tool to its service client, which performs the Google API operation. The graph preserves the distinct mail and calendar capabilities and their parsing/authentication layers. Relationships for sampled code are cited; README-supported integrations are cited to the README, and unsampled tool internals are not expanded beyond documented capabilities.

Main entry points: [`Calendar-MCP/gcalendar/client.py`](https://github.com/nishit-luhadia30/mcp/blob/main/Calendar-MCP/gcalendar/client.py) (Calendar Client), [`Calendar-MCP/server.py`](https://github.com/nishit-luhadia30/mcp/blob/main/Calendar-MCP/server.py) (Calendar MCP Server), [`Gmail-MCP/gmail/client.py`](https://github.com/nishit-luhadia30/mcp/blob/main/Gmail-MCP/gmail/client.py) (Gmail Client), [`Main-Agent/nodes.py`](https://github.com/nishit-luhadia30/mcp/blob/main/Main-Agent/nodes.py) (Tool Discovery)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_agent["Conversational Agent"]
  node_cli["Conversation CLI<br/>[main.py]"]
  node_agent_graph["Agent Graph<br/>[graph.py]"]
  node_agent_nodes["Tool Discovery<br/>[nodes.py]"]
end

subgraph group_gmail["Gmail MCP"]
  node_gmail_server["Gmail MCP Server<br/>[server.py]"]
  node_gmail_read["Read Mail<br/>[read.py]"]
  node_gmail_search["Search Mail<br/>[search.py]"]
  node_gmail_message_tools["Message Actions"]
end

subgraph group_gmail_data["Gmail Integration"]
  node_gmail_client["Gmail Client<br/>[client.py]"]
  node_gmail_parser["Message Parser<br/>[parser.py]"]
  node_gmail_service["Gmail Service<br/>[service.py]"]
  node_gmail_auth["Gmail Auth<br/>[auth.py]"]
end

subgraph group_calendar["Calendar MCP"]
  node_calendar_server["Calendar MCP Server<br/>[server.py]"]
  node_calendar_read["Event Reading<br/>[read.py]"]
  node_calendar_event["Event Lookup<br/>[event.py]"]
  node_calendar_search["Event Search<br/>[search.py]"]
  node_calendar_create["Event Creation<br/>[create.py]"]
  node_calendar_update["Event Updates<br/>[update.py]"]
  node_calendar_delete["Event Deletion<br/>[delete.py]"]
  node_calendar_availability["Availability Check<br/>[availability.py]"]
end

subgraph group_calendar_data["Calendar Integration"]
  node_calendar_client["Calendar Client<br/>[client.py]"]
  node_calendar_parser["Event Parser<br/>[parser.py]"]
  node_calendar_service["Calendar Service<br/>[service.py]"]
  node_calendar_auth["Calendar Auth<br/>[auth.py]"]
end

node_user(("User"))
node_llm["Groq Model"]
node_gmail_api["Gmail API"]
node_calendar_api["Calendar API"]

node_user -->|"enters request"| node_cli
node_cli -->|"invokes graph"| node_agent_graph
node_agent_graph -->|"builds with"| node_agent_nodes
node_agent_nodes -->|"binds tools"| node_llm
node_agent_nodes -->|"connects tools"| node_gmail_server
node_agent_nodes -->|"connects tools"| node_calendar_server
node_gmail_server -->|"dispatches reads"| node_gmail_read
node_gmail_server -->|"dispatches search"| node_gmail_search
node_gmail_server -->|"dispatches actions"| node_gmail_message_tools
node_gmail_read -->|"calls client"| node_gmail_client
node_gmail_search -->|"calls client"| node_gmail_client
node_gmail_message_tools -->|"uses client"| node_gmail_client
node_gmail_client -->|"parses messages"| node_gmail_parser
node_gmail_client -->|"gets service"| node_gmail_service
node_gmail_service -->|"gets credentials"| node_gmail_auth
node_gmail_client -->|"calls API"| node_gmail_api
node_calendar_server -->|"dispatches reads"| node_calendar_read
node_calendar_server -->|"dispatches lookup"| node_calendar_event
node_calendar_server -->|"dispatches search"| node_calendar_search
node_calendar_server -->|"dispatches creation"| node_calendar_create
node_calendar_server -->|"dispatches updates"| node_calendar_update
node_calendar_server -->|"dispatches deletion"| node_calendar_delete
node_calendar_server -->|"dispatches check"| node_calendar_availability
node_calendar_read -->|"uses client"| node_calendar_client
node_calendar_event -->|"uses client"| node_calendar_client
node_calendar_search -->|"uses client"| node_calendar_client
node_calendar_create -->|"uses client"| node_calendar_client
node_calendar_update -->|"calls client"| node_calendar_client
node_calendar_delete -->|"uses client"| node_calendar_client
node_calendar_availability -->|"uses client"| node_calendar_client
node_calendar_client -->|"parses events"| node_calendar_parser
node_calendar_client -->|"gets service"| node_calendar_service
node_calendar_service -->|"gets credentials"| node_calendar_auth
node_calendar_client -->|"calls API"| node_calendar_api

click node_cli "https://github.com/nishit-luhadia30/mcp/blob/main/Main-Agent/main.py"
click node_agent_graph "https://github.com/nishit-luhadia30/mcp/blob/main/Main-Agent/graph.py"
click node_agent_nodes "https://github.com/nishit-luhadia30/mcp/blob/main/Main-Agent/nodes.py"
click node_gmail_server "https://github.com/nishit-luhadia30/mcp/blob/main/Gmail-MCP/server.py"
click node_gmail_read "https://github.com/nishit-luhadia30/mcp/blob/main/Gmail-MCP/tools/read.py"
click node_gmail_search "https://github.com/nishit-luhadia30/mcp/blob/main/Gmail-MCP/tools/search.py"
click node_gmail_message_tools "https://github.com/nishit-luhadia30/mcp/tree/main/Gmail-MCP/tools"
click node_gmail_client "https://github.com/nishit-luhadia30/mcp/blob/main/Gmail-MCP/gmail/client.py"
click node_gmail_parser "https://github.com/nishit-luhadia30/mcp/blob/main/Gmail-MCP/gmail/parser.py"
click node_gmail_service "https://github.com/nishit-luhadia30/mcp/blob/main/Gmail-MCP/gmail/service.py"
click node_gmail_auth "https://github.com/nishit-luhadia30/mcp/blob/main/Gmail-MCP/gmail/auth.py"
click node_calendar_server "https://github.com/nishit-luhadia30/mcp/blob/main/Calendar-MCP/server.py"
click node_calendar_read "https://github.com/nishit-luhadia30/mcp/blob/main/Calendar-MCP/tools/read.py"
click node_calendar_event "https://github.com/nishit-luhadia30/mcp/blob/main/Calendar-MCP/tools/event.py"
click node_calendar_search "https://github.com/nishit-luhadia30/mcp/blob/main/Calendar-MCP/tools/search.py"
click node_calendar_create "https://github.com/nishit-luhadia30/mcp/blob/main/Calendar-MCP/tools/create.py"
click node_calendar_update "https://github.com/nishit-luhadia30/mcp/blob/main/Calendar-MCP/tools/update.py"
click node_calendar_delete "https://github.com/nishit-luhadia30/mcp/blob/main/Calendar-MCP/tools/delete.py"
click node_calendar_availability "https://github.com/nishit-luhadia30/mcp/blob/main/Calendar-MCP/tools/availability.py"
click node_calendar_client "https://github.com/nishit-luhadia30/mcp/blob/main/Calendar-MCP/gcalendar/client.py"
click node_calendar_parser "https://github.com/nishit-luhadia30/mcp/blob/main/Calendar-MCP/gcalendar/parser.py"
click node_calendar_service "https://github.com/nishit-luhadia30/mcp/blob/main/Calendar-MCP/gcalendar/service.py"
click node_calendar_auth "https://github.com/nishit-luhadia30/mcp/blob/main/Calendar-MCP/gcalendar/auth.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_cli,node_agent_graph,node_agent_nodes,node_user toneBlue
class node_gmail_server,node_gmail_read,node_gmail_search,node_gmail_message_tools toneAmber
class node_gmail_client,node_gmail_parser,node_gmail_service,node_gmail_auth,node_gmail_api,node_calendar_api toneMint
class node_calendar_server,node_calendar_read,node_calendar_event,node_calendar_search,node_calendar_create,node_calendar_update,node_calendar_delete,node_calendar_availability toneRose
class node_calendar_client,node_calendar_parser,node_calendar_service,node_calendar_auth,node_llm toneIndigo
```

## Components

### Conversational Agent

- [Conversation CLI](https://github.com/nishit-luhadia30/mcp/blob/main/Main-Agent/main.py): `Main-Agent/main.py`
- [Agent Graph](https://github.com/nishit-luhadia30/mcp/blob/main/Main-Agent/graph.py): `Main-Agent/graph.py`
- [Tool Discovery](https://github.com/nishit-luhadia30/mcp/blob/main/Main-Agent/nodes.py): `Main-Agent/nodes.py`

### Gmail MCP

- [Gmail MCP Server](https://github.com/nishit-luhadia30/mcp/blob/main/Gmail-MCP/server.py): `Gmail-MCP/server.py`
- [Read Mail](https://github.com/nishit-luhadia30/mcp/blob/main/Gmail-MCP/tools/read.py): `Gmail-MCP/tools/read.py`
- [Search Mail](https://github.com/nishit-luhadia30/mcp/blob/main/Gmail-MCP/tools/search.py): `Gmail-MCP/tools/search.py`
- [Message Actions](https://github.com/nishit-luhadia30/mcp/tree/main/Gmail-MCP/tools): `Gmail-MCP/tools`

### Gmail Integration

- [Gmail Client](https://github.com/nishit-luhadia30/mcp/blob/main/Gmail-MCP/gmail/client.py): `Gmail-MCP/gmail/client.py`
- [Message Parser](https://github.com/nishit-luhadia30/mcp/blob/main/Gmail-MCP/gmail/parser.py): `Gmail-MCP/gmail/parser.py`
- [Gmail Service](https://github.com/nishit-luhadia30/mcp/blob/main/Gmail-MCP/gmail/service.py): `Gmail-MCP/gmail/service.py`
- [Gmail Auth](https://github.com/nishit-luhadia30/mcp/blob/main/Gmail-MCP/gmail/auth.py): `Gmail-MCP/gmail/auth.py`

### Calendar MCP

- [Calendar MCP Server](https://github.com/nishit-luhadia30/mcp/blob/main/Calendar-MCP/server.py): `Calendar-MCP/server.py`
- [Event Reading](https://github.com/nishit-luhadia30/mcp/blob/main/Calendar-MCP/tools/read.py): `Calendar-MCP/tools/read.py`
- [Event Lookup](https://github.com/nishit-luhadia30/mcp/blob/main/Calendar-MCP/tools/event.py): `Calendar-MCP/tools/event.py`
- [Event Search](https://github.com/nishit-luhadia30/mcp/blob/main/Calendar-MCP/tools/search.py): `Calendar-MCP/tools/search.py`
- [Event Creation](https://github.com/nishit-luhadia30/mcp/blob/main/Calendar-MCP/tools/create.py): `Calendar-MCP/tools/create.py`
- [Event Updates](https://github.com/nishit-luhadia30/mcp/blob/main/Calendar-MCP/tools/update.py): `Calendar-MCP/tools/update.py`
- [Event Deletion](https://github.com/nishit-luhadia30/mcp/blob/main/Calendar-MCP/tools/delete.py): `Calendar-MCP/tools/delete.py`
- [Availability Check](https://github.com/nishit-luhadia30/mcp/blob/main/Calendar-MCP/tools/availability.py): `Calendar-MCP/tools/availability.py`

### Calendar Integration

- [Calendar Client](https://github.com/nishit-luhadia30/mcp/blob/main/Calendar-MCP/gcalendar/client.py): `Calendar-MCP/gcalendar/client.py`
- [Event Parser](https://github.com/nishit-luhadia30/mcp/blob/main/Calendar-MCP/gcalendar/parser.py): `Calendar-MCP/gcalendar/parser.py`
- [Calendar Service](https://github.com/nishit-luhadia30/mcp/blob/main/Calendar-MCP/gcalendar/service.py): `Calendar-MCP/gcalendar/service.py`
- [Calendar Auth](https://github.com/nishit-luhadia30/mcp/blob/main/Calendar-MCP/gcalendar/auth.py): `Calendar-MCP/gcalendar/auth.py`

### Other components

- **User**
- **Groq Model**
- **Gmail API**
- **Calendar API**

## Connections

- User → Conversation CLI: enters request (evidence: `README.md`)
- Conversation CLI → Agent Graph: invokes graph (evidence: `Main-Agent/main.py`)
- Agent Graph → Tool Discovery: builds with (evidence: `Main-Agent/graph.py`)
- Tool Discovery → Groq Model: binds tools (evidence: `Main-Agent/nodes.py`)
- Tool Discovery → Gmail MCP Server: connects tools (evidence: `Main-Agent/nodes.py`)
- Tool Discovery → Calendar MCP Server: connects tools (evidence: `Main-Agent/nodes.py`)
- Gmail MCP Server → Read Mail: dispatches reads (evidence: `Gmail-MCP/server.py`)
- Gmail MCP Server → Search Mail: dispatches search (evidence: `Gmail-MCP/server.py`)
- Gmail MCP Server → Message Actions: dispatches actions (evidence: `Gmail-MCP/server.py`)
- Read Mail → Gmail Client: calls client (evidence: `Gmail-MCP/tools/read.py`)
- Search Mail → Gmail Client: calls client (evidence: `Gmail-MCP/tools/search.py`)
- Message Actions → Gmail Client: uses client (evidence: `Gmail-MCP/tools/search.py`)
- Gmail Client → Message Parser: parses messages (evidence: `Gmail-MCP/gmail/client.py`)
- Gmail Client → Gmail Service: gets service (evidence: `Gmail-MCP/gmail/client.py`)
- Gmail Service → Gmail Auth: gets credentials (evidence: `Gmail-MCP/gmail/service.py`)
- Gmail Client → Gmail API: calls API (evidence: `Gmail-MCP/gmail/client.py`)
- Calendar MCP Server → Event Reading: dispatches reads (evidence: `Calendar-MCP/server.py`)
- Calendar MCP Server → Event Lookup: dispatches lookup (evidence: `Calendar-MCP/server.py`)
- Calendar MCP Server → Event Search: dispatches search (evidence: `Calendar-MCP/server.py`)
- Calendar MCP Server → Event Creation: dispatches creation (evidence: `Calendar-MCP/server.py`)
- Calendar MCP Server → Event Updates: dispatches updates (evidence: `Calendar-MCP/server.py`)
- Calendar MCP Server → Event Deletion: dispatches deletion (evidence: `Calendar-MCP/server.py`)
- Calendar MCP Server → Availability Check: dispatches check (evidence: `Calendar-MCP/server.py`)
- Event Reading → Calendar Client: uses client (evidence: `Calendar-MCP/tools/read.py`)
- Event Lookup → Calendar Client: uses client (evidence: `Calendar-MCP/tools/event.py`)
- Event Search → Calendar Client: uses client (evidence: `Calendar-MCP/tools/search.py`)
- Event Creation → Calendar Client: uses client (evidence: `Calendar-MCP/tools/create.py`)
- Event Updates → Calendar Client: calls client (evidence: `Calendar-MCP/tools/update.py`)
- Event Deletion → Calendar Client: uses client (evidence: `Calendar-MCP/tools/delete.py`)
- Availability Check → Calendar Client: uses client (evidence: `Calendar-MCP/tools/availability.py`)
- Calendar Client → Event Parser: parses events (evidence: `Calendar-MCP/gcalendar/client.py`)
- Calendar Client → Calendar Service: gets service (evidence: `Calendar-MCP/gcalendar/client.py`)
- Calendar Service → Calendar Auth: gets credentials (evidence: `Calendar-MCP/gcalendar/service.py`)
- Calendar Client → Calendar API: calls API (evidence: `Calendar-MCP/gcalendar/client.py`)
