- Home
- MCP servers
- SearchAPI
SearchAPI
- python
12
GitHub Stars
python
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"rmmargt-searchapi-mcp-agent": {
"command": "uv",
"args": [
"run",
"--with",
"mcp[cli]",
"/path/to/searchapi-mcp-agent/mcp_server.py"
],
"env": {
"GOOGLE_API_KEY": "YOUR_GOOGLE_API_KEY_PLACEHOLDER",
"SEARCHAPI_API_KEY": "YOUR_API_KEY_PLACEHOLDER"
}
}
}
}This MCP server provides an Agent-to-Agent (A2A) interface for SearchAPI tools via the Model Context Protocol (MCP). It lets you connect, configure, and route natural language queries to a collection of search services, with real-time status updates and robust error handling. Use it to combine map searches, flight queries, hotel bookings, and more behind a unified MCP client.
How to use
You use this MCP server by connecting an MCP client (such as an AI assistant) to the SearchAPI MCP Agent, which exposes a set of search tools through MCP. Start the agent, configure your MCP client to reach it, and then issue natural language queries or direct tool calls. The system automatically routes requests to the appropriate tool, handles streaming responses, and provides real-time task status updates.
How to install
Prerequisites: ensure you have Python 3.9 or higher and a Python environment available. You also need a working MCP client to connect to the agent and an environment to run the agent and host components.
-
Install Python and create a virtual environment.
-
Install required dependencies.
-
Set up environment variables for API access.
MCP Configuration
Configure the MCP entry that runs the Host-agnostic MCP client for the SearchAPI agent using the following setup. This example uses an stdio-based MCP entry that launches a local process and communicates via standard input/output.
{
"mcpServers": {
"searchapi": {
"type": "stdio",
"name": "searchapi_mcp",
"command": "uv",
"args": [
"run",
"--with",
"mcp[cli]",
"/path/to/searchapi-mcp-agent/mcp_server.py"
],
"env": {
"SEARCHAPI_API_KEY": "your_api_key_here",
"GOOGLE_API_KEY": "your_google_api_key_here"
}
}
}
}
A2A Integration
This project fully implements the A2A protocol and can serve as an endpoint for AI assistants. It supports dynamic tool routing, streaming responses, real-time task status updates, and graceful error handling to ensure reliable operation.
Notes and security
Keep API keys secure and restricted to the necessary scopes. Before confirming actions in MCP clients, verify that the requested operations are appropriate and comply with your usage policies.
Available tools
search_google_web
Web search tool with web results, knowledge graph integration, related questions, suggestions, language support, and region/time range filtering.
search_google_video
Video search tool with lists, duration filtering, source filtering, and HD preview support.
search_google_maps
Place search, details, reviews, and location coordinates retrieval.
search_google_flights
Flight search with one-way/round-trip, multi-city itineraries, price calendar, filters, baggage info, and airline selection.
search_google_hotels
Hotel search with location, price/availability, facilities filtering, ratings, special offers, and room type selection.