@@ -8,10 +8,26 @@ A Model Context Protocol (MCP) server that enables AI assistants to scaffold Men
88
99``` bash
1010pnpm install
11+ pnpm build # Build the server
1112pnpm start # HTTP mode (default)
1213pnpm start:stdio # STDIO mode
1314```
1415
16+ ## Global Installation
17+
18+ For use with MCP clients (Cursor, Claude Desktop, LMStudio), install globally:
19+
20+ ``` bash
21+ # Build first
22+ pnpm build
23+
24+ # Link globally using npm (NOT pnpm - better MCP client compatibility)
25+ npm link
26+
27+ # Verify installation
28+ which pluggable-widgets-mcp
29+ ```
30+
1531## Transport Modes
1632
1733### HTTP Mode (default)
@@ -53,6 +69,21 @@ pnpm start:stdio
5369
5470** _ Some client setups like Claude Desktop support STDIO only (for now)_ **
5571
72+ ** Option 1: Global command (after ` npm link ` )**
73+
74+ ``` json
75+ {
76+ "mcpServers" : {
77+ "pluggable-widgets-mcp" : {
78+ "command" : " pluggable-widgets-mcp" ,
79+ "args" : [" stdio" ]
80+ }
81+ }
82+ }
83+ ```
84+
85+ ** Option 2: Absolute path (more reliable during development)**
86+
5687``` json
5788{
5889 "mcpServers" : {
@@ -64,6 +95,8 @@ pnpm start:stdio
6495}
6596```
6697
98+ > ** Note:** After rebuilding the server, you may need to restart/reconnect your MCP client to pick up changes.
99+
67100## Available Tools
68101
69102### create-widget
@@ -85,6 +118,34 @@ Scaffolds a new Mendix pluggable widget using `@mendix/generator-widget`.
85118
86119Generated widgets are placed in ` generations/ ` directory within this package.
87120
121+ ### File Operation Tools
122+
123+ | Tool | Description |
124+ | -------------------------- | ------------------------------------------------------------ |
125+ | ` list-widget-files ` | Lists all files in a widget directory, grouped by type |
126+ | ` read-widget-file ` | Reads the contents of a file from a widget directory |
127+ | ` write-widget-file ` | Writes content to a file (creates parent dirs automatically) |
128+ | ` batch-write-widget-files ` | Writes multiple files atomically |
129+
130+ ** Security:** Path traversal is blocked; only allowed extensions: ` .tsx ` , ` .ts ` , ` .xml ` , ` .scss ` , ` .css ` , ` .json ` , ` .md `
131+
132+ ### build-widget
133+
134+ Builds a widget using ` pluggable-widgets-tools ` , producing an ` .mpk ` file.
135+
136+ | Parameter | Required | Description |
137+ | ------------ | -------- | ------------------------------------- |
138+ | ` widgetPath ` | Yes | Absolute path to the widget directory |
139+
140+ Returns structured errors for TypeScript, XML, or dependency issues.
141+
142+ ## Available Resources
143+
144+ | URI | Description |
145+ | ------------------------------------- | -------------------------------------------------------------------------- |
146+ | ` mendix://guidelines/property-types ` | Complete reference for all Mendix widget property types |
147+ | ` mendix://guidelines/widget-patterns ` | Reusable patterns for common widget types (Button, Input, Container, etc.) |
148+
88149## Development
89150
90151``` bash
@@ -135,13 +196,15 @@ This is useful for verifying tool behavior without needing a full AI client inte
135196
136197## Roadmap
137198
138- - [x] Widget scaffolding
199+ - [x] Widget scaffolding (`create-widget`)
139200- [x] HTTP transport
140201- [x] STDIO transport
141202- [x] Progress notifications
142- - [ ] Widget editing and modification
143- - [ ] Property management
144- - [ ] Build and deployment tools
203+ - [x] File operations (list, read, write, batch-write)
204+ - [x] Build tool (`build-widget`)
205+ - [x] Guideline resources (property-types, widget-patterns)
206+ - [ ] Widget property editing (XML manipulation)
207+ - [ ] TypeScript error recovery suggestions
145208
146209## License
147210
0 commit comments