Python: document keyed web search with Serply MCP - #8319
Open
Serply (googio) wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The documentation is internally consistent, scoped appropriately, and provides a complete runnable example.
Pull request overview
Adds a documentation-only Serply MCP example demonstrating authenticated web and news search without a model provider account.
Changes:
- Documents dependency installation and
SERPLY_API_KEYsetup. - Adds direct
google_searchandgoogle_news_searchcalls using host-scopedheader_provider. - Describes available tools, output, data transmission, and connection cleanup.
File summaries
| File | Description |
|---|---|
python/samples/02-agents/mcp/README.md |
Adds the keyed Serply MCP walkthrough and prerequisite. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Balanced
💡 Add a code-review agent skill for context-aware, tailored reviews. Learn more in the docs.
Author
|
@microsoft-github-policy-service agree |
Add a README section to the MCP samples showing MCPStreamableHTTPTool against the Serply MCP server with header_provider supplying the X-Api-Key header, calling google_search and google_news_search directly. Adds the SERPLY_API_KEY line under Prerequisites.
Serply (googio)
force-pushed
the
feat/serply-search
branch
from
September 13, 2026 16:02
9f108f0 to
a852848
Compare
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.
Motivation & Context
The MCP README has an anonymous web search example (Parallel, #8084) and a generic
header_providersample, but no runnable example of a keyed web search server that combines the two. This adds one for the Serply MCP server, which exposes Google, Bing, Google News, Google Scholar, Google Maps, and page scraping tools behind anX-Api-Keyheader.The example reuses the
header_providerpattern frommcp_api_key_auth.py, so the key is scoped toapi.serply.iorequests, and calls the tools directly so it needs no model provider account.I work with Serply, which operates this service.
Description & Review Guide
google_searchandgoogle_news_searchcalls throughMCPStreamableHTTPToolwithheader_provider. One line under Prerequisites forSERPLY_API_KEY.SERPLY_API_KEYare unaffected.main(it needs the ambientheader_providerhandshake fix from Python: preserve MCP request ownership on low-level sends #8246). Against the releasedagent-framework-core1.18.0 wheel withmcp1.30 the initialize request goes out without the header and Serply answers 401, so the example will start working for wheel users with the next release.Verification: ran the exact code block from the README with
agent-framework-coreinstalled from this branch and a live key. Output listed the nine Serply tools, three web results with title, URL, and snippet, and a list of news articles. Ranruff checkandruff format --checkon the snippet with the repo config. No non-ASCII characters were added.Related Issue
None. This follows the shape of #8084, which added the Parallel section without an issue.
Contribution Checklist