- Home
- MCP servers
- Searchapi
Searchapi
- javascript
0
GitHub Stars
javascript
Language
7 months ago
First Indexed
3 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": {
"lianshuang-photo-searchapi-mcp-nodejs": {
"command": "npx",
"args": [
"-y",
"searchapi-mcp"
],
"env": {
"MCP_TRANSPORT": "stdio",
"SEARCHAPI_API_KEY": "your_api_key"
}
}
}
}You can run a lightweight MCP server that lets AI assistants query the searchapi.io API to search Google Maps data, flights, hotels, reviews, and more. It exposes a set of endpoints your MCP client can call, handling the heavy lifting of API requests and returning structured results for your AI workflows.
How to use
Start by ensuring you have an API key for the searchapi.io service. You will connect your MCP client to the local stdio-based MCP server so your AI assistant can perform searches and fetch travel data. You will typically integrate this server into your Claude Desktop or other MCP client by loading the provided configuration, including the environment variable with your API key.
How to install
Prerequisites: Node.js and npm or npx must be available on your system.
Install the MCP server globally with the package manager to enable the searchapi-mcp command.
Install and run the MCP server locally
# Install the MCP server globally
npm install -g searchapi-mcp
# Start the MCP server using stdio transport
searchapi-mcp
# Start the MCP server with explicit stdio transport using npx (alternative flow)
Configuration and usage with your MCP client
You will provide your API key to the server through environment variables when you start or configure your MCP client. The client will pass this key to the server so requests to searchapi.io can be authenticated.
Additional configuration: Claude Desktop integration
If you are configuring Claude Desktop to use this MCP server, provide a node-based command that runs the MCP server and sets the required environment variables. An example CLI flow is shown in the configuration example.
Tools and endpoints
The MCP server exposes several tools that let you perform focused searches and fetch data from searchapi.io. Each tool maps to a specific API capability such as searching maps, flights, hotels, reviews, and more.
Security and environment
Protect your API key. Do not expose the API key in client-side code or logs. Store it in a secure environment variable and reference it only in server-side configurations or trusted MCP clients.
Notes and troubleshooting
If you encounter issues starting the server, verify that Node.js is installed and that the API key variable is set correctly. Check that you are using the stdio transport configuration if your MCP client requires local startup through a CLI command.
Example MCP configuration (stdio)
{
"mcpServers": {
"searchapi": {
"type": "stdio",
"name": "searchapi",
"command": "npx",
"args": ["-y", "searchapi-mcp"],
"env": {
"SEARCHAPI_API_KEY": "YOUR_API_KEY",
"MCP_TRANSPORT": "stdio"
}
}
}
}
What you get from this MCP server
You gain access to tools that let you search Google Maps, search flights, search hotels, read reviews, fetch hotel details, query flight calendars, get the current time with travel date suggestions, search general Google results, and search Google videos.
Available tools
search_google_maps
Search locations or services on Google Maps.
search_google_flights
Search flight information between specified origins and destinations.
search_google_hotels
Search hotel listings based on a query and date range.
search_google_maps_reviews
Retrieve reviews for a specific place on Google Maps.
search_google_hotels_property
Retrieve detailed information about a specific hotel property.
search_google_flights_calendar
Get flight calendar pricing for a given route and dates.
get_current_time
Get the current system time and travel date suggestions.
search_google
Retrieve Google search results for a query.
search_google_videos
Retrieve Google video results for a query.