# fr0ster/mcp-abap-adt architecture

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

- Interactive diagram: https://gitdiagram.com/fr0ster/mcp-abap-adt
- Repository: https://github.com/fr0ster/mcp-abap-adt

## Overview

mcp-abap-adt is an MCP server that gives AI agents controlled access to ABAP repositories through SAP ADT. The main workflow is an MCP client request entering through stdio, HTTP, or SSE; handler groups expose tools for repository analysis or ABAP changes; handlers call ADT and return results. The README also documents authentication and destination selection, full and compact variants, debugging, testing, transports, and runtime analysis. Some subsystem links below reflect README-described capabilities because their implementation was not sampled.

Main entry points: [`src/lib/clients.ts`](https://github.com/fr0ster/mcp-abap-adt/blob/main/src/lib/clients.ts) (ADT connection and clients), [`src/lib/handlers/base/BaseHandlerGroup.ts`](https://github.com/fr0ster/mcp-abap-adt/blob/main/src/lib/handlers/base/BaseHandlerGroup.ts) (Tool registration), [`server-runtime/src/stdio/server.ts`](https://github.com/fr0ster/mcp-abap-adt/blob/main/server-runtime/src/stdio/server.ts) (stdio server), [`server-runtime/src/http/server.ts`](https://github.com/fr0ster/mcp-abap-adt/blob/main/server-runtime/src/http/server.ts) (HTTP server)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_transport["MCP transports"]
  node_stdio["stdio server<br/>[server.ts]"]
  node_http["HTTP server<br/>[server.ts]"]
  node_sse["SSE server<br/>[server.ts]"]
end

subgraph group_runtime["Server and access"]
  node_auth["Destinations and auth"]
end

subgraph group_repo["Repository tools"]
  node_analysis["Repository analysis"]
  node_metadata["Metadata and navigation"]
  node_read["Object reads"]
end

subgraph group_dev["Development workflows"]
  node_changes["Object CRUD and activation"]
  node_rap["RAP and services"]
  node_transport_tools["Transport management"]
  node_tests["ABAP testing"]
  node_debug["Debugging"]
  node_runtime_tools["Runtime and profiling"]
end

subgraph group_shared["Shared execution"]
  node_registry["Tool registration"]
  node_connection["ADT connection and clients<br/>[clients.ts]"]
  node_answer["Result formatting<br/>[answer.ts]"]
end

node_client(("MCP client"))
node_sap{{"SAP ABAP system"}}

node_client -->|"sends tools"| node_stdio
node_client -->|"sends tools"| node_http
node_client -->|"sends tools"| node_sse
node_stdio -->|"resolves destination"| node_auth
node_stdio -.->|"serves tools"| node_registry
node_http -.->|"serves tools"| node_registry
node_sse -.->|"serves tools"| node_registry
node_registry -->|"registers tools"| node_analysis
node_registry -.->|"supplies context"| node_connection
node_analysis -.->|"queries ADT"| node_connection
node_metadata -->|"reads ADT"| node_connection
node_read -.->|"reads ADT"| node_connection
node_changes -->|"changes ADT objects"| node_connection
node_rap -->|"updates services"| node_connection
node_transport_tools -.->|"manages transports"| node_connection
node_tests -.->|"runs tests"| node_connection
node_debug -.->|"controls debugger"| node_connection
node_runtime_tools -->|"runs programs"| node_connection
node_connection -->|"calls ADT"| node_sap
node_answer -.->|"returns results"| node_client

click node_stdio "https://github.com/fr0ster/mcp-abap-adt/blob/main/server-runtime/src/stdio/server.ts"
click node_http "https://github.com/fr0ster/mcp-abap-adt/blob/main/server-runtime/src/http/server.ts"
click node_sse "https://github.com/fr0ster/mcp-abap-adt/blob/main/server-runtime/src/sse/server.ts"
click node_auth "https://github.com/fr0ster/mcp-abap-adt/tree/main/server-runtime/src/stdio/auth"
click node_registry "https://github.com/fr0ster/mcp-abap-adt/blob/main/src/lib/handlers/base/BaseHandlerGroup.ts"
click node_connection "https://github.com/fr0ster/mcp-abap-adt/blob/main/src/lib/clients.ts"
click node_answer "https://github.com/fr0ster/mcp-abap-adt/blob/main/src/lib/answer.ts"
click node_analysis "https://github.com/fr0ster/mcp-abap-adt/tree/main/src/handlers/search/readonly"
click node_metadata "https://github.com/fr0ster/mcp-abap-adt/tree/main/src/handlers/system/readonly"
click node_read "https://github.com/fr0ster/mcp-abap-adt/tree/main/src/handlers"
click node_changes "https://github.com/fr0ster/mcp-abap-adt/tree/main/src/handlers/class/high"
click node_rap "https://github.com/fr0ster/mcp-abap-adt/tree/main/src/handlers/service_binding/high"
click node_transport_tools "https://github.com/fr0ster/mcp-abap-adt/tree/main/src/handlers/transport"
click node_tests "https://github.com/fr0ster/mcp-abap-adt/tree/main/src/handlers/unit_test"
click node_debug "https://github.com/fr0ster/mcp-abap-adt/tree/main/src/handlers/debugger"
click node_runtime_tools "https://github.com/fr0ster/mcp-abap-adt/tree/main/src/handlers/system"

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_stdio,node_http,node_sse,node_client toneBlue
class node_auth toneAmber
class node_analysis,node_metadata,node_read toneMint
class node_changes,node_rap,node_transport_tools,node_tests,node_debug,node_runtime_tools toneRose
class node_registry,node_connection,node_answer,node_sap toneIndigo
```

## Components

### MCP transports

- [stdio server](https://github.com/fr0ster/mcp-abap-adt/blob/main/server-runtime/src/stdio/server.ts): `server-runtime/src/stdio/server.ts`
- [HTTP server](https://github.com/fr0ster/mcp-abap-adt/blob/main/server-runtime/src/http/server.ts): `server-runtime/src/http/server.ts`
- [SSE server](https://github.com/fr0ster/mcp-abap-adt/blob/main/server-runtime/src/sse/server.ts): `server-runtime/src/sse/server.ts`

### Server and access

- [Destinations and auth](https://github.com/fr0ster/mcp-abap-adt/tree/main/server-runtime/src/stdio/auth): `server-runtime/src/stdio/auth`

### Repository tools

- [Repository analysis](https://github.com/fr0ster/mcp-abap-adt/tree/main/src/handlers/search/readonly): `src/handlers/search/readonly`
- [Metadata and navigation](https://github.com/fr0ster/mcp-abap-adt/tree/main/src/handlers/system/readonly): `src/handlers/system/readonly`
- [Object reads](https://github.com/fr0ster/mcp-abap-adt/tree/main/src/handlers): `src/handlers`

### Development workflows

- [Object CRUD and activation](https://github.com/fr0ster/mcp-abap-adt/tree/main/src/handlers/class/high): `src/handlers/class/high`
- [RAP and services](https://github.com/fr0ster/mcp-abap-adt/tree/main/src/handlers/service_binding/high): `src/handlers/service_binding/high`
- [Transport management](https://github.com/fr0ster/mcp-abap-adt/tree/main/src/handlers/transport): `src/handlers/transport`
- [ABAP testing](https://github.com/fr0ster/mcp-abap-adt/tree/main/src/handlers/unit_test): `src/handlers/unit_test`
- [Debugging](https://github.com/fr0ster/mcp-abap-adt/tree/main/src/handlers/debugger): `src/handlers/debugger`
- [Runtime and profiling](https://github.com/fr0ster/mcp-abap-adt/tree/main/src/handlers/system): `src/handlers/system`

### Shared execution

- [Tool registration](https://github.com/fr0ster/mcp-abap-adt/blob/main/src/lib/handlers/base/BaseHandlerGroup.ts): `src/lib/handlers/base/BaseHandlerGroup.ts`
- [ADT connection and clients](https://github.com/fr0ster/mcp-abap-adt/blob/main/src/lib/clients.ts): `src/lib/clients.ts`
- [Result formatting](https://github.com/fr0ster/mcp-abap-adt/blob/main/src/lib/answer.ts): `src/lib/answer.ts`

### Other components

- **MCP client**
- **SAP ABAP system**

## Connections

- MCP client → stdio server: sends tools
- MCP client → HTTP server: sends tools
- MCP client → SSE server: sends tools
- stdio server → Destinations and auth: resolves destination (evidence: `server-runtime/src/stdio/server.ts`)
- stdio server → Tool registration: serves tools
- HTTP server → Tool registration: serves tools
- SSE server → Tool registration: serves tools
- Tool registration → Repository analysis: registers tools (evidence: `src/lib/handlers/groups/SearchHandlersGroup.ts`)
- Tool registration → ADT connection and clients: supplies context
- Repository analysis → ADT connection and clients: queries ADT
- Metadata and navigation → ADT connection and clients: reads ADT (evidence: `src/handlers/system/readonly/handleGetServiceBindingPreviewUrl.ts`)
- Object reads → ADT connection and clients: reads ADT (evidence: `src/handlers/system/readonly/handleGetServiceBindingPreviewUrl.ts`)
- Object CRUD and activation → ADT connection and clients: changes ADT objects
- RAP and services → ADT connection and clients: updates services (evidence: `src/handlers/service_binding/high/handleUpdateServiceBinding.ts`)
- Transport management → ADT connection and clients: manages transports
- ABAP testing → ADT connection and clients: runs tests
- Debugging → ADT connection and clients: controls debugger
- Runtime and profiling → ADT connection and clients: runs programs (evidence: `src/handlers/system/high/handleRuntimeRunClass.ts`)
- ADT connection and clients → SAP ABAP system: calls ADT
- Result formatting → MCP client: returns results
