@mdui/mcp 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +29 -0
- package/data/components.d.ts +43 -0
- package/data/components.js +6078 -0
- package/data/cssClasses.d.ts +8 -0
- package/data/cssClasses.js +33 -0
- package/data/cssVariables.d.ts +7 -0
- package/data/cssVariables.js +1088 -0
- package/data/documents.d.ts +9 -0
- package/data/documents.js +523 -0
- package/data/icons.d.ts +1 -0
- package/data/icons.js +2126 -0
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/package.json +36 -0
- package/server.d.ts +2 -0
- package/server.js +34 -0
- package/stdio.d.ts +2 -0
- package/stdio.js +12 -0
- package/tools/getComponentMetadata.d.ts +6 -0
- package/tools/getComponentMetadata.js +124 -0
- package/tools/getDocument.d.ts +7 -0
- package/tools/getDocument.js +97 -0
- package/tools/listComponents.d.ts +6 -0
- package/tools/listComponents.js +50 -0
- package/tools/listCssClasses.d.ts +6 -0
- package/tools/listCssClasses.js +43 -0
- package/tools/listCssVariables.d.ts +6 -0
- package/tools/listCssVariables.js +40 -0
- package/tools/listDocuments.d.ts +6 -0
- package/tools/listDocuments.js +43 -0
- package/tools/listIconCodes.d.ts +6 -0
- package/tools/listIconCodes.js +72 -0
- package/tools/listIconComponents.d.ts +7 -0
- package/tools/listIconComponents.js +79 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025-present zdhxiong@gmail.com
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
# @mdui/mcp
|
|
2
|
+
|
|
3
|
+
An MCP server tailored for mdui. It provides read-only, offline, deterministic tools to discover components, icons, CSS tokens, and documentation. Designed for AI agents and IDEs to query structured data reliably.
|
|
4
|
+
|
|
5
|
+
## Available tools
|
|
6
|
+
|
|
7
|
+
- `list_components` — Lists all mdui Web Components (excluding standalone icon elements).
|
|
8
|
+
- `get_component_metadata` — Retrieves detailed API metadata for a component by tag name.
|
|
9
|
+
- `list_css_classes` — Lists all global CSS utility classes with brief descriptions.
|
|
10
|
+
- `list_css_variables` — Lists all global CSS custom properties (design tokens).
|
|
11
|
+
- `list_documents` — Lists all documentation pages.
|
|
12
|
+
- `get_document` — Fetches a documentation page by key or component tag name.
|
|
13
|
+
- `list_icon_codes` — Lists icon codes for a Material Icons variant.
|
|
14
|
+
- `list_icon_components` — Lists standalone icon custom elements and their import statements for a variant.
|
|
15
|
+
|
|
16
|
+
## Setup
|
|
17
|
+
|
|
18
|
+
### Claude Desktop / Cursor
|
|
19
|
+
|
|
20
|
+
```json
|
|
21
|
+
{
|
|
22
|
+
"mcpServers": {
|
|
23
|
+
"mdui": {
|
|
24
|
+
"command": "npx",
|
|
25
|
+
"args": ["-y", "@mdui/mcp"]
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
```
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
interface ComponentProperty {
|
|
2
|
+
name: string;
|
|
3
|
+
attribute: string | null;
|
|
4
|
+
reflects?: boolean;
|
|
5
|
+
description: string;
|
|
6
|
+
type: string;
|
|
7
|
+
default?: string;
|
|
8
|
+
}
|
|
9
|
+
interface ComponentMethod {
|
|
10
|
+
name: string;
|
|
11
|
+
signature: string;
|
|
12
|
+
description: string;
|
|
13
|
+
}
|
|
14
|
+
interface ComponentEvent {
|
|
15
|
+
name: string;
|
|
16
|
+
description: string;
|
|
17
|
+
}
|
|
18
|
+
interface ComponentSlot {
|
|
19
|
+
name: string;
|
|
20
|
+
description: string;
|
|
21
|
+
}
|
|
22
|
+
interface ComponentCssPart {
|
|
23
|
+
name: string;
|
|
24
|
+
description: string;
|
|
25
|
+
}
|
|
26
|
+
interface ComponentCssProperty {
|
|
27
|
+
name: string;
|
|
28
|
+
description: string;
|
|
29
|
+
}
|
|
30
|
+
interface Component {
|
|
31
|
+
tagName: string;
|
|
32
|
+
description: string;
|
|
33
|
+
docUrl: string;
|
|
34
|
+
usage: string;
|
|
35
|
+
properties: ComponentProperty[];
|
|
36
|
+
methods: ComponentMethod[];
|
|
37
|
+
events: ComponentEvent[];
|
|
38
|
+
slots: ComponentSlot[];
|
|
39
|
+
cssParts: ComponentCssPart[];
|
|
40
|
+
cssProperties: ComponentCssProperty[];
|
|
41
|
+
}
|
|
42
|
+
export declare const components: Component[];
|
|
43
|
+
export {};
|