Skip to main content
Glama

Next UI MCP

English | 日本語

Next UI MCP is an MCP server that helps AI coding assistants build and check projects using ServiceNow's Now/Next Experience UI Framework.

It provides framework guidance, component scaffolds, and tools for finding and inspecting components from your ServiceNow instance.

This is an unofficial, community-maintained project. It is not affiliated with, endorsed by, or supported by ServiceNow.

Quick start

You need Node.js 18.20 or newer and an MCP-compatible coding assistant.

Add this server to your assistant's MCP configuration. For example, use .mcp.json for Claude Code or .cursor/mcp.json for Cursor:

On macOS, first configure a basic-auth profile with snc configure profile. The server uses the default profile automatically.

{
  "mcpServers": {
    "next-ui": {
      "command": "npx",
      "args": ["-y", "next-ui-mcp@latest"]
    }
  }
}

The server reads the profile's host and username from ~/.snc/config.json and its password from the macOS Keychain. No credentials need to be added to your project configuration. If you use a profile other than default, set NEXT_UI_SNC_PROFILE in the server's env configuration.

Restart or refresh your coding assistant after updating its MCP configuration. The tools should then be available in your project.

Related MCP server: Fluent MCP Server

What your agent can do

Learn the framework and create a component

  • get_framework_guidance — get guidance on framework topics, project structure, Storybook, manifests, and component development.

  • get_component_scaffold — generate starter files for a component.

  • explain_now_ui_manifest — learn how now-ui.json relates to components.

The Storybook guidance and scaffolds use next-ui-storybook for local component development and preview.

Find and inspect platform components

  • recommend_instance_components — find platform components that may fit a use case.

  • search_instance_components — search components available on your instance.

  • search_instance_icons — find icon names available on your instance.

  • evaluate_platform_component_fit — decide whether to use a platform component, compose it, or build a custom component.

  • get_component_api — inspect a component's properties, events, and slots from your instance.

  • resolve_component_package — find the npm package for a platform component.

Check a project

  • validate_now_ui_manifest — validate a now-ui.json manifest.

  • analyze_project_dependencies — check platform package declarations in package.json.

Connect to a ServiceNow instance

Instance credentials enable tools that look up live component and icon information. Choose one of these three options:

1. Use an snc profile (macOS)

Configure a basic-auth profile with snc configure profile. Leave NEXT_UI_INSTANCE_URL unset; the server uses the default profile. To use another profile, set NEXT_UI_SNC_PROFILE to its name. The host and username are read from ~/.snc/config.json, and the password is read from the macOS Keychain.

2. Use a username and password

Set these variables in the MCP server's env configuration:

  • NEXT_UI_INSTANCE_URL

  • NEXT_UI_INSTANCE_USER

  • NEXT_UI_INSTANCE_PASSWORD

3. Use a bearer token

Set NEXT_UI_INSTANCE_URL and NEXT_UI_INSTANCE_TOKEN in the MCP server's env configuration. The token is sent as a bearer token. If both a token and username/password are set, the token takes precedence.

Instance requests time out after 20 seconds by default. Set NEXT_UI_INSTANCE_TIMEOUT_MS in the server's env configuration to change the timeout.

Help your assistant follow the project workflow

MCP configuration connects the server; project instructions help your assistant use its tools at the right time. Add a root-level AGENTS.md (or your assistant's equivalent project-instructions file), or merge the guidance into an existing file. For example:

# ServiceNow UI Development

## HDS Policy

Prefer HDS components over custom equivalents.
Prefer composition or thin wrappers when an HDS component is a partial fit.
Custom UI requires a concrete functional or design gap.

## Required Workflow

For new UI and substantial changes to existing UI:

- Before implementation, use next-ui-mcp get_framework_guidance
  with topic "agent-workflow-contract" and follow its guidance.
- Discover HDS candidates using recommend_instance_components
  or search_instance_components.
- Evaluate plausible candidates with evaluate_platform_component_fit.
- Inspect selected components with get_component_api before using them.
- Follow MCP guidance for imports and instance-backed dependencies.
- Briefly explain any decision to create a custom equivalent.
- If MCP tools are unavailable or fail, report the limitation.
  Do not interpret failed discovery as proof that no HDS component exists.

Configure the MCP server separately in each coding assistant. Instructions do not connect the server, and they guide the assistant but cannot guarantee it will follow them.

Demo

Watch the demo

Contributing

Contributions to the framework guidance and instance-backed component discovery are welcome.

Set up the project

These steps are for contributors working on the source code. You do not need them to install or use the MCP server.

pnpm install
pnpm run build
pnpm test

To run the server from source during development:

pnpm run dev

License

MIT

Available Tools

11 tools
analyze_project_dependenciesA

Analyzes a Next Experience UI component project package.json for platform components that should be declared as optionalDependencies with the version set to "instance". Use this when adding or changing instance-backed platform dependencies, including preparation for eventual deployment with snc ui-component deploy --fa, regardless of the local preview workflow.

Inputs: packageJsonPath (required), plannedComponentTags.

evaluate_platform_component_fitA

Evaluates whether an HDS platform component should be used directly, wrapped/composed, or replaced with a custom component. MUST prefer existing platform components such as now-card before building a custom card or custom primitive. Use this before scaffolding new UI from scratch and before inventing custom wrappers around functionality the instance already exposes. For any styled card, panel, or container, the evaluation must consider the platform component first and then require a separate .scss file plus a styles property on the custom element if custom UI is still necessary. When the chosen platform component is instance-backed, the project should declare it in package.json under optionalDependencies with version "instance".

Inputs: useCase (required), desiredEvents, desiredProperties.

explain_now_ui_manifestA

Explains what now-ui.json is for in a ServiceNow Now/Next Experience UI Framework component project, and the rule that every property and dispatched event in a component's source must have a matching declaration in now-ui.json. Read this before creating or editing a component if you are unsure whether the manifest needs updating too.

Inputs: no named parameters.

get_component_apiA

Looks up the REAL, current API (properties, slots, and dispatched actions/events) of a Now/Next Experience UI Framework component — e.g. now-button, now-input, now-select — as it actually exists on the user's own configured ServiceNow instance. The lookup uses sys_ux_lib_component for the tag and the related sys_ux_macroponent row through root_component to read the component's actual props, dispatched_events, and availableSlots from root_component_definition, which may be newer or richer than what is published to public npm. Call this BEFORE writing custom markup/logic that duplicates something a platform component already provides, so the real component and its actual props/events/slots get used instead of a hand-rolled equivalent. Use search_instance_components first if you do not already know the exact tag. Requires the target instance to be configured via environment variables (NEXT_UI_INSTANCE_URL and credentials).

Inputs: componentTag (required).

get_component_scaffoldA

Returns a minimal Now/Next Experience UI Framework component scaffold that uses Storybook with @dylanlindgren/next-ui-storybook-addon as its default local preview workflow. Include a matching now-ui.json stub, .storybook/main.mjs, a component story, and a separate component stylesheet in .scss imported and assigned via the createCustomElement styles property. Runtime shims MUST import servicenowUiCore and servicenowUiRendererSnabbdom from @servicenow/ui-mega, exactly as shown in the returned scaffold. Neither component source nor runtime shim files may import or re-export from @servicenow/ui-core or @servicenow/ui-renderer-snabbdom; wrapping those original packages in local files does not satisfy this requirement. For new components without an existing repo style, MUST prefer the JSX scaffold and MUST NOT hand-write low-level createElement trees. Agents must assess existing project configuration and preserve compatible Storybook setup, scripts, stories, examples, lockfiles, and custom instructions rather than replacing them wholesale. Agents must prefer existing platform components such as now-card before inventing a custom card or primitive when a suitable HDS component already exists. Any HDS component used in JSX must also include the matching package import (for example import "@servicenow/now-card"), and all JSX class names must use className instead of class. If the component is instance-backed, the generated package.json should declare the platform package in optionalDependencies with version "instance".

Inputs: scopeName, componentName, elementPrefix.

get_framework_guidanceA

MANDATORY workflow guidance for ServiceNow Now/Next Experience UI Framework projects. MUST use next-ui-storybook with @dylanlindgren/next-ui-storybook-addon as the default local development and preview workflow. For existing projects, inspect their Storybook configuration, package scripts, stories, lockfile, and instructions before migrating; preserve compatible setup and make targeted changes rather than overwriting project files. For new components with no existing local style, MUST prefer the JSX scaffold returned by get_component_scaffold and MUST NOT hand-write low-level createElement trees unless the repo already uses that pattern. MUST prefer platform components such as now-card, now-button, and similar instance-backed HDS components before creating custom equivalents. MUST import the corresponding package for any HDS component used in JSX or markup, for example import "@servicenow/now-card" or import "@servicenow/now-button". MUST declare instance-backed platform packages in package.json under optionalDependencies with version "instance" rather than leaving them implicit. MUST also use the local runtime shims at src/runtime/ui-core.js and src/runtime/snabbdom.js for createCustomElement and the renderer. Runtime shims MUST import servicenowUiCore and servicenowUiRendererSnabbdom from @servicenow/ui-mega. Neither component source nor runtime shim files may import or re-export from @servicenow/ui-core or @servicenow/ui-renderer-snabbdom; wrapping those original packages in local files does not satisfy this requirement. JSX must use className instead of class, and styles must live in a separate .scss file per component, imported and declared on the component definition via the styles property. This tool includes the createCustomElement stub pattern, the agent workflow contract, the sample project structure, Storybook local-development and migration guidance, manifest rules, instance-backed dependency patterns, and the platform-component-first decision flow. When called without arguments, it defaults to create-custom-element guidance.

Inputs: topic, question.

recommend_instance_componentsA

Recommends likely HDS platform components from a curated registry, using live ServiceNow instance metadata when available for props and dispatched events. Use this before inventing a custom component when an existing platform component may already fit.

Inputs: limit, useCase, desiredEvents, desiredProperties.

resolve_component_packageA

Returns the exact npm package that a ServiceNow HDS component tag belongs to. Examples: now-card -> @servicenow/now-card and now-card-header -> @servicenow/now-card. Never guesses from the tag name; if the tag is not in the curated registry, returns an explicit "unknown" result instead of inventing a package.

Inputs: componentTag (required).

search_instance_componentsA

Searches a curated HDS component registry and enriches matches with live ServiceNow instance metadata when available. Use this when an agent needs to discover likely platform components before choosing a dependency or writing custom UI code.

Inputs: limit, query, actionName, propertyName.

search_instance_iconsA

Searches the icon library (the icon property of now-icon, now-button, now-alert, now-pill and other HDS components) on the user's configured ServiceNow instance. Icon names are read from the instance's now-icon package, so results are the real icons available there. Use this BEFORE picking an icon name instead of guessing. Results are base names in dash-case (e.g. "star", "address-book"); append "-outline" or "-fill" to get the value for an icon property (e.g. "star-outline"). Passing a full name such as "star-outline" also validates that the base icon exists. Requires NEXT_UI_INSTANCE_URL and credentials.

Inputs: limit, query.

validate_now_ui_manifestA

Validates a now-ui.json manifest using the ServiceNow component-schema-validation package and checks that each uiBuilder object has a non-empty tileIcon path. Accepts either the raw manifest object or a JSON string. Returns whether the manifest is valid and any schema or tileIcon issues found.

Inputs: manifest (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.8/5.0

    Scored across 11 tools

    Disambiguation3/5

    Several tools cluster around component discovery: search_instance_components ('group likely platform components') and recommend_instance_components ('recommend likely HDS components from a curated registry') are nearly indistinguishable, and resolve_component_package/evaluate_platform_component_fit/get_component_api further overlap in the same decision space. Most other tools (guidance, scaffold, manifest validate vs explain, icon search) are clearly distinct, so descriptions help but boundaries are fuzzy.

    Naming Consistency5/5

    Every tool follows a clean snake_case verb_noun pattern (get_framework_guidance, validate_now_ui_manifest, search_instance_icons, evaluate_platform_component_fit, etc.). No mixed conventions or vague bare verbs.

    Tool Count4/5

    11 tools is a sensible, well-scoped set for a component-development assistant. Slightly heavy on overlapping discovery/decision helpers, but each has a plausible place.

    Completeness4/5

    Covers the lifecycle well: guidance, scaffolding, manifest explain/validate, icon lookup, component discovery, API inspection, dependency analysis, and platform-fit decisions. Minor gap in that manifest authoring is only indirectly handled via the scaffold stub rather than a dedicated create/update tool.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      maintenance
      Enables natural language interaction with ServiceNow Fluent SDK commands, API specifications, and development resources for AI-assisted environments.
      17
      504 npm
      32
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI assistants and development tools to interact with ServiceNow instances through the Model Context Protocol, supporting incident, change, problem, CMDB, service catalog, knowledge base, and custom table operations.
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables Claude and other MCP clients to perform real ServiceNow development across multiple instances: running server-side scripts, debugging ACLs, flows, notifications and ATF tests, tracing impact and change history, and migrating update sets through export, preview and commit.
      MIT