Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions website/src/content/docs/docs/tutorials/mcp.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
44 changes: 44 additions & 0 deletions website/src/content/docs/zh-cn/docs/tutorials/mcp.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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 生命周期。如果服务返回速率限制,请等待提示的重试时间后再试。

## 故障排除

| 症状 | 检查项 |
Expand Down