Skip to content

Add bundled MCP server, setup and Extract skills, and Markdown-first search (v1.1.0) - #1

Draft
adarshdigievo wants to merge 3 commits into
mainfrom
plugin-revamp
Draft

adarshdigievo wants to merge 3 commits into
mainfrom
plugin-revamp

Conversation

@adarshdigievo

@adarshdigievo adarshdigievo commented Nov 18, 2026 •

Copy link
Copy Markdown
Member

Summary

The plugin now works without a shell or an exported key, guides the user through setup when the key is missing, asks SerpApi for Markdown by default, and can read web pages.

  • Bundled MCP server. mcp.json adds SerpApi's hosted MCP server (https://mcp.serpapi.com/mcp) as serpapi. The key is a required plugin variable, SERPAPI_API_KEY, entered in Cursor's plugin settings and sent as a bearer token.
  • Search skill rebuilt and renamed. search becomes serpapi-web-search, so /search is now /serpapi-web-search. It calls the MCP search tool first and falls back to curl. It asks for Markdown (output=md) by default and JSON when structured data is needed. Its engine table shows the query input, result key and key fields for common intents. references/gotchas.md and references/recipes.md replace examples.md.
  • New serpapi-extract skill. It reads a known URL as Markdown, lists a site's URLs, or crawls a bounded set of pages through SerpApi's Extract API, on the same two routes.
  • New serpapi-setup skill, adapted from serpapi-codex-plugin with only the MCP and curl routes. It runs when a key or access is missing: it stores the key for curl in the OS credential store or a private file without the key appearing in chat, verifies with one real search, and diagnoses failed requests.
  • Key kept out of the URL. Every curl command pipes the key to curl on stdin (--data-urlencode 'api_key@-') and starts with -q, so a verbose or trace setting in ~/.curlrc can't print it.
  • Docs, tests, version. The README covers key entry, /serpapi-setup and the new skill names, test.sh grows from 11 to 34 checks, and the version is 1.1.0.

The search and Extract skills are adapted from serpapi/skills#7. Its CLI route, engine catalog and Python checks are not ported; this plugin keeps its bundled engines/*.json schemas as the parameter source.

AI disclosure

Changes made by Claude Fable 5.2 (GitHub Copilot Desktop). I made the design decisions; the model wrote the code, docs and tests. Claude Fable 5.2, Gemini 4 Carbon, GPT-6.1 Sol and GPT-6.2 Astra reviewed the first commit over six rounds. Claude Fable 5.2, Gemini 4 Carbon and GPT-6.1 Sol reviewed the search rebuild and the Extract skill over two more rounds; Gemini 4 Carbon timed out in the first of those. Each finding was reproduced or checked against the code before anything was changed. The reviewers read the code only; they could not run the tests or make live calls.

Testing

Run on macOS against commit 14690a2, and by CI on Ubuntu:

  • bash test.sh: 34 passed, 0 failed, in the working tree, in a fresh clone of this branch, and in CI. Its optional live API check was skipped because no key was set.
  • The two new test.sh checks (relative links resolve; engines named in the skills have a bundled schema) both failed as intended when a linked file and an engine schema were removed in a scratch copy.
  • Cursor's plugin-template validator passes, and plugin.json is valid against the cursor/plugins manifest schema.
  • mcp.json against the hosted server: it connects and lists its four tools without a key. An unresolved placeholder returns Invalid SerpApi API key and an empty key returns Missing API key, the two errors the skills handle. The extract tool returns the same two errors.
  • Live, through the hosted MCP server with a real key: every row of the engine table returned the stated result key and fields. The recipes returned results, most of them run with an added json_restrictor to keep the response small. Extract returned Markdown in scrape, map and crawl modes, and the structured fields as JSON when the tool's own mode is left at its default.
  • curl: the four commands in the search and Extract skills each return SerpApi's invalid-key error with a dummy key and never print the key, even with verbose and trace-ascii set in ~/.curlrc. /search.json with output=md returns text/markdown.
  • All 26 JSON examples parse and use only parameters found in the engine's bundled schema.
  • save-key.sh in scratch folders: it saves with directory mode 700 and file mode 600, and refuses an existing key, a symlinked config directory, and a parent directory writable by group or others.

Local Cursor test

To be added.

Not tested

  • PowerShell: save-key.ps1 and the PowerShell recipes have never been run.
  • Extract over curl with a real key. The same parameters were run through the MCP server.
  • The google_ai_overview follow-up recipe, which needs a token that no test search returned.
  • A real API key through the plugin's own MCP config, until the Cursor test above.

adarshdigievo and others added 3 commits November 18, 2026 23:01
Bundle SerpApi's hosted MCP server in mcp.json, with the API key as a
required plugin variable (SERPAPI_API_KEY) that Cursor sends as a bearer
token. The search skill now calls the MCP search tool first and falls
back to curl, so a search no longer needs a shell or an exported key.

Add a serpapi-setup skill, adapted from serpapi-codex-plugin, for when a
key or access is missing. It covers the MCP and curl routes, stores the
key for curl in the OS credential store or a private file without it
appearing in chat, verifies a real search, and diagnoses failed requests.

The search skill's curl commands and its examples now pipe the key to
curl on stdin instead of placing it in the URL, and start with -q so a
verbose or trace setting in ~/.curlrc cannot print it.

The bundled engines/*.json files stay the default source for engine
parameters; the MCP resource is read only when a file is missing.
test.sh checks the new files, that every mcp.json variable is declared,
each skill's frontmatter, and a save-key.sh symlink regression.

Bump the plugin version to 1.1.0.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Rename the search skill to serpapi-web-search and rebuild it as an
adapted port of the serpapi-web-search skill proposed for the
serpapi/skills repository. Requests ask for Markdown (output=md) by
default and JSON when structured data is needed. The engine table now
shows the query input, result key and key fields for common intents;
gotchas.md and recipes.md hold the details and worked requests.
recipes.md replaces examples.md, and its parameter sets work on both
the MCP and curl routes.

Add a serpapi-extract skill, adapted from the same source, for reading
a known URL as Markdown, listing a site's URLs, and crawling a bounded
set of pages through SerpApi's Extract API.

The MCP-first order, the curl fallback with the key on stdin, and the
bundled engines/*.json schemas are unchanged. The source's CLI route,
engine catalog and Python checks are not ported.

test.sh checks the new files, that every relative link in the skills
and README resolves, and that every engine named in the skills has a
bundled schema.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
The Extract skill said the MCP extract tool's own mode argument only
trims JSON. With mode "compact" the tool returns Markdown unless
params.output is "json", and a scrape's JSON keeps only markdown and
error, so the skill's structured-data example returned Markdown with
no error.

Say to leave mode out, or use "complete", when JSON is wanted, in the
skill and in its request examples.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@adarshdigievo adarshdigievo changed the title Add bundled SerpApi MCP server and serpapi-setup skill (v1.1.0) Add bundled MCP server, setup and Extract skills, and Markdown-first search (v1.1.0) Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant