@fundamental-ngx/mcp 0.62.0-rc.67
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/README.md +109 -0
- package/package.json +21 -0
- package/src/data/components.json +61370 -0
- package/src/extractors/build-metadata.d.ts +8 -0
- package/src/extractors/build-metadata.js +178 -0
- package/src/extractors/build-metadata.js.map +1 -0
- package/src/extractors/cem-extractor.d.ts +17 -0
- package/src/extractors/cem-extractor.js +430 -0
- package/src/extractors/cem-extractor.js.map +1 -0
- package/src/extractors/changelog-extractor.d.ts +6 -0
- package/src/extractors/changelog-extractor.js +115 -0
- package/src/extractors/changelog-extractor.js.map +1 -0
- package/src/extractors/description-extractor.d.ts +11 -0
- package/src/extractors/description-extractor.js +58 -0
- package/src/extractors/description-extractor.js.map +1 -0
- package/src/extractors/example-extractor.d.ts +19 -0
- package/src/extractors/example-extractor.js +67 -0
- package/src/extractors/example-extractor.js.map +1 -0
- package/src/extractors/token-extractor.d.ts +6 -0
- package/src/extractors/token-extractor.js +345 -0
- package/src/extractors/token-extractor.js.map +1 -0
- package/src/extractors/typedoc-extractor.d.ts +16 -0
- package/src/extractors/typedoc-extractor.js +576 -0
- package/src/extractors/typedoc-extractor.js.map +1 -0
- package/src/index.d.ts +2 -0
- package/src/index.js +3 -0
- package/src/index.js.map +1 -0
- package/src/server.d.ts +1 -0
- package/src/server.js +794 -0
- package/src/server.js.map +1 -0
- package/src/types/component-metadata.d.ts +177 -0
- package/src/types/component-metadata.js +21 -0
- package/src/types/component-metadata.js.map +1 -0
package/README.md
ADDED
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
# @fundamental-ngx/mcp
|
|
2
|
+
|
|
3
|
+
MCP (Model Context Protocol) server that exposes the entire Fundamental NGX component catalog to AI coding assistants.
|
|
4
|
+
|
|
5
|
+
## What It Does
|
|
6
|
+
|
|
7
|
+
AI coding assistants (Claude Code, Cursor, VS Code Copilot, Windsurf, etc.) can connect to this MCP server and get structured access to:
|
|
8
|
+
|
|
9
|
+
- **1000+ components** across 8 libraries (core, platform, btp, cx, cdk, ui5-webcomponents, ui5-webcomponents-fiori, ui5-webcomponents-ai)
|
|
10
|
+
- **Full API metadata** — inputs, outputs, slots, methods, enum values, CSS properties
|
|
11
|
+
- **Component recommendations** — describe what you want to build and get matching components
|
|
12
|
+
- **Design tokens** — SAP theming CSS custom properties and utility classes
|
|
13
|
+
- **Migration guidance** — breaking changes and upgrade paths from changelogs
|
|
14
|
+
- **Accessibility guidance** — ARIA inputs, keyboard handling, and a11y examples
|
|
15
|
+
- **Component comparison** — side-by-side comparison of alternative components
|
|
16
|
+
|
|
17
|
+
This eliminates hallucinated APIs and outdated documentation — the assistant works from the actual component metadata.
|
|
18
|
+
|
|
19
|
+
## Quick Start
|
|
20
|
+
|
|
21
|
+
### VS Code / Cursor
|
|
22
|
+
|
|
23
|
+
Create or edit `.vscode/mcp.json` in your project root:
|
|
24
|
+
|
|
25
|
+
```json
|
|
26
|
+
{
|
|
27
|
+
"servers": {
|
|
28
|
+
"fundamental-ngx": {
|
|
29
|
+
"command": "npx",
|
|
30
|
+
"args": ["-y", "@fundamental-ngx/mcp"]
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
### Claude Code
|
|
37
|
+
|
|
38
|
+
Run this command in your terminal to register the server for the current project:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
claude mcp add fundamental-ngx -- npx -y @fundamental-ngx/mcp
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
Or to make it available across all your projects:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
claude mcp add --scope user fundamental-ngx -- npx -y @fundamental-ngx/mcp
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
You can verify it was added with:
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
claude mcp list
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Windsurf
|
|
57
|
+
|
|
58
|
+
Add to `~/.codeium/windsurf/mcp_config.json`:
|
|
59
|
+
|
|
60
|
+
```json
|
|
61
|
+
{
|
|
62
|
+
"mcpServers": {
|
|
63
|
+
"fundamental-ngx": {
|
|
64
|
+
"command": "npx",
|
|
65
|
+
"args": ["-y", "@fundamental-ngx/mcp"]
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
That's it — your AI assistant now has full access to the Fundamental NGX component catalog.
|
|
72
|
+
|
|
73
|
+
## Available Tools
|
|
74
|
+
|
|
75
|
+
| Tool | Purpose | Example Query |
|
|
76
|
+
| ------------------------- | ---------------------------------------------------------------- | -------------------------------------------------------------- |
|
|
77
|
+
| `list_components` | List all components, filter by library/category | `{ "library": "core", "category": "Form" }` |
|
|
78
|
+
| `search_components` | Keyword search across names, selectors, descriptions, properties | `{ "query": "date picker" }` |
|
|
79
|
+
| `get_component_api` | Full API details for a specific component | `{ "name": "fd-button" }` or `{ "name": "ui5-table" }` |
|
|
80
|
+
| `get_component_examples` | Usage examples from the docs app | `{ "name": "fd-dialog" }` |
|
|
81
|
+
| `recommend_components` | Suggest components for a UI description | `{ "description": "a filterable data table with pagination" }` |
|
|
82
|
+
| `get_migration_guide` | Breaking changes and upgrade guidance | `{ "from_version": "0.58.0" }` |
|
|
83
|
+
| `get_design_tokens` | SAP theming tokens and utility classes | `{ "query": "background color", "category": "color" }` |
|
|
84
|
+
| `get_accessibility_guide` | ARIA inputs, keyboard handling, and a11y examples | `{ "name": "ui5-dialog" }` |
|
|
85
|
+
| `compare_components` | Side-by-side comparison of two components | `{ "component_a": "fd-button", "component_b": "ui5-button" }` |
|
|
86
|
+
|
|
87
|
+
## Metadata Schema
|
|
88
|
+
|
|
89
|
+
Each component in the catalog follows this structure:
|
|
90
|
+
|
|
91
|
+
```typescript
|
|
92
|
+
interface ComponentMetadata {
|
|
93
|
+
name: string; // "ButtonComponent"
|
|
94
|
+
selector: string; // "fd-button" or "ui5-button"
|
|
95
|
+
library: Library; // "@fundamental-ngx/core"
|
|
96
|
+
category: string; // "Actions", "Form", "Layout"
|
|
97
|
+
description: string;
|
|
98
|
+
deprecated?: string; // deprecation message
|
|
99
|
+
inputs: InputMetadata[];
|
|
100
|
+
outputs: OutputMetadata[];
|
|
101
|
+
slots: SlotMetadata[]; // UI5 components
|
|
102
|
+
methods: MethodMetadata[];
|
|
103
|
+
cssProperties: CssPropertyMetadata[];
|
|
104
|
+
keyboardHandling?: string; // keyboard interaction notes (UI5 components)
|
|
105
|
+
source: 'cem' | 'typedoc';
|
|
106
|
+
}
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
See `src/types/component-metadata.ts` for full type definitions.
|
package/package.json
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@fundamental-ngx/mcp",
|
|
3
|
+
"version": "0.62.0-rc.67",
|
|
4
|
+
"description": "MCP server exposing Fundamental NGX component metadata for AI coding assistants",
|
|
5
|
+
"license": "Apache-2.0",
|
|
6
|
+
"repository": {
|
|
7
|
+
"type": "git",
|
|
8
|
+
"url": "git+https://github.com/SAP/fundamental-ngx.git"
|
|
9
|
+
},
|
|
10
|
+
"type": "commonjs",
|
|
11
|
+
"main": "./src/index.js",
|
|
12
|
+
"types": "./src/index.d.ts",
|
|
13
|
+
"bin": {
|
|
14
|
+
"fundamental-ngx-mcp": "./src/index.js"
|
|
15
|
+
},
|
|
16
|
+
"dependencies": {
|
|
17
|
+
"@modelcontextprotocol/sdk": "^1.12.1",
|
|
18
|
+
"tslib": "^2.3.0",
|
|
19
|
+
"zod": "^3.24.0"
|
|
20
|
+
}
|
|
21
|
+
}
|