You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: quickstart/client.mdx
+72-14Lines changed: 72 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -404,12 +404,12 @@ If you see:
404
404
<Tabtitle="Java">
405
405
406
406
<Note>
407
-
This is a quickstart demo based on Spring AI MCP auto-configuraiton and boot starters.
408
-
To learn how to create sync and async McpClients programatically consult the [Java SDK Client guid](TODO: add URL)
407
+
This is a quickstart demo based on Spring AI MCP auto-configuration and boot starters.
408
+
To learn how to create sync and async MCP Clients manually, consult the [Java SDK Client](/sdk/java/mcp-client) documentation
409
409
</Note>
410
410
411
411
This example demonstrates how to build an interactive chatbot that combines Spring AI's Model Context Protocol (MCP) with the [Brave Search MCP Server](https://github.com/modelcontextprotocol/servers/tree/main/src/brave-search). The application creates a conversational interface powered by Anthropic's Claude AI model that can perform internet searches through Brave Search, enabling natural language interactions with real-time web data.
412
-
[You can find the complete code for this tutorial here.](https://github.com/spring-projects/spring-ai-examples/tree/main/model-context-protocol/brave-chatbot)
412
+
[You can find the complete code for this tutorial here.](https://github.com/spring-projects/spring-ai-examples/tree/main/model-context-protocol/web-search/brave-chatbot)
413
413
414
414
## System Requirements
415
415
@@ -447,9 +447,9 @@ Before starting, ensure your system meets these requirements:
447
447
```
448
448
449
449
5. Run the application using Maven:
450
-
```bash
451
-
./mvnw spring-boot:run
452
-
```
450
+
```bash
451
+
./mvnw spring-boot:run
452
+
```
453
453
454
454
<Warning>
455
455
Make sure you keep your `ANTHROPIC_API_KEY` and `BRAVE_API_KEY` keys secure!
@@ -466,24 +466,35 @@ The application integrates Spring AI with the Brave Search MCP server through se
The application will start an interactive chat session where you can ask questions. The chatbot will use Brave Search when it needs to find information from the internet to answer your queries.
547
+
548
+
The chatbot can:
549
+
- Answer questions using its built-in knowledge
550
+
- Perform web searches when needed using Brave Search
551
+
- Remember context from previous messages in the conversation
552
+
- Combine information from multiple sources to provide comprehensive answers
553
+
554
+
### Advanced Configuration
555
+
556
+
The MCP client supports additional configuration options:
557
+
558
+
- Client customization through `McpSyncClientCustomizer` or `McpAsyncClientCustomizer`
559
+
- Multiple clients with multiple transport types: `STDIO`and `SSE` (Server-Sent Events)
560
+
- Integration with Spring AI's tool execution framework
561
+
- Automatic client initialization and lifecycle management
562
+
563
+
For WebFlux-based applications, you can use the WebFlux starter instead:
0 commit comments