Skip to content

Add slop-relay CLI and cloud bridge server#57

Open
devteapot wants to merge 2 commits intomainfrom
add-relay-cli
Open

Add slop-relay CLI and cloud bridge server#57
devteapot wants to merge 2 commits intomainfrom
add-relay-cli

Conversation

@devteapot
Copy link
Copy Markdown
Owner

Summary

Two new packages that together let cloud LLM hosts (Mistral Le Chat, ChatGPT, Claude.ai) reach SLOP apps running on a user's machine through a URL-based MCP connector.

  • @slop-ai/relay-cli — outbound relay agent. Reuses @slop-ai/discovery to find local SLOP providers and tunnels them over an authenticated WSS connection to a hosted bridge. Bin: slop-relay.
  • @slop-ai/bridge-server — multi-tenant cloud relay. Terminates Streamable HTTP MCP from LLM hosts on one side and the relay protocol on the other, routing tool calls per user. Deployed to Fly at bridge.slopai.dev.

Wire protocol lives in relay-cli/src/protocol.ts and is re-exported via @slop-ai/relay-cli/protocol so the bridge consumes it without copy-paste.

Auth (v1): per-user SLOP_BRIDGE_USERS env mapping holds two distinct tokens — mcpToken (Bearer header from LLM host) and relayToken (Bearer header from slop-relay). Real OAuth lands later.

Test plan

  • bun test in bridge-server (e2e in-process: fake relay + MCP client roundtrip list_apps, open_app, app_action)
  • Deployed to Fly (slop-bridge app), https://bridge.slopai.dev/healthz returns 200, cert provisioned
  • Local 3-terminal smoke: example SLOP app + relay + MCP inspector against deployed bridge
  • /debug/providers (auth'd by mcpToken) confirms providers are bridged end-to-end, including browser-extension tabs (Excalidraw observed via transport: relay, source: bridge)
  • Le Chat Custom MCP Connector validation against https://bridge.slopai.dev/mcp with Bearer mcpToken
  • Follow-up: investigate empty capabilities array on bridged tab providers (extension or discovery/src/bridge-client.ts likely drops the field)

🤖 Generated with Claude Code

devteapot and others added 2 commits April 30, 2026 23:58
Sibling to relay-cli: terminates Streamable HTTP MCP from LLM hosts on
one side and the relay protocol from slop-relay on the other, routing
tool calls per user. Deployed to Fly at bridge.slopai.dev.

- bridge-server: relay-hub, mcp-session, tokens, http, cli + e2e test
- /debug/providers endpoint (Bearer mcpToken) for relay-state inspection
- relay-cli exports ./protocol so the bridge can import wire types
  without copy-paste
- fly.toml at repo root; Dockerfile filters workspace globs to the
  packages/typescript subset that ships in the image

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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