From 614c61316b455659c715e9f5676223bc7553734d Mon Sep 17 00:00:00 2001 From: Mark Pollack Date: Tue, 25 Mar 2025 15:11:34 -0400 Subject: [PATCH] web-search examples: Sync maven deps used with those listed in README.md --- .../web-search/brave-chatbot/README.md | 6 +++--- .../web-search/brave-starter/README.md | 16 ++++++++-------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/model-context-protocol/web-search/brave-chatbot/README.md b/model-context-protocol/web-search/brave-chatbot/README.md index 425e7d7..682e66f 100644 --- a/model-context-protocol/web-search/brave-chatbot/README.md +++ b/model-context-protocol/web-search/brave-chatbot/README.md @@ -59,11 +59,11 @@ The application integrates Spring AI with the Brave Search MCP server through se ```xml org.springframework.ai - spring-ai-mcp-client-spring-boot-starter + spring-ai-starter-mcp-client org.springframework.ai - spring-ai-anthropic-spring-boot-starter + spring-ai-starter-model-anthropic ``` @@ -150,7 +150,7 @@ For WebFlux-based applications, you can use the WebFlux starter instead: ```xml org.springframework.ai - spring-ai-mcp-client-webflux-spring-boot-starter + spring-ai-starter-mcp-client-webflux ``` diff --git a/model-context-protocol/web-search/brave-starter/README.md b/model-context-protocol/web-search/brave-starter/README.md index ca49553..97699a0 100644 --- a/model-context-protocol/web-search/brave-starter/README.md +++ b/model-context-protocol/web-search/brave-starter/README.md @@ -16,7 +16,7 @@ The project uses the following key dependencies: org.springframework.ai - spring-ai-starter-model-openai + spring-ai-starter-model-anthropic ``` @@ -27,7 +27,7 @@ The project uses the following key dependencies: - Java 17 or higher - Maven 3.6+ - npx package manager -- OpenAI API key +- Anthropic API key - Brave Search API key (Get one at https://brave.com/search/api/) ## Setup @@ -47,7 +47,7 @@ The project uses the following key dependencies: 3. Set up your API keys: ```bash - export OPENAI_API_KEY='your-openai-api-key-here' + export ANTHROPIC_API_KEY='your-anthropic-api-key-here' export BRAVE_API_KEY='your-brave-api-key-here' ``` @@ -71,7 +71,7 @@ The application uses Spring Boot's auto-configuration capabilities to set up the ### Project Dependencies -The project uses Spring AI's MCP client Spring Boot starter and OpenAI starter: +The project uses Spring AI's MCP client Spring Boot starter and Anthropic starter: ```xml @@ -81,7 +81,7 @@ The project uses Spring AI's MCP client Spring Boot starter and OpenAI starter: org.springframework.ai - spring-ai-starter-model-openai + spring-ai-starter-model-anthropic ``` @@ -96,7 +96,7 @@ This approach configures the MCP client directly in the application.properties f ```properties spring.application.name=mcp spring.main.web-application-type=none -spring.ai.openai.api-key=${OPENAI_API_KEY} +spring.ai.anthropic.api-key=${ANTHROPIC_API_KEY} # Direct MCP client configuration spring.ai.mcp.client.stdio.connections.brave-search.command=npx @@ -111,7 +111,7 @@ Alternatively, you can move the MCP configuration to an external file. This appr ```properties spring.application.name=mcp spring.main.web-application-type=none -spring.ai.openai.api-key=${OPENAI_API_KEY} +spring.ai.anthropic.api-key=${ANTHROPIC_API_KEY} # Use external configuration file spring.ai.mcp.client.stdio.servers-configuration=classpath:/mcp-servers-config.json @@ -191,7 +191,7 @@ spring.ai.mcp.client.stdio.servers-configuration=classpath:/mcp-servers-config.j Spring Boot's auto-configuration handles the setup: - Configures the application as a command-line tool (non-web) -- Sets up the OpenAI integration using the provided API key +- Sets up the Anthropic integration using the provided API key - Enables the MCP STDIO client for communication with the Brave Search server - Provides a `List` bean containing the Brave Search capabilities, which is automatically injected into the `CommandLineRunner`