MCP.so
登录

Spring MCP Server

@deepanshu-rawat6

关于 Spring MCP Server

A basic implementation of MCP server using Spring Boot

基本信息

分类

其他

许可证

MIT

运行时

java

传输方式

stdio

发布者

deepanshu-rawat6

配置

暂无标准配置

该服务器的 README 中没有可解析的 MCP 配置块,请前往代码仓库查看安装说明。

代码仓库

工具

未检测到工具

工具是从 README 中自动提取的。维护者可以在 ## Tools 标题下列出工具,即可填充这部分内容。

概览

What is Spring MCP Server?

Spring MCP Server is a Spring Boot application that implements the Model Context Protocol (MCP) to expose data and tools to AI-powered clients. It is built with Spring AI and Spring Model Context Protocol Server, and is intended for developers who want to create secure, two-way connections between their data sources and AI tools like Claude Desktop.

How to use Spring MCP Server?

Create a Spring Boot application with the Spring Model Context Protocol Server dependency, define service classes annotated with @Tool, and register tool callbacks in a @Bean method. Build the application with mvn clean package -DskipTests and configure it in claude_desktop_config.json by specifying the Java command and the path to the generated JAR file. Start Claude Desktop to see the installed MCP server and its available tools.

Key features of Spring MCP Server

  • Built on Spring Boot 3.4.4 and Spring AI 0.4.0
  • Uses @Tool annotation to expose Java methods as MCP tools
  • Provides tool descriptions and names for AI clients
  • Integrates directly with Claude Desktop via stdio transport
  • Supports custom tool callbacks through Spring beans
  • Runs as a standalone Java application without a web server

Use cases of Spring MCP Server

  • Expose a portfolio of personal or professional information to an AI assistant
  • Provide a curated list of links (e.g., GitHub, LinkedIn, Twitter) for retrieval by an AI client
  • Create a knowledge base that an AI can query using natural language prompts
  • Integrate custom Spring Boot services into an AI-powered chat interface

FAQ from Spring MCP Server

What are the runtime requirements for Spring MCP Server?

Java 21, Maven 3.9.9, Spring Boot 3.4.4, Spring AI 0.4.0, and the Spring Model Context Protocol Server dependency are required. The application is built and run as a JAR file.

How does Spring MCP Server connect to an AI client?

The server uses the stdio transport protocol. Clients such as Claude Desktop are configured to launch the JAR file as a subprocess and communicate via standard input/output.

How are tools defined in Spring MCP Server?

Tools are defined by annotating methods in a Spring service class with @Tool(name = "...", description = "..."). The annotated methods are then registered as tool callbacks using ToolCallbacks.from(service) in a Spring @Bean method.

Where does the data used by the server reside?

Data is defined in Java code within the service class, typically loaded at startup (e.g., via @PostConstruct). The README example stores data in a static list inside the service.

Can I use Spring MCP Server with other AI clients besides Claude Desktop?

The README only demonstrates integration with Claude Desktop. The configuration uses claude_desktop_config.json, but the underlying MCP standard could support other clients that implement the same protocol.

评论

其他 分类下的更多 MCP 服务器