Repository navigation
Add bundled SerpApi MCP server and serpapi-setup skill (v1.1.0) - #1
Draft
adarshdigievo wants to merge 1 commit into
Draft
adarshdigievo wants to merge 1 commit into
adarshdigievo wants to merge 1 commit into
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The plugin now works without a shell or an exported key, and can guide the user through setup when the key is missing.
mcp.jsonadds SerpApi's hosted MCP server (https://mcp.serpapi.com/mcp) asserpapi. The key is a required plugin variable,SERPAPI_API_KEY, entered in Cursor's plugin settings and sent as a bearer token.searchcalls the MCPsearchtool and falls back tocurlwhen the server or its key isn't available. The bundledengines/*.jsonfiles stay the default source for engine parameters.serpapi-setupskill, 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.--data-urlencode 'api_key@-') and start with-q, so a verbose or trace setting in~/.curlrccan't print it./serpapi-setup,test.shgrows from 11 to 26 checks, and the version is1.1.0.The MCP server also exposes
extract,search_tableandsearch_dashboard, and itssearchtool acceptsoutput: "md"for Markdown. Cursor Agent can use these once the server has a key. The setup skill's MCP guide mentions them in one line each; the search skill doesn't cover Extract or output formats yet.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 then reviewed the change over six rounds, and each finding was reproduced or checked against the code before anything was changed.
Testing
Run on macOS against commit 4029752:
bash test.sh: 26 passed, 0 failed, in the working tree and in a fresh clone of this branch. Its optional live API check was skipped because no key was set.plugin.jsonis valid against the cursor/plugins manifest schema.mcp.jsonagainst the hosted server: it connects and lists its four tools without a key. An unresolved placeholder returnsInvalid SerpApi API keyand an empty key returnsMissing API key, the two errors the skills handle.main. The 28 that were run with a dummy key each returned HTTP 401 and none printed the key, even withverboseandtrace-asciiset in~/.curlrc.save-key.shin scratch folders: it saves with directory mode700and file mode600, 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
save-key.ps1and the PowerShell recipes have never been run.test.shhas only run on macOS. CI runs it on Ubuntu for this PR.