{
  "markdown": "# searchapi-mcp-server\n\n[![CI](https://github.com/Ahmednsh/searchapi-mcp-server/actions/workflows/ci.yml/badge.svg)](https://github.com/Ahmednsh/searchapi-mcp-server/actions)\n\n```bash\nnpx @ahmednsh/searchapi-mcp-server\n```\n\nMCP server exposing [SearchApi.io](https://www.searchapi.io/) as four tools: Google Search, Google Shopping, Google Jobs, and YouTube Search. Results come back as compact structured text built for an LLM context — direct answers first, no raw JSON.\n\n> Community project — not affiliated with or endorsed by SearchApi.io.\n> \"SearchApi\" is a trademark of its respective owner.\n\n## Claude Desktop setup\n\nGet an API key at [searchapi.io](https://www.searchapi.io/), then add the server to `claude_desktop_config.json` (`%AppData%\\Claude\\` on Windows, `~/Library/Application Support/Claude/` on macOS):\n\n```json\n{\n  \"mcpServers\": {\n    \"searchapi\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@ahmednsh/searchapi-mcp-server\"],\n      \"env\": {\n        \"SEARCHAPI_API_KEY\": \"your-api-key\"\n      }\n    }\n  }\n}\n```\n\nRestart Claude Desktop. The four tools appear under the \"searchapi\" server.\n\n## Tools\n\n### google_search\n\n`q` (required), `num` (1–20, default 10), `gl` (country code, e.g. `sa`), `hl` (language code, e.g. `ar`).\n\nDirect-answer features (answer box, knowledge graph, AI overview) are placed before the organic results whenever Google returns them:\n\n```\nSearch results for \"capital of Saudi Arabia\":\n\n---\n\n[Answer box]\nSaudi Arabia Capital: Riyadh\n\n---\n\n1. Riyadh\n   https://en.wikipedia.org/wiki/Riyadh\n   Riyadh is the capital and largest city of Saudi Arabia. It is also the capital of the Riyadh Province and the centre of the Riyadh Governorate.\n2. Riyadh | Population, Climate, Map, History, & Facts\n   https://www.britannica.com/place/Riyadh\n   Riyadh is Saudi Arabia's capital and largest city. It became the capital of the Saud dynasty in 1824 and, except for a brief period in the ...\n```\n\n### google_shopping\n\n`q` (required), `gl` (country code), `include_links` (boolean, default `false`).\n\n```\nShopping results for \"wireless mouse\" (showing 10 of 40):\n\n1. Logitech M220 Silent Wireless Mouse\n   $13.83 — Walmart — 4.8★ (44,000 reviews)\n   Free 90-day returns\n2. Logitech G305 Lightspeed Wireless Gaming Mouse\n   $29.99 — Target — 4.6★ (8,100 reviews)\n   30-day returns\n```\n\n### google_jobs\n\n`q` (required), `location` (e.g. `\"Riyadh, Saudi Arabia\"`).\n\n```\nJob results for \"software engineer\" in \"Riyadh, Saudi Arabia\":\n\n1. Senior Software Engineer - Backend — Delivery Hero\n   Riyadh Saudi Arabia · via Delivery Hero\n   No degree mentioned\n   Apply: https://careers.deliveryhero.com/job/senior-software-engineer-backend-in-riyadh-saudi-arabia-jid-7417\n   About the opportunity We are looking for a highly talented Senior Backend Engineer to join our Riyadh office. If you are looking for a place where ...\n```\n\n### youtube_search\n\n`q` (required).\n\n```\nYouTube results for \"model context protocol tutorial\":\n\n1. Model Context Protocol Clearly Explained | MCP Beyond the Hype\n   https://www.youtube.com/watch?v=tzrwxLNHtRY\n   codebasics ✓ — 557,404 views — 15:04 — 1 year ago\n   This video contains a very simple explanation of MCP, also known as Model Context Protocol. We will first understand what ...\n2. What is MCP? Integrate AI Agents with Databases & APIs\n   https://www.youtube.com/watch?v=eur8dUO9mvE\n   IBM Technology ✓ — 684,035 views — 3:46 — 1 year ago\n   Dive into the world of Model Context Protocol and learn how to seamlessly connect AI agents to databases, APIs, and more.\n```\n\n## For developers\n\n- **Error semantics:** tool execution failures (missing/invalid key, HTTP 429/4xx/5xx, network errors) return a readable message with `isError: true`, so clients and models can distinguish a failed call from search content. \"No results\" is deliberately **not** an error — an empty search succeeded, and the message tells the model to change keywords instead of retrying.\n- **`include_links`** on `google_shopping` is off by default because Google Shopping product links are ~500-character tracking URLs pointing back at Google, not at the merchant; the seller name is shown instead. Set `include_links: true` if you need them.\n- **Output caps:** at most 10 results per call (the header says `showing 10 of N` when truncated); job descriptions are stripped of HTML and cut at 250 characters.\n- **Layout:** `src/index.ts` registers the tools and talks to SearchApi; `src/format.ts` holds the pure response-to-text formatters, unit-tested in `src/format.test.ts` (`npm test`).\n\n## Development\n\n```bash\ngit clone https://github.com/Ahmednsh/searchapi-mcp-server.git && cd searchapi-mcp-server && npm install && npm run build\n```\n\n```bash\nnpm test\n```\n\n## License\n\nMIT\n",
  "bytes": 4723,
  "sha": "757e45910c32f184799dadc716bffdfafa0f005067428a4ce373e799e774d477",
  "repo_slug": "ahmednsh/searchapi-mcp-server",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_ahmednsh_searchapi_mcp_server_bd504396/readme"
}