You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: tools/ai-tools/build-mcp.md
+37-8Lines changed: 37 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,20 +25,35 @@ import TabItem from '@theme/TabItem';
25
25
26
26
## What is Build MCP?
27
27
28
-
The Build MCP server gives your AI coding assistant direct access to the Avalonia documentation. Instead of relying on training data that may be outdated or incomplete, your assistant can search guides, tutorials, and API references in real timeand return answers grounded in the official docs.
28
+
The Build MCP server gives your AI coding assistant direct access to the Avalonia documentation and expert development guidance. Instead of relying on training data that may be outdated or incomplete, your assistant can search guides, tutorials, and API references in real time, load Avalonia-specific coding rules, and use guided prompts for common workflows like creating new projects or recreating a UI from a screenshot.
29
29
30
30
Build MCP is **free to use** and requires no license key or local installation. It runs as a remote server, so setup takes only a few seconds in any MCP-compatible editor or CLI tool.
31
31
32
32
For a general introduction to MCP, see [AI Tools](/tools/ai-tools/).
33
33
34
34
## Available tools
35
35
36
-
The Build MCP server exposes two tools to your AI assistant:
36
+
The Build MCP server exposes three tools to your AI assistant:
37
37
38
38
| Tool | Description |
39
39
|------|-------------|
40
-
|`search_avalonia_docs`| Searches the full Avalonia documentation, including API references, tutorials, guides, and migration docs. Accepts a natural language query and returns matching results with source links. |
41
-
|`lookup_avalonia_api`| Looks up a specific Avalonia class, property, method, or event in the API reference. Use this for targeted API queries such as `TextBlock`, `Window.Show`, or `StyledProperty`. |
40
+
|`search_avalonia_docs`| Searches the full Avalonia documentation, including API references, tutorials, guides, and migration docs. Common topics like "styling", "binding", and "mvvm" are automatically routed to optimized queries for better results. |
41
+
|`lookup_avalonia_api`| Looks up a specific Avalonia class, property, method, or event in the API reference. Use this for targeted queries such as `TextBlock`, `Window.Show`, or `StyledProperty`. |
42
+
|`get_avalonia_expert_rules`| Returns a comprehensive set of Avalonia development rules covering AXAML syntax, the property system, styling, data binding, MVVM patterns, custom controls, layout, theming, assets, threading, and common mistakes to avoid. Call this at the start of a development session so your assistant writes correct, idiomatic Avalonia code. |
43
+
44
+
## Available prompts
45
+
46
+
In addition to tools, the Build MCP server provides prompts that configure your assistant for specific workflows. MCP prompts are pre-written instructions that set up the assistant's context and behavior for a task.
47
+
48
+
:::note
49
+
Prompt support varies by client. Claude Desktop, Claude Code, and Cursor support MCP prompts. Other editors may not surface them in the UI. If your editor does not support prompts, you can achieve the same effect by asking your assistant to call the `get_avalonia_expert_rules` tool directly.
50
+
:::
51
+
52
+
| Prompt | Description |
53
+
|--------|-------------|
54
+
|`init`| Initializes an Avalonia expert session for an existing project. Loads development rules, sets up concise response behavior, and configures the assistant to use the documentation tools for every technical question. |
55
+
|`new`| Guides you through creating a new Avalonia application. Covers template selection (`avalonia.mvvm` for desktop, `avalonia.xplat` for cross-platform), project creation with CommunityToolkit.Mvvm, compiled bindings setup, and developer tools installation. Accepts an optional `app_name` parameter. |
56
+
|`recreate-ui`| Sets up an iterative design workflow for recreating a UI from a screenshot or image. The assistant writes AXAML, previews it using the [DevTools MCP](/tools/developer-tools/mcp)`attach-to-file` tool, takes screenshots to compare against the target, and keeps refining until the result matches. Accepts an optional `theme` parameter (`light` or `dark`). Requires a paid [Accelerate license](https://my.avalonia.dev/) for the DevTools MCP integration. |
42
57
43
58
## Setting up the MCP server
44
59
@@ -250,16 +265,30 @@ Describe what you want to accomplish in natural language. The AI assistant calls
250
265
"Look up the Avalonia TextBlock control in the API reference."
251
266
```
252
267
253
-
**Migration guidance:**
268
+
**Loading expert rules at the start of a session:**
254
269
255
270
```text
256
-
"Search the Avalonia docs for how to migrate from WPF to Avalonia."
271
+
"Load the Avalonia expert rules so you can help me build my app correctly."
272
+
```
273
+
274
+
**Creating a new project (using the `new` prompt):**
275
+
276
+
```text
277
+
"Create a new Avalonia desktop app called WeatherTracker."
257
278
```
258
279
259
-
**Finding tutorials:**
280
+
**Recreating a UI from a screenshot (using the `recreate-ui` prompt):**
260
281
261
282
```text
262
-
"Find an Avalonia tutorial on building an MVVM application."
283
+
"Recreate this UI in Avalonia. Use the light theme."
284
+
```
285
+
286
+
This prompt works best when combined with the [DevTools MCP](/tools/developer-tools/mcp), which provides the `attach-to-file` tool for live XAML previewing. The assistant writes AXAML, previews it, takes screenshots, and iterates until the result matches your target design. DevTools MCP requires a paid [Accelerate license](https://my.avalonia.dev/).
287
+
288
+
**Migration guidance:**
289
+
290
+
```text
291
+
"Search the Avalonia docs for how to migrate from WPF to Avalonia."
Copy file name to clipboardExpand all lines: tools/ai-tools/index.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,7 @@ Each MCP setup page includes step-by-step configuration instructions for the fol
25
25
26
26
## Build MCP
27
27
28
-
The Build MCP server gives your AI coding assistant direct access to the Avalonia documentation. Your assistant can search guides, tutorials, and API references in real time, returning answers grounded in the official docs rather than relying on training data that may be outdated.
28
+
The Build MCP server gives your AI coding assistant direct access to the Avalonia documentation and expert development rules. Your assistant can search guides, tutorials, and API references in real time, load comprehensive coding rules for idiomatic Avalonia development, and use guided prompts for common workflows like creating new projects or recreating a UI from a screenshot.
29
29
30
30
Build MCP is **free to use** and requires no license key or local installation. It runs as a remote server that connects over HTTP, so setup takes only a few seconds.
0 commit comments