# microsoft/github-copilot-java-mcp-demo architecture

> Architecture diagram of the GitHub repository microsoft/github-copilot-java-mcp-demo, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/microsoft/github-copilot-java-mcp-demo
- Repository: https://github.com/microsoft/github-copilot-java-mcp-demo

## Overview

This is a Spring Boot Todo demonstration with two user-facing entry points: a Thymeleaf web UI and MCP tools, both intended to use shared Todo logic. The web workflow covers showing, adding, toggling, and deleting todos; MCP exposes list, get, add, complete, and delete operations. The README documents in-memory storage and an Actuator health endpoint. No source excerpts were provided, so implementation-level calls beyond the documented MCP delegation and overview are shown only as unverified dashed links.

Main entry points: [`src/main/java/com/example/tododemo/web/TodoController.java`](https://github.com/microsoft/github-copilot-java-mcp-demo/blob/main/src/main/java/com/example/tododemo/web/TodoController.java) (Todo controller), [`src/main/java/com/example/tododemo/service/TodoService.java`](https://github.com/microsoft/github-copilot-java-mcp-demo/blob/main/src/main/java/com/example/tododemo/service/TodoService.java) (Todo service), [`src/main/java/com/example/tododemo/mcp/TodoTools.java`](https://github.com/microsoft/github-copilot-java-mcp-demo/blob/main/src/main/java/com/example/tododemo/mcp/TodoTools.java) (MCP tools), [`src/main/resources/application.properties`](https://github.com/microsoft/github-copilot-java-mcp-demo/blob/main/src/main/resources/application.properties) (MCP endpoint)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web interface"]
  node_controller["Todo controller"]
  node_template["Todo page<br/>[index.html]"]
end

subgraph group_mcp["MCP tools"]
  node_tools["MCP tools<br/>[TodoTools.java]"]
  node_mcpendpoint["MCP endpoint"]
end

subgraph group_core["Todo core"]
  node_service["Todo service<br/>[TodoService.java]"]
  node_repository["Todo repository"]
  node_todo["Todo model<br/>[Todo.java]"]
end

subgraph group_ops["Runtime operations"]
  node_application["Spring Boot app"]
  node_actuator["Health endpoint"]
end

node_browser(("Browser user"))
node_vscode(("VS Code Copilot"))

node_browser -.->|"uses UI"| node_controller
node_controller -.->|"delegates to"| node_service
node_controller -.->|"renders"| node_template
node_vscode -->|"connects to"| node_mcpendpoint
node_mcpendpoint -->|"exposes tools"| node_tools
node_tools -->|"delegates to"| node_service
node_service -.->|"uses storage"| node_repository
node_application -->|"exposes health"| node_actuator

click node_controller "https://github.com/microsoft/github-copilot-java-mcp-demo/blob/main/src/main/java/com/example/tododemo/web/TodoController.java"
click node_template "https://github.com/microsoft/github-copilot-java-mcp-demo/blob/main/src/main/resources/templates/index.html"
click node_tools "https://github.com/microsoft/github-copilot-java-mcp-demo/blob/main/src/main/java/com/example/tododemo/mcp/TodoTools.java"
click node_mcpendpoint "https://github.com/microsoft/github-copilot-java-mcp-demo/blob/main/src/main/resources/application.properties"
click node_service "https://github.com/microsoft/github-copilot-java-mcp-demo/blob/main/src/main/java/com/example/tododemo/service/TodoService.java"
click node_repository "https://github.com/microsoft/github-copilot-java-mcp-demo/blob/main/src/main/java/com/example/tododemo/repository/TodoRepository.java"
click node_todo "https://github.com/microsoft/github-copilot-java-mcp-demo/blob/main/src/main/java/com/example/tododemo/model/Todo.java"
click node_application "https://github.com/microsoft/github-copilot-java-mcp-demo/blob/main/src/main/java/com/example/tododemo/SpringbootMcpDemoApplication.java"
click node_actuator "https://github.com/microsoft/github-copilot-java-mcp-demo/blob/main/src/main/resources/application.properties"

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_controller,node_template,node_browser toneBlue
class node_tools,node_mcpendpoint toneAmber
class node_service,node_repository,node_todo toneMint
class node_application,node_actuator toneRose
class node_vscode toneIndigo
```

## Components

### Web interface

- [Todo controller](https://github.com/microsoft/github-copilot-java-mcp-demo/blob/main/src/main/java/com/example/tododemo/web/TodoController.java): `src/main/java/com/example/tododemo/web/TodoController.java`
- [Todo page](https://github.com/microsoft/github-copilot-java-mcp-demo/blob/main/src/main/resources/templates/index.html): `src/main/resources/templates/index.html`

### MCP tools

- [MCP tools](https://github.com/microsoft/github-copilot-java-mcp-demo/blob/main/src/main/java/com/example/tododemo/mcp/TodoTools.java): `src/main/java/com/example/tododemo/mcp/TodoTools.java`
- [MCP endpoint](https://github.com/microsoft/github-copilot-java-mcp-demo/blob/main/src/main/resources/application.properties): `src/main/resources/application.properties`

### Todo core

- [Todo service](https://github.com/microsoft/github-copilot-java-mcp-demo/blob/main/src/main/java/com/example/tododemo/service/TodoService.java): `src/main/java/com/example/tododemo/service/TodoService.java`
- [Todo repository](https://github.com/microsoft/github-copilot-java-mcp-demo/blob/main/src/main/java/com/example/tododemo/repository/TodoRepository.java): `src/main/java/com/example/tododemo/repository/TodoRepository.java`
- [Todo model](https://github.com/microsoft/github-copilot-java-mcp-demo/blob/main/src/main/java/com/example/tododemo/model/Todo.java): `src/main/java/com/example/tododemo/model/Todo.java`

### Runtime operations

- [Spring Boot app](https://github.com/microsoft/github-copilot-java-mcp-demo/blob/main/src/main/java/com/example/tododemo/SpringbootMcpDemoApplication.java): `src/main/java/com/example/tododemo/SpringbootMcpDemoApplication.java`
- [Health endpoint](https://github.com/microsoft/github-copilot-java-mcp-demo/blob/main/src/main/resources/application.properties): `src/main/resources/application.properties`

### Other components

- **Browser user**
- **VS Code Copilot**

## Connections

- Browser user → Todo controller: uses UI
- Todo controller → Todo service: delegates to
- Todo controller → Todo page: renders
- VS Code Copilot → MCP endpoint: connects to (evidence: `README.md`)
- MCP endpoint → MCP tools: exposes tools (evidence: `README.md`)
- MCP tools → Todo service: delegates to (evidence: `README.md`)
- Todo service → Todo repository: uses storage
- Spring Boot app → Health endpoint: exposes health (evidence: `README.md`)
