Repository navigation
feat: add an opt-in Parallel Search MCP example - #2197
georgeatparallel wants to merge 2 commits into
Conversation
|
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! |
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.
a6308e5 to
a52d5f2
Compare
|
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! |
|
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. |
|
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.
|
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. |
|
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. |
|
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. |
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_searchandweb_fetchare 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
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.