feat(site): MCP platform showcase with multi-server chat demo#66
Open
mattzcarey wants to merge 14 commits intomainfrom
Open
feat(site): MCP platform showcase with multi-server chat demo#66mattzcarey wants to merge 14 commits intomainfrom
mattzcarey wants to merge 14 commits intomainfrom
Conversation
Contributor
Author
|
/bonk review this |
Reposition mcp.cloudflare.com as the best platform to host and connect to MCP servers. Users can try 10 MCP servers (Stripe, Sentry, Asana, Atlassian, Linear, PayPal, Square, Webflow, Intercom, Cloudflare) from an interactive chat demo. - Add chat UI with ChatInterface, ToolCard, and ChatDemo components - Make hero cards clickable to select MCP server, scroll to demo - Add inline logo pill buttons for easy server switching - Keep MCP OAuth connections alive across server switches - Scope tools to active server via getActiveTools() prefix filtering - Add 1-hour inactivity alarm to clean up idle sessions - Server-side MCP URL registry (URLs never sent from client) - Switch model to @cf/moonshotai/kimi-k2.5 - Update page copy: Features, MCP Spec support, Code Mode, CTA sections - Fix R3F texturedLetterMaterial JSX type declaration
Use separate agent instances per server (session ID includes server ID) so each DO has exactly one MCP connection. Removes PersistedObject, tool prefix filtering, and cleared-state juggling. OAuth tokens persist per server since the same DO is reused on return.
- Server pills are now toggleable (multi-select, min 1) - Code Mode pill: toggleable for single server, auto-enabled for 2+ - Lazy connect: selecting servers doesn't connect until first message - Messages clear when selection changes - 2+ servers uses codemode (LLM writes JS against all tools) - 1 server uses direct MCP tools by default - ToolCard shows code blocks and logs for codemode calls - Add @cloudflare/codemode dependency and worker_loaders binding - Replace switchServer with connectServers callable - Update compat date to 2026-01-28
…e guard - ToolCard: keep content always mounted, toggle via CSS max-h/opacity (prevents state jumping between tool calls during streaming) - GridAgent: sweep every 30s instead of 5s - ChatAgent: don't schedule inactivity timer in onStart, wrap destroy in try/catch - Disable Code Mode pill when Cloudflare is selected (has native codemode) - Remove "Join the likes of these companies" copy
- Code Mode defaults on when multiple non-Cloudflare servers selected - Always toggleable (no more locked/auto state) - Cloudflare selection disables it (has native codemode) - Reset override when server selection changes - Better pill styling with monospace symbol and proper gap
Code Mode pill is now always toggleable for any server combination.
Server is now source of truth for MCP selection. ChatAgent stores useCodemode in DO state via setState, synced to client via onStateUpdate. Connected server IDs derived from mcpState on first push. Also removes font-mono from chat header for consistent typography.
All MCP connection status now derived from server-pushed mcpState. Removed isConnectingMcp, use mcpStatus from getMcpStatus instead. Don't reset mcpState on selection change — server is source of truth. Use toolCallId as React key for stable tool block rendering.
- Add getSessionConfig() callable for single authoritative sync on connect - Remove onStateUpdate + serverStateRef (eliminates null ref crash and race between onStateUpdate/onMcpUpdate ordering) - Cache DynamicWorkerExecutor on DO instance - Add noopener,noreferrer to OAuth popup - Surface connectError in header UI - Handle empty serverIds in sync (reset to defaults)
- Add activeServerIds to ChatAgentState for server-side tool filtering instead of disconnecting/reconnecting servers on selection change - Add setActiveServers callable to update which tools the LLM sees - Add getActiveTools() that filters MCP tools by active server IDs - Make connectServers additive-only (never removes servers) - Add reauthServers callable + reauth button (ArrowsClockwise) in header - Reduce auto-destroy timer to 15min, skip if connections still active - Remove getMcpStatus helper, derive all status from mcpState.servers - Dedupe OAuth popups per server+URL (workaround for SDK double-fire) - Clear only wipes messages, keeps DO session and server connections - Update system prompt to list active servers, not all connected - Filter tool count in header to only show active server tools - Add MCP intro section above Try It demo - Add side-by-side code examples section with Shiki syntax highlighting - Remove "Only pay for CPU time" claim from Region: Earth - Add plans/ to gitignore
|
ProviderModelNotFoundError |
|
@mattzcarey Bonk workflow failed. Check the logs for details. View workflow run · To retry, trigger Bonk again. |
1314f54 to
634719d
Compare
…izing - ShikiCode: switch between github-light-default and github-dark-default themes based on data-mode attribute, add copy-to-clipboard button - Card layout: use canvas text measurement instead of fixed char width ratio, switch label to flexbox so it sizes to fit content naturally - Replace Sentry, Intercom, Linear, Webflow, Asana SVGs with official brand logos and normalize viewBoxes to square for consistent sizing
- Intercom: #6AFDEF → #0057FF (light) / #47C7F0 (dark) - Webflow: #4353FF → #146EF5 (official brand blue) - Asana: #F06A6A → #FC636B (updated coral)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
@cloudflare/codemodeto wrap all tools into a singlecodemodetool where the LLM writes JavaScript. Also available as a toggle for single-server use.@cf/moonshotai/kimi-k2.5Blocked on
@cloudflare/codemodepackage bundleszod-to-tswhich pulls intypescript, causing__filename is not definedon Workers deploy (see @cloudflare/codemode: zod-to-ts pulls in typescript, breaks Workers deploy agents#1076). Currently usinghttps://pkg.pr.new/@cloudflare/codemode@1074as a workaround. Once merged and released, switch to a pinned version.Test plan