From 74c26cc16bc12706aa890fb6219b7de6568f3418 Mon Sep 17 00:00:00 2001 From: George Pickett Date: Fri, 9 Oct 2026 17:31:59 +0000 Subject: [PATCH] docs: add Parallel Search MCP tutorial example --- .../src/content/docs/docs/tutorials/mcp.mdx | 46 +++++++++++++++++++ .../content/docs/zh-cn/docs/tutorials/mcp.mdx | 44 ++++++++++++++++++ 2 files changed, 90 insertions(+) diff --git a/website/src/content/docs/docs/tutorials/mcp.mdx b/website/src/content/docs/docs/tutorials/mcp.mdx index 0ce2ae9e..8f2aa705 100644 --- a/website/src/content/docs/docs/tutorials/mcp.mdx +++ b/website/src/content/docs/docs/tutorials/mcp.mdx @@ -172,6 +172,52 @@ bub mcp remove time `--env` is only allowed with `--transport stdio`; `--header` is only allowed with `--transport http` or `--transport sse`. +## Search the web with Parallel + +[Parallel Search MCP](https://docs.parallel.ai/integrations/mcp/search-mcp) provides free web search +and page fetching without a Parallel account or API key. Anonymous searches use Fast mode and have +lower rate limits than authenticated requests. + +After installing `bub-mcp` above, add the HTTP server: + +```bash +bub mcp add --transport http --header "User-Agent: bub/parallel-search-example" \ + parallel https://search.parallel.ai/mcp +bub mcp list +``` + +The equivalent entry under `mcpServers` in your `mcp.json` is: + +```json +{ + "parallel": { + "url": "https://search.parallel.ai/mcp", + "transport": "http", + "headers": { "User-Agent": "bub/parallel-search-example" } + } +} +``` + +Keep your existing entries, including `time`. You should see `Status: Connected` and the tools +`mcp.parallel_web_search` and `mcp.parallel_web_fetch`. + +Start a session with the MCP lifecycle enabled: + +```bash +bub gateway --enable-channel cli --enable-channel mcp.lifecycle +``` + +With a working model provider, ask: + +```text +Use mcp.parallel_web_search to find Bub's MCP tutorial, then use mcp.parallel_web_fetch +on https://bub.build/docs/tutorials/mcp/ and summarize how to connect an HTTP server. +``` + +Check the tool-call output to confirm both tools ran. Use `bub chat` or the gateway for this example; +`bub run` does not start the MCP lifecycle. If the service rate-limits a request, wait for the indicated +retry period before trying again. + ## Troubleshooting | Symptom | Check | diff --git a/website/src/content/docs/zh-cn/docs/tutorials/mcp.mdx b/website/src/content/docs/zh-cn/docs/tutorials/mcp.mdx index ce9a2d2f..5eea941d 100644 --- a/website/src/content/docs/zh-cn/docs/tutorials/mcp.mdx +++ b/website/src/content/docs/zh-cn/docs/tutorials/mcp.mdx @@ -172,6 +172,50 @@ bub mcp remove time `--env` 仅在 `--transport stdio` 下可用;`--header` 仅在 `--transport http` 或 `--transport sse` 下可用。 +## 使用 Parallel 搜索网页 + +[Parallel Search MCP](https://docs.parallel.ai/integrations/mcp/search-mcp) 提供免费的网页搜索和页面抓取, +无需 Parallel 账号或 API key。匿名搜索使用 Fast 模式,速率限制比已认证请求更低。 + +按上文安装 `bub-mcp` 后,添加 HTTP 服务器: + +```bash +bub mcp add --transport http --header "User-Agent: bub/parallel-search-example" \ + parallel https://search.parallel.ai/mcp +bub mcp list +``` + +在 `mcp.json` 的 `mcpServers` 下,等价配置为: + +```json +{ + "parallel": { + "url": "https://search.parallel.ai/mcp", + "transport": "http", + "headers": { "User-Agent": "bub/parallel-search-example" } + } +} +``` + +保留 `time` 等已有条目。应能看到 `Status: Connected`,以及工具 +`mcp.parallel_web_search` 和 `mcp.parallel_web_fetch`。 + +启用 MCP 生命周期并启动会话: + +```bash +bub gateway --enable-channel cli --enable-channel mcp.lifecycle +``` + +配置好模型提供商后,向 Bub 提问: + +```text +使用 mcp.parallel_web_search 查找 Bub 的 MCP 教程,然后通过 mcp.parallel_web_fetch +抓取 https://bub.build/docs/tutorials/mcp/,总结如何连接 HTTP 服务器。 +``` + +检查工具调用输出,确认两个工具都已执行。本例需要使用 `bub chat` 或 gateway; +`bub run` 不会启动 MCP 生命周期。如果服务返回速率限制,请等待提示的重试时间后再试。 + ## 故障排除 | 症状 | 检查项 |