Skip to content

feat(mcp): add remote auth, interaction flows, and prompt/resource support#344

Open
wgqqqqq wants to merge 12 commits intoGCWing:mainfrom
wgqqqqq:feat/mcp-oauth
Open

feat(mcp): add remote auth, interaction flows, and prompt/resource support#344
wgqqqqq wants to merge 12 commits intoGCWing:mainfrom
wgqqqqq:feat/mcp-oauth

Conversation

@wgqqqqq
Copy link
Copy Markdown
Collaborator

@wgqqqqq wgqqqqq commented Apr 2, 2026

Summary

This PR expands BitFun's MCP integration across the core service layer, desktop bridge, and web UI.

It adds a complete remote-auth and reauth flow, surfaces MCP interaction requests in the app UI, and exposes MCP prompt/resource capabilities both to the agent runtime and to end users in the chat input and settings UI.

What changed

  • Add remote MCP OAuth and reauth support across config parsing, server lifecycle/auth management, and desktop APIs.
  • Preserve remote metadata and transport semantics so stdio, SSE, and streamable HTTP servers keep the right behavior and UI affordances.
  • Split MCP server management into focused auth, lifecycle, reconnect, interaction, catalog, and tools modules to make the service easier to evolve.
  • Add MCP interaction dialog plumbing in the app shell so server-driven user interaction requests can be surfaced and completed in the desktop UI.
  • Add MCP resource and prompt APIs on the desktop/web boundary.
  • Add built-in agent tools for listing/reading MCP resources and listing/getting MCP prompts.
  • Expose MCP prompts in the chat slash-command picker and execute them in a Claude-style flow: the visible user message stays as the slash command, while the actual model input is expanded from prompts/get.
  • Replace the MCP resource browser mock data with real resource listing and reading.
  • Improve MCP settings/tool presentation, metadata handling, and config item UI.

Verification

  • cargo check -p bitfun-core --lib
  • cargo check -p bitfun-desktop --lib
  • pnpm run type-check:web

wgqqqqq added 12 commits April 1, 2026 16:15
Keep remote MCP tool, resource, prompt, and result metadata nearly lossless when adapting rmcp types into BitFun protocol types.

Preserve titles, icons, annotations, output schemas, structured tool results, _meta payloads, and resource links instead of flattening them away during remote transport mapping. Also advertise supported client capabilities during initialize and add focused tests for metadata retention and streamable HTTP initialization behavior.
- normalize MCP source and transport parsing for stdio, streamable-http, and sse servers\n- expose transport and start capability metadata through the desktop API and settings page\n- improve the OAuth callback handoff UI and register dynamic MCP tools for agents

# Conflicts:
#	src/crates/core/src/agentic/agents/registry.rs
# Conflicts:
#	src/web-ui/src/flow_chat/components/ChatInput.tsx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant