Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This commit introduces a new MCP server that integrates the Tavily Search API.
The Tavily Search server allows LLMs to perform web searches optimized for quality and relevance. It includes features such as:
The server has been tested with a Spring AI MCP client and is ready for integration with MCP-compatible clients.
Server Details
tavily-search
Motivation and Context
This change is needed to enhance the capabilities of LLMs by providing them with access to a powerful and optimized search engine. The Tavily Search API is specifically designed for AI applications, offering features that improve the quality and relevance of search results for language models. This server allows LLMs to retrieve information from the web more effectively, leading to better-informed and more accurate responses.
How Has This Been Tested?
This server has been tested with a Spring AI example application that utilizes the
ChatClient
to interact with the MCP server. The following scenarios were tested:Also tested with MCP Inspector
The tests verified that the server correctly handles requests, communicates with the Tavily API, and returns results in the expected format.
Breaking Changes
No, this is a new server implementation and does not introduce any breaking changes. Users will not need to update existing MCP client configurations unless they want to use the new
tavily-search
server.Types of changes
Checklist
Additional context
The
tavily-search
server is implemented in TypeScript and uses the@modelcontextprotocol/sdk
for communication. It requires a Tavily API key, which should be provided as an environment variable (TAVILY_API_KEY
). The server supports bothnpx
and Docker deployments, as documented in the README. The implementation includes error handling for common issues like API errors and invalid input arguments.