MCP Server for interacting with SearchAPI.io
npm install @rmmargt/searchapi-mcp-serverMCP Server for interacting with SearchAPI.io.
This package provides a Model Context Protocol (MCP) server that exposes various SearchAPI.io endpoints (like Google Search, Maps, Flights, Hotels, etc.) as tools for compatible MCP clients (e.g., Claude Desktop, VS Code Copilot Agent Mode).
This server is designed to be run via npx within an MCP client's configuration.
* Node.js (version specified in package.json engines field, e.g., >=18.0.0)
* A SearchAPI.io API Key
1. Get API Key: Obtain an API key from SearchAPI.io.
2. Set Environment Variable: The server requires the SEARCHAPI_API_KEY environment variable to be set. How you set this depends on your MCP client:
* Claude Desktop: Add it to the env section of your server configuration in claude_desktop_config.json:
``json`
{
"mcpServers": {
"searchapi": {
"command": "npx",
"args": [
"@rmmargt/searchapi-mcp-server"
],
"env": {
"SEARCHAPI_API_KEY": "YOUR_SEARCHAPI_KEY_HERE"
}
}
}
}
* Other Clients: Refer to your specific client's documentation for setting environment variables for MCP servers.
Open your Claude Desktop configuration (~/Library/Application Support/Claude/claude_desktop_config.json on macOS or %APPDATA%\Claude\claude_desktop_config.json on Windows) and add:
`json`
{
"mcpServers": {
"searchapi": {
"command": "npx",
"args": [
"@rmmargt/searchapi-mcp-server"
],
"env": {
"SEARCHAPI_API_KEY": "YOUR_SEARCHAPI_KEY_HERE"
}
}
// ... other servers
}
}
Replace YOUR_SEARCHAPI_KEY_HERE with your actual key. Restart Claude Desktop.
This server exposes the following tools (matching the SearchAPI.io endpoints):
* search_google_mapssearch_google_flights
* search_google_hotels
* search_google_maps_reviews
* search_google_hotels_property
* search_google_flights_calendar
* get_current_time
* (Utility function)search_google
* search_google_videos
*
Refer to the SearchAPI.io documentation or the tool descriptions provided via MCP for details on parameters.
1. Clone the repository (if applicable).
2. Install dependencies: npm installtsx
3. Run in development mode (uses for live reloading): npm run devnpm run build`
4. Build for production:
MIT