Flutter Lens
v0.1.0-alpha.6Render Flutter widgets to real PNGs for coding agents, locally and without an emulator.
Values you need
| Variable | What it is | |
|---|---|---|
FLUTTER_LENS_ROOT | required | Absolute path to the specific local project you authorize the server to read. |
FLUTTER_LENS_TRUSTED | optional | Set true only if you explicitly trust this project and authorize execution of its code. Default: false |
npm (npx) discovery passed
Requires Node.js 18+
Run in a terminal
claude mcp add flutter-lens -e 'FLUTTER_LENS_ROOT=<FLUTTER_LENS_ROOT>' -- npx -y flutter-lens-dev@0.1.0-alpha.6Add to
claude_desktop_config.json{
"mcpServers": {
"flutter-lens": {
"args": [
"-y",
"flutter-lens-dev@0.1.0-alpha.6"
],
"command": "npx",
"env": {
"FLUTTER_LENS_ROOT": "<FLUTTER_LENS_ROOT>"
}
}
}
}Add to
~/.cursor/mcp.json{
"mcpServers": {
"flutter-lens": {
"args": [
"-y",
"flutter-lens-dev@0.1.0-alpha.6"
],
"command": "npx",
"env": {
"FLUTTER_LENS_ROOT": "<FLUTTER_LENS_ROOT>"
}
}
}
}Add to
.vscode/mcp.json{
"inputs": [
{
"description": "FLUTTER_LENS_ROOT",
"id": "flutter-lens-root",
"password": true,
"type": "promptString"
}
],
"servers": {
"flutter-lens": {
"args": [
"-y",
"flutter-lens-dev@0.1.0-alpha.6"
],
"command": "npx",
"env": {
"FLUTTER_LENS_ROOT": "${input:flutter-lens-root}"
},
"type": "stdio"
}
}
}Add to
~/.codex/config.toml[mcp_servers.flutter-lens]
command = "npx"
args = ["-y", "flutter-lens-dev@0.1.0-alpha.6"]
env = { "FLUTTER_LENS_ROOT" = "<FLUTTER_LENS_ROOT>" }For AI agents
- Ask the user for: FLUTTER_LENS_ROOT. Never invent or guess these values; secrets go into the client config, not into chat logs.
- Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
- Restart or reload the client so it starts the server.
- Verify: the server should expose these tools: plan_flutter_preview, inspect_png, compare_screens, list_frameworks, list_devices, discover_screens, render_screen.
- If it fails, check that the required runtime is installed (Node.js 18+) and that the values above are set.
Machine-readable: install.md · manifest.json