FlutterFlow AI MCP Setup
Configure the FlutterFlow AI MCP server in Cursor and VS Code for the OrgSmart project with GLM-5.1
Prerequisites
- ✓ Dart SDK 3.12+ installed
- ✓ FlutterFlow CLI activated
- ✓ FlutterFlow API key from account settings
- ✓ Cursor IDE and/or VS Code installed
- ✓ Ollama running with glm-5.1:cloud
1. Activate the FlutterFlow CLI
First, activate the FlutterFlow CLI globally via Dart:
dart pub global activate flutterflow_cli
This installs the flutterflow command globally. Make sure your Dart bin directory is on your PATH:
# Linux/macOS
export PATH="$PATH:$HOME/.pub-cache/bin"
# Windows PowerShell
$env:Path += ";$env:LOCALAPPDATA\Pub\Cache\bin"
Verify the installation:
flutterflow --version
2. Initialize the Workspace
cd ~/OrgSmart/orgsmart/org-smart-zhy03j
flutterflow ai init orgsmart --project org-smart-zhy03j --api-key YOUR_API_KEY --yes
cd orgsmart
flutterflow ai refresh-context org-smart-zhy03j
3. Configure Cursor IDE
Create ~/.cursor/mcp.json:
{
"mcpServers": {
"flutterflow_ai": {
"command": "dart",
"args": [
"run",
"/path/to/orgsmart/.flutterflow/sdk/flutterflow_ai/mcp/server.dart",
"--dir",
"/path/to/orgsmart"
]
},
"ollama": {
"url": "http://localhost:11434"
}
}
}
Add GLM-5.1 to ~/.config/Cursor/User/settings.json:
{
"cursor-general.modelProvider": "ollama",
"ollama.endpoint": "http://localhost:11434",
"ollama.models": [
{ "model": "glm-5.1:cloud", "displayName": "GLM 5.1 (Cloud via Ollama)" }
]
}
Install Cline: cursor --install-extension saoudrizwan.claude-dev
4. Configure VS Code
Add to settings.json under "mcp":
"mcp": {
"servers": {
"flutterflow_ai": {
"command": "dart",
"args": ["run", "/path/to/orgsmart/.flutterflow/sdk/flutterflow_ai/mcp/server.dart", "--dir", "/path/to/orgsmart"]
},
"ollama": { "url": "http://localhost:11434" }
}
}
Install extensions: code --install-extension saoudrizwan.claude-dev and code --install-extension Continue.continue
5. Configure Ollama + GLM-5.1
# Install Ollama
curl -fsSL https://ollama.com/install.sh | sh # Linux
# or download from https://ollama.com/download # Windows/Mac
# Pull the GLM-5.1 cloud model
ollama pull glm-5.1:cloud
# Verify
ollama list
6. Configure Cline (Model Selection)
The MCP tools (FlutterFlow AI) are configured from the steps above, but the AI model that Cline uses must be set up inside Cline's own UI:
- Open Cline — click the Cline icon in the VS Code sidebar (or
Ctrl+Shift+P→ “Cline: Open”) - At the top of the Cline panel, click the model dropdown
- Click the gear icon or “Add Provider”
- Select “Ollama” as the provider
- Set the base URL to:
http://localhost:11434 - Save the configuration
- Select glm-5.1:cloud from the model list
7. Windows Quick Setup
Download the automated setup script for Windows:
Download setup-flutterflow-ai-windows.ps1
# Full setup (Dart + Cursor + VS Code + Ollama):
.\setup-flutterflow-ai-windows.ps1 -InstallDart -InstallCursorExtensions -InstallVSCodeExtensions -SetupOllama
# Minimal (workspace + MCP only):
.\setup-flutterflow-ai-windows.ps1 -FlutterFlowApiKey "YOUR_KEY"
MCP Tools Reference
| Tool | Description | Usage |
|---|---|---|
init | Create workspace | flutterflow ai init myapp --project ID |
validate | Dry-run validation | flutterflow ai validate dsl/edit.dart --project-id ID |
run | Push changes | flutterflow ai run dsl/edit.dart --project-id ID |
inspect | View project | flutterflow ai inspect ID --page HomePage |
resources | List resources | flutterflow ai resources ID |
search | Search entities | flutterflow ai search ID --query "button" |
refreshContext | Refresh SDK | flutterflow ai refresh-context ID |
Architecture
┌─────────────┐ ┌──────────────┐ ┌──────────────────┐
│ Cursor IDE │────▶│ MCP Protocol │────▶│ FlutterFlow AI │
│ VS Code │ │ (stdio/SSE) │ │ MCP Server │
│ Cline │ │ │ │ (server.dart) │
│ Continue │ └──────────────┘ └───────┬──────────┘
└──────┬──────┘ │
│ ▼
│ ┌──────────────────┐
│ │ FlutterFlow API │
│ │ (api.flutterflow) │
│ └──────────────────┘
▼
┌──────────────┐
│ Ollama │ GLM-5.1:cloud
│ localhost │ (cloud model)
│ :11434 │
└──────────────┘
flutterflow ai refresh-context org-smart-zhy03j to sync the local typed SDK.