FormWind.Mcp 0.1.8-preview.1

This is a prerelease version of FormWind.Mcp.
dotnet tool install --global FormWind.Mcp --version 0.1.8-preview.1
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local FormWind.Mcp --version 0.1.8-preview.1
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=FormWind.Mcp&version=0.1.8-preview.1&prerelease
                    
nuke :add-package FormWind.Mcp --version 0.1.8-preview.1
                    

FormWind.Mcp

An MCP server for FormWind, the Tailwind-style styling layer for WinForms. It lets coding agents (Claude Code, GitHub Copilot, Cursor …) check the classes they write and see the result, instead of guessing.

Install

dotnet tool install -g FormWind.Mcp --prerelease

Requires Windows and the .NET 8 runtime (or newer). Add the server to your agent, for example in .mcp.json at the root of your project for Claude Code:

{
  "mcpServers": {
    "formwind": { "command": "formwind-mcp" }
  }
}

or with the CLI: claude mcp add formwind -- formwind-mcp.

Tools

Tool What it does
validate_classes Lists the unknown classes in a class string, each with a "did you mean" suggestion (hovr:bg-blu-600 → hover:bg-blue-600), and the components used.
explain_classes Resolves the classes to the property values they set (BackColor, ForeColor, Font, Padding, Radius …) in the base state and in every variant (dark, hover, disabled, parts such as header:); states resolves combinations such as dark:hover.
list_components The theme's components (btn-primary, card, input …) with what they expand to, and the AutoStyle mapping from control types to components.
list_vocabulary The class patterns FormWind recognizes, by category, with the theme's color names, shades and variants.
render Draws a control (standard or Tw*, optionally with children) with the classes and returns one PNG: a row per mode (light, dark) and a column per state (base, hover, focus, active, disabled, checked, invalid). stateTarget applies the states to one child instead (a hovered group container also shows its children's group-hover: classes). Without width and height, buttons, labels and check boxes size to their text and padding classes.

Every tool returns structured content with an output schema; render also returns the image, and its summary gives the image layout (label sizes, cell size, control offset) so a frame can be located or cropped.

Errors are tool results with isError: true whose text is a JSON object: {"code": "unknown_preset", "message": "Unknown preset 'bootstrap'.", "hint": "Use tailwind, fluent, antd or material."}. Codes: unknown_preset, theme_not_found, invalid_theme, unknown_state, unknown_mode, unknown_category, unknown_control_type, invalid_state_target, timeout, render_failed.

Every tool takes an optional preset (tailwind, fluent, antd, material) and themeFile. Without them the server uses tw.config.json in its working folder (the folder the agent starts it in), or the default theme.

Resources

  • formwind://llms.txt: FormWind for coding agents (approaches, components, classes, variants, rules).
  • formwind://presets/{name}: a preset in the tw.config.json format.

Safety

The server is read-only: no tool writes files, and no tool runs code from your application. render draws controls from WinForms and FormWind only, off screen, one at a time, with a 30-second limit.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
0.1.8-preview.1 54 11/12/2026
0.1.7-preview.1 52 11/10/2026
0.1.6-preview.2 60 11/6/2026
0.1.6-preview.1 54 11/5/2026
0.1.5-preview.1 53 11/4/2026
0.1.4-preview.1 68 10/26/2026
0.1.3-preview.1 64 10/25/2026
0.1.2-preview.1 74 10/21/2026

### Added

- `TwDiagnostics` (experimental, `FW9001`): `ActiveFrameTimers` lists the frame timers running on the UI thread and the
 control each one animates, `IsAnimating` tells whether anything moves, `ShadowCache` gives the size, hits and misses of
 the shadow cache, and `TransitionCompleted` reports the steps of each `TwTransition.CrossFade` (capture source and time,
 cover, change, paint). Before, these could only be measured with reflection on internal members.
- `TwMotion.ReduceInRemoteSession` (default `true`): while `TwMotion.Enabled` follows Windows, animations are off in a
 remote desktop session, where every frame of a fade is sent over the network as a picture.

### Fixed

- A loading grid (`TwGrid.SetLoading`) or `TwDataList` whose loading ended while it was out of view (another page, scrolled
 away) kept its skeleton pulse running about 30 times a second forever, so the application never went idle. The pulse
 now stops when loading ends, and never-ending animations (skeleton pulse, `TwProgress` indeterminate, `animate-spin` /
 `animate-pulse`) leave the frame clock while their control is hidden and come back when it is shown.
- A cross-fade started while the previous one on the same host was still fading ends the previous one at once instead of
 fading two pictures over each other.

### Performance

- Shadows are drawn nine-slice: one small blurred picture per radius, blur and color is cut into corners, edges and middle
 instead of one blurred picture per control size. Resizing a window full of cards no longer adds a bitmap per step; the
 cache is limited to 8 MB and disposes the least recently used pictures. The result is pixel for pixel the same.
- Applying classes allocates about 30 % less per label (8.6 → 5.9 KB) and 15 % less per button: the read-only checks for
 disabled colors share one result among controls with the same classes.
- `TwChip` measures its text again only when the text or font changes (layout asks for its size many times).

### Behavior changes

- In a remote desktop session animations are off by default (`TwMotion.ReduceInRemoteSession`); `TwMotion.Enabled` or
 `TwMotion.Preference` set in code still wins.