{"id":116508,"date":"2026-10-21T16:32:53","date_gmt":"2026-10-21T08:32:53","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/116508.html"},"modified":"2026-10-21T16:32:53","modified_gmt":"2026-10-21T08:32:53","slug":"spring-boot%e6%90%ad%e5%bb%bamcp%e6%9c%8d%e5%8a%a1","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/116508.html","title":{"rendered":"spring boot\u642d\u5efaMCP\u670d\u52a1"},"content":{"rendered":"<h3>\u4e00&#xff1a;\u4f9d\u8d56\u5b89\u88c5<\/h3>\n<p>&lt;dependencyManagement&gt;<br \/>\n    &lt;dependencies&gt;<br \/>\n        &lt;dependency&gt;<br \/>\n            &lt;groupId&gt;org.springframework.ai&lt;\/groupId&gt;<br \/>\n            &lt;artifactId&gt;spring-ai-bom&lt;\/artifactId&gt;<br \/>\n            &lt;version&gt;2.0.1&lt;\/version&gt;<br \/>\n            &lt;type&gt;pom&lt;\/type&gt;<br \/>\n            &lt;scope&gt;import&lt;\/scope&gt;<br \/>\n        &lt;\/dependency&gt;<br \/>\n    &lt;\/dependencies&gt;<br \/>\n&lt;\/dependencyManagement&gt;<br \/>\n&lt;dependencies&gt;<br \/>\n  &lt;dependency&gt;<br \/>\n      &lt;groupId&gt;org.springframework.boot&lt;\/groupId&gt;<br \/>\n      &lt;artifactId&gt;spring-boot-starter-web&lt;\/artifactId&gt;<br \/>\n  &lt;\/dependency&gt;<br \/>\n  &lt;!&#8211; Security \u7528\u4e8eBearer\u9274\u6743 &#8211;&gt;<br \/>\n  &lt;dependency&gt;<br \/>\n      &lt;groupId&gt;org.springframework.boot&lt;\/groupId&gt;<br \/>\n      &lt;artifactId&gt;spring-boot-starter-security&lt;\/artifactId&gt;<br \/>\n  &lt;\/dependency&gt;<br \/>\n  &lt;!&#8211; MCP Server WebMvc Streamable HTTP &#8211;&gt;<br \/>\n  &lt;dependency&gt;<br \/>\n      &lt;groupId&gt;org.springframework.ai&lt;\/groupId&gt;<br \/>\n      &lt;artifactId&gt;spring-ai-starter-mcp-server-webmvc&lt;\/artifactId&gt;<br \/>\n  &lt;\/dependency&gt;<br \/>\n  &lt;!&#8211; Spring AI 2.x \u4e2d spring-ai-core \u5df2\u66f4\u540d\u4e3a spring-ai-model&#xff0c;\u63d0\u4f9b &#064;Tool &#8211;&gt;<br \/>\n  &lt;dependency&gt;<br \/>\n      &lt;groupId&gt;org.springframework.ai&lt;\/groupId&gt;<br \/>\n      &lt;artifactId&gt;spring-ai-model&lt;\/artifactId&gt;<br \/>\n  &lt;\/dependency&gt;<br \/>\n&lt;\/dependencies&gt; <\/p>\n<h3>\u4e8c&#xff1a;mcp\u670d\u52a1\u914d\u7f6e<\/h3>\n<p>\u914d\u7f6e\u6587\u4ef6\u5728application.yml<\/p>\n<p>spring:<br \/>\n  ai:<br \/>\n    mcp:<br \/>\n      server:<br \/>\n        name: zkbmpt #MCP\u670d\u52a1\u540d\u79f0<br \/>\n        version: 0.0.1 #MCP \u670d\u52a1\u7248\u672c\u53f7<br \/>\n        type: SYNC #\u5de5\u5177\u6267\u884c\u6a21\u578b&#xff0c;\u9009\u503c&#xff1a;&#096;SYNC&#096;&#xff08;\u540c\u6b65\u6267\u884c&#xff09; \/ &#096;ASYNC&#096;&#xff08;\u5f02\u6b65\u6d41\u5f0f\u6267\u884c&#xff09;<br \/>\n        protocol: STREAMABLE #MCP \u5e95\u5c42\u4f20\u8f93\u534f\u8bae&#xff0c;\u53ef\u9009\u503c&#xff1a;&#096;SSE&#096; \/ &#096;STREAMABLE&#096;&#xff08;Streamable HTTP Transport&#xff09;<br \/>\n        #MCP \u670d\u52a1\u6307\u4ee4\u3001\u7cfb\u7edf\u63d0\u793a\u6587\u672c<br \/>\n        instructions: |<br \/>\n          \u8fd9\u662f\u62a5\u540d\u7cfb\u7edf\u7ba1\u7406MCP\u670d\u52a1&#xff0c;\u63d0\u4f9b\u62a5\u540d\u5355\u67e5\u8be2\u3001\u65b0\u589e\u3001\u5ba1\u6838\u5de5\u5177\u3002<br \/>\n          \u8c03\u7528\u5de5\u5177\u524d\u786e\u8ba4\u53c2\u6570&#xff0c;\u5ba1\u6838\u7c7b\u64cd\u4f5c\u8c28\u614e\u6267\u884c\u3002<br \/>\n        annotation-scanner:<br \/>\n          enabled: true #\u6ce8\u89e3\u81ea\u52a8\u626b\u63cf\u5f00\u5173<br \/>\n# \u81ea\u5b9a\u4e49MCP Bearer\u5bc6\u94a5<br \/>\nmcp:<br \/>\n  auth-token: sk-xxxx<br \/>\n# \u8c03\u8bd5\u65e5\u5fd7&#xff0c;\u67e5\u770bMCP\u62a5\u6587\u3001\u5de5\u5177\u6ce8\u518c<br \/>\nlogging:<br \/>\n  level:<br \/>\n    org.springframework.ai.mcp: DEBUG<br \/>\n    org.springframework.security: WARN <\/p>\n<h3>\u4e09&#xff1a;Security \u9274\u6743\u914d\u7f6e\u7c7b<\/h3>\n<p>package com.example.demo.mcp.config;<\/p>\n<p>import jakarta.servlet.FilterChain;<br \/>\nimport jakarta.servlet.ServletException;<br \/>\nimport jakarta.servlet.http.HttpServletRequest;<br \/>\nimport jakarta.servlet.http.HttpServletResponse;<br \/>\nimport org.springframework.beans.factory.annotation.Value;<br \/>\nimport org.springframework.context.annotation.Bean;<br \/>\nimport org.springframework.context.annotation.Configuration;<br \/>\nimport org.springframework.http.HttpMethod;<br \/>\nimport org.springframework.security.authentication.UsernamePasswordAuthenticationToken;<br \/>\nimport org.springframework.security.config.annotation.web.builders.HttpSecurity;<br \/>\nimport org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;<br \/>\nimport org.springframework.security.config.http.SessionCreationPolicy;<br \/>\nimport org.springframework.security.core.authority.AuthorityUtils;<br \/>\nimport org.springframework.security.core.context.SecurityContextHolder;<br \/>\nimport org.springframework.security.web.SecurityFilterChain;<br \/>\nimport org.springframework.security.web.authentication.www.BasicAuthenticationFilter;<br \/>\nimport org.springframework.web.filter.OncePerRequestFilter;<\/p>\n<p>import java.io.IOException;<\/p>\n<p>&#064;Configuration<br \/>\n&#064;EnableWebSecurity<br \/>\npublic class McpSecurityConfig {<\/p>\n<p>    &#064;Value(&#034;${mcp.auth-token}&#034;)<br \/>\n    private String validToken;<\/p>\n<p>    &#064;Bean<br \/>\n    public SecurityFilterChain filterChain(HttpSecurity http) throws Exception {<br \/>\n        http<br \/>\n                .csrf(csrf -&gt; csrf.disable())<br \/>\n                .sessionManagement(s -&gt; s.sessionCreationPolicy(SessionCreationPolicy.STATELESS))<br \/>\n                .authorizeHttpRequests(auth -&gt; auth<br \/>\n                        .requestMatchers(HttpMethod.OPTIONS, &#034;\/mcp&#034;, &#034;\/mcp\/**&#034;).permitAll()<br \/>\n                        .requestMatchers(&#034;\/mcp&#034;, &#034;\/mcp\/**&#034;).authenticated()<br \/>\n                        .anyRequest().permitAll())<br \/>\n                .addFilterBefore(new BearerTokenFilter(validToken), BasicAuthenticationFilter.class);<br \/>\n        return http.build();<br \/>\n    }<\/p>\n<p>    static class BearerTokenFilter extends OncePerRequestFilter {<br \/>\n        private final String expectToken;<\/p>\n<p>        public BearerTokenFilter(String expectToken) {<br \/>\n            this.expectToken &#061; expectToken;<br \/>\n        }<\/p>\n<p>        &#064;Override<br \/>\n        protected boolean shouldNotFilter(HttpServletRequest request) {<br \/>\n            if (HttpMethod.OPTIONS.matches(request.getMethod())) {<br \/>\n                return true;<br \/>\n            }<br \/>\n            String uri &#061; request.getRequestURI();<br \/>\n            return !&#034;\/mcp&#034;.equals(uri) &amp;&amp; !uri.startsWith(&#034;\/mcp\/&#034;);<br \/>\n        }<\/p>\n<p>        &#064;Override<br \/>\n        protected void doFilterInternal(HttpServletRequest request,<br \/>\n                                        HttpServletResponse response,<br \/>\n                                        FilterChain filterChain) throws ServletException, IOException {<br \/>\n            String authHeader &#061; request.getHeader(&#034;Authorization&#034;);<br \/>\n            if (authHeader &#061;&#061; null || !authHeader.startsWith(&#034;Bearer &#034;)) {<br \/>\n                response.setStatus(HttpServletResponse.SC_UNAUTHORIZED);<br \/>\n                response.setContentType(&#034;application\/json;charset&#061;utf-8&#034;);<br \/>\n                response.getWriter().write(&#034;{\\\\&#034;code\\\\&#034;:401,\\\\&#034;msg\\\\&#034;:\\\\&#034;\u7f3a\u5c11Authorization Bearer\u8bf7\u6c42\u5934\\\\&#034;}&#034;);<br \/>\n                return;<br \/>\n            }<br \/>\n            String token &#061; authHeader.substring(7);<br \/>\n            if (!expectToken.equals(token)) {<br \/>\n                response.setStatus(HttpServletResponse.SC_UNAUTHORIZED);<br \/>\n                response.setContentType(&#034;application\/json;charset&#061;utf-8&#034;);<br \/>\n                response.getWriter().write(&#034;{\\\\&#034;code\\\\&#034;:401,\\\\&#034;msg\\\\&#034;:\\\\&#034;Token\u65e0\u6548\\\\&#034;}&#034;);<br \/>\n                return;<br \/>\n            }<br \/>\n            var authentication &#061; new UsernamePasswordAuthenticationToken(<br \/>\n                    &#034;mcp-client&#034;, null, AuthorityUtils.createAuthorityList(&#034;ROLE_MCP&#034;));<br \/>\n            SecurityContextHolder.getContext().setAuthentication(authentication);<br \/>\n            filterChain.doFilter(request, response);<br \/>\n        }<br \/>\n    }<br \/>\n}<\/p>\n<h3>\u56db&#xff1a;CORS \u8de8\u57df\u914d\u7f6e\u7c7b<\/h3>\n<p>package com.example.demo.mcp.config;<\/p>\n<p>import org.springframework.context.annotation.Configuration;<br \/>\nimport org.springframework.web.servlet.config.annotation.CorsRegistry;<br \/>\nimport org.springframework.web.servlet.config.annotation.WebMvcConfigurer;<\/p>\n<p>&#064;Configuration<br \/>\npublic class McpCorsConfig implements WebMvcConfigurer {<br \/>\n    &#064;Override<br \/>\n    public void addCorsMappings(CorsRegistry registry) {<br \/>\n        registry.addMapping(&#034;\/mcp&#034;)<br \/>\n                .allowedOriginPatterns(&#034;*&#034;)<br \/>\n                .allowedMethods(&#034;GET&#034;, &#034;POST&#034;, &#034;OPTIONS&#034;)<br \/>\n                .allowedHeaders(&#034;*&#034;)<br \/>\n                .allowCredentials(false)<br \/>\n                .maxAge(3600);<br \/>\n    }<br \/>\n}<\/p>\n<h3>\u4e94&#xff1a;Transport \u4e0a\u4e0b\u6587\u63d0\u53d6\u914d\u7f6e\u7c7b<\/h3>\n<p>package com.example.demo.mcp.config;<\/p>\n<p>import io.modelcontextprotocol.common.McpTransportContext;<br \/>\nimport org.springframework.ai.mcp.server.webmvc.transport.WebMvcStreamableServerTransportProvider;<br \/>\nimport org.springframework.context.annotation.Bean;<br \/>\nimport org.springframework.context.annotation.Configuration;<\/p>\n<p>import java.util.HashMap;<br \/>\nimport java.util.Map;<\/p>\n<p>&#064;Configuration<br \/>\npublic class McpTransportConfig {<br \/>\n    &#064;Bean<br \/>\n    public WebMvcStreamableServerTransportProvider transportProvider() {<br \/>\n        return WebMvcStreamableServerTransportProvider.builder()<br \/>\n                .contextExtractor(serverRequest -&gt; {<br \/>\n                    Map&lt;String, Object&gt; ctxMap &#061; new HashMap&lt;&gt;();<br \/>\n                    String authHeader &#061; serverRequest.headers().firstHeader(&#034;Authorization&#034;);<br \/>\n                    ctxMap.put(&#034;Authorization&#034;, authHeader);<br \/>\n                    return McpTransportContext.create(ctxMap);<br \/>\n                })<br \/>\n                .build();<br \/>\n    }<br \/>\n}<\/p>\n<h3>\u516d&#xff1a;MCP \u5de5\u5177\u670d\u52a1\u7c7b<\/h3>\n<p>package com.example.demo.mcp.service;<\/p>\n<p>import org.springframework.ai.mcp.annotation.McpTool;<br \/>\nimport org.springframework.ai.mcp.annotation.McpToolParam;<br \/>\nimport org.springframework.stereotype.Service;<\/p>\n<p>import java.time.LocalDateTime;<br \/>\nimport java.time.ZoneId;<\/p>\n<p>&#064;Service<br \/>\npublic class McpToolService {<br \/>\n    &#064;McpTool(name &#061; &#034;serverTime&#034;, description &#061; &#034;\u8fd4\u56de\u670d\u52a1\u5f53\u524d\u65f6\u95f4&#xff08;Asia\/Shanghai&#xff09;&#034;)<br \/>\n    public String serverTime() {<br \/>\n        return LocalDateTime.now(ZoneId.of(&#034;Asia\/Shanghai&#034;)).toString();<br \/>\n    }<\/p>\n<p>    &#064;McpTool(name &#061; &#034;query&#034;, description &#061; &#034;\u8003\u751f\u4fe1\u606f\u67e5\u8be2&#034;)<br \/>\n    public String query(<br \/>\n            &#064;McpToolParam(description &#061; &#034;\u8003\u751f\u59d3\u540d&#034;, required &#061; true) String name,<br \/>\n            &#064;McpToolParam(description &#061; &#034;\u5b66\u53f7&#034;, required &#061; true) String studentNo) {<br \/>\n        \/\/\u5177\u4f53\u7684\u4e1a\u52a1\u903b\u8f91<br \/>\n        return &#034;\u8003\u751f&#xff1a;&#034; &#043; name &#043; &#034;,\u5b66\u53f7&#xff1a;&#034; &#043; studentNo;<br \/>\n    }<br \/>\n}<\/p>\n<h3>\u4e03&#xff1a;\u6d4b\u8bd5\u8c03\u8bd5<\/h3>\n<p>\u4f7f\u7528\u00a0MCP Inspector\u00a0\u5de5\u5177\u8fdb\u884cmcp\u670d\u52a1\u8c03\u8bd5<\/p>\n<h4>1&#xff1a;\u6dfb\u52a0\u670d\u52a1\u5668<\/h4>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"919\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261021083250-6ad878b264e85.png\" width=\"1920\" \/><\/p>\n<p>\u9009\u62e9stramable-http<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"411\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261021083251-6ad878b334b5f.png\" width=\"625\" \/><\/p>\n<h4>2&#xff1a;\u914d\u7f6eheader<\/h4>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"301\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261021083251-6ad878b34e02f.png\" width=\"667\" \/><\/p>\n<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"823\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261021083251-6ad878b364bba.png\" width=\"605\" \/><\/p>\n<h4>3:\u8c03\u8bd5<\/h4>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"358\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261021083251-6ad878b381dc6.png\" width=\"669\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"919\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261021083251-6ad878b396fed.png\" width=\"1920\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" alt=\"\" height=\"534\" src=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261021083252-6ad878b4315bf.png\" width=\"1446\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e00&#xff1a;\u4f9d\u8d56\u5b89\u88c5<br \/>\norg.springframework.aispring-ai-bom2.0.1pomimport<br \/>\n&lt;\/depend<\/p>\n","protected":false},"author":2,"featured_media":116501,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[53,99,98,292],"topic":[],"class_list":["post-116508","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-server","tag-ai","tag-java","tag-spring-boot","tag-292"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>spring boot\u642d\u5efaMCP\u670d\u52a1 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/116508.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"spring boot\u642d\u5efaMCP\u670d\u52a1 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"\u4e00&#xff1a;\u4f9d\u8d56\u5b89\u88c5 org.springframework.aispring-ai-bom2.0.1pomimport &lt;\/depend\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/116508.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-10-21T08:32:53+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261021083250-6ad878b264e85.png\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/116508.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/116508.html\",\"name\":\"spring boot\u642d\u5efaMCP\u670d\u52a1 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-10-21T08:32:53+00:00\",\"dateModified\":\"2026-10-21T08:32:53+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/116508.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/116508.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/116508.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"spring boot\u642d\u5efaMCP\u670d\u52a1\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"spring boot\u642d\u5efaMCP\u670d\u52a1 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/116508.html","og_locale":"zh_CN","og_type":"article","og_title":"spring boot\u642d\u5efaMCP\u670d\u52a1 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"\u4e00&#xff1a;\u4f9d\u8d56\u5b89\u88c5 org.springframework.aispring-ai-bom2.0.1pomimport &lt;\/depend","og_url":"https:\/\/www.wsisp.com\/helps\/116508.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-10-21T08:32:53+00:00","og_image":[{"url":"https:\/\/www.wsisp.com\/helps\/wp-content\/uploads\/2026\/10\/20261021083250-6ad878b264e85.png"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"4 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/116508.html","url":"https:\/\/www.wsisp.com\/helps\/116508.html","name":"spring boot\u642d\u5efaMCP\u670d\u52a1 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-10-21T08:32:53+00:00","dateModified":"2026-10-21T08:32:53+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/116508.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/116508.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/116508.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"spring boot\u642d\u5efaMCP\u670d\u52a1"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/116508","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=116508"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/116508\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media\/116501"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=116508"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=116508"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=116508"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=116508"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}