sse mcp客户端

This commit is contained in:
wuchunlei
2025-07-08 15:52:15 +08:00
parent eb7d1b5db8
commit 073b1cf309
4 changed files with 57 additions and 4 deletions

View File

@@ -40,6 +40,26 @@ spring:
main:
allow-circular-references: true
ai:
mcp:
client:
toolcallback:
enabled: true
name: spring-ai-mcp-client
type: async
sse:
connections:
server1:
url: http://localhost:9090
# stdio:
# connections:
# server2:
# command: java
# args:
# -Dspring.ai.mcp.server.stdio=true
# -Dspring.main.web-application-type=none
# -Dspring.main.banner-mode=off
# -jar
# F:\ideaProject\stdioServer\target\stdioServer-0.0.1-SNAPSHOT.jar
openai:
api-key: sk-9b9babcc85414e999faac58411eb40d0 # 设置 DeepSeek API 的访问密钥,永远不要将密钥提交到代码仓库,建议通过环境变量注入。-收费
base-url: https://api.deepseek.com # 指定 DeepSeek API 的基础地址格式与OpenAI相同。