
ogulcanarbc/spring-ai-mcp-client
Developer tools이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기
mcp 클라이언트 응용 프로그램은 봄 ai를 활용. 그것은 mcp 프로토콜 지원 서버와 통합하여 ai 전원 채팅 상호 작용을 가능하게합니다.
개요
Model Context Protocol (MCP) 클라이언트 애플리케이션은 Spring AI 및 Anthropic Claude 모델 (또는 OpenAI)을 사용합니다. 그것은 MCP 프로토콜 지원 서버와 통합하여 AI 전원 채팅 상호 작용을 가능하게합니다. MCP 클라이언트는 MCP 서버와 연결 설정 및 관리에 책임있는 Model Context Protocol (MCP) 아키텍처의 주요 구성 요소입니다. 그것은 프로토콜의 클라이언트 측을 구현, 취급: - 서버와 호환성을 보장하기 위해 프로토콜 버전 협상 - 사용 가능한 기능을 결정하는 기능 협상 - 메시지 전송 및 JSON-RPC 통신 - 도구 발견 및 실행 - 자원 액세스 및 관리 - 신속한 시스템 상호 작용 - 루트 관리 및 샘플링 지원과 같은 옵션 기능 - openai 및 인류 모델 지원 Java 17+ Maven 또는 Gradle Docker (선택 사항) Anthropic API 키 또는 OpenAI API 키 - Anthropic 콘솔에서 Anthropic API 키. - OpenAI 콘솔에서 OpenAI API 키.
개요(AI 번역)
Model Context Protocol (MCP) 클라이언트 애플리케이션은 Spring AI 및 Anthropic Claude 모델 (또는 OpenAI)을 사용합니다. 그것은 MCP 프로토콜 지원 서버와 통합하여 AI 전원 채팅 상호 작용을 가능하게합니다.
봄 MCP 클라이언트는 무엇입니까
MCP 클라이언트는 MCP 서버와 연결 설정 및 관리에 책임있는 Model Context Protocol (MCP) 아키텍처의 주요 구성 요소입니다. 그것은 프로토콜의 클라이언트 측을 구현, 취급:
- 서버와의 호환성을 보장하는 프로토콜 버전 협상
- 유효한 특징을 결정하는 기능 협상
- 메시지 전송 및 JSON-RPC 통신
- 도구 발견 및 실행
- 자원 접근 및 관리
- Prompt 시스템 상호 작용
- 루트 관리 및 샘플링 지원과 같은 옵션 기능
- openai 및 인류 모델 지원
요구 사항
자바 17 + Maven 또는 Gradle (선택) 도커 Anthropic API 열쇠 또는 OpenAI API 열쇠
- Anthropic 콘솔에서 Anthropic API 키.
- OpenAI 콘솔에서 OpenAI API 키.
설치
##1. 복부 저장소
git 클론 CD 스프링-ai-mcp-클라이언트
##2. MCP 서버 구성
MCP 서버 정보는 mcp-servers에 추가되어야 합니다.
이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.
README
spring-ai-mcp-client
The Model Context Protocol (MCP) client application utilizes Spring AI and Anthropic Claude models (Or OpenAI). It integrates with MCP protocol-supported servers to enable AI-powered chat interactions.
What is Spring MCP Client
The MCP Client is a key component in the Model Context Protocol (MCP) architecture, responsible for establishing and managing connections with MCP servers. It implements the client-side of the protocol, handling:
- Protocol version negotiation to ensure compatibility with servers
- Capability negotiation to determine available features
- Message transport and JSON-RPC communication
- Tool discovery and execution
- Resource access and management
- Prompt system interactions
- Optional features like roots management and sampling support
- Supports openai and anthropic models
Requirements
Java 17+
Maven or Gradle
Docker (Optional)
Anthropic API key Or OpenAI API key
- Anthropic API key from the Anthropic Console.
- OpenAI API key from the OpenAI Console.
Installation
1. Clone Repository
git clone
cd spring-ai-mcp-client
2. MCP Server Configuration
The MCP server information must be added to the mcp-servers.json file as follows.
{
"mcpServers":{
"any-mcp-server":{
"command":"node",
"args":[
"any-mcp-server/build/index.js"
]
}
}
}
3. Spring Configuration
The application.yml file should be configured as follows:
spring:
ai:
mcp:
client:
enabled: true
name: any-mcp-server # MCP server name
version: 1.0.0
type: SYNC
request-timeout: 20s
stdio:
root-change-notification: true
servers-configuration: classpath:mcp-servers.json # MCP server config such/same as claude desktop configs.
anthropic:
api-key: ${ANTHROPIC_API_KEY}
# openai:
# api-key: ${OPENAI_API_KEY}
server:
port: 8081
4. Run Applicaton
mvn clean install
mvn spring-boot:run
Usage
Once the application is running, it can be accessed via the following endpoint:
You can start a chat with the following cURL command:
curl -X GET "http://localhost:8081/ai?message=Hello" -H "Accept: application/json"
설치
This server does not publish a one-line install command.
Open the repository installation guide MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →설정
{
"mcpServers":{
"any-mcp-server":{
"command":"node",
"args":[
"any-mcp-server/build/index.js"
]
}
}
}