SearchAPI ships with a built-in MCP (Model Context Protocol) server powered by fastapi-mcp. Every FastAPI route is automatically exposed as an MCP tool at theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/pratyay360/searchapi/llms.txt
Use this file to discover all available pages before exploring further.
/mcp endpoint — no additional configuration is required on the server side. When you run SearchAPI, the MCP server is ready at http://localhost:8000/mcp, and the root endpoint confirms this with {"mcp server": "/mcp"}.
Available MCP tools
All nine search tools are exposed automatically from the FastAPI routes.| Tool | Description |
|---|---|
web_search | General web search — returns a list of URLs |
search_by_engine | Search via a specific engine: bing, brave, duckduckgo, google, mojeek, yandex, yahoo, wikipedia |
search_papers | Search academic papers via Crossref — returns DOIs |
search_books | Search for books — returns URLs |
search_news | Search news articles — returns URLs |
search_pdfs | Search for PDF documents — returns URLs |
search_filetype | Search for files of a given type (pdf, docx, pptx, and more) |
search_repositories | Search GitHub and GitLab repositories — returns URLs |
search_wiki | Search Wikipedia and Wikimedia sites — returns URLs |
Connect a client
Choose the client you want to connect to SearchAPI.- Claude Desktop
- Cursor
- VS Code Copilot
Claude Desktop supports MCP servers over HTTP (for deployed instances) and via stdio (for local scripts).
Open the Claude Desktop configuration file
Find and open your
claude_desktop_config.json file:- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
Add the SearchAPI MCP server
Add the following entry to the Replace
mcpServers object, pointing to the /mcp endpoint of your running SearchAPI instance.claude_desktop_config.json
http://localhost:8000 with the base URL of your deployed instance if it is not running locally.Example: ask Claude to search for papers
Once connected, you can ask Claude to use thesearch_papers tool directly in natural language. For example:
Search for papers on “transformer architecture” and return the top 5 DOIs.Claude will call the
search_papers MCP tool, which hits GET /search/paper?query=transformer+architecture&limit=5 and returns a list of DOIs. You can then ask Claude to summarize, compare, or fetch the papers.
The MCP endpoint is confirmed at
/mcp. You can verify this by calling the root endpoint: GET http://localhost:8000/ returns {"mcp server": "/mcp"}.