Skip to content

feat: add an opt-in Parallel Search MCP example - #2197

Closed
georgeatparallel wants to merge 2 commits into
stackblitz-labs:mainfrom
georgeatparallel:georgeatparallel/parallel-search-mcp-example
Closed

georgeatparallel wants to merge 2 commits into
stackblitz-labs:mainfrom
georgeatparallel:georgeatparallel/parallel-search-mcp-example

Conversation

@georgeatparallel

@georgeatparallel georgeatparallel commented Sep 1, 2026 •

Copy link
Copy Markdown

Problem

If you want to search the web from bolt.diy, you need to find an MCP server and figure out how to connect it. There's no Parallel Search example in the app to help you get started, and it's easy to mistake Load Example for something that adds to your existing settings.

Solution

This adds Parallel Search to the existing Load Example config, plus a short walkthrough in the README. You can save just that connection, check that web_search and web_fetch are available, and use them in chat. No Parallel account or API key is needed.

Nothing connects automatically. Load Example only replaces the editor draft, and the instructions explain how to keep your other servers when saving. Your model choice and tool approvals stay the same. The guidance also explains what gets sent to Parallel when you approve a call, how to inspect the results, and that free search has rate limits. Model and hosting costs are separate.

This is for community bolt.diy, not hosted Bolt.new.

Testing

  • Checked the settings flow in the browser, from an empty config through saving only Parallel and discovering both tools.
  • Ran an anonymous search and fetch through bolt.diy's real MCP client and chat approval-processing path. Source URLs and excerpts came through in the results.
  • All 59 tests pass, including saved-settings protection, approval and denial, and HTTP, RPC, and MCP tool errors. Lint, build, and post-build typecheck pass too.

A full model-generated conversation wasn't tested because the isolated app had no model credentials configured. GitHub's application, code-quality, security, PR-validation, and preview workflows still require maintainer approval.

I work at Parallel, which operates this service.

@georgeatparallel
georgeatparallel marked this pull request as ready for review September 1, 2026 01:05
@dustinwloring1988

Copy link
Copy Markdown
Member

Hi @georgeatparallel, thank you for adding this Parallel Search MCP example! There have been several updates merged to \main\ recently causing a merge conflict. Could you please rebase on latest \main\ and resolve the conflicts? We'll take another look once updated. Thanks!

@dustinwloring1988 dustinwloring1988 added enhancement New feature or request epic:agentic Tools and agentic behavior labels Oct 6, 2026
Rebased onto current main. The README section moved to sit with the
restructured docs, and the Streamable HTTP fixture test now lives in its
own spec, ported to the AI SDK v5+ tool part shape. The fixture builds a
fresh stateless server per request, which current MCP SDK versions require.
@cursor
cursor Bot force-pushed the georgeatparallel/parallel-search-mcp-example branch from a6308e5 to a52d5f2 Compare October 8, 2026 18:59
@georgeatparallel

Copy link
Copy Markdown
Author

Rebased onto current main. The README section now sits right before Features with a TOC entry. Since main moved to AI SDK v5+, I moved the Streamable HTTP fixture test into its own spec (mcpService.streamableHttp.spec.ts) using the new tool part shape. typecheck, lint and the MCP specs pass locally. Should be good for another look!

@dustinwloring1988

Copy link
Copy Markdown
Member

When loading the MCP server and then clicking on it it crashes. Sorry dont have the crash info right now but I was on a windows 11 machine.

@georgeatparallel

Copy link
Copy Markdown
Author

Thanks for the report. Looking into the expand/click crash when Parallel is loaded (likely the tool schema render path). Will push a fix once I can reproduce it. If you still have a stack trace or console error from Windows, that would help, but I can proceed without it.

Expanding a configured MCP server threw "TypeError: schema is not a
function" and took the whole settings tab down with it.

Tools reach the tab as JSON from /api/mcp-update-config. That strips the
AI SDK Schema symbol and its validate function, leaving a bare
{ jsonSchema } object, so asSchema no longer recognises it as a Schema
and falls through to its lazy-factory branch, calling the object. This
affects every server, not just the Parallel Search example that surfaced
it.

Read the JSON Schema through a defensive helper instead. It unwraps the
serialized, in-process, Zod, lazy and raw-JSON-Schema shapes, gives up
rather than throwing on async or malformed ones, and coerces types and
descriptions into strings React can render. Properties described only by
anyOf/oneOf, such as Parallel's web_fetch objective, now show a type at
all ("string | null") instead of none.

Each tool also renders inside an error boundary, so a schema that still
manages to break rendering costs one row rather than the tab.
@georgeatparallel

Copy link
Copy Markdown
Author

Pushed a fix for the expand crash (b0c746e).

Root cause: after AI SDK v7, tools arrive in the settings tab as JSON from /api/mcp-update-config. That strips the Schema symbol, so asSchema treats the bare object as a lazy factory and throws "schema is not a function". Expanding any configured MCP server took the whole tab down, not just Parallel, and it is not Windows-specific.

The PR now reads tool schemas through a defensive helper, wraps each tool row in an error boundary, and adds regression tests (including Parallel's web_search/web_fetch shapes). Full vitest suite, typecheck, and lint are green locally. Worth another expand/click on Windows when you have a minute.

@dustinwloring1988

Copy link
Copy Markdown
Member

This would be good for our new plugin system, which I am testing now and should be done in a day or two. This will allow people to add features that others can use with out changing the core codebase. Let me know if you need help with it.

@georgeatparallel

Copy link
Copy Markdown
Author

Thanks @dustinwloring1988, that sounds like a better home for it. I'll take a look at the plugin system once it's out and move this over.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request epic:agentic Tools and agentic behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants