Код: Выделить всё
org.springframework.boot
spring-boot-starter-web
org.springframework.ai
spring-ai-starter-mcp-client
org.springframework.ai
spring-ai-starter-model-ollama
org.springframework.boot
spring-boot-devtools
runtime
true
org.projectlombok
lombok
true
Код: Выделить всё
server.port=8080
spring.ai.mcp.client.enabled=true
spring.ai.mcp.client.name=mcp-client
spring.ai.mcp.client.version=1.0.0
spring.ai.mcp.client.request-timeout=30s
spring.ai.mcp.client.type=SYNC
spring.ai.mcp.client.sse.connections.mcp-server.url=http://localhost:8082
spring.ai.mcp.client.toolcallback.enabled=true
spring.ai.ollama.base-url= http://ip_address:port
spring.ai.ollama.chat.options.model= model_version
spring.ai.ollama.chat.temperature= 0.7
spring.ai.ollama.chat.max-tokens= 8192
Код: Выделить всё
@SpringBootApplication(
exclude = {
SseWebFluxTransportAutoConfiguration.class,
StdioTransportAutoConfiguration.class
}
)
public class McpclientApplication {
public static void main(String[] args) {
SpringApplication.run(McpclientApplication.class, args);
}
}
Код: Выделить всё
org.springframework.boot
spring-boot-starter-web
org.springframework.ai
spring-ai-starter-mcp-server-webmvc
org.springframework.boot
spring-boot-devtools
runtime
true
org.springframework.boot
spring-boot-starter-jdbc
org.postgresql
postgresql
runtime
org.projectlombok
lombok
true
Код: Выделить всё
spring.application.name=mcp-server
server.port=8082
spring.main.banner-mode=off
logging.file.name=./logs/spring-boot-ai-mcp-server.log
spring.ai.mcp.server.name=mcp-server
spring.ai.mcp.server.version=0.0.1
spring.datasource.url= jdbc:postgresql://ip_address:port/db_name
spring.datasource.driver-class-name=org.postgresql.Driver
spring.datasource.username=
spring.datasource.password=
Подробнее здесь: https://stackoverflow.com/questions/796 ... ame-in-mcp