cloudflare / cloudflare/agents

Add an opt-in live web search example to the MCP client

Open
#2,164 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
TypeScript
Stars
5.6k
Forks
711
Avg merge
1d 20h
Merged PRs (30d)
53

Description

Hey folks, I was trying out the MCP client example and noticed there isn't an easy way to test it against a real hosted MCP server without setting up authentication first.

Parallel has a public MCP endpoint at https://search.parallel.ai/mcp that supports live web search without an API key. It seems like a good fit for an optional "Try live web search" button in the existing example. The client would still start disconnected, and people could still connect any MCP server they want.

I also ran into a small issue in the existing form: array arguments get sent as strings. That breaks tools like `web_search`, which expects `search_queries` to be an array, and `web_fetch`, which expects `urls` to be an array. Supporting array and nullable-array fields would fix this for other MCP servers too.

I put together a small implementation here:

https://github.com/georgeatparallel/agents/commit/f2a0d9b1dbec98a002c7f2efdcba857f1db2ebbc

It adds the optional connection button, fixes array inputs, includes seven focused tests, and documents the example. I also tested it end to end against the running Worker and got live search results back without an API key.

I couldn't open a PR because this repo currently limits pull requests to collaborators. If this sounds useful, could someone let me know the best way to contribute it?

Contributor guide

Open the contributing guide

Research direction

Start with the existing MCP client example and its form handling, then review the referenced implementation commit and its seven focused tests. Verify the optional Parallel connection flow, array and nullable-array arguments, documentation, and end-to-end live search behavior against the running Worker.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
ai, developer-experience
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.