Skip to content

feat(webuiapps): add minimal MCP stdio bridge for external agent integration#35

Open
CrepuscularIRIS wants to merge 2 commits intoMiniMax-AI:mainfrom
CrepuscularIRIS:feat/mcp-minimal-bridge
Open

feat(webuiapps): add minimal MCP stdio bridge for external agent integration#35
CrepuscularIRIS wants to merge 2 commits intoMiniMax-AI:mainfrom
CrepuscularIRIS:feat/mcp-minimal-bridge

Conversation

@CrepuscularIRIS
Copy link
Copy Markdown

Summary

This PR adds a minimal MCP stdio bridge in the Vite dev backend so OpenRoom can talk to external MCP servers (for multi-agent integration use cases).

What Changed

  • Added MCP server config persistence at ~/.openroom/mcp-servers.json
  • Added backend endpoints in apps/webuiapps/vite.config.ts:
    • GET/POST /api/mcp-servers
    • GET /api/mcp-tools
    • POST /api/mcp-call
  • Implemented stdio JSON-RPC framing (Content-Length) and request timeout handling
  • Added MCP helper utilities:
    • apps/webuiapps/src/lib/mcpBridgeTools.ts
  • Added unit tests:
    • apps/webuiapps/src/lib/__tests__/mcpBridgeTools.test.ts

Why

OpenRoom currently has a strong chat/tool UX. This bridge lets OpenRoom act as a frontend hub while delegating reasoning/tools to external MCP-compatible agents/services.

Validation

  • pnpm --dir apps/webuiapps test -- --run (113 tests passed)
  • pnpm --dir apps/webuiapps build (success)
  • Local smoke test with a temporary stdio MCP server:
    • POST /api/mcp-servers -> saved server config
    • GET /api/mcp-tools -> discovered echo tool
    • POST /api/mcp-call -> successful tool call response

Notes

  • This is intentionally minimal backend plumbing first.
  • UI-level MCP management and routing policies can be iterated in follow-up PRs.

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.

2 participants