Skip to main content

Local development with AI

Windmill provides tools to enhance local development with AI coding assistants like Claude Code or Cursor: the CLI init command for generating AI context files, the VS Code extension's YAML linter for flow validation, and the MCP server for direct interaction between LLMs and your workspace.

Prerequisites

  • Windmill CLI installed (npm install -g windmill-cli)
  • A workspace set up locally with wmill workspace add and wmill sync pull
  • Optionally, VS Code with the Windmill extension installed
  • An AI coding assistant (Claude Code, Cursor, etc.)

CLI init command

Running wmill init in a synced workspace folder generates context files for AI assistants:

cd myworkspace
wmill init

This creates:

  • An AGENTS.md file — a standard context file for AI coding agents
  • Skill files — Skill files for AI coding agents

These files describe the Windmill file structure, how scripts and flows are organized, how to create and edit them, and how to manage resources like triggers and schedules. AI tools that read these files automatically get this context when working in the workspace.

This is the expected file tree:

├── .claude
│   └── skills
│   ├── cli-commands
│   ├── raw-app
│   ├── resources
│   ├── schedules
│   ├── triggers
│   ├── write-flow
│   ├── write-script-bash
│   ├── write-script-bigquery
│   ├── write-script-bun
│   ├── write-script-bunnative
│   ├── write-script-csharp
│   ├── write-script-deno
│   ├── write-script-duckdb
│   ├── write-script-go
│   ├── write-script-graphql
│   ├── write-script-java
│   ├── write-script-mssql
│   ├── write-script-mysql
│   ├── write-script-nativets
│   ├── write-script-php
│   ├── write-script-postgresql
│   ├── write-script-powershell
│   ├── write-script-python3
│   ├── write-script-rust
│   └── write-script-snowflake
├── AGENTS.md
├── CLAUDE.md
├── rt.d.ts
├── wmill-lock.yaml
└── wmill.yaml

Some examples of prompts you can use to guide the AI:

  • "Write a script that fetches data from my Supabase resource"
  • "Write a mail triage flow using an AI Agent that labels emails as spam, important, or junk, and schedule it to run every day at 9am."
  • "Add 4 HTTP triggers to create, delete, update and list users in my MongoDB resource"

VS Code extension YAML linter

The Windmill VS Code extension validates flow.yaml files in real time. AI coding assistants that check IDE diagnostics can read these validation errors and auto-correct schema mistakes in flow definitions.

This creates a feedback loop: the AI edits a flow YAML file, the linter catches structural errors immediately, and the AI can fix them without manual intervention.

The extension also allows you to run your scripts and flows locally from the editor.

MCP server

Windmill's MCP server allows AI tools to interact directly with a Windmill workspace. It supports:

  • Accessing Windmill documentation
  • Executing scripts and flows
  • Creating, updating, listing, and deleting resources (schedules, variables, etc.)
  • Note that for writing and deploying scripts, flows, and apps, we highly recommend using the CLI along with the AGENTS.md file, for better guidance and syntax validation.

To set up the MCP server with Claude Code:

claude mcp add --transport http windmill https://app.windmill.dev/api/mcp/w/<your-workspace-id>/mcp?token=<your-token>

To set up with Cursor, add the following to your MCP configuration:

{
"mcpServers": {
"windmill-mcp": {
"url": "https://app.windmill.dev/api/mcp/w/<your-workspace-id>/mcp?token=<your-token>"
}
}
}

See the MCP documentation for generating your token and full setup instructions.

Putting it all together

A typical AI-assisted local development workflow:

  1. Run wmill init in your workspace folder to generate AI context files
  2. Open the workspace in VS Code with the Windmill extension for running scripts and flows locally, and real-time YAML validation
  3. Connect your AI tool to the Windmill MCP server for direct workspace interaction
  4. Start building scripts, flows, and apps with your AI assistant
  5. Push the changes back to the Windmill workspace with wmill sync push