ComposeBridge 🌉
Real-time on-device visual editor for Jetpack Compose + Model Context Protocol (MCP) server for AI coding agents.
Live UI tuning (<50ms latency), AST-guided surgical source code splicing, and autonomous AI-assisted refactoring.
Power your agent
Cài đặt từ nhà phát hành. Không phải endpoint của PlugMCP.
Host a copy with our keys and logs.
Chưa có bản phát hành đóng gói nào trong registry. Làm theo README của kho mã.
URL từ xa hay một lệnh trên máy của bạn? Hai cách cài đặt khác nhau thế nào
Chạy trên PlugMCP
A new server you create. It is not this listing's official endpoint. Use the publisher install when you want their URL and their credentials.
MởTừ nhà phát hành
Real-time on-device visual editor for Jetpack Compose + Model Context Protocol (MCP) server for AI coding agents.
Live UI tuning (<50ms latency), AST-guided surgical source code splicing, and autonomous AI-assisted refactoring.
Real-time on-device visual editor for Jetpack Compose + MCP Server for AI agents. Live UI tuning, AST-guided surgical source splicing, and standalone AI-driven code edits — no phone needed.
Watch ComposeBridge visually edit a running Jetpack Compose UI live:
Copy composebridge-runtime-release.aar and composebridge-agent-release.aar into your app module's libs/ folder:
// app/build.gradle.kts
dependencies {
// 1. Runtime registries: compiles cleanly in both Debug & Release
implementation(files("libs/composebridge-runtime-release.aar"))
// 2. Interactive visual inspector: debug builds only
debugImplementation(files("libs/composebridge-agent-release.aar"))
}
// MainActivity.kt
import com.composebridge.agent.ComposeBridgeAgent
class MainActivity : ComponentActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
// Start bridge connection (automatically connects to local hub)
ComposeBridgeAgent.start(serverUrl = "ws://127.0.0.1:8711")
setContent {
// Wrap root content in ComposeBridgeAgent.Root
ComposeBridgeAgent.Root {
MyApplicationTheme {
MainScreen()
}
}
}
}
}
adb reverse tcp:8711 tcp:8711 automatically).ComposeBridge coordinates three interconnected components over a fast local loopback interface:
+--------------------------+ +----------------------------+
| Android Phone / AVD | | Local WebSocket Hub |
| | | (Python 3.10+ Daemon) |
| [App UI in Compose] | | |
| | | WebSocket | server.py (:8711) |
| [:composebridge-agent] |<===============>| ├── Message Router |
| - Visual Touch Overlay| (Port 8711) | ├── AST Splicer |
| - Semantic Inspector | | └── PatternJournal |
| | | +----------------------------+
| [:composebridge-runtime]| ||
| - TextRegistry | || JSON-RPC
| - ThemeRegistry | || (stdio / TCP)
| - DimensionRegistry | \/
+--------------------------+ +----------------------------+
| Developer Tools & AI |
| |
| [Android Studio Plugin] |
| - Live Changes Diff |
| - Token Split / Scanner |
| [Autonomous MCP Agents] |
| - Antigravity / Claude |
| - 27 Standard MCP Tools |
+----------------------------+
:composebridge-agent): Injected via ComposeBridgeAgent.Root. Renders non-intrusive hit-testing overlays, extracts semantic metadata, and transmits change requests over local WebSocket (ws://127.0.0.1:8711).:composebridge-runtime): Standalone ~9KB runtime containing registry singletons (BridgeTextRegistry, BridgeThemeRegistry, BridgeDimensionRegistry). Ensures production Release builds compile with zero overhead without packaging debug overlays.server.py): Acts as the central event hub and Kotlin AST manipulation engine. Applies deterministic changes using file write-locks, atomic rewrites, and maintains a byte-level .bridge.bak rollback journal.ComposeBridge exposes 27 deep-inspection and code refactoring tools to any AI assistant supporting the Model Context Protocol (MCP). No physical phone is required to use MCP tools.
💡 Ultra-Lightweight Context Window: ComposeBridge uses Lazy Loading, so 27 MCP tools consume only ~176 tokens (<1% of context window).
Make sure server dependencies are installed and the server is executable from your server directory:
cd server
pip install -r requirements.txt
mcp_config.jsonAdd the ComposeBridge server configuration to your AI agent's config file (e.g. in ~/.gemini/config/mcp_config.json or your IDE configuration):
{
"mcpServers": {
"composebridge": {
"command": "python",
"args": ["-u", "C:\Users\thinkpad\StudioProjects\compose-bridge\server\mcp_server.py"],
"env": {
"COMPOSEBRIDGE_ROOT": "C:\Users\thinkpad\StudioProjects\MyTeacher-App",
"PYTHONIOENCODING": "utf-8"
}
}
}
}
⚠️ Important: Any changes made to
mcp_config.jsonrequire starting a New Chat in your AI agent interface so that all 27 MCP tools are freshly discovered and initialized.
list_tokens, find_token_by_color, get_token_impact, get_token_siblings, get_all_token_groups, list_orphans, get_naming_convention.set_token, set_text, add_token, rollback_last.replace_pattern, list_applied_patterns, rollback_pattern, suggest_token_split, detect_conditional_variants.list_modified_files, get_file_diff, approve_file_changes, reject_file_changes, approve_all_files, reject_all_files, reject_all_files_force.run_gradle_build, list_allowed_gradle_tasks, trigger_user_sync, get_sync_status.adb reverse tcp:8711 tcp:8711). The Studio plugin runs this automatically on startup.[WS] Connection failed🟢 Bridge Running in Studio or python server.py in terminal).adb reverse tcp:8711 tcp:8711
ComposeBridgeAgent.start(serverUrl = "ws://192.168.1.X:8711").Duplicate class found in modulescomposebridge-runtime-release.aar is added under implementation(...) and composebridge-agent-release.aar is added under debugImplementation(...). Do not include the agent in release configurations.composebridge.json or pass --project <path> when launching server.py.We welcome contributions! Please review our:
Distributed under the Apache License 2.0.
Real-time on-device visual editor for Jetpack Compose + MCP Server for AI agents. Live UI tuning, AST-guided surgical source splicing, and standalone AI-driven code edits — no phone needed.
Công cụ
Chưa có danh sách công cụ. Máy chủ từ xa sẽ có danh sách sau lần kiểm tra tình trạng đầu tiên.
Câu hỏi thường gặp
Sao chép cấu hình stdio cho Cursor, Claude Desktop, Claude Code hoặc VS Code trên trang này. Cấu hình dùng bản cài đặt của nhà phát hành, không phải proxy của PlugMCP.
Bản ghi này không liệt kê biến môi trường bắt buộc nào.
Compose Bridge chạy cục bộ qua stdio.
Kiểm tra lần cuối: 2026-10-27. Real-time on-device visual editor for Jetpack Compose + MCP Server for AI agents. Live UI tuning, AST-guided surgical source splicing, and standalone AI-driven code edits — no phone needed.