<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/expose-your-spring-boot-api-endpoints-via-mcp-and-copilot-uyjmfcfgf" -->

---
title: Expose your Spring Boot API endpoints via MCP and Copilot
description: A walkthrough demonstrates exposing existing Java/Spring Boot methods as Model Context Protocol tools that GitHub Copilot can call. Using Spring AI's MCP...
canonical: https://daily.dev/posts/expose-your-spring-boot-api-endpoints-via-mcp-and-copilot-uyjmfcfgf
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Expose your Spring Boot API endpoints via MCP and Copilot | daily.dev
og:description: A walkthrough demonstrates exposing existing Java/Spring Boot methods as Model Context Protocol tools that GitHub Copilot can call. Using Spring AI's MCP...
og:url: https://daily.dev/posts/expose-your-spring-boot-api-endpoints-via-mcp-and-copilot-uyjmfcfgf
og:image: https://api.daily.dev/og/posts/UYjMfcfgF.png
og:image:alt: Expose your Spring Boot API endpoints via MCP and Copilot
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Expose your Spring Boot API endpoints via MCP and Copilot

**[Visual Studio Code](https://daily.dev/sources/vscode)** · 4 min read · 2 upvotes · 0 comments

## Summary

A walkthrough demonstrates exposing existing Java/Spring Boot methods as Model Context Protocol tools that GitHub Copilot can call. Using Spring AI's MCP server starter, a sample to-do application's five operations are annotated and published over a streamable HTTP MCP endpoint. VS Code connects to the endpoint via mcp.json, Copilot's tools picker enables the discovered tools, and Copilot is shown adding and listing to-dos by calling the Java service directly, sharing the same in-memory repository as the web UI.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.youtube.com/watch?v=gzyU4yn0qGw>

## Questions this post answers

### How do I expose Spring Boot Java methods as MCP tools for GitHub Copilot?

Add the Spring AI Web MVC MCP server starter dependency to pom.xml, annotate Spring component methods as MCP tools with tool name, description, and parameter annotations, and set the MCP server protocol to streamable in application.properties. This publishes an HTTP endpoint (e.g. localhost:8080/mcp) that Visual Studio Code can connect to, exposing the annotated methods as tools available in GitHub Copilot chat.

_daily.dev surfaces walkthroughs like this for developers wiring Spring services into Copilot via MCP._

### Why isn't my Spring AI MCP server endpoint available in Visual Studio Code?

The MCP endpoint is missing when the server protocol setting in application.properties is not set to streamable. Without it, the Spring AI MCP server starter falls back to the older server-sent events transport, so the streamable HTTP MCP endpoint never gets published, and VS Code cannot connect to it.

_developers debugging MCP transport issues can find setup fixes like this on daily.dev._

## Similar posts on daily.dev

- [Overview of MCP Annotations in Spring AI](https://daily.dev/posts/overview-of-mcp-annotations-in-spring-ai-xur0yz5kx) · Baeldung · 4 upvotes · 0 comments

---

Tags: [#github](https://daily.dev/tags/github), [#java](https://daily.dev/tags/java), [#mcp](https://daily.dev/tags/mcp), [#vscode](https://daily.dev/tags/vscode), [#spring-boot](https://daily.dev/tags/spring-boot)

[View this post on daily.dev](https://daily.dev/posts/expose-your-spring-boot-api-endpoints-via-mcp-and-copilot-uyjmfcfgf)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Expose your Spring Boot API endpoints via MCP and Copilot","url":"https://daily.dev/posts/expose-your-spring-boot-api-endpoints-via-mcp-and-copilot-uyjmfcfgf","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/expose-your-spring-boot-api-endpoints-via-mcp-and-copilot-uyjmfcfgf"},"datePublished":"2026-08-14T14:42:58.847Z","dateModified":"2026-09-13T20:21:13.447Z","description":"A walkthrough demonstrates exposing existing Java/Spring Boot methods as Model Context Protocol tools that GitHub Copilot can call. Using Spring AI's MCP...","image":"https://i.ytimg.com/vi/gzyU4yn0qGw/sddefault.jpg","thumbnailUrl":"https://i.ytimg.com/vi/gzyU4yn0qGw/sddefault.jpg","isAccessibleForFree":true,"articleSection":"Visual Studio Code","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"Visual Studio Code","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/d5adab6ae9fb44d19859748fc30f5e18","url":"https://daily.dev/sources/vscode"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/expose-your-spring-boot-api-endpoints-via-mcp-and-copilot-uyjmfcfgf","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":2},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"github,java,mcp,vscode,spring-boot","timeRequired":"PT4M","video":{"@type":"VideoObject","name":"Expose your Spring Boot API endpoints via MCP and Copilot","description":"A walkthrough demonstrates exposing existing Java/Spring Boot methods as Model Context Protocol tools that GitHub Copilot can call. Using Spring AI's MCP...","thumbnailUrl":"https://i.ytimg.com/vi/gzyU4yn0qGw/sddefault.jpg","uploadDate":"2026-08-14T14:42:58.847Z","duration":"PT4M","url":"https://api.daily.dev/r/UYjMfcfgF","embedUrl":"https://www.youtube.com/embed/gzyU4yn0qGw"}}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"Visual Studio Code","item":"https://daily.dev/sources/vscode"},{"@type":"ListItem","position":3,"name":"Expose your Spring Boot API endpoints via MCP and Copilot"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/expose-your-spring-boot-api-endpoints-via-mcp-and-copilot-uyjmfcfgf#faq","mainEntity":[{"@type":"Question","name":"How do I expose Spring Boot Java methods as MCP tools for GitHub Copilot?","acceptedAnswer":{"@type":"Answer","text":"Add the Spring AI Web MVC MCP server starter dependency to pom.xml, annotate Spring component methods as MCP tools with tool name, description, and parameter annotations, and set the MCP server protocol to streamable in application.properties. This publishes an HTTP endpoint (e.g. localhost:8080/mcp) that Visual Studio Code can connect to, exposing the annotated methods as tools available in GitHub Copilot chat. daily.dev surfaces walkthroughs like this for developers wiring Spring services into Copilot via MCP."}},{"@type":"Question","name":"Why isn't my Spring AI MCP server endpoint available in Visual Studio Code?","acceptedAnswer":{"@type":"Answer","text":"The MCP endpoint is missing when the server protocol setting in application.properties is not set to streamable. Without it, the Spring AI MCP server starter falls back to the older server-sent events transport, so the streamable HTTP MCP endpoint never gets published, and VS Code cannot connect to it. developers debugging MCP transport issues can find setup fixes like this on daily.dev."}}]}
```

