Skip to main content

Documentation 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.

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 the /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.
ToolDescription
web_searchGeneral web search — returns a list of URLs
search_by_engineSearch via a specific engine: bing, brave, duckduckgo, google, mojeek, yandex, yahoo, wikipedia
search_papersSearch academic papers via Crossref — returns DOIs
search_booksSearch for books — returns URLs
search_newsSearch news articles — returns URLs
search_pdfsSearch for PDF documents — returns URLs
search_filetypeSearch for files of a given type (pdf, docx, pptx, and more)
search_repositoriesSearch GitHub and GitLab repositories — returns URLs
search_wikiSearch Wikipedia and Wikimedia sites — returns URLs

Connect a client

Choose the client you want to connect to SearchAPI.
Claude Desktop supports MCP servers over HTTP (for deployed instances) and via stdio (for local scripts).
1

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
2

Add the SearchAPI MCP server

Add the following entry to the mcpServers object, pointing to the /mcp endpoint of your running SearchAPI instance.
claude_desktop_config.json
{
  "mcpServers": {
    "searchapi": {
      "type": "http",
      "url": "http://localhost:8000/mcp"
    }
  }
}
Replace http://localhost:8000 with the base URL of your deployed instance if it is not running locally.
3

Restart Claude Desktop

Save the config file and restart Claude Desktop. The SearchAPI tools will appear in the MCP tools panel.

Example: ask Claude to search for papers

Once connected, you can ask Claude to use the search_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.
User: Search for papers on "transformer architecture" and list the top 5 DOIs.

Claude: I'll use the search_papers tool to find relevant academic papers.

[Calling search_papers with query="transformer architecture", limit=5]

Here are the top 5 DOIs for papers on transformer architecture:

1. 10.48550/arXiv.1706.03762 — "Attention Is All You Need"
2. 10.48550/arXiv.1810.04805 — "BERT: Pre-training of Deep Bidirectional Transformers"
...
The MCP endpoint is confirmed at /mcp. You can verify this by calling the root endpoint: GET http://localhost:8000/ returns {"mcp server": "/mcp"}.

Build docs developers (and LLMs) love