发现优秀的 MCP 服务器

通过 MCP 服务器扩展您的代理能力,拥有 86,267 个能力。

全部86,267
M365 Roadmap MCP Server

M365 Roadmap MCP Server

A Python-based MCP server that enables AI agents to query the Microsoft 365 Roadmap programmatically.

LibreLink MCP Server

LibreLink MCP Server

Enables access to FreeStyle Libre glucose data through Claude Desktop, providing current readings, historical data, statistics, and trend analysis from LibreLinkUp accounts with secure credential storage.

Spring Ai Mcp Deepseek

Spring Ai Mcp Deepseek

好的,以下是将 Spring AI 与 MCP 服务(包括 MCP server 和 Deepseek client)整合的步骤和一些关键考虑因素: **理解 MCP 和 Deepseek** * **MCP (Model Control Plane):** 通常指的是一个用于管理、部署和监控机器学习模型的平台。它可能包含模型注册、版本控制、A/B 测试、监控等功能。 具体实现会因供应商而异。你需要了解你使用的 MCP 平台的具体 API 和协议。 * **Deepseek:** Deepseek 是一家提供大语言模型 (LLM) 服务的公司。 Deepseek Client 指的是用于与 Deepseek LLM API 交互的客户端库或 SDK。 **整合步骤 (通用指南)** 由于 MCP 和 Deepseek 的具体实现可能不同,以下是一个通用的整合指南,你需要根据你的具体环境进行调整: 1. **依赖管理:** * **Spring AI:** 在你的 `pom.xml` (Maven) 或 `build.gradle` (Gradle) 文件中添加 Spring AI 的依赖。 确保选择与你的 Spring Boot 版本兼容的 Spring AI 版本。 ```xml <!-- Maven --> <dependency> <groupId>org.springframework.ai</groupId> <artifactId>spring-ai-core</artifactId> <version>最新版本</version> <!-- 替换为实际版本 --> </dependency> <!-- 如果需要特定的 LLM 提供商集成,例如 OpenAI --> <dependency> <groupId>org.springframework.ai</groupId> <artifactId>spring-ai-openai</artifactId> <version>最新版本</version> <!-- 替换为实际版本 --> </dependency> ``` ```gradle // Gradle dependencies { implementation 'org.springframework.ai:spring-ai-core:最新版本' // 替换为实际版本 implementation 'org.springframework.ai:spring-ai-openai:最新版本' // 替换为实际版本 (如果需要) } ``` * **Deepseek Client:** 添加 Deepseek 提供的客户端库的依赖。 这可能是一个 Maven 或 Gradle 依赖,或者你需要手动下载 JAR 文件并添加到你的项目中。 查阅 Deepseek 的文档以获取正确的依赖信息。 ```xml <!-- Maven (示例,需要替换为 Deepseek 提供的实际依赖) --> <dependency> <groupId>com.deepseek</groupId> <artifactId>deepseek-client</artifactId> <version>版本号</version> <!-- 替换为实际版本 --> </dependency> ``` ```gradle // Gradle (示例,需要替换为 Deepseek 提供的实际依赖) dependencies { implementation 'com.deepseek:deepseek-client:版本号' // 替换为实际版本 } ``` * **MCP Client:** 添加 MCP 平台提供的客户端库的依赖。 这可能是一个 Maven 或 Gradle 依赖,或者你需要手动下载 JAR 文件并添加到你的项目中。 查阅 MCP 平台的文档以获取正确的依赖信息。 ```xml <!-- Maven (示例,需要替换为 MCP 提供的实际依赖) --> <dependency> <groupId>com.mcp</groupId> <artifactId>mcp-client</artifactId> <version>版本号</version> <!-- 替换为实际版本 --> </dependency> ``` ```gradle // Gradle (示例,需要替换为 MCP 提供的实际依赖) dependencies { implementation 'com.mcp:mcp-client:版本号' // 替换为实际版本 } ``` 2. **配置 Spring AI:** * **`application.properties` 或 `application.yml`:** 配置 Spring AI 以使用 Deepseek LLM。 这通常涉及设置 API 密钥、端点 URL 等。 Spring AI 可能没有直接支持 Deepseek 的集成,因此你可能需要创建一个自定义的 `ChatClient` 实现。 ```properties # application.properties (示例,需要根据 Deepseek 的要求进行调整) spring.ai.deepseek.api-key=你的Deepseek API密钥 spring.ai.deepseek.base-url=Deepseek API 的基本 URL ``` ```yaml # application.yml (示例,需要根据 Deepseek 的要求进行调整) spring: ai: deepseek: api-key: 你的Deepseek API密钥 base-url: Deepseek API 的基本 URL ``` 3. **创建自定义 `ChatClient` (如果 Spring AI 没有直接支持):** * 如果 Spring AI 没有内置的 Deepseek 集成,你需要创建一个自定义的 `ChatClient` 实现。 这涉及实现 `ChatClient` 接口,并使用 Deepseek Client 与 Deepseek API 进行交互。 ```java import org.springframework.ai.chat.ChatClient; import org.springframework.ai.chat.ChatResponse; import org.springframework.ai.chat.prompt.Prompt; import com.deepseek.client.DeepseekApiClient; // 假设的 Deepseek Client 类 public class DeepseekChatClient implements ChatClient { private final DeepseekApiClient deepseekApiClient; public DeepseekChatClient(DeepseekApiClient deepseekApiClient) { this.deepseekApiClient = deepseekApiClient; } @Override public ChatResponse call(Prompt prompt) { // 1. 将 Spring AI 的 Prompt 转换为 Deepseek API 期望的格式 String deepseekPrompt = convertToDeepseekPrompt(prompt); // 2. 使用 Deepseek Client 调用 Deepseek API String deepseekResponse = deepseekApiClient.generate(deepseekPrompt); // 3. 将 Deepseek API 的响应转换为 Spring AI 的 ChatResponse ChatResponse chatResponse = convertToChatResponse(deepseekResponse); return chatResponse; } // 实现 convertToDeepseekPrompt 和 convertToChatResponse 方法 private String convertToDeepseekPrompt(Prompt prompt) { // 将 Spring AI 的 Prompt 对象转换为 Deepseek API 期望的字符串格式 // 这可能涉及提取消息、角色等信息,并将其格式化为 Deepseek API 要求的 JSON 或其他格式 return "Deepseek 格式的 Prompt"; } private ChatResponse convertToChatResponse(String deepseekResponse) { // 将 Deepseek API 返回的字符串响应转换为 Spring AI 的 ChatResponse 对象 // 这可能涉及解析 JSON 响应,提取文本内容,并将其封装到 ChatResponse 中 return new ChatResponse("Spring AI 格式的 ChatResponse"); } } ``` 4. **配置 MCP 集成:** * **获取模型信息:** 使用 MCP Client 从 MCP server 获取 Deepseek 模型的部署信息,例如端点 URL、模型版本等。 * **动态配置:** 根据从 MCP 获取的信息,动态配置 DeepseekChatClient 的连接参数。 这允许你根据 MCP 的管理来切换模型版本或端点。 ```java import com.mcp.client.McpClient; // 假设的 MCP Client 类 import com.mcp.client.ModelInfo; @Configuration public class AiConfig { @Autowired private McpClient mcpClient; @Bean public DeepseekChatClient deepseekChatClient() { // 从 MCP 获取模型信息 ModelInfo modelInfo = mcpClient.getModelInfo("deepseek-model"); // 替换为你的模型名称 // 根据模型信息配置 DeepseekApiClient DeepseekApiClient deepseekApiClient = new DeepseekApiClient(modelInfo.getEndpointUrl(), modelInfo.getVersion()); // 假设的 DeepseekApiClient 构造函数 // 创建 DeepseekChatClient return new DeepseekChatClient(deepseekApiClient); } } ``` 5. **使用 Spring AI:** * 在你的 Spring 组件中注入 `ChatClient` (或 `DeepseekChatClient`),并使用它来与 Deepseek LLM 进行交互。 ```java import org.springframework.ai.chat.ChatClient; import org.springframework.ai.chat.ChatResponse; import org.springframework.ai.chat.prompt.Prompt; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @Service public class MyService { @Autowired private ChatClient chatClient; // 或者 DeepseekChatClient public String generateResponse(String userPrompt) { Prompt prompt = new Prompt(userPrompt); ChatResponse response = chatClient.call(prompt); return response.getResult().getOutput().getContent(); } } ``` **关键考虑因素:** * **Deepseek Client API:** 仔细阅读 Deepseek Client 的文档,了解如何使用它来与 Deepseek API 进行交互。 你需要了解如何构建请求、处理响应、处理错误等。 * **MCP API:** 仔细阅读 MCP 平台的文档,了解如何使用 MCP Client 获取模型信息。 你需要了解如何认证、查询模型信息、处理错误等。 * **数据格式转换:** Spring AI 的 `Prompt` 和 `ChatResponse` 对象可能与 Deepseek API 期望的格式不同。 你需要实现适当的转换逻辑。 * **错误处理:** 实现健壮的错误处理机制,以处理 Deepseek API 和 MCP API 的错误。 * **安全性:** 安全地存储和管理 API 密钥和其他敏感信息。 考虑使用 Spring Cloud Config 或其他配置管理工具。 * **异步处理:** 如果 Deepseek API 调用是耗时的,考虑使用异步处理来避免阻塞你的应用程序。 可以使用 Spring 的 `@Async` 注解或 Reactive Streams。 * **监控和日志:** 添加监控和日志记录,以便跟踪 API 调用、性能和错误。 * **Spring AI 版本:** 确保你使用的 Spring AI 版本与你的 Spring Boot 版本兼容。 * **依赖冲突:** 注意依赖冲突,特别是当使用多个第三方库时。 **示例代码 (更详细的示例,但仍然需要根据你的具体环境进行调整):** ```java // DeepseekChatClient.java import org.springframework.ai.chat.ChatClient; import org.springframework.ai.chat.ChatResponse; import org.springframework.ai.chat.Generation; import org.springframework.ai.chat.prompt.Prompt; import org.springframework.ai.chat.prompt.PromptTemplate; import org.springframework.util.Assert; import java.util.List; import java.util.Map; public class DeepseekChatClient implements ChatClient { private final DeepseekApi deepseekApi; public DeepseekChatClient(DeepseekApi deepseekApi) { Assert.notNull(deepseekApi, "DeepseekApi must not be null"); this.deepseekApi = deepseekApi; } @Override public ChatResponse call(Prompt prompt) { DeepseekApi.ChatCompletionRequest request = createRequest(prompt); DeepseekApi.ChatCompletionResponse response = this.deepseekApi.chatCompletion(request); return convertResponse(response); } private DeepseekApi.ChatCompletionRequest createRequest(Prompt prompt) { List<DeepseekApi.ChatMessage> messages = prompt.getInstructions().stream() .map(i -> new DeepseekApi.ChatMessage(i.getRole().name().toLowerCase(), i.getContent())).toList(); return new DeepseekApi.ChatCompletionRequest(messages); } private ChatResponse convertResponse(DeepseekApi.ChatCompletionResponse response) { Generation generation = new Generation(response.choices().get(0).message().content()); return new ChatResponse(List.of(generation)); } // 内部接口,用于模拟 Deepseek API 客户端 interface DeepseekApi { ChatCompletionResponse chatCompletion(ChatCompletionRequest request); record ChatCompletionRequest(List<ChatMessage> messages) { } record ChatMessage(String role, String content) { } record ChatCompletionResponse(List<Choice> choices) { } record Choice(ChatMessage message) { } } // 模拟 Deepseek API 客户端实现 @org.springframework.stereotype.Component static class DeepseekApiClient implements DeepseekApi { @org.springframework.beans.factory.annotation.Value("${deepseek.api.key}") private String apiKey; @Override public ChatCompletionResponse chatCompletion(ChatCompletionRequest request) { // 实际调用 Deepseek API 的代码 // 需要使用 Deepseek 提供的 SDK 或 HTTP 客户端 // 这里只是一个模拟实现 String responseContent = "模拟 Deepseek API 响应: " + request.messages().get(0).content(); ChatMessage chatMessage = new ChatMessage("assistant", responseContent); Choice choice = new Choice(chatMessage); ChatCompletionResponse response = new ChatCompletionResponse(List.of(choice)); return response; } } // 示例配置 @org.springframework.context.annotation.Configuration static class DeepseekConfig { @org.springframework.context.annotation.Bean public DeepseekChatClient deepseekChatClient(DeepseekApi deepseekApi) { return new DeepseekChatClient(deepseekApi); } } public static void main(String[] args) { // 示例用法 org.springframework.context.annotation.AnnotationConfigApplicationContext context = new org.springframework.context.annotation.AnnotationConfigApplicationContext(DeepseekConfig.class); ChatClient chatClient = context.getBean(ChatClient.class); PromptTemplate promptTemplate = new PromptTemplate("请用中文回答: {question}"); Prompt prompt = promptTemplate.create(Map.of("question", "What is Spring AI?")); ChatResponse response = chatClient.call(prompt); System.out.println("Response: " + response.getResult().getOutput().getContent()); } } ``` **总结** 整合 Spring AI 与 MCP 和 Deepseek 需要仔细的规划和实施。 你需要了解每个组件的 API 和协议,并实现适当的转换和错误处理逻辑。 希望这些步骤和考虑因素能帮助你成功地整合这些服务。 请务必查阅 Deepseek 和 MCP 平台的官方文档以获取更详细的信息。

zenvoy-mcp

zenvoy-mcp

MCP server for the Zenvoy Markdown notes app, providing 26 tools for vault operations like reading, creating, searching notes, and managing tasks, templates, and comments.

mobile-release-mcp

mobile-release-mcp

MCP server for managing mobile app releases on App Store Connect and Google Play. It exposes 101 tools for iOS and Android release lifecycle and reacts to EAS/GitHub webhooks automatically.

Connhex MCP Server

Connhex MCP Server

Enables natural language interaction with Connhex IoT platform APIs for managing devices, telemetry, rules, and resources via MCP tools.

xhs-mcp

xhs-mcp

A lightweight MCP server that provides read-only access to Xiaohongshu (Little Red Book) data, enabling search, note details, user profiles, and trending feeds via direct HTTP APIs.

Skolverket-MCP

Skolverket-MCP

Enables easy access to open data from the Swedish National Agency for Education, allowing querying and integration of educational statistics and facts through large language models.

Remember Me

Remember Me

MCP 服务器用于持久化聊天记录和规则。 (MCP fúwùqì yòng yú chíjiǔ huà liáotiān jìlù hé guīzé.)

Echo MCP Server

Echo MCP Server

A simple demonstration MCP server that provides an echo tool and resource for learning how to build MCP servers. Serves as a starting point and template for creating custom MCP server implementations.

hiveclear

hiveclear

MCP server for agent treasury management. Creates yield-bearing vaults, manages USDC deposits, and runs programmable time-based payment streams between agents.

Qontinui MCP Server

Qontinui MCP Server

Enables AI-driven visual automation by connecting to Qontinui Runner to load workflow configurations, execute visual automation workflows, and monitor execution status across multiple displays.

MCP Calculator Server

MCP Calculator Server

Provides mathematical calculation tools including basic operations, expressions, and functions, along with TypeScript SDK documentation resources and meeting summary prompt templates.

CLI-Anything · ArcGIS Pro

CLI-Anything · ArcGIS Pro

Drive Esri's ArcGIS Pro from an AI agent — the ArcGIS Pro counterpart to QGIS MCP. A headless ArcPy CLI plus an in-process .NET 8 add-in that exposes the live Pro session as MCP tools (ping, zoom_to, query, run_gp, export_layout) so an agent drives the running project while you watch.

qwen-dap-mcp

qwen-dap-mcp

Enables coding agents to connect to Debug Adapter Protocol debuggers over MCP, allowing them to launch or attach to native targets, control execution, set breakpoints and watchpoints, inspect stacks, variables, memory, and exceptions, and capture agent-friendly debugger snapshots.

zoho-mail-mcp

zoho-mail-mcp

An MCP server that connects AI assistants to Zoho Mail, enabling reading, searching, sending, scheduling, organizing, and downloading emails through the official Zoho Mail REST API.

obol

obol

Enables AI agents to access Solana wallet analytics, token data, and DeFi tools via pay-per-request USDC micropayments using the x402 protocol, without API keys or subscriptions.

appstore-connect-mcp

appstore-connect-mcp

Enables management of App Store Connect operations such as listing apps, managing builds, submitting for review, and handling in-app purchases through Claude Code.

Nornir MCP Server

Nornir MCP Server

A FastMCP server that provides network automation tools by exposing Nornir and NAPALM operations as MCP tools, allowing users to manage and interact with network devices through compatible MCP clients.

airlock

airlock

MCP server that vets package installations and shell commands to block dangerous actions by AI coding agents.

io.github.AndrewVG23/grocery-mcp

io.github.AndrewVG23/grocery-mcp

A dedicated MCP and REST service that searches grocery retailers directly and returns reviewable product links, enabling users to find products and create handoffs without adding to carts or placing orders.

astrbot-mcp

astrbot-mcp

Provides tools for AstrBot plugin development including documentation access and hook inventory.

cloudprice-mcp

cloudprice-mcp

MCP server that lets Claude (or any MCP-compatible client) compare on-demand compute + storage pricing across AWS, Azure, and GCP in real time.

Qiniu Cloud Storage MCP Server

Qiniu Cloud Storage MCP Server

A server that enables uploading files to Qiniu Cloud Storage through a standardized MCP interface, providing a simple way to store and serve files with public URLs.

notebooklm-mcp-pro

notebooklm-mcp-pro

Production-grade Model Context Protocol server for Google NotebookLM that lets any MCP-capable client (Claude, ChatGPT, Cursor, etc.) interact with NotebookLM notebooks, sources, chats, and artifacts.

overseerr-mcp-server

overseerr-mcp-server

FastMCP server to interact with the Overseerr API for movie and TV show requests management, enabling users to request media, search, and manage libraries via natural language.

kcsc-design-mcp

kcsc-design-mcp

Enables AI assistants to retrieve and cite South Korean national construction standards (KDS/KCS) with tables and formula images via the KCSC OpenAPI, and to use design decision trees, validation, and blank Excel templates directly in the chat interface.

binance-alpha-mcp

binance-alpha-mcp

binance-alpha-mcp

mcp-rag-server

mcp-rag-server

MCP RAG Server is a Python MCP server that indexes documents in multiple formats (Markdown, text, PowerPoint, PDF) using multilingual-e5-large embeddings and enables vector search for retrieval-augmented generation.

tuya-infrared-mcp

tuya-infrared-mcp

An MCP server that enables AI assistants to control devices via Tuya infrared remote control, supporting actions like toggling power and setting modes through natural language.