flutterflow-mcp 0.3.5 → 0.3.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -263,9 +263,19 @@ This MCP ships with a comprehensive FlutterFlow YAML reference catalog that AI m
263
263
 
264
264
  See [docs/ff-yaml/](docs/ff-yaml/) for the full catalog.
265
265
 
266
+ ## AI Agent Skill
267
+
268
+ This MCP includes a [skills.sh](https://skills.sh)-compatible skill for AI agents. Install it to teach your AI assistant how to use FlutterFlow MCP effectively:
269
+
270
+ ```bash
271
+ npx skills add mohn93/ff-mcp --skill flutterflow-mcp
272
+ ```
273
+
274
+ Compatible with Claude Code, Cursor, GitHub Copilot, Codex, Goose, Windsurf, and 12+ other AI agents. The skill provides tool orchestration workflows, critical YAML rules, and detailed reference documentation for widgets, actions, data binding, theming, and more.
275
+
266
276
  ## Claude Code Skills
267
277
 
268
- Copy skills from [`skills/`](skills/) into your project's `.claude/skills/` directory:
278
+ You can also copy Claude Code-specific skills from [`skills/`](skills/) into your project's `.claude/skills/` directory:
269
279
 
270
280
  - **`ff-yaml-dev.md`** — Core workflow: reading, editing, and creating FlutterFlow pages/components
271
281
  - **`ff-widget-patterns.md`** — Quick reference for common widget YAML patterns and snippets
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "flutterflow-mcp",
3
- "version": "0.3.5",
3
+ "version": "0.3.6",
4
4
  "description": "MCP server for the FlutterFlow Project API — AI-assisted FlutterFlow development through Claude and other MCP-compatible clients",
5
5
  "type": "module",
6
6
  "main": "build/index.js",
@@ -0,0 +1,201 @@
1
+ ---
2
+ name: flutterflow-mcp
3
+ description: >
4
+ Teaches AI assistants how to develop FlutterFlow apps using MCP tools.
5
+ Use this skill when working with FlutterFlow projects, editing FF YAML,
6
+ creating or inspecting pages and components, reading project configuration,
7
+ or navigating FlutterFlow widget trees. It covers all 25 MCP tools for
8
+ discovery, reading, editing, and settings. Triggers on: FlutterFlow,
9
+ FF YAML, FF page, FF component, FF widget, FF theme, FF project.
10
+ license: MIT
11
+ compatibility: Requires the flutterflow-mcp MCP server to be connected and a valid FLUTTERFLOW_API_TOKEN environment variable.
12
+ metadata:
13
+ author: mohn93
14
+ version: "1.0"
15
+ ---
16
+
17
+ ## Prerequisites
18
+
19
+ This skill requires the **flutterflow-mcp** MCP server to be installed and connected. Before proceeding, check if the `list_projects` tool is available. If not, the user needs to set up the MCP server first:
20
+
21
+ 1. Get a FlutterFlow API token from **FlutterFlow > Profile > Account Settings > API Token** (requires a paid FlutterFlow subscription)
22
+ 2. Add the MCP server to your AI client:
23
+ ```bash
24
+ # Claude Code
25
+ claude mcp add flutterflow -e FLUTTERFLOW_API_TOKEN=<token> -- npx -y flutterflow-mcp
26
+
27
+ # Other clients (Claude Desktop, Cursor, Windsurf) — add to MCP config:
28
+ # { "command": "npx", "args": ["-y", "flutterflow-mcp"], "env": { "FLUTTERFLOW_API_TOKEN": "<token>" } }
29
+ ```
30
+ 3. Restart your AI client, then verify by calling `list_projects`
31
+
32
+ ## Overview
33
+
34
+ The FlutterFlow MCP provides 25 tools for reading, inspecting, and editing FlutterFlow projects through YAML. It connects AI assistants to the FlutterFlow Project API, enabling programmatic access to pages, components, themes, actions, data models, and settings. All project data is represented as YAML files that can be fetched, cached locally, validated, and pushed back.
35
+
36
+ ## Tool Catalog
37
+
38
+ ### Discovery & Exploration
39
+
40
+ | Tool | Purpose |
41
+ |------|---------|
42
+ | `list_projects` | List all FF projects accessible to your API token |
43
+ | `list_project_files` | List YAML file keys in a project (supports prefix filter) |
44
+ | `list_pages` | List pages with human-readable names, scaffold IDs, and folders |
45
+ | `search_project_files` | Search file keys by keyword, prefix, or regex |
46
+ | `sync_project` | Download all project YAML to local cache for fast reads |
47
+
48
+ ### Reading & Understanding
49
+
50
+ | Tool | Purpose |
51
+ |------|---------|
52
+ | `get_page_by_name` | Fetch full page YAML by human-readable name |
53
+ | `get_project_yaml` | Fetch specific YAML file(s) by file key |
54
+ | `get_page_summary` | Quick page overview: widget tree, actions, params (cache-based) |
55
+ | `get_component_summary` | Quick component overview: widget tree, params (cache-based) |
56
+ | `find_component_usages` | Find all pages/components that use a given component |
57
+ | `find_page_navigations` | Find all actions that navigate to a given page |
58
+
59
+ ### Configuration & Settings
60
+
61
+ | Tool | Purpose |
62
+ |------|---------|
63
+ | `get_theme` | Theme colors, typography, breakpoints, widget defaults |
64
+ | `get_app_state` | App state variables, constants, environment settings |
65
+ | `get_api_endpoints` | API endpoint definitions (method, URL, headers, response) |
66
+ | `get_data_models` | Data structs, enums, Firestore collections, Supabase tables |
67
+ | `get_custom_code` | Custom actions, functions, widgets, AI agents (read-only) |
68
+ | `get_general_settings` | App Details, App Assets, Nav Bar & App Bar |
69
+ | `get_project_setup` | Firebase, Languages, Platforms, Permissions, Dependencies |
70
+ | `get_app_settings` | Authentication, Push Notifications, Deployment settings |
71
+ | `get_in_app_purchases` | Stripe, Braintree, RevenueCat, Razorpay config |
72
+ | `get_integrations` | Supabase, SQLite, GitHub, Algolia, Google Maps, AdMob, etc. |
73
+
74
+ ### Editing & Documentation
75
+
76
+ | Tool | Purpose |
77
+ |------|---------|
78
+ | `get_editing_guide` | Get recommended workflow and docs for a specific editing task |
79
+ | `get_yaml_docs` | Search/retrieve YAML reference docs by topic or file path |
80
+ | `validate_yaml` | Validate YAML content before pushing changes |
81
+ | `update_project_yaml` | Push validated YAML changes to the FF project |
82
+
83
+ ## Core Workflows
84
+
85
+ ### Discover & Explore a Project
86
+
87
+ Use this workflow when first connecting to a FlutterFlow project or when you need to understand its structure.
88
+
89
+ ```
90
+ 1. list_projects → pick the target projectId
91
+ 2. sync_project(projectId) → cache all YAML locally for fast reads
92
+ 3. list_pages(projectId) → see all pages with human-readable names, scaffold IDs, folders
93
+ 4. get_page_summary(projectId, pageName) → widget tree overview for any page of interest
94
+ ```
95
+
96
+ After syncing, all cache-based tools (`get_page_summary`, `get_component_summary`, `get_theme`, `get_app_state`, etc.) work without additional API calls.
97
+
98
+ ### Read / Inspect a Page or Component
99
+
100
+ Use this workflow to understand what a page contains, how it is structured, and how it connects to the rest of the app.
101
+
102
+ ```
103
+ 1. get_page_summary(projectId, pageName) → quick overview of widget tree, actions, params
104
+ 2. get_page_by_name(projectId, pageName) → full YAML if you need complete details
105
+ 3. find_page_navigations(projectId, pageName) → discover what actions navigate here
106
+ 4. find_component_usages(projectId, componentName) → find everywhere a component is used
107
+ ```
108
+
109
+ For components, use `get_component_summary` instead of `get_page_summary`. Component summaries resolve nested component references so you can see the full hierarchy.
110
+
111
+ ### Edit an Existing Widget
112
+
113
+ Use this workflow to modify a specific widget on a page without affecting the rest of the page.
114
+
115
+ ```
116
+ 1. get_page_by_name(projectId, pageName) → get the full page YAML
117
+ 2. Identify the node file key for the target widget (format: page/id-Scaffold_XXX/page-widget-tree-outline/node/id-Widget_YYY)
118
+ 3. get_project_yaml(projectId, fileName: "page/id-.../node/id-Widget_XXX") → fetch the individual node YAML
119
+ 4. Modify the YAML — keep inputValue and mostRecentInputValue in sync
120
+ 5. validate_yaml(projectId, fileKey, content) → check for errors before pushing
121
+ 6. update_project_yaml(projectId, {fileKey: content}) → push changes
122
+ ```
123
+
124
+ Always edit at the node level. Editing the full page YAML for a single widget change risks overwriting unrelated content and is more error-prone.
125
+
126
+ ### Add a New Widget to a Page
127
+
128
+ Use this workflow when you need to add new widgets to an existing page.
129
+
130
+ ```
131
+ 1. get_page_by_name(projectId, pageName) → understand the current widget tree structure
132
+ 2. get_yaml_docs(topic: "WidgetType") → look up the YAML schema for the widget you want to add
133
+ 3. Update the page-widget-tree-outline to include a reference to the new widget key
134
+ 4. Create individual node files for each new widget (one file per widget)
135
+ 5. validate_yaml → validate the tree outline first, then each node file
136
+ 6. update_project_yaml → push tree outline + all node files together in one call
137
+ ```
138
+
139
+ Pushing the tree outline and node files in a single call is critical. The server strips inline widget children from the tree outline, so nodes must be separate files.
140
+
141
+ ### Create a Reusable Component
142
+
143
+ Use this workflow to build a new component from scratch.
144
+
145
+ ```
146
+ 1. get_yaml_docs(topic: "create component") → get the full walkthrough and required file structure
147
+ 2. Design component parameters: name, dataType, isNullable for each param
148
+ 3. Create these files: component metadata, widget-tree-outline, root node (with isDummyRoot: true), child nodes
149
+ 4. validate_yaml → validate all files before pushing
150
+ 5. update_project_yaml → push all component files in one call
151
+ ```
152
+
153
+ Remember: the root node of a component must have `isDummyRoot: true`. Callback triggers use `triggerType: CALLBACK` with a separate `parameterIdentifier` field. WidgetProperty params use `widgetProperty` in parameterPasses, not `inputValue`.
154
+
155
+ ## Critical YAML Rules
156
+
157
+ 1. **Sync inputValue and mostRecentInputValue** -- Both fields must always contain the same value when you set or update them. If you change one, change both. Exceptions: `fontWeightValue` and `fontSizeValue` only accept `inputValue` (they have no `mostRecentInputValue` field).
158
+
159
+ 2. **Use node-level file keys for edits** -- Target `page/id-Scaffold_XXX/page-widget-tree-outline/node/id-Widget_YYY` for individual widget edits. Never edit the full page YAML (`page/id-Scaffold_XXX`) just to change a single widget. Full-page edits risk overwriting unrelated content and are harder to validate.
160
+
161
+ 3. **Always validate before pushing** -- Call `validate_yaml` before every `update_project_yaml` call. Validation catches missing node files, unknown fields, invalid enum values, and structural problems. Skipping validation risks corrupting the project.
162
+
163
+ 4. **Push tree outline and node files together** -- When adding new widgets, include the updated `page-widget-tree-outline` AND all individual node files in a single `update_project_yaml` call. Widget children embedded inline in the tree outline will be silently stripped by the FlutterFlow server.
164
+
165
+ 5. **Column has no mainAxisSize field** -- To achieve shrink-to-content behavior (equivalent to `MainAxisSize.min` in Flutter), use `minSizeValue: { inputValue: true }` on the Column widget instead.
166
+
167
+ 6. **AppBar templateType** -- Only `LARGE_HEADER` is a confirmed valid value. Do not use `STANDARD` as it may cause unexpected behavior. Control the AppBar height through the `toolbarHeight` property instead.
168
+
169
+ 7. **Custom code is read-only** -- Custom actions, functions, widgets, and AI agents cannot be created or edited through the MCP API. Use `get_custom_code` to read their signatures and source code, but any modifications must be made directly in the FlutterFlow UI. Attempting to push custom code changes will silently corrupt or be ignored.
170
+
171
+ ## Anti-Patterns
172
+
173
+ - **Don't use `list_project_files` to find pages** -- It returns raw file keys without human-readable names. Use `list_pages` instead, which gives you page names, scaffold IDs, and folder assignments.
174
+
175
+ - **Don't fetch pages one-by-one to browse a project** -- This is slow and wastes API calls. Use `sync_project` to cache everything locally first, then use `get_page_summary` for quick overviews of any page.
176
+
177
+ - **Don't edit full page YAML for a single widget change** -- Full-page edits can overwrite other widgets, actions, or parameters. Always use node-level file keys for targeted, safe edits.
178
+
179
+ - **Don't guess YAML field names or enum values** -- FlutterFlow YAML has specific field names and valid values that are not always intuitive. Use `get_yaml_docs(topic)` or `get_editing_guide(task)` to look up the correct schema before writing YAML.
180
+
181
+ - **Don't embed widget children inline in the tree outline** -- The FlutterFlow server silently strips inline children from the `page-widget-tree-outline` file. Always create separate node files for each widget.
182
+
183
+ - **Don't push custom code changes through the API** -- The API silently corrupts or ignores Dart code edits for custom actions, functions, and widgets. These must be edited in the FlutterFlow UI.
184
+
185
+ ## Documentation Lookup
186
+
187
+ The MCP server ships with 21 built-in reference documents. Use these tools to look up schemas, patterns, and conventions **before** writing YAML:
188
+
189
+ | When you need... | Call |
190
+ |------------------|------|
191
+ | Widget schema (Button, Text, Container, etc.) | `get_yaml_docs(topic: "Button")` |
192
+ | Action chains, triggers, navigation | `get_yaml_docs(topic: "actions")` |
193
+ | Data binding, variable sources | `get_yaml_docs(topic: "variables")` |
194
+ | Colors, typography, dimensions | `get_yaml_docs(topic: "theming")` |
195
+ | Creating components from scratch | `get_yaml_docs(topic: "create component")` |
196
+ | Editing workflows and anti-patterns | `get_yaml_docs(topic: "editing")` |
197
+ | Data structs, enums, collections | `get_yaml_docs(topic: "data")` |
198
+ | Full docs index | `get_yaml_docs()` |
199
+ | Guided workflow for a specific task | `get_editing_guide(task: "change the button color")` |
200
+
201
+ Always consult the docs before writing YAML. They contain validated schemas, field references, enum values, and real examples.