Add MCP server transport for Copilot Chat integration#36
Merged
Redth merged 5 commits intoRedth:mainfrom Mar 11, 2026
Merged
Conversation
Add 'maui-devflow mcp-serve' command that starts an MCP (Model Context Protocol) server over stdio. This enables VS Code Copilot Chat and other MCP-compatible AI hosts to interact with running MAUI apps through structured, typed tool responses — including inline screenshots. 27 MCP tools exposed: - maui_screenshot (returns image directly), maui_tree (structured JSON) - maui_logs, maui_network, maui_network_detail, maui_network_clear - maui_tap, maui_fill, maui_clear, maui_scroll - maui_set_property, maui_get_property - maui_navigate, maui_focus, maui_resize - maui_query, maui_query_css, maui_element, maui_hittest - maui_list_agents, maui_status, maui_wait, maui_select_agent - maui_cdp_evaluate, maui_cdp_screenshot, maui_cdp_source, maui_cdp_webviews The existing CLI is unchanged — MCP is purely additive. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add maui_assert tool for element property assertions - Add maui_recording_start/stop/status tools for screen recording - Update maui_scroll with itemIndex, groupIndex, scrollToPosition params - Update maui_screenshot with maxWidth and scale params - Update maui_logs with skip param for pagination - Register new tools in McpServerHost Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add SetPropertyAsync, GetLogsAsync, SendCdpCommandAsync to AgentClient - Refactor MCP PropertyTools, LogsTool, CdpTools to use AgentClient instead of direct HTTP calls (removed static HttpClient instances) - Extract shared port resolution to BrokerClient.ResolveAgentPortForProjectAsync() - Simplify McpAgentSession (87 → 33 lines) by delegating to BrokerClient - Simplify Program.ResolveAgentPort() by delegating to shared helper - Move ReadConfigPort() to BrokerClient, remove duplicate in Program.cs - Update CLI handlers (set-property, logs, CDP, webviews, source) to use AgentClient Net: -130 lines, 0 direct HttpClient usage in MCP tools Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…sors New MCP tools: - maui_preferences_list/get/set/delete/clear - maui_secure_storage_get/set/delete/clear - maui_app_info, maui_device_info, maui_display_info - maui_battery_info, maui_connectivity, maui_geolocation - maui_sensors_list/start/stop AgentClient: added methods for preferences, secure storage, platform info, geolocation, and sensor management. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add 'maui-devflow mcp-serve' command that starts an MCP (Model Context
Protocol) server over stdio. This enables VS Code Copilot Chat and other
MCP-compatible AI hosts to interact with running MAUI apps through
structured, typed tool responses — including inline screenshots.