
test mcp
Test repository for MCP
Repository Info
About This Server
Test repository for MCP
Model Context Protocol (MCP) - This server can be integrated with AI applications to provide additional context and capabilities, enabling enhanced AI interactions and functionality.
Documentation
SpringAI MCP 协议
简介
SpringAI MCP(Model Conventions Protocol)是Spring AI提供的一种协议,用于统一和标准化与不同AI模型的交互方式。它为开发者提供了一个一致的接口,使得在不同AI提供商之间切换变得更加简单。
主要特点
- 统一接口:无论使用哪种AI模型,都可以通过相同的API进行交互
- 模型无关性:代码与特定模型解耦,便于切换和测试不同模型
- 简化集成:降低与AI模型集成的复杂性
- 标准化响应处理:统一处理不同模型的响应格式
使用案例
MCP协议适用于以下场景:
- 多模型应用开发
- 需要模型灵活性的企业应用
- 研究和比较不同AI模型性能的项目
- 需要快速适应新兴AI模型的应用
示例代码
import org.springframework.ai.client.AiClient;
import org.springframework.ai.prompt.Prompt;
public class SpringAiMcpExample {
private final AiClient aiClient;
public SpringAiMcpExample(AiClient aiClient) {
this.aiClient = aiClient;
}
public String generateResponse(String input) {
Prompt prompt = new Prompt(input);
return aiClient.generate(prompt).getGeneration().getText();
}
}
支持的模型
SpringAI MCP目前支持多种主流AI模型,包括但不限于:
- OpenAI (GPT系列)
- Anthropic (Claude系列)
- Google (Gemini系列)
- 等其他AI提供商的模型
配置方法
在Spring Boot应用中配置MCP通常通过以下方式:
spring:
ai:
model:
provider: openai # 可以轻松切换为anthropic, google等
api-key: ${AI_API_KEY}
更多资源
- Spring AI官方文档
- MCP协议详细说明
- Spring AI GitHub仓库
许可证
SpringAI以及MCP协议遵循Apache License 2.0许可证发布。
Quick Start
Clone the repository
git clone https://github.com/ytrhao/test-mcpInstall dependencies
cd test-mcp
npm installFollow the documentation
Check the repository's README.md file for specific installation and usage instructions.
Repository Details
Recommended MCP Servers
Discord MCP
Enable AI assistants to seamlessly interact with Discord servers, channels, and messages.
Knit MCP
Connect AI agents to 200+ SaaS applications and automate workflows.
Apify MCP Server
Deploy and interact with Apify actors for web scraping and data extraction.
BrowserStack MCP
BrowserStack MCP Server for automated testing across multiple browsers.
Zapier MCP
A Zapier server that provides automation capabilities for various apps.