Expose your Spring Boot API endpoints via MCP and Copilot
Rory Preddy demonstrates how to expose Spring Boot Java methods as MCP tools, connect them to Visual Studio Code, and enable GitHub Copilot to call those tools to update a working application.
Overview
The video walks through wiring a Spring Boot app into the Model Context Protocol (MCP) so GitHub Copilot in Visual Studio Code can invoke Java operations as tools.
What you build
- Expose Java methods/operations from a Spring Boot application as MCP tools.
- Run an MCP server for the application.
- Connect Visual Studio Code to the MCP server.
- Enable the tools inside GitHub Copilot.
- Use Copilot to call the tools and update a working application.
Sample repository
Prerequisites to install
- Microsoft Build of OpenJDK: https://learn.microsoft.com/en-us/java/openjdk/download
- Extension Pack for Java (VS Code): https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-java-pack
- Spring Boot Extension Pack (VS Code): https://marketplace.visualstudio.com/items?itemName=vmware.vscode-boot-dev-pack
- GitHub Copilot for Visual Studio Code: https://marketplace.visualstudio.com/items?itemName=GitHub.copilot
Chapters (video timeline)
- 00:00 Introduction to Java tools with MCP
- 00:29 Expose Java operations as MCP tools
- 01:47 Start the MCP server
- 02:16 Connect Visual Studio Code to the server
- 02:56 Enable the tools in GitHub Copilot
- 03:14 Use Copilot to call the Java tools
- 04:30 Recap