How maestroai-company/opera-hub works
Opera Hub is a self-hosted hub for pairing Opera devices, synchronizing their data, sharing AI providers, and managing optional local models and MCP servers. The main runtime starts authenticated iroh endpoints and dispatches protocol handlers; paired clients initiate pairing, sync, and administration through the client library. The README documents capabilities beyond the sampled excerpts, so those branches are included with README evidence rather than implying their implementation was inspected.
Main entry points: hub.rs Hub runtime · mod.rs MCP server management · protocols.rs Pairing flow · db.rs Encrypted database
Components 22
Hub entry
- Hub CLI
crates/opera-hub/src/main.rs - Background service
crates/opera-hub/src/service.rs - Hub runtime
crates/opera-hub/src/hub.rs
Pairing and access
- Pairing flow
crates/opera-hub/src/protocols.rs - Pairing codes
crates/opera-hub/src/invite.rs - Device permissions
crates/opera-hub/src/store.rs
Device features
- Client library
crates/opera-hub-client/src/lib.rs - Shared protocol types
crates/opera-hub-proto/src/lib.rs - Conversation sync
crates/opera-hub/src/sync.rs - Hub settings
crates/opera-hub/src/settings.rs - LAN discovery
crates/opera-hub/src/lan.rs
AI and MCP
- Provider sharing
crates/opera-hub/src/providers.rs - Local model runtime
crates/opera-hub/src/llama.rs - MCP server management
crates/opera-hub/src/mcp/mod.rs - MCP installation
crates/opera-hub/src/mcp/install.rs - MCP sandbox
crates/opera-hub/src/mcp/sandbox/mod.rs
Hub state
- Encrypted database
crates/opera-hub/src/db.rs - Hub configuration
crates/opera-hub/src/config.rs - Hub updates
crates/opera-hub/src/update.rs - Usage accounting
crates/opera-hub/src/usage.rs
Other components
- Hub operator
- Opera devices
Connections 29
- Hub operator → Hub CLI: runs commands
README.md - Hub CLI → Background service: controls service
- Hub CLI → Hub runtime: starts runtime
README.md - Opera devices → Client library: uses hub client
README.md - Client library → Hub runtime: connects securely
README.md - Client library → Shared protocol types: uses shared types
crates/opera-hub-client/src/lib.rs - Hub runtime → Pairing flow: routes requests
crates/opera-hub/src/hub.rs - Pairing flow → Pairing codes: opens invite
crates/opera-hub/src/protocols.rs - Pairing flow → Device permissions: records paired device
crates/opera-hub/src/protocols.rs - Pairing flow → Encrypted database: checks grants
- Hub runtime → Conversation sync: routes sync
crates/opera-hub/src/hub.rs - Hub runtime → Hub settings: loads settings
crates/opera-hub/src/hub.rs - Hub runtime → LAN discovery: announces hub
crates/opera-hub/src/hub.rs - Hub runtime → Provider sharing: routes provider requests
crates/opera-hub/src/hub.rs - Hub runtime → Local model runtime: starts model runtime
crates/opera-hub/src/hub.rs - Hub runtime → MCP server management: starts MCP managers
crates/opera-hub/src/hub.rs - MCP server management → MCP installation: installs servers
crates/opera-hub/src/mcp/mod.rs - MCP server management → MCP sandbox: spawns isolated processes
crates/opera-hub/src/mcp/mod.rs - MCP server management → Encrypted database: stores server secrets
crates/opera-hub/src/mcp/mod.rs - Hub runtime → Encrypted database: opens encrypted store
crates/opera-hub/src/hub.rs - Hub runtime → Hub configuration: loads runtime config
crates/opera-hub/src/hub.rs - Hub runtime → Hub updates: checks for updates
crates/opera-hub/src/hub.rs - Conversation sync → Encrypted database: reads and writes records
crates/opera-hub/src/sync.rs - Provider sharing → Local model runtime: uses local models
crates/opera-hub/src/providers.rs - Provider sharing → MCP server management: uses MCP tools
crates/opera-hub/src/providers.rs - Hub runtime → Usage accounting: tracks usage
- Opera devices → Conversation sync: syncs conversations
README.md - Opera devices → Hub settings: manages hub
README.md - Opera devices → Local model runtime: manages models
README.md