# manjotsingh20/azure-synapse-mcp architecture

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

- Interactive diagram: https://gitdiagram.com/manjotsingh20/azure-synapse-mcp
- Repository: https://github.com/manjotsingh20/azure-synapse-mcp

## Overview

This is an MCP server that exposes Azure Synapse SQL, pipeline, Spark, and notebook operations to compatible AI clients. The principal workflow is a client tool request, server-side dispatch, execution through the relevant Synapse interface, and a returned tool result. The sampled source shows SQL connection and query helpers plus pipeline and notebook calls; Spark submission is documented and partially sampled, so its internal client wiring is not expanded.

Main entry points: [`server.py`](https://github.com/manjotsingh20/azure-synapse-mcp/blob/main/server.py) (MCP server)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_mcp["MCP interface"]
  node_server["MCP server<br/>[server.py]"]
end

subgraph group_sql["SQL access"]
  node_sql_tools["SQL tools<br/>[server.py]"]
  node_sql_exec["SQL execution<br/>[server.py]"]
  node_credentials["Azure credentials<br/>[server.py]"]
  node_sql_connection["SQL connection<br/>[server.py]"]
  node_synapse_sql[("Synapse SQL")]
end

subgraph group_artifacts["Workspace artifacts"]
  node_artifacts_client["Artifacts client<br/>[server.py]"]
  node_pipeline_tools["Pipeline tools<br/>[server.py]"]
  node_notebook_tools["Notebook tools<br/>[server.py]"]
  node_synapse_artifacts["Synapse artifacts"]
end

subgraph group_spark["Spark jobs"]
  node_spark_tools["Spark tools<br/>[server.py]"]
  node_spark_service["Synapse Spark"]
end

node_client(("MCP client"))

node_client -->|"requests tools"| node_server
node_server -->|"dispatches SQL"| node_sql_tools
node_server -->|"dispatches pipelines"| node_pipeline_tools
node_server -->|"dispatches notebooks"| node_notebook_tools
node_server -->|"dispatches Spark"| node_spark_tools
node_sql_tools -->|"executes SQL"| node_sql_exec
node_sql_exec -->|"opens connection"| node_sql_connection
node_sql_connection -->|"gets token"| node_credentials
node_sql_connection -->|"connects"| node_synapse_sql
node_sql_exec -->|"queries or writes"| node_synapse_sql
node_server -->|"gets credentials"| node_credentials
node_pipeline_tools -->|"calls pipeline API"| node_artifacts_client
node_notebook_tools -->|"lists notebooks"| node_artifacts_client
node_artifacts_client -->|"uses credentials"| node_credentials
node_artifacts_client -->|"calls workspace API"| node_synapse_artifacts
node_spark_tools -->|"submits or lists jobs"| node_spark_service
node_server -->|"returns results"| node_client

click node_server "https://github.com/manjotsingh20/azure-synapse-mcp/blob/main/server.py"
click node_sql_tools "https://github.com/manjotsingh20/azure-synapse-mcp/blob/main/server.py"
click node_sql_exec "https://github.com/manjotsingh20/azure-synapse-mcp/blob/main/server.py"
click node_credentials "https://github.com/manjotsingh20/azure-synapse-mcp/blob/main/server.py"
click node_sql_connection "https://github.com/manjotsingh20/azure-synapse-mcp/blob/main/server.py"
click node_artifacts_client "https://github.com/manjotsingh20/azure-synapse-mcp/blob/main/server.py"
click node_pipeline_tools "https://github.com/manjotsingh20/azure-synapse-mcp/blob/main/server.py"
click node_notebook_tools "https://github.com/manjotsingh20/azure-synapse-mcp/blob/main/server.py"
click node_spark_tools "https://github.com/manjotsingh20/azure-synapse-mcp/blob/main/server.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_server,node_client toneBlue
class node_sql_tools,node_sql_exec,node_credentials,node_sql_connection,node_synapse_sql toneAmber
class node_artifacts_client,node_pipeline_tools,node_notebook_tools,node_synapse_artifacts toneMint
class node_spark_tools,node_spark_service toneRose
```

## Components

### MCP interface

- [MCP server](https://github.com/manjotsingh20/azure-synapse-mcp/blob/main/server.py): `server.py`

### SQL access

- [SQL tools](https://github.com/manjotsingh20/azure-synapse-mcp/blob/main/server.py): `server.py`
- [SQL execution](https://github.com/manjotsingh20/azure-synapse-mcp/blob/main/server.py): `server.py`
- [Azure credentials](https://github.com/manjotsingh20/azure-synapse-mcp/blob/main/server.py): `server.py`
- [SQL connection](https://github.com/manjotsingh20/azure-synapse-mcp/blob/main/server.py): `server.py`
- **Synapse SQL**

### Workspace artifacts

- [Artifacts client](https://github.com/manjotsingh20/azure-synapse-mcp/blob/main/server.py): `server.py`
- [Pipeline tools](https://github.com/manjotsingh20/azure-synapse-mcp/blob/main/server.py): `server.py`
- [Notebook tools](https://github.com/manjotsingh20/azure-synapse-mcp/blob/main/server.py): `server.py`
- **Synapse artifacts**

### Spark jobs

- [Spark tools](https://github.com/manjotsingh20/azure-synapse-mcp/blob/main/server.py): `server.py`
- **Synapse Spark**

### Other components

- **MCP client**

## Connections

- MCP client → MCP server: requests tools
- MCP server → SQL tools: dispatches SQL
- MCP server → Pipeline tools: dispatches pipelines
- MCP server → Notebook tools: dispatches notebooks
- MCP server → Spark tools: dispatches Spark
- SQL tools → SQL execution: executes SQL
- SQL execution → SQL connection: opens connection
- SQL connection → Azure credentials: gets token
- SQL connection → Synapse SQL: connects
- SQL execution → Synapse SQL: queries or writes
- MCP server → Azure credentials: gets credentials
- Pipeline tools → Artifacts client: calls pipeline API
- Notebook tools → Artifacts client: lists notebooks
- Artifacts client → Azure credentials: uses credentials
- Artifacts client → Synapse artifacts: calls workspace API
- Spark tools → Synapse Spark: submits or lists jobs
- MCP server → MCP client: returns results
