The Cardea Web Search MCP Server is a component of the Cardea project that provides web search capabilities through a Multi-Channel Protocol (MCP) server. It leverages the Tavily API to fetch and return web search results.
- search
- Perform a web search for the given query
- Input parameters:
query: The query to search for
- Output parameters:
query: The original queryresponse_time: The time taken to get the responseresults: A list of search results, each containing:content: The main content of the search resultraw_content: The raw content of the search resultscore: The relevance score of the search resulttitle: The title of the search resulturl: The URL of the search result
# build mcp server
cargo build --releaseImportant
Before running the mcp server, you need to set the Tavily API key. You can obtain a key from Tavily.
export TAVILY_API_KEY=<your-api-key>The CLI options of the mcp server are as follows:
Usage: cardea-web-search [OPTIONS]
Options:
-s, --socket-addr <SOCKET_ADDR> Socket address to bind to [default: 127.0.0.1:8010]
-t, --transport <TRANSPORT> Transport type to use (sse or stream-http) [default: stream-http] [possible values: sse, stream-http]
-m, --max-results <MAX_RESULTS> Max results to return [default: 5]
-h, --help Print help
-V, --version Print versionNow, let's start the mcp server by running the following command:
# run mcp server (stream-http)
./target/release/cardea-web-search --transport stream-http
# run mcp server (sse)
./target/release/cardea-web-search --transport sseIf started successfully, you will see the following output:
Starting Cardea Web Search MCP server on 127.0.0.1:8010