mcp

v1.11.2
@spartan-ng/mcp Checked 2 days ago Published 2 days ago

Model Context Protocol server exposing Spartan Angular UI documentation, components, and blocks as AI-consumable tools.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

spartan_components_list List Spartan UI components

Returns a list of known Spartan Angular UI components with their documentation URLs. Use this to discover available components, then call spartan_components_get with specific component names to get detailed API documentation.

spartan_components_get Get component documentation

Fetch the Spartan UI documentation page for a given component (e.g., 'accordion'). IMPORTANT: The response contains comprehensive API information including Brain API (Brn*) and Helm API (Hlm*) components with their inputs, outputs, selectors, and examples. Always parse and present the API tables, code examples, and component specifications from the response. Look for structured sections like 'Brain API', 'Helm API', and 'Examples' in the response.

ParameterTypeDescription
name *stringComponent name (kebab-case), e.g., 'accordion'.
extractstringExtraction: 'code' for code blocks, 'api' for structured API information.
noCachebooleanBypass cache when true.
spartanVersionstringSpartan UI version to use for caching (e.g., '1.2.3'). If not provided, defaults to 'latest'.

spartan_docs_get Get a Spartan docs section

Fetch an official Spartan documentation section by topic (introduction, changelog, about, installation, components-json, theming, styles, dark-mode, cli, rtl, typography, figma, version-support, health-checks, update-guide, mcp, skills).

ParameterTypeDescription
topic *stringDocumentation topic to fetch. Includes 'analog-dark-mode' external article.
extractstringOptional extraction: code blocks, headings, or links.
formatstringReturn format: raw HTML or plain text.
noCachebooleanBypass cache when true.
spartanVersionstringSpartan UI version to use for caching (e.g., '1.2.3'). If not provided, defaults to 'latest'.

spartan_health_check Spartan pages availability check

Check availability and response times for selected Spartan docs and component pages. This validates the docs site, not your local workspace health check.

ParameterTypeDescription
componentsarrayComponent names to check; defaults to a small representative set.
topicsarrayDocs topics to check; defaults to a standard set.

spartan_health_instructions Spartan CLI health check instructions

Return official instructions and commands for running the Spartan CLI health check in Angular CLI or Nx workspaces.

spartan_health_command Build Spartan health check command

Return the exact command to run the Spartan health check for Angular CLI or Nx. Optionally append --dry-run.

ParameterTypeDescription
tool *stringWhich toolchain to use: Angular CLI (ng) or Nx (nx).
dryRunbooleanAppend --dry-run to preview changes.

spartan_meta Spartan metadata

Return known docs topics, components, and blocks for client autocomplete.

spartan_components_dependencies Show component dependencies

Analyze what other components, packages, or dependencies a Spartan UI component requires. Includes Angular CDK dependencies, peer components, and installation requirements.

ParameterTypeDescription
componentName *stringSpartan component name (e.g., 'calendar', 'dialog')
includeTransitivebooleanInclude transitive dependencies (dependencies of dependencies)

spartan_accessibility_check Check component accessibility features

Analyze accessibility features, ARIA support, keyboard navigation, and screen reader compatibility for a Spartan UI component. Provides accessibility best practices and implementation guidance.

ParameterTypeDescription
componentName *stringSpartan component name
checkTypestringType of accessibility check: specific area or 'all' for comprehensive analysis

spartan_cache_status Get cache status

Get current cache status, including version, cached components, and statistics

spartan_cache_clear Clear cache

Clear cached documentation for the current Spartan UI version

ParameterTypeDescription
allVersionsbooleanClear cache for all versions (default: false)

spartan_cache_rebuild Rebuild cache

Rebuild cache by fetching fresh documentation from spartan.ng for all components and blocks

ParameterTypeDescription
blocksarraySpecific blocks to rebuild (default: all blocks)
componentsarraySpecific components to rebuild (default: all components)
includeDocsbooleanInclude documentation topics (default: true)

spartan_cache_switch_version Switch version

Switch to a different Spartan UI version for caching and retrieval

ParameterTypeDescription
version *stringSpartan UI version (e.g., '1.2.3', 'latest')

spartan_cache_list_versions List cached versions

List all cached Spartan UI versions

spartan_blocks_list List Spartan UI blocks

Returns a list of known Spartan Angular UI blocks (pre-built UI patterns) with their documentation URLs. Blocks are higher-level compositions of components like sidebars, login forms, signup forms, calendars, and steppers. Use this to discover available blocks, then call spartan_blocks_get with specific block names to get detailed code.

spartan_blocks_get Get block documentation and code

Fetch the Spartan UI documentation page for a given block (e.g., 'sidebar', 'login'). Blocks are pre-built UI patterns that combine multiple components. The response includes complete code examples showing how to use the block.

ParameterTypeDescription
name *stringBlock name (kebab-case), e.g., 'sidebar', 'login', 'signup', 'calendar', 'stepper'.
formatstringReturn format: raw HTML or plain text.
noCachebooleanBypass cache when true.
spartanVersionstringSpartan UI version to use for caching (e.g., '1.2.3'). If not provided, defaults to 'latest'.

spartan_blocks_dependencies Show block dependencies

Analyze what components and packages a Spartan UI block requires. Blocks are compositions of multiple components, so this shows all underlying dependencies.

ParameterTypeDescription
blockName *stringSpartan block name (e.g., 'sidebar', 'login')