Serpapi Mcp
by @merlintxu
Run SerpAPI searches via SerpAPI's MCP server using mcporter. Use when the user asks to search the web with SerpAPI/SerpAPI MCP, wants SerpAPI inside Clawdbot, or to use the /serp command.
clawhub install serpapi-mcp📖 About This Skill
name: serpapi-mcp description: Run SerpAPI searches via SerpAPI's MCP server using mcporter. Use when the user asks to search the web with SerpAPI/SerpAPI MCP, wants SerpAPI inside Clawdbot, or to use the /serp command.
serpapi-mcp
A wrapper skill that calls SerpAPI’s MCP server (Model Context Protocol) via the mcporter CLI.
What this skill provides
/serp usage
Treat this skill as providing the /serp command.
Syntax:
/serp /serp [engine] [num] [mode] Defaults:
engine=google_lightnum=5mode=compactNotes:
engine=google
- mode=completeExamples:
/serp site:cnmv.es "educación financiera"/serp "AAPL stock" google 3 compact/serp "mortgage pay off vs invest" google 10 completeHow it works
Main script (prints JSON to stdout):
skills/serpapi-mcp/scripts/serp.sh "" [engine] [num] [mode] It calls this MCP tool endpoint:
https://mcp.serpapi.com/$SERPAPI_API_KEY/mcp.searchOptional Airtable logger:
skills/serpapi-mcp/scripts/airtable_log.mjsRequirements
1) MCP client (mcporter)
This skill requires mcporter installed on the host.
Install:
npm install -g mcporterVerify:
mcporter --help2) SerpAPI key(s) + failover
You can configure either a single key or a failover pool:
SERPAPI_API_KEY
SERPAPI_API_KEYSRecommended placement (any of these is supported):
skills.entries.serpapi-mcp.env.SERPAPI_API_KEY
- skills.entries.serpapi-mcp.env.SERPAPI_API_KEYS
env.vars.SERPAPI_API_KEY
- env.vars.SERPAPI_API_KEYSFailover behavior:
Optional: store searches/results in Airtable
Enable / disable
Enable logging:
SERP_LOG_AIRTABLE=1 (or true)You can set this globally in the Gateway env (always on) or per-run when executing the script.
Airtable configuration (Gateway env)
Set these environment variables (do not store secrets in the repo/workspace):
AIRTABLE_TOKEN (Airtable Personal Access Token)AIRTABLE_BASE_IDAIRTABLE_TABLE (table name or table id)Write behavior & compatibility
Airtable table schema (recommended)
Field names must match exactly.
Core:
Query → Single line textEngine → Single line textNum → Number (integer)Mode → Single line textCreatedAt → Date/TimeProvenance:
SerpApiSearchId → Single line textSerpApiJsonEndpoint → URLGoogleUrl → URLRaw payload:
ResultJson → Long textResultJsonTruncatedFlag → CheckboxResultJsonTruncated if you prefer that name.)Structured summary:
SummaryJson → Long textSummaryJsonTruncated → CheckboxOrganicTop10Json → Long textRelatedQuestionsTop10Json → Long textShortVideosTop10Json → Long textVideosTop10Json → Long textImagesTop10Json → Long textFlags + counts:
HasAiOverview → CheckboxHasAnswerBox → CheckboxHasKnowledgeGraph → CheckboxOrganicCount → Number (integer)RelatedQuestionsCount → Number (integer)ShortVideosCount → Number (integer)VideosCount → Number (integer)ImagesCount → Number (integer)Airtable size limits
Airtable has per-cell size limits. The logger truncates JSON strings if needed:
AIRTABLE_MAX_JSON_CHARS (default: 90000)AIRTABLE_MAX_SUMMARY_CHARS (default: 90000)Output
Returns SerpAPI JSON. Depending on engine and what Google shows, the payload may include keys like:
organic_resultsshort_videos / videos_resultsimages_resultsrelated_questionsknowledge_graphanswer_box / ai_overviewtop_ads, bottom_ads, etc.)