@siemens/ix-mcp-angular 3.2.0-v.1.7.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.
Files changed (45) hide show
  1. package/LICENSE.md +20 -0
  2. package/README.md +330 -0
  3. package/config.json +48 -0
  4. package/database/vectors.db +0 -0
  5. package/dist/src/cli.d.ts +3 -0
  6. package/dist/src/cli.d.ts.map +1 -0
  7. package/dist/src/cli.js +298 -0
  8. package/dist/src/cli.js.map +1 -0
  9. package/dist/src/config.d.ts +34 -0
  10. package/dist/src/config.d.ts.map +1 -0
  11. package/dist/src/config.js +33 -0
  12. package/dist/src/config.js.map +1 -0
  13. package/dist/src/db-handler.d.ts +47 -0
  14. package/dist/src/db-handler.d.ts.map +1 -0
  15. package/dist/src/db-handler.js +143 -0
  16. package/dist/src/db-handler.js.map +1 -0
  17. package/dist/src/embeddings.d.ts +84 -0
  18. package/dist/src/embeddings.d.ts.map +1 -0
  19. package/dist/src/embeddings.js +300 -0
  20. package/dist/src/embeddings.js.map +1 -0
  21. package/dist/src/index.d.ts +24 -0
  22. package/dist/src/index.d.ts.map +1 -0
  23. package/dist/src/index.js +342 -0
  24. package/dist/src/index.js.map +1 -0
  25. package/dist/src/keys.d.ts +4 -0
  26. package/dist/src/keys.d.ts.map +1 -0
  27. package/dist/src/keys.js +25 -0
  28. package/dist/src/keys.js.map +1 -0
  29. package/dist/src/logger.d.ts +24 -0
  30. package/dist/src/logger.d.ts.map +1 -0
  31. package/dist/src/logger.js +185 -0
  32. package/dist/src/logger.js.map +1 -0
  33. package/dist/src/prompt.d.ts +19 -0
  34. package/dist/src/prompt.d.ts.map +1 -0
  35. package/dist/src/prompt.js +94 -0
  36. package/dist/src/prompt.js.map +1 -0
  37. package/dist/src/setup.d.ts +26 -0
  38. package/dist/src/setup.d.ts.map +1 -0
  39. package/dist/src/setup.js +718 -0
  40. package/dist/src/setup.js.map +1 -0
  41. package/dist/src/token.d.ts +22 -0
  42. package/dist/src/token.d.ts.map +1 -0
  43. package/dist/src/token.js +75 -0
  44. package/dist/src/token.js.map +1 -0
  45. package/package.json +56 -0
package/LICENSE.md ADDED
@@ -0,0 +1,20 @@
1
+ The MIT License
2
+
3
+ Copyright (c) Siemens 2016 - 2025
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
6
+ this software and associated documentation files (the “Software”), to deal in
7
+ the Software without restriction, including without limitation the rights to
8
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9
+ the Software, and to permit persons to whom the Software is furnished to do so,
10
+ 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, FITNESS
17
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,330 @@
1
+ # Siemens MCP Server for iX Angular
2
+
3
+ A Model Context Protocol (MCP) server that provides AI assistants (Agents) with access to
4
+ [Siemens Industrial Experience](https://ix.siemens.io) design system and component API documentation
5
+ through Retrieval-Augmented Generation (RAG). This enables more accurate and relevant assistance
6
+ with design system and component library APIs.
7
+
8
+ ## Usage and use cases
9
+
10
+ - Local MCP server installation includes all design system documentation, component APIs, examples
11
+ and icon information
12
+ - MCP server integration with your AI Agent setup of choice, integrated into your IDE (for example,
13
+ GitHub Copilot Agent integration within VS Code with project-related MCP configuration)
14
+ - Use cases include (but are not limited to):
15
+ - Get design system best practice information
16
+ - Export components
17
+ - Review project text according to UX writing guidelines
18
+ - Generate new pages using design system components
19
+ - Add and modify pages
20
+
21
+ ## Installation
22
+
23
+ ### Prerequisites
24
+
25
+ - Node.js (20+ recommended)
26
+ - Access to the API [https://api.siemens.com/llm](https://api.siemens.com) by creating a free token
27
+ at <https://my.siemens.com> with `llm` scope. We use the `embeddings` API. Siemens access is
28
+ required to request a token. We are working on a configurable alternative.
29
+ - IDE/Agent/LLM setup of your choice (for example: VS Code, GitHub Copilot, Claude Sonnet 4.5)
30
+
31
+ ### Version selection
32
+
33
+ We distribute a MCP server package `@siemens/ix-mcp-angular` for every `@siemens/ix-angular`
34
+ version. The version of `@siemens/ix-mcp-angular` must match your version of `@siemens/ix-angular`.
35
+ The version number of the MCP package `@siemens/ix-mcp-angular` is a combination of the
36
+ `@siemens/ix-angular` version and the version of the MCP code.
37
+
38
+ For example, `@siemens/ix-mcp-angular@4.0.0-v.1.4.8` comes with the data of
39
+ `@siemens/ix-angular@4.0.0` and `v.1.4.8` is the version of the MCP script.
40
+
41
+ To facilitate the version selection, we use
42
+ [npm distribution tags](https://docs.npmjs.com/cli/commands/npm-dist-tag) `@ix<version>` that match
43
+ the version of `@siemens/ix-angular`. When using the corresponding distribution tag on installation,
44
+ you get the latest version of the MCP package that matches your `@siemens/ix-angular` version and
45
+ simplifies handling in your `package.json`.
46
+
47
+ ```json
48
+ "dependencies": {
49
+ "@siemens/ix-angular": "4.0.0",
50
+ },
51
+ "devDependencies": {
52
+ "@siemens/ix-mcp-angular": "4.0.0-v.1.4.8",
53
+ }
54
+ ```
55
+
56
+ New MCP package versions on the same `ix` version are incremented like `4.0.0-v.1.4.9`,
57
+ `4.0.0-v.1.4.10`, `4.0.0-v.1.5.0`.
58
+
59
+ ### Project installation
60
+
61
+ ```bash
62
+ npm install --save-dev --save-exact @siemens/ix-mcp-angular@ix4.0.0
63
+
64
+ # Or with yarn
65
+ yarn add -D --exact @siemens/ix-mcp-angular@ix4.0.0
66
+ ```
67
+
68
+ ### Global installation
69
+
70
+ ```bash
71
+ npm install -g @siemens/ix-mcp-angular@ix4.0.0
72
+ ```
73
+
74
+ ### Upgrading
75
+
76
+ Simply install the tag for your version and framework again:
77
+
78
+ ```bash
79
+ # in project
80
+ npm install --save-dev --save-exact @siemens/ix-mcp-angular@ix4.1.0
81
+
82
+ # with yarn
83
+ yarn add -D --exact @siemens/ix-mcp-angular@ix4.1.0
84
+
85
+ # global
86
+ npm install -g --save-exact @siemens/ix-mcp-angular@ix4.1.0
87
+ ```
88
+
89
+ ## Quick Start
90
+
91
+ After local project or global package installation, you need to initialize the MCP server and
92
+ provide the access token.
93
+
94
+ 1. **Navigate to your project directory**:
95
+
96
+ ```bash
97
+ cd your-project
98
+ ```
99
+
100
+ 2. **Run initial setup**:
101
+
102
+ ```bash
103
+ npx @siemens/ix-mcp-angular init
104
+ ```
105
+
106
+ Or if token is already set up:
107
+
108
+ ```bash
109
+ npx @siemens/ix-mcp-angular setup
110
+ ```
111
+
112
+ > Important: Run this command in the root of every project where you want to use the MCP server.
113
+
114
+ 3. **Follow the prompts**:
115
+ - Enter your LLM token from https://my.siemens.com/ (requires 'llm' scope)
116
+ - This token is needed to generate embeddings for semantic search of the documentation. The
117
+ embeddings help find relevant documentation chunks, but the actual LLM (language model) that
118
+ processes your queries and generates responses is provided separately by your AI tool (e.g.,
119
+ GitHub Copilot, Claude, etc.)
120
+ - Choose which tools to configure (VS Code, Cline, Zed, etc.)
121
+ - Optionally set up iX instruction files for AI agents
122
+ - The tool will create MCP configuration files based on your selection, commit the local
123
+ configuration to share it (make sure it is not ignored by `.gitignore`)
124
+
125
+ 4. **Restart your AI tools** (VS Code, Cline, Zed, etc.)
126
+ - Ensure the server is running and trust the MCP server, e.g. click the "Server" icon in the
127
+ Github Copilot Chat panel in VS Code.
128
+ - **For GitHub Copilot in VS Code**: Make sure you are in Agent Mode (not Chat Mode). Use models
129
+ like **Claude Sonnet 4.5**.
130
+
131
+ 5. **Start prompting**:
132
+ - "How do I use the search component from @siemens/ix?"
133
+ - "Show me examples of @siemens/charts-ng usage"
134
+ - "Implement a dashboard with different widgets"
135
+ - "Find icons related to AI or machine learning"
136
+ - "Review the texts of this project"
137
+
138
+ > The MCP server starts automatically when your AI tools need it.
139
+
140
+ ## Setup Options
141
+
142
+ During `init` or `setup`, select which configuration(s) to create:
143
+
144
+ - **Local VS Code / GitHub Copilot (Repository)** creates a VS Code MCP configuration file at
145
+ `.vscode/mcp.json` in the current repository
146
+ - **Cline Global Settings** updates global Cline MCP configuration
147
+ - **VS Code / GitHub Copilot Global Config** writes user-level MCP config
148
+ - **Zed Global Settings** configures Zed editor / agent MCP
149
+
150
+ ## AI Agent Instructions (optional)
151
+
152
+ After MCP configuration, you can set up iX instruction files so AI agents work more effectively with
153
+ your codebase. Do this in each repository where you want instructions.
154
+
155
+ You have two options:
156
+
157
+ - **Symbolic link to receive updates**
158
+ Keeps files synced with the installed package. Requires the package to remain installed and may
159
+ not work on all systems or package managers. The tool can create symlinks automatically;
160
+ otherwise, create links yourself pointing to the installed package's `AGENTS.md` and iX
161
+ instructions.
162
+
163
+ - **Copy the content** Copy the contents of the package’s `AGENTS.md` into one of the following in
164
+ your repo:
165
+ - `.github/instructions/ix.instructions.md`
166
+ - `AGENTS.md`
167
+ - `.github/copilot-instructions.md`
168
+
169
+ If you prefer manual copy, open the package’s `AGENTS.md`, then paste it into your chosen file and
170
+ commit it. Repeat per repository whenever you want to update the instructions.
171
+
172
+ ## Logging
173
+
174
+ Per default no logging is performed, but you can enable local-only logging of all search queries and
175
+ retrieval results during setup.
176
+
177
+ ### Manually enabling logging
178
+
179
+ In your MCP configuration add the flag `--log` to log all search queries and retrieval results to
180
+ local log files in `~/.ix-mcp-angular`.
181
+
182
+ ```json
183
+ {
184
+ "servers": {
185
+ "@siemens/ix-mcp-angular": {
186
+ "type": "stdio",
187
+ "command": "npx",
188
+ "args": ["@siemens/ix-mcp-angular", "--log"]
189
+ }
190
+ }
191
+ }
192
+ ```
193
+
194
+ ### Viewing and sharing logs
195
+
196
+ To view logs, use the `npx @siemens/ix-mcp-angular log` command, select any relevant session and
197
+ look at the output or the files copied to your current working directory.
198
+
199
+ For feedback about the MCP and Agent results, please create an issue at
200
+ [https://code.siemens.com/ux/sdl-mcp/issues](https://code.siemens.com/ux/sdl-mcp/issues), share your
201
+ information, and include the relevant logs.
202
+
203
+ ## Usage
204
+
205
+ ### Commands
206
+
207
+ #### Init (First-time setup)
208
+
209
+ Complete initial setup: configure token and create all MCP configurations.
210
+
211
+ ```bash
212
+ npx @siemens/ix-mcp-angular init
213
+ ```
214
+
215
+ #### Setup (Update configurations)
216
+
217
+ Create or update MCP configuration files for your tools (uses existing token).
218
+
219
+ ```bash
220
+ npx @siemens/ix-mcp-angular setup
221
+ ```
222
+
223
+ #### Setup Token
224
+
225
+ Set or update only the LLM token in system keychain.
226
+
227
+ ```bash
228
+ npx @siemens/ix-mcp-angular setup-token
229
+ ```
230
+
231
+ #### Check
232
+
233
+ Verify your installation and configuration.
234
+
235
+ ```bash
236
+ npx @siemens/ix-mcp-angular check
237
+ ```
238
+
239
+ #### Test
240
+
241
+ Test the MCP server with a sample query.
242
+
243
+ ```bash
244
+ npx @siemens/ix-mcp-angular test
245
+ ```
246
+
247
+ #### Log
248
+
249
+ Check your previous MCP retrieval logs (if enabled / not disabled).
250
+
251
+ ```bash
252
+ npx @siemens/ix-mcp-angular log
253
+ ```
254
+
255
+ ### Connection Issues
256
+
257
+ - Verify that the MCP server is running (it should start automatically)
258
+ - Restart your AI tool after configuration changes
259
+ - Verify your LLM token is valid at https://my.siemens.com/
260
+
261
+ ## Manual Configuration
262
+
263
+ If you prefer to set up the configurations manually, here are the required files and their contents.
264
+
265
+ ### VS Code (.vscode/mcp.json or User/mcp.json)
266
+
267
+ ```json
268
+ {
269
+ "servers": {
270
+ "@siemens/ix-mcp-angular": {
271
+ "type": "stdio",
272
+ "command": "npx",
273
+ "args": ["@siemens/ix-mcp-angular"]
274
+ }
275
+ }
276
+ }
277
+ ```
278
+
279
+ ### Cline (Global Cline MCP settings)
280
+
281
+ ```json
282
+ {
283
+ "mcpServers": {
284
+ "@siemens/ix-mcp-angular": {
285
+ "command": "npx",
286
+ "args": ["@siemens/ix-mcp-angular"]
287
+ }
288
+ }
289
+ }
290
+ ```
291
+
292
+ ### Zed (Global Zed settings)
293
+
294
+ ```json
295
+ {
296
+ "context_servers": {
297
+ "@siemens/ix-mcp-angular": {
298
+ "source": "custom",
299
+ "command": "<path-to-npx, run which/where npx to find>",
300
+ "args": ["@siemens/ix-mcp-angular"],
301
+ "env": {}
302
+ }
303
+ }
304
+ }
305
+ ```
306
+
307
+ ## License
308
+
309
+ The following applies for code and documentation of the git repository, unless explicitly mentioned.
310
+
311
+ Copyright (c) Siemens 2016 - 2025
312
+
313
+ MIT, see [LICENSE.md](LICENSE.md).
314
+
315
+ ### Open Source Software
316
+
317
+ The software of this distributed MCP npm package consists of the database file and JavaScript files,
318
+ which provide access to the database, implementing the Model Context Protocol. This package does not
319
+ include any third party software. However, to use this software, you need the Open Source Software
320
+ packages specified in the `dependencies` part of the [package.json](package.json) file, and their
321
+ dependencies. When installing this package with a npm package manager, the dependencies are
322
+ automatically installed (e.g., when using npm).
323
+
324
+ ## Support
325
+
326
+ For issues and questions, please use the issue tracker at:
327
+ [https://code.siemens.com/ux/sdl-mcp/issues](https://code.siemens.com/ux/sdl-mcp/issues)
328
+
329
+ For suboptimal retrievals / agent behavior, consider attaching a relevant log to help us figure out
330
+ how to improve the service, see [Viewing and sharing logs](#viewing-and-sharing-logs).
package/config.json ADDED
@@ -0,0 +1,48 @@
1
+ {
2
+ "name": "@siemens/ix-mcp-angular",
3
+ "description": "iX MCP server for Angular",
4
+ "displayName": "iX Angular",
5
+ "binName": "ix-mcp-angular",
6
+ "designSystem": "iX",
7
+ "projectName": "iX",
8
+ "searchToolName": "ix-search",
9
+ "iconSearch": true,
10
+ "iconSearchToolName": "ix-icon-search",
11
+ "iconName": "@siemens/ix-icons",
12
+ "agentsFile": true,
13
+ "instructionFileName": "iX.instructions.md",
14
+ "observabilityLogging": false,
15
+ "exampleQuestions": [
16
+ "How do I use the Breadcrumb component from @siemens/ix-angular?",
17
+ "Show me examples of a pane layout",
18
+ "Implement a form for adding a new user with name, email, and role",
19
+ "Find icons related to settings or configuration"
20
+ ],
21
+ "texts": {
22
+ "FRAMEWORK_DEV_QUESTION": "Angular development question",
23
+ "FRAMEWORK_IMPLEMENTATIONS": "Angular implementations",
24
+ "FRAMEWORK_SUPPORTED_LIBRARIES": "• @siemens/ix-angular - All angular ui components (e.g. ix-button, ix-application-header)\n• @siemens/ix - Contains styling, theming and utility functionality\n",
25
+ "FRAMEWORK_SEMANTIC_SEARCH_TOOL": "Semantic search tool for Siemens iX Design System and Angular component library",
26
+ "FRAMEWORK_ALL_QUERIES": "This applies to ALL Angular-related queries regardless of whether iX libraries are explicitly mentioned",
27
+ "FRAMEWORK_VERSION_SPECIFIC": "The tool provides access to version-specific Siemens iX documentation that is automatically tuned to match the user's library versions",
28
+ "FRAMEWORK_SETUP_ADVICE": "This ensures you get the exact APIs, components, and implementation patterns available in their specific setup rather than generic Angular advice",
29
+ "FRAMEWORK_COMPREHENSIVE_GUIDANCE": "Always search first to leverage the comprehensive ix and ix-react documentation before offering any Angular guidance",
30
+ "FRAMEWORK_SEARCH_QUERY": "Search query for iX documentation. Can include component names, functionality descriptions, API questions, or usage patterns. Examples: \"button component\", \"form configuration\", \"pane layout\", \"table\"",
31
+ "FRAMEWORK_DOCUMENTATION_RESULTS": "# iX Documentation Results"
32
+ },
33
+ "headerSections": {
34
+ "remove": ["HTML Examples", "React Examples", "Vue Examples"],
35
+ "keep": ["Angular Examples", "Angular Standalone Examples"],
36
+ "endDelimiter": "<!-- Auto Generated Below -->",
37
+ "rename": {
38
+ "Angular Examples": "Examples",
39
+ "Angular Standalone Examples": "Standalone Examples"
40
+ }
41
+ },
42
+ "contentCleanup": {
43
+ "removeStrings": ["<!-- Auto Generated Below -->"],
44
+ "removePatterns": [
45
+ "-+\\n\\n\\*Built with \\[StencilJS\\]\\(https://stenciljs\\.com/\\)\\*\\n?$"
46
+ ]
47
+ }
48
+ }
Binary file
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env node
2
+ export {};
3
+ //# sourceMappingURL=cli.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../../src/mcp/cli.ts"],"names":[],"mappings":""}