SerpAPI MCP serverand Python AI tasks
qbash hosts a SerpAPI MCP server you can use in Claude, ChatGPT, Codex, Cursor, Grok Bot and Muse.
Developers use qbash Tasks to write cloud-hosted Python functions that pair SerpAPI with models such as Claude and GPT.
MCP server
Build a SerpAPI MCP server
Give ChatGPT, Claude and your other AI tools access to SerpAPI through one server. You pick which SerpAPI tools it shares, and you can add other connectors, memory folders and Tasks to the same server.
How to set it up
- Connect SerpAPI on the qbash Connectors page.
- Create an MCP server and add the SerpAPI tools you want to share.
- Paste the server URL into your client. It connects with OAuth or an access token.
Python AI task
Write a SerpAPI task in Python
A qbash Task is a hosted Python function that calls SerpAPI and AI models.
Review search results for a topic
Get the first page of Google results from the past week and summarize the supplied titles and snippets with links.
report = qbash.integrations.serp.search(
search_string="Python workflow scheduling", search_engine="google",
time_period="past_week", gl="us", hl="en",
)
results = report.get("serpapi_response", {}).get("organic_results", [])
if results:
digest = qbash.ai.run_prompt(
slug="search-results-digest",
variables={"results": json.dumps(results)},
)
qbash.output(digest)
else:
qbash.output("No search results returned for this topic.")
Sample search response
{
"status": "success",
"search_string": "Python workflow scheduling",
"search_engine": "google",
"serpapi_response": {
"organic_results": [
{
"position": 1,
"title": "Python task scheduling guide",
"link": "https://example.com/scheduling",
"snippet": "A guide to scheduling Python tasks."
}
]
},
"message": "Search completed"
}
What the SerpAPI connector can do
- Search the web via SerpAPI and return structured results
qbash Tasks: AI applications in Python
A Task is a Python function that calls SerpAPI, your other connectors and models such as Claude, GPT, Gemini and Grok. qbash hosts and runs it.
Run Tasks on a schedule or from your team's tools
- Deterministic where it counts Write the logic in Python and call a model only for the steps that need judgement, so the rest runs the same way every time.
- Version controlled Every save is a revision you can compare and roll back.
- Logged Each run records its inputs, output, errors and what started it.
- Shared credentials Connections belong to your organization, so a Task keeps working when its author is away.
SerpAPI MCP questions
Does SerpAPI have an official MCP server?
Yes. SerpAPI runs its own MCP server at mcp.serpapi.com that takes your SerpAPI key. The qbash server puts search on the same URL as your other connectors with the key stored once in qbash.
Does the SerpAPI MCP server reshape results?
No. It forwards SerpAPI’s response body unchanged, so the keys depend on the engine, such as organic_results for Google and news_results for the news engines.
Related research connectors
Build a SerpAPI task
Write it in Python with AI steps, and qbash hosts it with versions and run logs.
Build a SerpAPI MCP server
Pick the SerpAPI tools to share and connect ChatGPT, Claude or Grok Bot.