NeuralNg Angular UI Expert MCP

io.github.hasanaydin7由 GitHub 帳號 hasanaydin7 發布v1.0.1更新於 Nov 1, 2026

Angular UI expert for NeuralNg discovery, composition, validation, icons and project-aware themes.

概覽

AI 產生的概覽

唯讀的 MCP 伺服器,為 Angular 助理提供 NeuralNg 元件檢索、以契約為基礎的介面組合、範本驗證與精簡主題配方。

可以做什麼
  • 搜尋並讀取 NeuralNg 元件、契約、README 範例與 llms.txt 指引
  • 檢索 6,184 個 Neural Icons 變體,回傳精確類別、匯入、標記與無障礙建議
  • 規劃 UI、表單、頁面與表格組合,含匯入、provider、狀態與無障礙檢查
  • 驗證 Angular 範本是否符合 NeuralNg 契約,並以唯讀方式檢查目前工作區
  • 建立、驗證、編輯、比對與編譯精簡主題配方,讀取元件主題契約
適用情境
在使用 NeuralNg 元件庫建置或審查 Angular 介面時適用:希望助理選對元件、匯入與 provider,在編譯前檢查範本,或讓新頁面與既有專案的慣例和主題保持一致。
執行需求
透過 npx 以 stdio 在本機執行,需要 Node.js 24.x;建議固定套件版本以確保環境可重現。未宣告帳號、API 金鑰或環境變數。專案檢查會讀取作為行程工作目錄的工作區,因此應在工作區根目錄啟動。
安裝前請注意
工具為唯讀:只回傳配方、診斷與方案,不寫入檔案也不執行 shell 指令,主題產物需另行建置。檢查僅讀取工作目錄內有限範圍的中繼資料與範本,不讀取相依套件原始碼。驗證只是範本契約檢查,並非 Angular 型別檢查或無障礙稽核,CSS 提示為靜態警告;仍需嚴格編譯與瀏覽器測試確認。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 NeuralNg Angular UI Expert MCP,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

@neural-ng/mcp-server

Read-only Angular UI expert interface for NeuralNg component discovery, contract-backed composition, usage validation, project-consistent guidance and compact theme workflows.

The server is separate from @neural-ng/core. Angular applications never load an MCP runtime in the browser. Theme tools return recipes, validation results, diffs and compile summaries; they do not write files or execute shell commands.

Run

Since rc.4, the catalog covers Editor, theme tools accept native objects, empty queries support bounded browsing and project inspection reports CSS risk hints.

Current release: 1.0.1 (stable MCP interface). Requires Node.js 24.x. Pin the version for reproducible agent environments; @latest selects the latest published release.

bash
npx -y @neural-ng/[email protected]

Generic MCP client configuration:

json
{  "command": "npx",  "args": ["-y", "@neural-ng/[email protected]"]}

The process uses stdio. Standard output is reserved for MCP JSON-RPC messages; fatal diagnostics are written to standard error.

Tool output contracts

Since 1.0.0-rc.3, tools expose output contracts, the validator accepts native arrays and project inspection separates scan coverage from semantic confidence.

All 20 tools advertise an outputSchema in tools/list. The server validates successful structuredContent before returning it. Invalid output becomes a tool error rather than a success. Tool-handler errors keep isError: true and the separate {error: {schemaVersion: 1, message}} contract; they are not successful instances of the advertised result schema.

Existing result envelopes and schema versions are retained. New fields are additive; consumers must tolerate unknown fields. Required-field removals or type changes require an explicit result-schema version change. Snapshot tests lock the published JSON schema shapes, alongside actual-output and negative tests.

Resources

Agent capability discovery:

  • neural://server/capabilities — versioned tool groups, result schemas, inspection limits, safety guarantees and compatibility guidance

Component and package resources:

  • neural://catalog
  • neural://package/exports
  • neural://components/{id}/contract
  • neural://components/{id}/readme
  • neural://components/{id}/llms

Icon resources:

  • neural://icons/catalog — compact package totals, categories, versions and brand-search policy; use search_icons for bounded matches

Theme resources:

  • neural://themes/catalog
  • neural://themes/schema
  • neural://themes/presets
  • neural://themes/presets/neutral
  • neural://themes/presets/glass
  • neural://themes/presets/mist
  • neural://themes/presets/futuristic
  • neural://themes/ai-guide

Component resources are registered as fixed URIs. The server does not accept a filesystem path and does not read arbitrary files.

Component tools

search_components

Omit query, or pass an empty/whitespace string, to browse at most limit contracts in stable id order (default 10, maximum 20). Non-empty queries rank matches. Browsing is a bounded preview, not an exhaustive paginated listing.

Searches public selectors, entry points, summaries, README files and llms.txt guidance.

json
{  "query": "date calendar localized",  "limit": 5}

get_component

Returns the schema-versioned Angular API contract used by coding agents. The standard detail level includes Signal inputs, models and outputs, typed template contexts, required providers, class contract names and the available example count without sending full documentation through the context window.

json
{  "component": "neural-select",  "detail": "standard"}

Use detail: "summary" during discovery and detail: "full" only when every class slot and embedded example is required. Results are returned as both MCP text content and structuredContent.

get_component_examples

Returns a bounded list of published examples with their documentation heading, language and code.

json
{  "component": "neural-table",  "limit": 3}

get_component_contract

Legacy full-contract lookup retained for existing clients. New integrations should use get_component so they can select a token-efficient detail level.

json
{  "component": "neural-tri-state-checkbox"}

recommend_components

Uses deterministic intent matching. It does not invoke another model or a network service.

json
{  "goal": "nullable inherited permission checkbox",  "limit": 3}

Icon intelligence

search_icons

Searches all 6,184 outline and filled Neural Icons variants by exact name, category, or common UI intent. Results are bounded and include the exact nt class, the smallest valid CSS import, ready-to-use markup, supported effects, and accessibility guidance. Brand icons are excluded by default.

json
{  "query": "delete user",  "style": "outline",  "limit": 10,  "include_brands": false}

Use style: "filled" only when the returned icon lists filled support. Pass a category to narrow the deterministic search. Set include_brands: true only when the product explicitly needs a trademarked brand glyph.

Composition intelligence

plan_ui

Turns a product requirement into a contract-backed NeuralNg composition. The result contains selected primitives and reasons, exact standalone imports, provider requirements, structural regions, state ownership, accessibility checks, implementation order, and component ids that can be passed directly to get_component_examples.

json
{  "goal": "Admin user management with search, role filter, table and detail drawer",  "kind": "auto"}

kind accepts auto, form, page, or table. Auto detection is deterministic; it does not call another model or network service.

Structure-specific planners

Use suggest_form_structure, suggest_page_structure, or suggest_table_structure when the outer interaction shape is already known. Each accepts a non-empty goal and returns the same versioned plan contract as plan_ui with the corresponding kind fixed.

Contract correctness

validate_usage

Parses an Angular template with @angular/compiler and checks the resulting AST against the generated NeuralNg public contracts. It understands Angular control flow, structural directives, interpolation, property/event/two-way bindings, custom elements, and NeuralNg attribute selectors on native elements. It reports stable diagnostic codes with source positions for Angular syntax errors, unknown selectors or bindings, missing required inputs, invalid literal unions (including exported type aliases), inaccessible icon-only buttons, missing standalone imports, required providers, and duplicate Toast channels.

Explicit ng-template directives (such as neuralTableCell) and their nested components are checked too. Event listeners do not satisfy required inputs; model outputs use their generated Change suffix. String-literal property bindings are checked against input unions, and empty static or string-literal accessible labels do not satisfy the icon-only button check.

This is a template contract checker, not a full Angular application compiler. Dynamic expression types, runtime label values, template context types, and application behavior still require Angular compilation and application tests.

json
{  "template": "<neural-button icon=\"trash\"></neural-button>",  "imports": ["NeuralButton"],  "providers": []}

Use native arrays of non-empty declaration/provider names. Legacy imports_json and providers_json JSON strings remain supported; do not pass an import map. If both forms are sent, their trimmed, deduplicated name sets must agree; conflicting or malformed values return an explicit tool error. Omitted fields retain the previous empty-array defaults.

The schema-v2 result includes valid, parser identity and version, syntax status, diagnostics, exact suggested imports grouped by entry point, and provider requirements. NNG000 identifies Angular parse failures before contract validation. Informational missing-import diagnostics do not make a template invalid; error diagnostics do.

Project-aware tools

The generated catalog covers Core and the independently versioned @neural-ng/editor, including Editor template directives, inputs, outputs and typed classes. Contracts expose packageName and packageVersion; neural://package/exports retains the Core fields and adds companionPackages. installedEditorVersion reports locally resolved Editor metadata. NNP010 warns when Editor and its catalog version differ; matching Core alone does not verify Editor APIs. Unrecognized selectors still produce diagnostics.

CSS checks emit warnings, not runtime verdicts: NNP011 detects a flat CSS display rule matching a statically identifiable element using hidden; NNP012 flags root NeuralNg token declarations with !important. A later protective rule may make an NNP011 warning harmless. The check does not compute the cascade, resolve imports or evaluate Sass, inline component styles, dynamic selectors or theme interactions. :where(:root, ...) alone is not a bug. Verify Appearance switching and hidden overlays in a real browser. The hint pass is capped at 1000 hidden elements, 2000 rules and 100 warnings; NNP013 reports those limits. This cap is independent of file scan coverage.

inspect_project

Inspects the Angular workspace used as the MCP process working directory and returns declared Angular/NeuralNg package versions, workspace kind, summary counts, used selectors and occurrence locations, icon classes and stylesheets, imports grouped by entry point, configured providers, theme and Appearance setup, inferred conventions, and actionable diagnostics. External templates, inline component templates and attribute directives are parsed with @angular/compiler; invented APIs and accessibility failures therefore use the same diagnostics as validate_usage.

The scan is read-only and accepts no filesystem path. It skips dependencies, build output, VCS data, tests, declarations, and symlinks. Work is bounded to 400 source files, 256 KiB per file, 5 MiB in total, and 10,000 directory entries; oversized files are rejected before their contents are read. The result explicitly reports truncation and analysis confidence. analysis.scanCoverage reports only whether bounded enumeration completed. analysis.semanticConfidence is heuristic or insufficient, never a claim of compiler-level correctness. Templates use Angular AST parsing, while import/provider/theme metadata uses static heuristics. compilationVerified is always false. The legacy confidence field is retained as a deprecated alias for scan completeness, not semantic certainty. Absolute paths are not returned, and component/icon evidence is capped at 25 relative paths per item while filesOmitted preserves the omitted count. angularVersion and neuralPackages contain declarations from the workspace package.json. Optional installedCoreVersion and installedAngularVersion separately report exact versions read from the corresponding local node_modules package manifests. Only bounded metadata within the workspace is read, not dependency source code. Core compatibility prefers installed metadata when available; dependency ranges without that evidence require review. Independently released Core, Icons, Theme, and MCP packages are not required to share a version. Diagnostics validate selectors and APIs present in the generated MCP catalog; an unknown selector from a separate package remains visible instead of being silently treated as valid.

inspect_neuralng_project remains as a compatibility alias and returns the same schema-v2 result. New agents should call inspect_project.

suggest_consistent_ui

Combines inspect_project with the composition engine. It identifies which planned primitives already have a project convention, which ones are new, and how to preserve the detected theme, unstyled ownership, and import style. The schema-v2 result includes per-component relative-path evidence, exact import reuse/add partitions, required-provider deltas, declared Core versus catalog version alignment, bounded project risks, and explicit next calls to get_component_examples and validate_usage. It returns focused project context rather than duplicating the full inspect_project result.

compatibility.evidenceSource distinguishes installed metadata from declarations. contractUsability is verified-version only for an exact installed Core/catalog match, review-required for declarations or mismatches, and unavailable when Core is missing. verified-version verifies only version alignment, not runtime correctness. unverifiedAspects names the APIs and behaviors that cannot be trusted yet; requiredActions explains version resolution, strict compilation and browser verification. The legacy status field is retained for compatibility.

json
{  "goal": "Add a searchable project table with a detail drawer",  "kind": "table"}

Compact theme tools

Native objects are preferred since rc.4. Use options with creation, recipe with validation/compilation, recipe plus patch with editing and left plus right with diffing. Existing *_json strings remain supported. Both forms must be structurally equal when supplied together (object key order is ignored; array order matters). Missing required objects, non-object values and malformed/conflicting legacy inputs are errors.

The theme workflow intentionally operates on the small recipe rather than the resolved 1,348-token Core and Editor graph.

create_theme_recipe

json
{  "name": "violet-workspace",  "options": { "preset": "glass", "primary": "#7c3aed", "radius": "large" }}

validate_theme_recipe

json
{  "recipe": { "schemaVersion": 1, "name": "violet-workspace", "extends": "neutral" }}

edit_theme_recipe

Applies a bounded, prototype-safe sparse patch and validates the result. Theme validation rejects declaration injection, external CSS URLs, malformed aliases, and unknown component tokens before compilation.

json
{  "recipe": { "schemaVersion": 1, "name": "violet-workspace", "extends": "neutral" },  "patch": { "set": { "color.primary": "#7c3aed", "shape.radius": "large" } }}

diff_theme_recipes

Returns only changed dotted recipe paths instead of repeating both recipes.

get_component_theme_contract

Returns one component's supported theme properties. Use detail: "names" by default and request detail: "defaults" only when current mode values are needed.

json
{  "component": "toast",  "detail": "names"}

Recipe versions and quality metadata

Theme MCP tools author schema version 1. Early preview recipes should first be migrated with neural-theme migrate or migrateThemeRecipe() from @neural-ng/theme; MCP remains read-only and does not rewrite user files. Preset resources include stability and quality governance metadata so agents can prefer release baselines unless the user explicitly requests a preview style.

compile_theme_recipe

Runs the real @neural-ng/theme compiler and returns validation diagnostics, summary data, artifact byte sizes and integration instructions. It deliberately does not send full CSS or token artifacts through the model context. Generate those files with:

bash
npx neural-theme build

Catalog source

The committed component catalog is generated from:

  • tsconfig.base.json public @neural-ng/core/* paths;
  • the public @neural-ng/editor entry point and its independently versioned manifest;
  • each public secondary entry point's index.ts;
  • public Angular component and directive selectors;
  • package exports, README files and llms.txt files.

Regenerate and verify it with:

bash
npx nx run neural-mcp:catalognpx nx run neural-mcp:catalog-check

Quality commands

V1 support boundary

  • Runtime: Node 24, with contracts generated for the Core and Editor versions returned by each tool. An independently versioned Editor remains beta even if the MCP server becomes stable.
  • Project inspection recognizes Angular CLI, Nx and Angular package layouts from the configured working directory. The layout acceptance fixtures exercise metadata/template inspection, not independent builds of all workspace types. Start at the workspace root; nested package resolution, path aliases and cross-application provider scope are not TypeScript compiler resolution.
  • Template validation is not Angular type checking or an accessibility audit. Run strict Angular compilation and browser tests on generated screens.
  • CSS diagnostics are bounded static hints, not computed styles or cascade analysis. Appearance switching is deferred and is not certified by v1.
  • See RC4_ACCEPTANCE.md for actual agent retries, artifact identity and browser checks. Passing one scenario does not guarantee arbitrary generated UI.
bash
npx nx lint neural-mcpnpx nx test neural-mcpnpm run mcp:evalnpx nx build neural-mcpnpx nx run neural-mcp:package-testnpx nx run neural-mcp:mcp-smoke

mcp:eval reads the versioned manifest in evals/manifest.json. It gates ten composition regressions and the beta-exit existing-project user-management scenario across inspection, consistency planning, exact contracts, valid template acceptance, accessibility, provider requirements, and invented API rejection. CI runs it independently from the ordinary unit suite.

mcp-smoke packs both @neural-ng/theme and the MCP server, installs them into an isolated temporary consumer, initializes stdio MCP, reads component and theme resources, then calls component discovery and compact theme compiler tools.

來源:libs/neural-mcp/README.md,提交 3a8a7de

工具

20

search_components

Search NeuralNg components

Search the deterministic NeuralNg component catalog, README files, and llms.txt guidance. Omit query or use an empty string to browse a bounded list in stable id order.

輸入參數limitquery

search_icons

Search Neural Icons by UI intent

Search all 6,184 Neural Icons variants by name, category, or common UI intent and return exact CSS classes, smallest category imports, usage markup, and accessibility guidance. Brand icons are excluded unless explicitly requested.

輸入參數limitquery必填stylecategoryinclude_brands

get_component

Get a structured NeuralNg component API

Resolve a component and return its versioned public API. Use summary for discovery, standard for implementation, or full for every class slot and example.

輸入參數detailcomponent必填

get_component_examples

Get NeuralNg component examples

Return bounded, executable examples extracted from the published component README with their heading and language.

輸入參數limitcomponent必填

get_component_contract

Get a NeuralNg component contract

Resolve a component by id, class, selector, or entry point and return its public contract.

輸入參數component必填

recommend_components

Recommend NeuralNg components

Recommend documented NeuralNg components for a UI goal using deterministic intent matching.

輸入參數goal必填limit

plan_ui

Plan a NeuralNg UI composition

Turn a product goal into a deterministic, contract-backed component composition with exact imports, providers, state, accessibility checks, and implementation order.

輸入參數goal必填kind

suggest_form_structure

Suggest a NeuralNg form structure

Return a contract-backed form composition with exact imports, providers, state ownership, accessibility checks, and implementation order.

輸入參數goal必填

suggest_page_structure

Suggest a NeuralNg page structure

Return a contract-backed page composition with exact imports, providers, state ownership, accessibility checks, and implementation order.

輸入參數goal必填

suggest_table_structure

Suggest a NeuralNg table structure

Return a contract-backed table composition with exact imports, providers, state ownership, accessibility checks, and implementation order.

輸入參數goal必填

validate_usage

Validate NeuralNg Angular template usage

Parse an Angular template with @angular/compiler and validate syntax, NeuralNg elements and attribute directives, bindings, required inputs, literal values, icon-button accessibility, standalone imports, provider requirements, and duplicate Toast channels.

輸入參數importstemplate必填providersimports_jsonproviders_json

inspect_project

Inspect the current Angular project

Read the bounded MCP working directory and return a schema-v2 Angular compiler-backed inventory of NeuralNg versions, templates, elements and attribute directives, exact imports, providers, icons, theme/appearance setup, conventions, evidence, and diagnostics.

無需輸入參數。

inspect_neuralng_project

Inspect the current NeuralNg Angular workspace (legacy name)

Compatibility alias for inspect_project. It accepts no path and returns the same read-only schema-v2 inspection.

無需輸入參數。

suggest_consistent_ui

Plan UI consistent with the current project

Inspect the current Angular workspace and return a schema-v2 consistency plan with component evidence, version alignment, exact import/provider deltas, theme ownership, bounded risks, and validation next steps.

輸入參數goal必填kind

create_theme_recipe

Create a compact NeuralNg theme recipe

Create a deterministic sparse recipe from high-level brand and interface decisions. options accepts string fields: description, preset, primary, surface, radius, border, density, elevation, motion, typographyScale. Use options: {} for neutral defaults. Use preset, not extends; extends belongs to the returned recipe.

輸入參數name必填optionsoptions_json

validate_theme_recipe

Validate a NeuralNg theme recipe

Validate compact recipe JSON against the published schema and the complete Core and Editor token contract.

輸入參數reciperecipe_json

edit_theme_recipe

Edit a compact NeuralNg theme recipe

Apply a safe sparse patch with dotted set paths and unset paths, then validate the resulting recipe.

輸入參數patchrecipepatch_jsonrecipe_json

diff_theme_recipes

Diff compact NeuralNg theme recipes

Return only the deterministic dotted paths that differ between two compact recipes.

輸入參數leftrightleft_jsonright_json

get_component_theme_contract

Get a component-scoped NeuralNg theme contract

Return only the supported theme properties for one Core or Editor component. Use detail=defaults only when current default values are needed.

輸入參數detailcomponent必填

compile_theme_recipe

Compile a NeuralNg theme recipe summary

Compile and validate a compact recipe, returning summary, diagnostics, artifact byte sizes and integration instructions without emitting the full token graph.

輸入參數reciperecipe_json

版本歷史

7
  1. v1.0.1最新Nov 1, 2026
  2. v1.0.0Sep 29, 2026
  3. v1.0.0-rc.4Sep 26, 2026
  4. v1.0.0-rc.3Sep 25, 2026
  5. v1.0.0-rc.2Sep 21, 2026
  6. v1.0.0-rc.1Sep 17, 2026
  7. v0.1.0-beta.6Sep 16, 2026

評分

已滿足適用檢查項的 90%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分
  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分