{"id":233113,"date":"2026-07-23T04:13:52","date_gmt":"2026-07-23T11:13:52","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/java\/?p=233113"},"modified":"2026-07-23T04:16:52","modified_gmt":"2026-07-23T11:16:52","slug":"smarter-spring-development-in-eclipse-with-github-copilot","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/java\/smarter-spring-development-in-eclipse-with-github-copilot\/","title":{"rendered":"Smarter Spring Development in Eclipse with GitHub Copilot"},"content":{"rendered":"<p>How the Spring Tools MCP Server and GitHub Copilot together make Spring Development more efficient.<\/p>\n<h2><a href=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2026\/07\/Screenshot-2026-07-23-at-15.31.53.webp\"><img decoding=\"async\" class=\"alignnone size-full wp-image-233114\" src=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2026\/07\/Screenshot-2026-07-23-at-15.31.53.webp\" alt=\"Screenshot 2026 07 23 at 15 31 53 image\" width=\"928\" height=\"373\" srcset=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2026\/07\/Screenshot-2026-07-23-at-15.31.53.webp 928w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2026\/07\/Screenshot-2026-07-23-at-15.31.53-300x121.webp 300w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2026\/07\/Screenshot-2026-07-23-at-15.31.53-768x309.webp 768w\" sizes=\"(max-width: 928px) 100vw, 928px\" \/><\/a>\nIntroduction<\/h2>\n<p>If you write Spring Boot applications in Eclipse, you already know that <a href=\"https:\/\/spring.io\/tools#eclipse\">Spring Tools for Eclipse<\/a> brings best-in-class tooling right into your IDE, including quick navigation and visualization of core Spring elements in your projects, live information from running Spring Boot applications, Spring specific auto completion, validations and quick fixes, request mapping overviews, and much more. In addition to that, if you have the <a href=\"https:\/\/marketplace.eclipse.org\/content\/github-copilot\">GitHub Copilot plugin for Eclipse<\/a> installed, you have a powerful AI coding assistant at your fingertips.<\/p>\n<p>But here is the question that most developers haven\u2019t asked yet: <strong>what does Copilot actually know about your Spring project<\/strong><strong>, and how efficiently can it get that context? <\/strong>Copilot can search across the repository and infer a lot from source files, but that is still a general discovery process. It does not automatically have direct, structured access to things like your beans graph, the resolved classpath, the exact Spring Boot version, or the diagnostics your IDE is already computing. <strong>Spring Tools MCP Server<\/strong> helps close that gap by giving Copilot a fast, direct way to retrieve Spring-specific project information through a small number of targeted tool calls, which can improve response quality and may also reduce unnecessary exploration and token usage.<\/p>\n<p>This post explains why this matters and walks you through two hands-on demos so you can see it in action.<\/p>\n<h2>Why Connect Copilot to the Spring Tools MCP Server?<\/h2>\n<p>Before diving into the setup, it\u2019s worth understanding the core problem this solves and what you gain.<\/p>\n<p>The Spring Tools MCP server exposes the Spring specific facts that it knows about your projects as callable tools. When Copilot\u2019s agent mode needs to answer a Spring question, it can <strong>call one of those tools<\/strong> to fetch the real answer from your running IDE instead of guessing or searching for the answer by reading all sources from your project, using grep in the command line, or similar techniques. This is the difference between a colleague who has never seen your project and one who has had it open for hours.<\/p>\n<h3>Benefits at a Glance<\/h3>\n<table width=\"624\">\n<tbody>\n<tr>\n<td width=\"187\"><strong>Benefit<\/strong><\/td>\n<td width=\"437\"><strong>What it means for you<\/strong><\/td>\n<\/tr>\n<tr>\n<td width=\"187\"><strong>Token savings<\/strong><\/td>\n<td width=\"437\">Copilot fetches only the structured facts it needs on demand, rather than reading through large amounts of source files. This means lower latency and cost per interaction.<\/td>\n<\/tr>\n<tr>\n<td width=\"187\"><strong>Grounded accuracy<\/strong><\/td>\n<td width=\"437\">Responses are based on static analysis inside the IDE , not training-time guesses. Hallucinated bean names, missing imports, and wrong API calls drop dramatically.<\/td>\n<\/tr>\n<tr>\n<td width=\"187\"><strong>Version-aware suggestions<\/strong><\/td>\n<td width=\"437\">The Spring Tools MCP server reports your exact Spring Boot version, so Copilot will not suggest APIs introduced in Boot 3.x when you are on 2.7, or vice versa.<\/td>\n<\/tr>\n<tr>\n<td width=\"187\"><strong>Version validation<\/strong><\/td>\n<td width=\"437\">The Spring Tools MCP server compares the Spring Boot version used in the projects to those that are available to make Copilot aware of available updates and latest versions in general, so that Copilot always stays on top of the latest Spring versions available. It can even use project-defined repositories to look up available versions, so that it can make Copilot aware of the latest versions available to you specifically (e.g. via a commercial support or a company-internal repository).<\/td>\n<\/tr>\n<tr>\n<td width=\"187\"><strong>Correct bean wiring<\/strong><\/td>\n<td width=\"437\">Copilot knows the real bean graph: which beans exist, what their types are, and how they depend on each other.<\/td>\n<\/tr>\n<tr>\n<td width=\"187\"><strong>Stereotype awareness<\/strong><\/td>\n<td width=\"437\">The model sees which classes carry @Service, @Repository, @Controller, and other stereotypes (incuding user-defined ones and those that you assign to a class via supertypes instead of annotations), enabling more accurate architectural suggestions.<\/td>\n<\/tr>\n<tr>\n<td width=\"187\"><strong>Live diagnostics<\/strong><\/td>\n<td width=\"437\">Copilot can read the exact errors and warnings your IDE has already detected before generating a fix, so it addresses real problems rather than imagined ones.<\/td>\n<\/tr>\n<tr>\n<td width=\"187\"><strong>Feedback loops<\/strong><\/td>\n<td width=\"437\">The loop that is only possible with real IDE feedback: agents can fetch diagnostics, apply a fix, and re-fetch diagnostics to verify it worked. No need for the agent to execute long builds and evaluate the build output.<\/td>\n<\/tr>\n<tr>\n<td width=\"187\"><strong>No stale knowledge<\/strong><\/td>\n<td width=\"437\">The MCP always reflects the current state of your workspace. Adding a dependency or renaming a bean is immediately visible to the agent.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>&nbsp;<\/p>\n<h2><strong>Getting Started<\/strong><\/h2>\n<h3>Prerequisites<\/h3>\n<ul>\n<li><a href=\"https:\/\/spring.io\/tools\">Spring Tools for Eclipse<\/a>2.0 or later installed<\/li>\n<li><a href=\"https:\/\/marketplace.eclipse.org\/content\/github-copilot\">GitHub Copilot plugin for Eclipse<\/a> installed and signed in<\/li>\n<li>A Spring Boot project open in your workspace<\/li>\n<\/ul>\n<h3>Step 1: Enable the Embedded MCP Server<\/h3>\n<p>The MCP server is experimental (at the moment) and must be switched on explicitly.<\/p>\n<ol>\n<li>In Eclipse, go to <strong>Window \u2192 Preferences \u2192 Spring \u2192 AI<\/strong><\/li>\n<li>Check <strong>Enable embedded MCP server<\/strong><\/li>\n<li>Click <strong>Apply and Close<\/strong>, then restart Eclipse<\/li>\n<\/ol>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2026\/07\/img2.webp\"><img decoding=\"async\" class=\"alignnone size-full wp-image-233117\" src=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2026\/07\/img2.webp\" alt=\"img2 image\" width=\"333\" height=\"648\" srcset=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2026\/07\/img2.webp 333w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2026\/07\/img2-154x300.webp 154w\" sizes=\"(max-width: 333px) 100vw, 333px\" \/><\/a>\n<div class=\"alert alert-success\"><p class=\"alert-divider\"><i class=\"fabric-icon fabric-icon--Lightbulb\"><\/i><strong>Tip<\/strong><\/p>You may need to approve the auto detected MCP server after restarting you IDE.<\/div><\/p>\n<h3>Step 2: Verify the MCP Is Registered with Copilot<\/h3>\n<p>Spring Tools automatically writes the MCP server entry into Copilot\u2019s configuration for Eclipse. To confirm:<\/p>\n<ol>\n<li>Click the <strong>GitHub Copilot icon<\/strong> in the Eclipse toolbar.<\/li>\n<li>Go to <strong>Edit Preferences \u2192 MCP Servers<\/strong>.<\/li>\n<li>You should see an entry similar to:<\/li>\n<\/ol>\n<pre class=\"prettyprint language-default\"><code class=\"language-default\">{\r\n  \"servers\": {\r\n    \"spring-tools-local-dev-server\": {\r\n      \"url\": \"http:\/\/localhost:50627\/mcp\",\r\n      \"type\": \"http\"\r\n    }\r\n  }\r\n}\r\n<\/code><\/pre>\n<p><div class=\"alert alert-success\"><p class=\"alert-divider\"><i class=\"fabric-icon fabric-icon--Lightbulb\"><\/i><strong>Tip<\/strong><\/p>The port number might differ, but Spring Tools keeps the configuration up to date automatically, you do not need to update it manually.<\/div><\/p>\n<h3>Step 3: Switch Copilot Chat to Agent Mode<\/h3>\n<p>MCP tools are only invoked in <strong>Agent mode<\/strong>, not in the standard chat mode.<\/p>\n<ol>\n<li>Open the <strong>GitHub Copilot Chat<\/strong> panel in Eclipse.<\/li>\n<li>In the model\/mode selector at the top of the chat panel, switch from <strong>Chat<\/strong> to <strong>Agent<\/strong>.<\/li>\n<li>You are now ready to run the demos below.<\/li>\n<\/ol>\n<h2>Demos<\/h2>\n<p>The following two prompts demonstrate the collaboration between Copilot and the Spring Tools MCP server in action. In each case, Copilot will invoke one or more Spring Tools MCP tools automatically to ground its response in your live project data.<\/p>\n<h3>Demo 1: Exploring Your Application Context<\/h3>\n<p>One of the first things a new developer (or an AI agent) needs to understand about a Spring project is its bean graph: what\u2019s registered, what type it is, and how components are wired together. Without the Spring Tools MCP server, Copilot can only guess that from what\u2019s visible in the current file and by searching and reading through source files of your project. With the MCP server, it queries the Spring Tools for the authoritative answer.<\/p>\n<p><div class=\"alert alert-primary\"><p class=\"alert-divider\"><i class=\"fabric-icon fabric-icon--Info\"><\/i><strong>Try this prompt in Copilot Agent mode:<\/strong><\/p>What beans are registered in my application context?<\/div>\n<a href=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2026\/07\/img3.webp\"><img decoding=\"async\" class=\"alignnone size-full wp-image-233119\" src=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2026\/07\/img3.webp\" alt=\"img3 image\" width=\"422\" height=\"549\" srcset=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2026\/07\/img3.webp 422w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2026\/07\/img3-231x300.webp 231w\" sizes=\"(max-width: 422px) 100vw, 422px\" \/><\/a><\/p>\n<h4>What happens behind the scenes<\/h4>\n<p>When you send this prompt, Copilot\u2019s agent recognizes it needs project-specific data. It calls the MCP tool to retrieve the full bean list from the Spring Tools, which has already indexed your project. The response is then structured and returned to you directly in chat.<\/p>\n<p>You will receive a breakdown of all beans registered in your context, including:<\/p>\n<ul>\n<li>Bean name and fully qualified class name<\/li>\n<li>Stereotype (@Service, @Repository, @Controller, @Component, etc.)<\/li>\n<li>Dependencies and injection points<\/li>\n<li>Which module or configuration class registers each bean<\/li>\n<\/ul>\n<h4>Example response (truncated)<\/h4>\n<pre class=\"prettyprint language-xml\"><code class=\"language-xml\">Your application context has 24 registered beans:\r\n\r\n\r\n\r\n\r\n\u00a0 UserService\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 @Service\u00a0\u00a0\u00a0\u00a0\u00a0 com.example.service.UserService\r\n\r\n\u00a0 UserRepository\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 @Repository\u00a0\u00a0 com.example.repository.UserRepository\r\n\r\n\u00a0 ProductController\u00a0\u00a0\u00a0\u00a0 @RestController\u00a0 com.example.web.ProductController\r\n\r\n\u00a0 SecurityConfig\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 @Configuration\u00a0 com.example.config.SecurityConfig\r\n\r\n\u00a0 DataSource\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 @Bean\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 com.example.config.DataSourceConfig\r\n\r\n\u00a0 ...\r\n\r\n\r\n\r\n\r\nUserService depends on: UserRepository, PasswordEncoder\r\n\r\nProductController depends on: ProductService, UserService<\/code><\/pre>\n<p>This is data that the Spring Tools has already computed. The MCP server simply makes it available to the agent on demand \u2014 no file pasting, no hallucination, no token waste.<\/p>\n<h3>Demo 2: Fetching Live Project Diagnostics<\/h3>\n<p>The second demo shows something even more powerful: giving Copilot awareness of your project\u2019s current errors and warnings <strong><em>before<\/em><\/strong> it tries to fix them. Without this, an AI agent might generate a fix that addresses a symptom while ignoring the root cause \u2014 or worse, introduces a new problem it can\u2019t see.<\/p>\n<p><div class=\"alert alert-primary\"><p class=\"alert-divider\"><i class=\"fabric-icon fabric-icon--Info\"><\/i><strong>Try this prompt in Copilot Agent mode:<\/strong><\/p>Show me the Spring specific diagnostics of the project.<\/div>\n<a href=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2026\/07\/img4.webp\"><img decoding=\"async\" class=\"alignnone size-full wp-image-233125\" src=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2026\/07\/img4.webp\" alt=\"img4 image\" width=\"420\" height=\"544\" srcset=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2026\/07\/img4.webp 420w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2026\/07\/img4-232x300.webp 232w\" sizes=\"(max-width: 420px) 100vw, 420px\" \/><\/a><\/p>\n<h4>What happens behind the scenes<\/h4>\n<p>By explicitly naming the tool in your prompt, you instruct the agent to call <strong>getProjectDiagnostics<\/strong> on the Spring Boot Language Server. This is the same set of errors, warnings, and info markers you see in Eclipse\u2019s <strong>Problems<\/strong> view \u2014 but now surfaced directly in chat, where Copilot can reason about them and propose targeted fixes.<\/p>\n<p>The diagnostics response includes:<\/p>\n<ul>\n<li>File path and line number of each issue<\/li>\n<li>Severity level (Error \/ Warning \/ Info)<\/li>\n<li>A human-readable message (identical to what the IDE shows)<\/li>\n<li>The specific Spring rule or validation that triggered it<\/li>\n<\/ul>\n<h4>Example response (truncated)<\/h4>\n<pre class=\"prettyprint language-xml\"><code class=\"language-xml\">Project diagnostics via getProjectDiagnostics (Spring Boot Language Server):\r\n\r\nERROR   UserController.java:42\r\n  No bean of type 'EmailService' found in application context.\r\n  Consider adding @Service or @Component to EmailService.\r\n\r\nWARNING SecurityConfig.java:17\r\n  @Configuration class missing @EnableWebSecurity.\r\n  Spring Security auto-configuration may not apply correctly.\r\n\r\nINFO    application.properties:5\r\n  Property 'spring.datasource.url' is deprecated since Boot 3.2.\r\n  Suggested replacement: spring.datasource.jdbc-url\r\n\r\n3 issues found (1 error, 1 warning, 1 info).<\/code><\/pre>\n<p>Once Copilot has this information, you can follow up naturally: <em>\u201cFix the missing EmailService bean error.\u201d<\/em> The agent already knows the exact location and the root cause, so it can generate a precise, correct fix, not a guess.<\/p>\n<p><div class=\"alert alert-success\"><p class=\"alert-divider\"><i class=\"fabric-icon fabric-icon--Lightbulb\"><\/i><strong>Tip<\/strong><\/p>You can also let Copilot decide when to call getProjectDiagnostics on its own. In a multi-step agentic task (e.g. &#8216;Refactor UserService and make sure there are no new errors&#8217;), the agent will often call this tool automatically at the end to verify its changes did not introduce new problems.<\/div><\/p>\n<h2>Discovering All Available MCP Tools<\/h2>\n<p>The Spring Tools MCP server exposes more tools than just the two shown above. You can discover everything it offers through the chat panel:<\/p>\n<p><strong>Chat<\/strong> <strong>Panel<\/strong> <strong>\u2192 <\/strong><strong>Configure Tools \u2192 <\/strong><strong>Model Context Protocol (MCP)<\/strong><\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2026\/07\/img5.webp\"><img decoding=\"async\" class=\"alignnone size-full wp-image-233126\" src=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2026\/07\/img5.webp\" alt=\"img5 image\" width=\"468\" height=\"253\" srcset=\"https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2026\/07\/img5.webp 468w, https:\/\/devblogs.microsoft.com\/java\/wp-content\/uploads\/sites\/51\/2026\/07\/img5-300x162.webp 300w\" sizes=\"(max-width: 468px) 100vw, 468px\" \/><\/a><\/p>\n<h2>Conclusion<\/h2>\n<p>The Spring Tools MCP server bridges the gap between what GitHub Copilot knows in general and what it needs to know about <em>your<\/em> project specifically. By connecting Copilot\u2019s agent mode to the live data your IDE already computes, you get responses that are grounded in reality, lighter on tokens, and accurate enough to trust.<\/p>\n<h2>Feedback<\/h2>\n<p>GitHub Copilot for Eclipse is open source, your voice shapes its future.\nVisit the repository at <a href=\"https:\/\/github.com\/microsoft\/copilot-for-eclipse\">github.com\/microsoft\/copilot-for-eclipse<\/a> to report issues, suggest features, or submit a pull request. Every contribution, big or small, helps make the Eclipse developer experience better for everyone.<\/p>\n<p>The Spring Tools MCP server is at an early experimental stage, so we would love to hear your feedback and suggestions. You can find the Spring Tools (including the embedded MCP server) project at <a href=\"https:\/\/github.com\/spring-projects\/spring-tools\/\">https:\/\/github.com\/spring-projects\/spring-tools\/<\/a>. Please visit the repository to report issues, suggest new features, or submit a pull request.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>How the Spring Tools MCP Server and GitHub Copilot together make Spring Development more efficient. Introduction If you write Spring Boot applications in Eclipse, you already know that Spring Tools for Eclipse brings best-in-class tooling right into your IDE, including quick navigation and visualization of core Spring elements in your projects, live information from running [&hellip;]<\/p>\n","protected":false},"author":97204,"featured_media":233114,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[1],"tags":[852,248,761],"class_list":["post-233113","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-java","tag-github-copilot","tag-java","tag-spring-boot"],"acf":[],"blog_post_summary":"<p>How the Spring Tools MCP Server and GitHub Copilot together make Spring Development more efficient. Introduction If you write Spring Boot applications in Eclipse, you already know that Spring Tools for Eclipse brings best-in-class tooling right into your IDE, including quick navigation and visualization of core Spring elements in your projects, live information from running [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/posts\/233113","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/users\/97204"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/comments?post=233113"}],"version-history":[{"count":1,"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/posts\/233113\/revisions"}],"predecessor-version":[{"id":233139,"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/posts\/233113\/revisions\/233139"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/media\/233114"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/media?parent=233113"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/categories?post=233113"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/java\/wp-json\/wp\/v2\/tags?post=233113"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}