Skip to Content
Safesun Systems

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:

  1. Open Cline — click the Cline icon in the VS Code sidebar (or Ctrl+Shift+P → “Cline: Open”)
  2. At the top of the Cline panel, click the model dropdown
  3. Click the gear icon or “Add Provider”
  4. Select “Ollama” as the provider
  5. Set the base URL to: http://localhost:11434
  6. Save the configuration
  7. Select glm-5.1:cloud from the model list
Tip: Cline's MCP tools (FlutterFlow AI) appear automatically once you start a conversation. The model provider is configured separately in Cline's UI — you only do this once.

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

ToolDescriptionUsage
initCreate workspaceflutterflow ai init myapp --project ID
validateDry-run validationflutterflow ai validate dsl/edit.dart --project-id ID
runPush changesflutterflow ai run dsl/edit.dart --project-id ID
inspectView projectflutterflow ai inspect ID --page HomePage
resourcesList resourcesflutterflow ai resources ID
searchSearch entitiesflutterflow ai search ID --query "button"
refreshContextRefresh SDKflutterflow 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      │
└──────────────┘
Important: After changes made in the FlutterFlow web editor, run flutterflow ai refresh-context org-smart-zhy03j to sync the local typed SDK.

Safesun Systems — safesun.co.za — Internal Developer Documentation

Last updated: June 2026