Flutter Inspector MCP Server
by Arenukvern
A powerful Model Context Protocol (MCP) server that connects your Flutter apps with AI coding assistants. It allows AI tools to analyze errors and get screenshots of your app.
Last updated: N/A
Flutter Inspector MCP Server for AI-Powered Development
GitHub Repository
smithery badge
š A powerful Model Context Protocol (MCP) server that connects your Flutter apps with AI coding assistants like Cursor, Claude, and Cline.
<a href="https://glama.ai/mcp/servers/qnu3f0fa20"> <img width="380" height="200" src="https://glama.ai/mcp/servers/qnu3f0fa20/badge" alt="Flutter Inspector Server MCP server" /> </a>ā ļø This project is a work in progress and not all methods (mostly Flutter Inspector related) are implemented yet.
Currently Flutter works with MCP server via forwarding server. Please see Architecture for more details.
Some of other methods are not tested - they may work or not. Please use with caution. It is possible that the most methods will be removed from the MCP server later to focus solely on Flutter applications and maybe Jaspr.
ā ļø WARNING ā ļø
Debug methods, which may use huge amount of tokens and therefore overload context now placed under "debug-tools" parameter. In production, any debug methods are disabled by default.
š Getting Started
- Quick Start is available in QUICK_START.md
- Configuration options are available in CONFIGURATION.md
šÆ What Agent can call:
- [Resource|Tool] Analyse errors: get precise and condensed errors of your app. Why it is better then console message: it contains precisely only what Agent need, not the whole list of traced widgets and duplicate information. This works best to give Agent understanding of the error.
- [Resource|Tool] Screenshot: get screenshot of the app. Works only with Claude (untested). Cursor and Cline doesn't support image type in the response.
Will be implemented:
-
[Resource|Tool] App info: size of screen, pixel ratio. Unlocks ability for an Agent to use widget selection.
-
Hot reload & Hot restart
-
[Resource|Tool] Selection tool: Current idea:
- Enable widget selection in Flutter Inspector.
- Select widget by logical pixel position.
- Get detailed information about your Flutter app's structure based on logical pixel position.
In research:
- Inspect Current Route: See current navigation state
- Extensions: Flutter Provider/Riverpod states: Get state of Provider/Riverpod instances.
- Extensions: Jaspr: ?
- Extensions: Jaspr Provider: ?
- Extensions: Flame: ?
š Available Tools
All tools default to using port 8181 if no port is specified. You can override this by providing a specific port number.
Most tools described in TOOLS.md
todo: add more details about useful methods
š§ Troubleshooting
Make sure you:
-
Verify that forwarding server is running.
-
Opened Devtools in Browser.
-
Have added MCP extension to your Flutter app dev dependencies and enabled it in Devtools.
-
Connection Issues
- Ensure your Flutter app is running in debug mode
- Verify the port matches in both Flutter app and inspector
- Check if the port is not being used by another process
-
AI Tool Not Detecting Inspector
- Restart the AI tool after configuration changes
- Verify the configuration JSON syntax
- Check the tool's logs for connection errors
š§ Smithery Integration š§ (work in progress)
The Flutter Inspector is registered with Smithery's registry, making it discoverable and usable by other AI tools through a standardized interface.
Integration Architecture
āāāāāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāāāāā āāāāāāāāāāāāāāā
ā ā ā ā ā ā ā ā ā ā
ā Flutter App ā<--->ā DevTools ā<--->ā Forwarding ā<--->ā MCP Server ā<--->ā Smithery ā
ā (Debug Mode) ā ā Extension ā ā Server ā ā (Registered) ā ā Registry ā
ā ā ā ā ā ā ā ā ā ā
āāāāāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāā āāāāāāāāāāāāāāāāāāā āāāāāāāāāāāāāāā
š¤ Contributing
Contributions are welcome! Please feel free to submit pull requests or report issues on the GitHub repository.
š Learn More
- Flutter DevTools Documentation
- Dart VM Service Protocol
- Flutter DevTools RPC Constants (I guess and hope they are correct:))
š License
MIT - Feel free to use in your projects!
Flutter and Dart are trademarks of Google LLC.