MCP server
Give Claude Code, Cursor, Claude Desktop or any MCP client web search and page fetching through SerpHubAPI.
The official serphubapi-mcp server exposes SerpHubAPI as four tools your agent can call directly. It runs locally over stdio and talks to https://api.serphubapi.com with your API key.
Tools
| Tool | What it does | Credits |
|---|---|---|
list_services | The catalog: every engine/type you can search, with price and live status. | 0 |
search | Any catalog service — search engines, in-app search, AI search — returned as Markdown. include_content=N also returns the full text of the top N pages. | the service's price (e.g. google/web 10; cache_first half, 0 on a cache hit) + 3 per page of content |
fetch | Any public URL → main content as Markdown. | 3 (0 on failure) |
batch | Up to 5 searches in one call, each returned as Markdown; one item failing does not block the others. | each item billed like a search (failed/empty/cache-hit free) |
Failed calls and empty results are never charged.
Prerequisites
- A SerpHubAPI API key from /dashboard/keys. New accounts get 1,000 free credits.
uvinstalled, which providesuvx. The server is fetched and run automatically on first use.
Claude Code
claude mcp add serphubapi -e SERPHUBAPI_API_KEY=shapi_xxxxxxxx -- uvx serphubapi-mcp
Cursor
Add to ~/.cursor/mcp.json (or .cursor/mcp.json in a project):
{
"mcpServers": {
"serphubapi": {
"command": "uvx",
"args": ["serphubapi-mcp"],
"env": { "SERPHUBAPI_API_KEY": "shapi_xxxxxxxx" }
}
}
}
Claude Desktop
Open Settings → Developer → Edit Config to open claude_desktop_config.json, add the same block, and restart Claude Desktop:
{
"mcpServers": {
"serphubapi": {
"command": "uvx",
"args": ["serphubapi-mcp"],
"env": { "SERPHUBAPI_API_KEY": "shapi_xxxxxxxx" }
}
}
}
Other MCP clients
Any client that can launch a stdio MCP server works: command uvx, argument serphubapi-mcp, and the environment variable below.
Environment variables
| Variable | Default | Description |
|---|---|---|
SERPHUBAPI_API_KEY | — | Required. Your API key. |
SERPHUBAPI_BASE_URL | https://api.serphubapi.com | Override only if instructed by support. |
Tips
- Create a dedicated key for each agent or machine and give it a daily credit limit at /dashboard/keys, so a looping agent can't drain your balance.
- Every tool call shows up at /dashboard/logs with its query and cost.
- If the tools don't appear, run
uvx serphubapi-mcpin a terminal to check that it starts, and make sure the key is set in the client config.