From fa0db9cf81dbc2fa9432ff9dbed797c63d1b617d Mon Sep 17 00:00:00 2001 From: George Pickett Date: Fri, 4 Sep 2026 17:39:16 -0700 Subject: [PATCH 1/2] Python: Clarify remote MCP setup in sample guide --- python/samples/concepts/mcp/README.md | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/python/samples/concepts/mcp/README.md b/python/samples/concepts/mcp/README.md index a5233fbb2249..15ff0e0d102a 100644 --- a/python/samples/concepts/mcp/README.md +++ b/python/samples/concepts/mcp/README.md @@ -12,7 +12,7 @@ Those can then be used with function calling in a chat or agent. ## Server types -There are two types of servers, Stdio and Sse based. The sample shows how to use the Stdio based server, which get's run locally, in this case by using [npx](https://docs.npmjs.com/cli/v8/commands/npx). +The samples support Stdio, SSE, and Streamable HTTP transports. A Stdio server runs locally, for example by using [npx](https://docs.npmjs.com/cli/v8/commands/npx). Some other common runners are [uvx](https://docs.astral.sh/uv/guides/tools/), for python servers and [docker](https://www.docker.com/), for containerized servers. @@ -20,6 +20,30 @@ The code shown works the same for a Sse server, only then a MCPSsePlugin needs t The reverse, using Semantic Kernel as a server, can be found in the [demos/mcp_server](../../demos/mcp_server/) folder. +### Connecting to a remote Streamable HTTP server + +`MCPStreamableHttpPlugin` connects directly to a hosted server without a local server process. For example, [Parallel Search MCP](https://docs.parallel.ai/integrations/mcp/search-mcp) provides `web_search` and `web_fetch` without a Parallel account or API key. Anonymous access is rate limited. + +After installing Semantic Kernel as described below, use this inside an async function: + +```python +from semantic_kernel import Kernel +from semantic_kernel.connectors.mcp import MCPStreamableHttpPlugin + +async with MCPStreamableHttpPlugin( + name="ParallelSearch", + url="https://search.parallel.ai/mcp", + load_prompts=False, +) as plugin: + kernel = Kernel() + functions = kernel.add_plugin(plugin) + print(sorted(functions.functions)) +``` + +This discovers the server's tools. To let an agent use them, pass `plugins=[plugin]` to the agent and invoke it inside the context manager, as in [the HTTP sample](agent_with_http_mcp_plugin.py). That sample's Azure configuration is still required when using its agent. Omit the plugin from the agent to disable access. + +An agent with these tools may call them during its work. Search queries, requested URLs, and any supplied objectives or context are sent to Parallel when tools run. + ## Running the samples 1. Depending on the sample you want to run: From 89448fd3e3106f3c478b340eb7f13645b4241186 Mon Sep 17 00:00:00 2001 From: George Pickett Date: Sat, 5 Sep 2026 12:43:44 -0700 Subject: [PATCH 2/2] Python: Clarify MCP plugin naming and SSE terminology --- python/samples/concepts/mcp/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/python/samples/concepts/mcp/README.md b/python/samples/concepts/mcp/README.md index 15ff0e0d102a..56e53ec7b77b 100644 --- a/python/samples/concepts/mcp/README.md +++ b/python/samples/concepts/mcp/README.md @@ -16,7 +16,7 @@ The samples support Stdio, SSE, and Streamable HTTP transports. A Stdio server r Some other common runners are [uvx](https://docs.astral.sh/uv/guides/tools/), for python servers and [docker](https://www.docker.com/), for containerized servers. -The code shown works the same for a Sse server, only then a MCPSsePlugin needs to be used instead of the MCPStdioPlugin. For Streamable HTTP server, MCPStreamableHttpPlugin can be used. +The code shown works the same for an SSE server, only then a MCPSsePlugin needs to be used instead of the MCPStdioPlugin. For Streamable HTTP server, MCPStreamableHttpPlugin can be used. The reverse, using Semantic Kernel as a server, can be found in the [demos/mcp_server](../../demos/mcp_server/) folder. @@ -34,10 +34,10 @@ async with MCPStreamableHttpPlugin( name="ParallelSearch", url="https://search.parallel.ai/mcp", load_prompts=False, -) as plugin: +) as mcp_plugin: kernel = Kernel() - functions = kernel.add_plugin(plugin) - print(sorted(functions.functions)) + plugin = kernel.add_plugin(mcp_plugin) + print(sorted(plugin.functions)) ``` This discovers the server's tools. To let an agent use them, pass `plugins=[plugin]` to the agent and invoke it inside the context manager, as in [the HTTP sample](agent_with_http_mcp_plugin.py). That sample's Azure configuration is still required when using its agent. Omit the plugin from the agent to disable access.