MG

microsoft/github-copilot-java-mcp-demo

开发工具官方

本页由 AI 翻译,技术细节请以原文为准。 查看原文

7 stars 12 forks 质量 70 趋势 23MIT

Java and Spring Boot demo showing how to build, debug, test, and extend an MCP-enabled app in VS Code with GitHub Copilot, Spring AI, Playwright, and the Copilot coding agent.

概览

This repository exists to teach development in with . The series takes this sample from a cloned folder to an app Copilot can call and test. Each chapter stands on its own, explains the concepts alongside the steps, and ends with a working result. Prefer the actions without the explanation? scripts/script.md covers the same four topics as a condensed step-by-step table. This repository is a local development and demonstration sample, not a production deployment. Todos are stored in memory, the MCP mutation tools are unauthenticated, and Actuator returns detailed health information. Do not expose port 8080 to untrusted networks. Before deploying, add authentication, authorization, persistent storage, and production-appropriate Actuator settings. - JDK 25 (java -version should report version 25) - VS Code with the and - GitHub Copilot access for the Copilot and MCP workflow Maven does not need to be installed separately; the repository includes the Maven Wrapper.

README

以下为原文 README 节选,完整内容请查看原文。

Spring Boot Todo — Web UI to MCP

Start here — the four-chapter training series

Open the series → | Watch the full video playlist

This repository exists to teach Java development in VS Code with GitHub Copilot. The series takes this sample from a cloned folder to an app Copilot can call and test. Each chapter stands on its own, explains the concepts alongside the steps, and ends with a working result.

# Chapter What you build Video
1 Build and Run Your First Spring Boot App Install the two extension packs, read the project structure, then build and run the app with Maven and the Spring Boot Dashboard. Watch on YouTube
2 Debug and Inspect a Spring Boot Request Pause a live request in the Java debugger, step across the class boundary, then check health and live memory. Watch on YouTube
3 Expose Your Java Operations to Copilot with MCP Publish the service operations as MCP tools and drive them from Copilot Chat. Watch on YouTube
4 Let Copilot Test Your App with Playwright Hand Copilot browser tools and have it test the UI end to end with Playwright. Watch on YouTube

Prefer the actions without the explanation? scripts/script.md covers the same four topics as a condensed step-by-step table.


How the sample fits together

flowchart LR
    UI["Web UIThymeleaf · /"] --> SVC
    MCP["MCP server/mcp"] --> SVC
    SVC["TodoService(shared logic)"]

[!IMPORTANT] This repository is a local development and demonstration sample, not a production deployment. Todos are stored in memory, the MCP mutation tools are unauthenticated, and Actuator returns detailed health information. Do not expose port 8080 to untrusted networks. Before deploying, add authentication, authorization, persistent storage, and production-appropriate Actuator settings.


Prerequisites

  • JDK 25 (java -version should report version 25)
  • VS Code with the Extension Pack for Java and Spring Boot Extension Pack
  • GitHub Copilot access for the Copilot and MCP workflow

Maven does not need to be installed separately; the repository includes the Maven Wrapper.

Run it

Windows (PowerShell):

.\mvnw.cmd spring-boot:run

macOS or Linux:

./mvnw spring-boot:run
在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →