I wanted Claude's help with WinDev. It couldn't read a single file.
WinDev saves its source code as compressed binary files that no text tool can read. I wrote a reader, then an editor, and then an MCP server so Claude can work in them.
Part of my work involves an application built with WinDev 20. WinDev is a French development environment with its own language, its own database engine and its own compression, because PC SOFT has never met a standard it didn't want to replace. The language is WLanguage, and you can write it in English or in French. The source files are unreadable in both.
Every window, query, report and class is a binary file that starts with PCS\0 and holds sections compressed with PC SOFT's own variant of LZW. The rest of the industry spent decades agreeing that source code is text, and WinDev looked at that agreement and compressed it. Open one in a text editor and you get noise. Point Claude at one and it gets the same noise.
Decompressing PC SOFT's LZW
LZW is a compression scheme that builds a dictionary of byte sequences as it reads, and writes a short code every time a sequence repeats. PC SOFT's variant packs its bits least significant first, and grows the code width from 9 to 16 bits as the dictionary grows. Code 0 clears the dictionary, code 257 ends the stream, and new entries start at 258. Literals are stored as the byte plus one, since code 0 is already taken.
Inside the decompressed sections, strings sit between the markers FF CE 88 F1 and FE ED 98 E1, so every string comes with eight bytes of packaging. The database schema isn't compressed at all. WinDev calls it the analysis, because "schema" would have been too easy to search for. It's plain UTF-16, which after all that felt like a holiday. There's one parser per kind of file: windows, the project, the analysis, queries, reports, classes and menus.
Thirty-four tools for Claude
wd_agent is a Python library, a command line with 23 commands, and an MCP server with 34 tools. That's what it takes to give Claude what cat gives it for every other language. MCP is the protocol that lets Claude call tools on my machine. Through it, Claude can ask for a recap of the whole project, read any procedure, search the code, list a window's controls, or draw the dependency graph.
Parsed files are cached twice, in memory and on disk, keyed by the file's path and modification time. An agent reads the same window many times in one conversation, and it shouldn't have to decompress it every time.
Writing back
At first I was sure the files couldn't be edited. Each record stores its own length, so changing one line seemed to shift everything after it. The only write I trusted was moving a control, a fixed-size change to four numbers.
Then I stopped guessing. For each kind of edit, I made the same change by hand in the WinDev IDE, saved, and compared the bytes with the original. WinDev finds code by scanning for markers and ignores the offsets I had been so worried about, and only one 32-bit value near the start of a section has to change. So the file keeps careful notes on where everything is, and WinDev ignores them and searches anyway. Today eight of the tools write. They set, insert and delete lines of code, create and delete procedures, and add, move and remove controls.
A round trip through my own parser proves nothing, because my parser happily accepts files that WinDev rejects. The real test is the IDE opening the file. The reference edits I made by hand sit next to the tests, and the suite runs 119 tests on Windows and Linux.
The edit WinDev still refuses
Deleting lines from a large procedure breaks WinDev's editor, because the source file also carries a compiled table of its statements, and I haven't decoded that table yet. Raising one of the count fields to make room crashes WinDev with an out-of-memory error, which I took as a no. For now the tool comments the line out instead.