@fundamental-ngx/mcp 0.62.4-rc.9 → 0.62.4

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 CHANGED
@@ -1,29 +1,32 @@
1
1
  # @fundamental-ngx/mcp
2
2
 
3
- MCP (Model Context Protocol) server that exposes the [Fundamental NGX](https://github.com/SAP/fundamental-ngx) component catalog to AI coding assistants.
3
+ MCP (Model Context Protocol) server that exposes the entire Fundamental NGX component catalog to AI coding assistants.
4
4
 
5
- ## Quick Start
5
+ ## What It Does
6
6
 
7
- ### With Claude Code
7
+ AI coding assistants (Claude Code, Cursor, VS Code Copilot, Windsurf, etc.) can connect to this MCP server and get structured access to:
8
8
 
9
- **Option 1: Using claude mcp add (Recommended)**
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
+ - **Usage guides** — decision trees and composition patterns for complex components (dialog, table, card, etc.)
17
+ - **Selector classification** — whether a component is an element, attribute directive, or both, with correct template usage
10
18
 
11
- ```bash
12
- # Install latest version
13
- claude mcp add fundamental-ngx -- npx -y @fundamental-ngx/mcp
19
+ This eliminates hallucinated APIs and outdated documentation — the assistant works from the actual component metadata.
14
20
 
15
- # Or install a specific version
16
- claude mcp add fundamental-ngx -- npx -y @fundamental-ngx/mcp@0.62.4
17
- ```
21
+ ## Quick Start
18
22
 
19
- This command automatically adds the MCP server to your `.claude/mcp.json` configuration.
23
+ ### VS Code / Cursor
20
24
 
21
- **Option 2: Manual configuration**
25
+ Create or edit `.vscode/mcp.json` in your project root:
22
26
 
23
27
  ```json
24
- // .claude/mcp.json
25
28
  {
26
- "mcpServers": {
29
+ "servers": {
27
30
  "fundamental-ngx": {
28
31
  "command": "npx",
29
32
  "args": ["-y", "@fundamental-ngx/mcp"]
@@ -32,59 +35,44 @@ This command automatically adds the MCP server to your `.claude/mcp.json` config
32
35
  }
33
36
  ```
34
37
 
35
- ### With Cursor
38
+ ### Claude Code
36
39
 
37
- ```json
38
- // .cursor/mcp.json
39
- {
40
- "mcpServers": {
41
- "fundamental-ngx": {
42
- "command": "npx",
43
- "args": ["-y", "@fundamental-ngx/mcp"]
44
- }
45
- }
46
- }
40
+ Run this command in your terminal to register the server for the current project:
41
+
42
+ ```bash
43
+ claude mcp add fundamental-ngx -- npx -y @fundamental-ngx/mcp
47
44
  ```
48
45
 
49
- ### With VS Code (Copilot)
46
+ Or to make it available across all your projects:
47
+
48
+ ```bash
49
+ claude mcp add --scope user fundamental-ngx -- npx -y @fundamental-ngx/mcp
50
+ ```
51
+
52
+ You can verify it was added with:
53
+
54
+ ```bash
55
+ claude mcp list
56
+ ```
57
+
58
+ ### Windsurf
59
+
60
+ Add to `~/.codeium/windsurf/mcp_config.json`:
50
61
 
51
62
  ```json
52
- // .vscode/mcp.json
53
63
  {
54
- "servers": {
64
+ "mcpServers": {
55
65
  "fundamental-ngx": {
56
66
  "command": "npx",
57
- "args": ["-y", "@fundamental-ngx/mcp"],
58
- "type": "stdio"
67
+ "args": ["-y", "@fundamental-ngx/mcp"]
59
68
  }
60
69
  }
61
70
  }
62
71
  ```
63
72
 
64
- ### How it works
65
-
66
- `npx -y @fundamental-ngx/mcp` starts a Node.js process that listens on **stdio** for JSON-RPC messages following the [Model Context Protocol](https://modelcontextprotocol.io/). Running it directly in a terminal will appear to hang — that is intentional. The process is idle, waiting for a client to send tool requests over stdin. It is designed to be launched and managed by an MCP client (Claude Code, Cursor, VS Code Copilot), not run interactively.
67
-
68
- To explore the server's tools from a browser UI, use the MCP Inspector instead (see below).
69
-
70
- **Debugging with MCP Inspector:**
71
-
72
- The [MCP Inspector](https://github.com/modelcontextprotocol/inspector) is a web UI for testing MCP servers interactively:
73
-
74
- ```bash
75
- npx @modelcontextprotocol/inspector npx -y @fundamental-ngx/mcp
76
- ```
77
-
78
- This opens a browser UI where you can:
73
+ That's it — your AI assistant now has full access to the Fundamental NGX component catalog.
79
74
 
80
- - Browse all 10 available tools
81
- - Send test requests with custom parameters
82
- - View formatted JSON responses
83
- - Debug tool behavior without an AI client
84
-
85
- The server communicates over **stdio** using the MCP JSON-RPC protocol.
86
-
87
- ## Tools
75
+ ## Available Tools
88
76
 
89
77
  | Tool | Purpose | Example Query |
90
78
  | ------------------------- | ---------------------------------------------------------------- | -------------------------------------------------------------- |
@@ -99,78 +87,58 @@ The server communicates over **stdio** using the MCP JSON-RPC protocol.
99
87
  | `compare_components` | Side-by-side comparison of two components | `{ "component_a": "fd-button", "component_b": "ui5-button" }` |
100
88
  | `get_usage_guide` | Decision tree and composition patterns for a component | `{ "component": "dialog" }` |
101
89
 
102
- ## Example Queries
103
-
104
- ```
105
- "What components are available in the core library?"
106
- → list_components with library "core"
107
-
108
- "Find a component for selecting a date range"
109
- search_components with query "date range"
110
-
111
- "What inputs does fd-button accept?"
112
- get_component_api with name "fd-button"
113
-
114
- "Show me HTML examples for fd-dialog"
115
- get_component_examples with name "fd-dialog"
116
-
117
- "I need to build a filterable data table with pagination"
118
- recommend_components with description "filterable data table with pagination"
119
-
120
- "What broke between 0.60.0 and 0.62.0?"
121
- get_migration_guide with from_version "0.60.0", to_version "0.62.0"
122
-
123
- "What SAP design tokens are available for background colors?"
124
- → get_design_tokens with query "background color", category "color"
125
-
126
- "How do I handle keyboard navigation in fd-menu?"
127
- → get_accessibility_guide with name "fd-menu"
128
-
129
- "What is the difference between fd-table and fdp-table?"
130
- → compare_components with component_a "fd-table", component_b "fdp-table"
131
-
132
- "Which dialog API should I use?"
133
- → get_usage_guide with component "dialog"
90
+ ## Metadata Schema
91
+
92
+ Each component in the catalog follows this structure:
93
+
94
+ ```typescript
95
+ interface ComponentMetadata {
96
+ name: string; // "ButtonComponent"
97
+ selector: string; // "fd-button" or "ui5-button"
98
+ selectorType: 'element' | 'attribute' | 'both'; // how to use in templates
99
+ templateUsage: string; // "<button fd-button>...</button>"
100
+ library: Library; // "@fundamental-ngx/core"
101
+ category: string; // "Actions", "Form", "Layout"
102
+ description: string;
103
+ deprecated?: string; // deprecation message
104
+ inputs: InputMetadata[];
105
+ outputs: OutputMetadata[];
106
+ slots: SlotMetadata[]; // UI5 components
107
+ methods: MethodMetadata[];
108
+ cssProperties: CssPropertyMetadata[];
109
+ keyboardHandling?: string; // keyboard interaction notes (UI5 components)
110
+ source: 'cem' | 'typedoc';
111
+ }
134
112
  ```
135
113
 
136
- ## Contributing
114
+ See `src/types/component-metadata.ts` for full type definitions.
137
115
 
138
- ### Prerequisites
116
+ ## AI Onboarding
139
117
 
140
- - Node.js 18+
141
- - Yarn 4.x (the monorepo uses Yarn workspaces)
118
+ The MCP server is designed as the primary AI-assisted onboarding path for Fundamental NGX. Here's the recommended workflow:
142
119
 
143
- ### Setup
120
+ 1. **Discover** — Use `recommend_components` to find the right components for your UI
121
+ 2. **Decide** — Use `get_usage_guide` to choose the right variant (e.g., which dialog API surface)
122
+ 3. **Learn** — Use `get_component_api` and `get_component_examples` for API details and working code
123
+ 4. **Build** — Use `get_design_tokens` and `get_accessibility_guide` while implementing
124
+ 5. **Compare** — Use `compare_components` when choosing between alternatives (e.g., `fd-table` vs `fdp-table`)
144
125
 
145
- ```bash
146
- # From the repo root
147
- yarn install
148
- ```
126
+ ### Usage Guides
149
127
 
150
- ### Build
128
+ The `get_usage_guide` tool provides structured decision trees for components with multiple API surfaces or variants:
151
129
 
152
- ```bash
153
- npx nx build mcp-server
154
- ```
155
-
156
- This compiles TypeScript and copies data assets (JSON files) into `dist/libs/mcp-server/`.
130
+ - **Dialog** — template-based vs component-based vs object-based; fd-dialog vs ui5-dialog vs fd-message-box
131
+ - **Table** fd-table (core, lightweight) vs fdp-table (platform, feature-rich) vs ui5-table (Web Components)
132
+ - **Button** — standard vs split-button vs segmented-button
133
+ - **Card** — fd-card (core) vs ui5-card (Web Components)
134
+ - **Layout Grid** fd-layout-grid vs fd-flexible-column-layout
157
135
 
158
- ### Extract metadata
136
+ ### Selector Classification
159
137
 
160
- The server's component catalog is generated from the built library artifacts. Re-run this after changing component source files:
138
+ Each component now includes `selectorType` and `templateUsage` fields to prevent incorrect template usage:
161
139
 
162
- ```bash
163
- npx nx run mcp-server:extract-metadata
164
- ```
165
-
166
- Use `--dry-run` to validate without writing:
167
-
168
- ```bash
169
- npx nx run mcp-server:check-metadata
170
- ```
171
-
172
- ### Test
173
-
174
- ```bash
175
- npx nx test mcp-server
176
- ```
140
+ | selectorType | Meaning | Example |
141
+ | ------------ | ------------------------------------- | -------------------------------- |
142
+ | `element` | Use as an HTML element | `<fd-card>...</fd-card>` |
143
+ | `attribute` | Use as an attribute on a host element | `<h2 fd-title>...</h2>` |
144
+ | `both` | Element + attribute combined | `<button fd-button>...</button>` |
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fundamental-ngx/mcp",
3
- "version": "0.62.4-rc.9",
4
- "description": "MCP server exposing Fundamental NGX component metadata for AI coding assistants. Includes companion Claude Code skills for project setup, forms, tables, page layouts, and more",
3
+ "version": "0.62.4",
4
+ "description": "MCP server exposing Fundamental NGX component metadata for AI coding assistants",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {
7
7
  "type": "git",