mcp-server-searchapi
Provides web search via Google, returning organic results, answer boxes, and related searches.
Searches Google News for recent articles with filtering by time period and region.
Searches Google Scholar for academic papers, returning authors, publication info, and citation counts.
Searches YouTube for videos, returning title, channel, views, and duration.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-server-searchapisearch for MCP server documentation"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-server-searchapi
An MCP server for SearchApi — Google web, news, scholar, and YouTube search as clean, agent-ready MCP tools.
Features
4 search tools — web, news, Google Scholar, and YouTube.
Normalized output — slimmed, consistent JSON tuned for LLM consumption (no raw SearchApi noise).
Bearer auth — single
SEARCHAPI_API_KEYenv var; no extra config.Retry / backoff — automatic retry on 429 and 5xx with exponential backoff.
stdio transport — plugs directly into any MCP-compatible host.
Zero-config run —
npx mcp-server-searchapiwith no installation step.
Related MCP server: Custom Search MCP Server
Tools
Tool | Searches | Key params |
| Google organic results |
|
| Google News |
|
| Google Scholar |
|
| YouTube |
|
Requirements
Node.js ≥ 18
A SearchApi API key (free tier available)
Install & run
SEARCHAPI_API_KEY=your_key npx mcp-server-searchapiNo installation required. npx downloads and runs the server on the fly.
Use with Claude Desktop / Claude Code
Add the following block to your MCP configuration file (claude_desktop_config.json for Claude Desktop, or .claude/settings.json for Claude Code):
{
"mcpServers": {
"searchapi": {
"command": "npx",
"args": ["-y", "mcp-server-searchapi"],
"env": { "SEARCHAPI_API_KEY": "your_key_here" }
}
}
}Once configured, Claude can call web_search, news_search, scholar_search, and youtube_search directly.
Example
Example web_search response (illustrative):
{
"results": [
{
"position": 1,
"title": "Model Context Protocol",
"link": "https://modelcontextprotocol.io",
"source": "modelcontextprotocol.io",
"snippet": "An open protocol that standardizes how applications provide context to large language models."
}
],
"related_searches": ["mcp server", "mcp tools"]
}Tool reference
web_search
Search Google via SearchApi. Returns organic results plus optional answer box, knowledge graph summary, and related searches.
Param | Type | Description |
| string (required) | The search query. |
| string | Country code, e.g. |
| string | Interface language, e.g. |
| string | Geographic location for the search. |
| integer | Results page number (default: 1). Google returns 10 results per page; use |
Returns: { results: [{position, title, link, source?, snippet?, date?}], answer?, knowledge?, related_searches? }
news_search
Search Google News via SearchApi. Returns recent articles with title, link, source, date, and snippet.
Param | Type | Description |
| string (required) | The news search query. |
| string | Restrict to a time window: |
| string | Country code, e.g. |
| string | Interface language, e.g. |
Returns: { results: [{title, link, source?, date?, snippet?, thumbnail?}] }
scholar_search
Search Google Scholar via SearchApi. Returns academic results with title, link, authors, publication info, citation count, and snippet.
Param | Type | Description |
| string (required) | The scholarly search query. |
| integer | Results page number (default: 1). |
| integer | Only return results published from this year onward. |
Returns: { results: [{title, link, authors?, publication?, cited_by?, snippet?}] }
youtube_search
Search YouTube via SearchApi. Returns videos with title, link, channel, view count, publish time, and duration.
Param | Type | Description |
| string (required) | The YouTube search query. |
| string | Country code, e.g. |
| string | Interface language, e.g. |
Returns: { results: [{title, link, channel?, views?, published?, length?, description?}] }
Extending
The client in src/searchapi-client.ts is engine-agnostic — it accepts any engine name that SearchApi supports. Adding support for another engine (maps, flights, patents, shopping, and 20+ others) is a single new file: create src/tools/<engine>.ts, map the tool's input params to SearchApi query params, add a normalize helper in src/normalize.ts, and register the tool in src/tools/index.ts. No changes to the client or server wiring are required.
Development
# Install dependencies
npm install
# Run unit tests (offline — no API key needed; fixtures are bundled)
npm test
# Build for distribution
npm run buildThe unit tests run fully offline using fixture files in test/fixtures/. A separate live integration test (test/live.test.ts) exercises the real SearchApi endpoint — it runs automatically as part of npm test but is skipped unless SEARCHAPI_API_KEY is set:
SEARCHAPI_API_KEY=your_key npm testLicense
MIT — see LICENSE.
Available Tools
4 toolsnews_searchA
Search Google News via SearchApi. Returns recent news articles with title, link, source, date and snippet.
| Name | Required | Description | Default |
|---|---|---|---|
| gl | No | Country code, e.g. 'us', 'tw'. | |
| hl | No | Interface language, e.g. 'en'. | |
| query | Yes | The news search query. | |
| time_period | No | Restrict results to a recent time window. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It discloses the return types (title, link, source, date, snippet) which is helpful behavioral information. However, it does not explicitly state that it is a read-only operation, any rate limits, or other behavioral constraints, leaving some ambiguity for an agent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, concise sentence that front-loads the main purpose and lists the return fields. Every word earns its place and there is no filler or redundancy.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given that this is a simple search tool with no output schema, the description adequately explains the purpose and return content. It could mention typical search tool details like result limits or sorting, but for a straightforward news search, the provided information is sufficient for an agent to invoke it correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100% since all four parameters have clear descriptions (e.g., gl as country code, hl as interface language, time_period with enum values). The description adds no additional parameter semantics beyond what the schema already provides, so a baseline score of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool searches Google News via SearchApi, which is a specific verb and resource. It distinguishes itself from siblings like web_search, youtube_search, and scholar_search by explicitly focusing on news articles and listing the returned fields (title, link, source, date, snippet).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides clear context that this tool is for searching news articles, implying it should be used when news-specific results are needed. However, it does not explicitly exclude other search tools or mention alternatives, so it lacks explicit 'when-not-to-use' guidance but is still contextually clear.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
scholar_searchA
Search Google Scholar via SearchApi. Returns academic results with title, link, publication info, citation count and snippet.
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | Results page (default 1). | |
| query | Yes | The scholarly search query. | |
| year_from | No | Only results published from this year onward. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It discloses the return fields (title, link, publication info, citation count, snippet), which is useful. However, it does not mention any limitations, rate limits, authentication needs, or side effects. For a read-only search tool this is adequate but not rich.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence that packs the essential information: what it does (search Google Scholar), the API, and what it returns. It is front-loaded with the verb and resource, with zero wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's low complexity, no output schema, and complete parameter schema, the description adequately covers the return values. It lists all key result fields. It could mention pagination or the year_from filter, but the schema covers those, so the description is sufficiently complete for this simple tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema covers all three parameters with clear descriptions (query, page, year_from), so baseline is 3. The description does not add any extra meaning beyond the schema; it only restates that it is a search query. The schema itself is sufficient.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool searches Google Scholar, a specific academic resource, and differentiates it from sibling tools like web_search and news_search by specifying it returns academic results with citation counts. The verb 'Search' plus resource 'Google Scholar' makes the purpose immediately clear.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies the tool is for scholarly/academic queries via the phrase 'academic results' and 'scholarly search query' in the schema. This clearly distinguishes it from general web/news/youtube searches, though it does not explicitly state when not to use it or name alternatives. The context is clear enough to infer appropriate use.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
web_searchA
Search the web via Google (SearchApi). Returns organic results with title, link, snippet, plus optional answer box, knowledge graph and related searches.
| Name | Required | Description | Default |
|---|---|---|---|
| gl | No | Country code, e.g. 'us', 'tw' (default us). | |
| hl | No | Interface language, e.g. 'en' (default en). | |
| page | No | Results page (default 1). | |
| query | Yes | The search query. | |
| location | No | Geographic location for the search. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the burden of behavioral disclosure. It clearly explains the expected output: organic results with title, link, snippet, and optional answer box, knowledge graph, and related searches. This provides meaningful insight into tool behavior beyond the tool's name.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, front-loaded sentence that directly states the action and the return format. Every word earns its place, with no redundant or filler content.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple search tool with no output schema, the description provides enough context about what results will be returned. It does not explain every parameter, but the schema covers those details, making the description reasonably complete for selection and invocation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so parameter details are fully documented in the schema. The tool description does not add additional meaning about parameter usage, such as query formatting or how 'location' differs from 'gl', but this is acceptable given the schema already covers it.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb and resource: 'Search the web via Google (SearchApi)'. It clearly differentiates from sibling tools by focusing on general web search rather than specialized sources like YouTube, news, or scholar.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for general web queries and contrasts implicitly with specialized sibling tools, but it does not explicitly state when to choose this tool over alternatives or provide exclusion criteria. Guidance is implied rather than stated.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
youtube_searchA
Search YouTube via SearchApi. Returns videos with title, link, channel, views, published time and length.
| Name | Required | Description | Default |
|---|---|---|---|
| gl | No | Country code, e.g. 'us', 'tw'. | |
| hl | No | Interface language, e.g. 'en'. | |
| query | Yes | The YouTube search query. |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description must carry the behavioral transparency burden. It discloses the return format (videos with specific fields), which is useful, but it does not mention result limits, pagination, ordering, or any potential side effects. Lacking these details, transparency is adequate but incomplete.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, front-loaded sentence that conveys the core action and return value without redundancy. Every word contributes meaning, and it is appropriately sized for the tool's simplicity.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the simple tool with three fully documented parameters and no output schema, the description is largely complete. It clearly states what the tool returns, though it omits details like result count or pagination behavior. This is a minor gap for a straightforward search tool.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so parameters are already fully documented in the schema. The description adds no additional meaning beyond what the schema provides for 'query', 'gl', and 'hl', earning the baseline score of 3.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb and resource: 'Search YouTube via SearchApi' and lists the returned video fields (title, link, channel, views, published time, length). This clearly distinguishes it from sibling tools like web_search or scholar_search, which target different content domains.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage when a user wants YouTube-specific search results, but it does not explicitly state when to use this tool versus alternatives or mention exclusions. There are no alternative tool names or conditions given, so guidance is only implicit.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
4 tool updates
v0.1.0- First observed
news_search - First observed
scholar_search - First observed
web_search - First observed
youtube_search
TDQS
Each tool targets a distinct content source (YouTube, web, news, scholar) with specific result types, leaving no ambiguity about which tool to use for a given search need.
All tool names follow a uniform '<source>_search' pattern, making the tool set highly predictable and easy to navigate.
Four tools is a well-scoped set for a search API server, covering the most common search verticals without unnecessary bloat.
The surface covers web, news, academic, and video search, which are fundamental. Minor gaps like image or social search exist but are not critical for the apparent purpose.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
MCP server for Google search results via SERP API
Docs: https://docs.keenable.ai/mcp-server Keenable is a free, remote MCP server that gives agents access to the web index. Search the web with ranked results and date/site filters, then fetch any indexed page as clean markdown. Works out of the box with no account or API key.
Serper MCP — wraps the Serper Google Search API (serper.dev)
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceAn MCP server that enables interaction with Google Custom Search API through natural language, allowing users to perform searches programmatically via the Multi-Agent Conversation Protocol.-
- -licenseNot gradedqualityNot gradedmaintenanceAn MCP (Multi-Agent Conversation Protocol) Server that enables interaction with Google's Custom Search API, allowing agents to perform customized web searches through natural language requests.-
- AlicenseNot gradedqualityDmaintenanceMCP server for internet search via direct Google and DuckDuckGo HTML scraping with AI-powered result normalization and optional summarization, requiring no API keys for search.MIT
- FlicenseAqualityCmaintenanceMCP server that provides a search_web tool to query a self-hosted SearXNG instance and return structured web search results.1-
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/roy6732856/mcp-server-searchapi'
If you have feedback or need assistance with the MCP directory API, please join our Discord server