Skip to main content
Glama
DCS Mission Builder

DCS Mission Builder

by schultz-dev0
README.md
# DCS Mission Builder

Build DCS World missions by telling an AI what you want. Free and open source (GPL-3.0), and it stays that way, forever.

You type something like:

> Make a Caucasus mission. Two Hornets on the ramp at Batumi doing CAP 40 miles north-east, a tanker off
> Kobuleti, and an SA-11 site north of Senaki on a hill that can see the valley. Dawn, scattered clouds.

The AI places the flights, the SAM site and the weather, checks the terrain, then saves a normal `.miz` file. You
open it in the DCS Mission Editor like any other mission and change whatever you like.

It only writes mission files. It doesn't change DCS, the running game or multiplayer servers.

## What you need

- **DCS World** on this computer.
- **Claude Desktop** (the Claude app), signed in. This is the AI you talk to.

## Setup on Windows (about 3 minutes)

1. Download **`DCS-Mission-Builder.exe`** from the [Releases page](https://github.com/schultz-dev0/dcs-mission-mcp/releases/latest).
2. Double-click it. If Windows says *"Windows protected your PC"*, click **More info**, then **Run anyway**. (New
   free programs get that warning until enough people have downloaded them.)
3. In the window that opens:
   - press **Connect to Claude**;
   - check it found your **DCS World** and **Saved Games** folders (press **Choose…** if not);
   - press **Install helper** under Terrain.
4. Quit Claude Desktop fully: right-click the Claude icon by the clock, choose **Quit**. Open Claude again.
5. Start a new chat and ask: **"What DCS maps can you build missions on?"** A list of maps means it works.

You can delete the downloaded file afterwards: Connect copies the program to your user folder. To update, download
the new version, double-click it and press **Connect to Claude** again.

## Setup on Linux

DCS runs under Wine or Proton; this runs natively next to it.

```sh
git clone https://github.com/schultz-dev0/dcs-mission-mcp.git
cd dcs-mission-mcp
./install-linux.sh
```

It installs what it needs into that folder, adds **DCS Mission Builder** to your app menu and opens the setup
window. Choose the **DCS World** and **Saved Games/DCS** folders inside your Wine prefix, then **Connect to
Claude** and **Install helper**. To update: `git pull && ./install-linux.sh`.

Claude Desktop has no official Linux build; the community builds read the same config file. With Claude Code:

```sh
claude mcp add dcs-missions -- "$PWD/.venv/bin/dcs-mission-builder" serve
```

## What you can ask for

| Ask for | Example |
|---|---|
| A new mission | "New Syria mission, summer, 06:00." |
| Flights | "Four Vipers doing SEAD out of Incirlik, cold start, I fly lead." |
| Air starts | "A tanker 30 miles west of Kobuleti at 22,000 feet." |
| Routes | "Send the Hornets to orbit 40 miles north-east of Batumi, racetrack." |
| SAM sites | "An SA-11 site 10 miles north of Senaki." / "A Patriot battery at Al Dhafra." |
| Ground and ships | "Four T-72s east of Kutaisi." / "A carrier 50 miles south of Kish." |
| Terrain | "How high is the ground there?" / "Can that radar see the valley?" / "Profile the ridge between them." |
| Weather and time | "Overcast with rain, wind from 270 at 15 knots, dawn." |
| Briefing | "Write a short briefing: blue is clearing the way for a strike on Senaki." |
| Your own missions | "Open strike.miz and tell me what's in it." |
| Multiplayer slots | "Make every aircraft in the Hornet flight a client slot." |

Places are easiest as distance and direction from an airfield: "15 miles north-east of Batumi". Coordinates work
too. Flights get DCS's own default loadout for their role, read from your DCS install.

## Terrain

Height, water and line-of-sight checks use DCS's own terrain, read on your machine. The helper you install in
step 3 does it: the first time you fly any mission on a map, it samples that map's ground in the background (a few
milliseconds per frame, so no stutter) and saves it in `Saved Games\DCS\dcs-mission-builder\terrain`. If you stop
early, the next flight on that map carries on. It samples again only after a DCS update.

The helper is one small script in `Saved Games\DCS\Scripts\Hooks`. It uses only the terrain functions the Mission
Editor uses, sends nothing anywhere and changes nothing in DCS. Delete the file to remove it. No map data from
Eagle Dynamics is ever shipped with this program.

Line of sight counts hills and the Earth's curvature, not buildings or trees.

## Where missions are saved

In your DCS Missions folder (`Saved Games\DCS\Missions`), so they show up in the Mission Editor's Open dialog. The
AI tells you the full path every time it saves.

The first time it saves over one of your existing missions, it keeps your original next to it as
`<name>.backup.miz`. Still, back up missions you care about.

## When something goes wrong

- **The AI says it has no DCS tools.** Claude wasn't fully quit. Quit it from the icon by the clock and open it
  again.
- **"Did you mean …"**: the AI will ask which one you meant. Pick from its list.
- **Flights have no weapons.** It couldn't find your DCS install. Open the setup window and choose the DCS World
  folder.
- **"Terrain hasn't been sampled yet"**: fly any mission on that map once with the helper installed.
- Still stuck: open an issue on GitHub and paste what the AI said.

## For developers

```sh
uv sync
uv run python tests/check.py          # tools build, save and reload a mission
uv run python tests/terrain_check.py  # needs luajit: the DCS hook and the Python reader agree
uv run dcs-mission-builder            # setup window; "serve" runs the MCP server
```

| Where | What |
|---|---|
| `src/dcs_mission_mcp/server.py` | The tools the AI calls |
| `src/dcs_mission_mcp/names.py` | Loose name matching: nicknames, airfields, roles |
| `src/dcs_mission_mcp/sites.py` | SAM site layouts |
| `src/dcs_mission_mcp/terrain.py` | Terrain cache reader, line of sight |
| `src/dcs_mission_mcp/dcs_hook/` | The Lua helper that samples terrain inside DCS |
| `src/dcs_mission_mcp/setup_app.py` | The setup window |
| `install-linux.sh` | Linux setup and app menu entry |

`.miz` reading and writing is [pydcs](https://github.com/pydcs/dcs). Releases: bump the version in
`pyproject.toml`, push the matching `vX.Y.Z` tag, and CI builds and publishes the exe. Rules for contributors (and
their AI agents) are in `AGENTS.md`.

## License

GPL-3.0-or-later. See `LICENSE`.