Skip to content
MCP server

c2n Web Components

Exact component APIs, examples, theme tokens and markup checks for c2n Lit web components

Runs locallyStatus and history
Install
Pricing
Open source
Platforms
CLI
Runs
Locally
Version
1.0.26
Listing updated
3 days ago

About c2n Web Components

c2n Web Components is an open-source MCP server for developer tools. It runs locally on your machine and is started by your AI client.

A coding agent often guesses attribute names for a component library; this server answers from the installed @c2n/* packages instead, so the API it reports matches the version in your project. Set C2N_PROJECT_ROOT to point it at a different project.

Ten tools run from listing and searching components to fetching full APIs with CSS variables grouped by part and state, browsing gallery looks, applying curated presets and reading the --c2-theme tokens. generate_variant produces a CSS class, HTML with style, a Lit subclass or JSON from overrides, and validate_markup flags native controls that should be replaced plus unknown tags, attributes, slots, events and variables.

It pairs with a separate @c2n/skill package that teaches workflow conventions; when MCP is unavailable the skill falls back to a bundled catalog and each package's custom-elements.json manifest. Setup commands are given for Claude Code, Codex and GitHub Copilot in VS Code.

Install

Run in a terminal

claude mcp add c2n -- npx -y @c2n/mcp

Add to claude_desktop_config.json

{
  "mcpServers": {
    "c2n": {
      "command": "npx",
      "args": [
        "-y",
        "@c2n/mcp"
      ]
    }
  }
}
Install in CursorOpens Cursor, which asks you to confirm. Or add it by hand:

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "c2n": {
      "command": "npx",
      "args": [
        "-y",
        "@c2n/mcp"
      ]
    }
  }
}
Install in VS CodeOpens VS Code, which asks you to confirm. Or add it by hand:

Add to .vscode/mcp.json

{
  "servers": {
    "c2n": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@c2n/mcp"
      ]
    }
  }
}

Add to ~/.codeium/windsurf/mcp_config.json

{
  "mcpServers": {
    "c2n": {
      "command": "npx",
      "args": [
        "-y",
        "@c2n/mcp"
      ]
    }
  }
}

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "c2n": {
      "command": "npx",
      "args": [
        "-y",
        "@c2n/mcp"
      ]
    }
  }
}

Configuration

  • C2N_PROJECT_ROOTProject whose installed @c2n/* packages the server reports. Defaults to the working directory.

Tools this server provides (10)

Taken from the project documentation; the running server may differ.

list_components
No description
search_components
No description
get_component
No description
get_examples
No description
search_examples
No description
get_presets
No description
get_theme
No description
generate_variant
No description
validate_markup
No description
get_workflow_guide
No description

What it does

Version-aware APIs
Reports component APIs from the packages installed in your project.
Gallery and presets
Browse looks, search examples and apply curated presets.
Theme tokens
Reads the --c2-theme tokens with install and mapping snippets.
Variant generation
Emits CSS, HTML, Lit subclasses or JSON from overrides.
Markup validation
Flags unknown tags, attributes, slots, events and variables.

Good for

  • Build a page with c2n components without guessing attributes
  • Restyle a component through theme tokens
  • Check hand-written markup for invalid c2n usage
  • Turn a repeated style into a reusable variant

Pricing

Open source

Prices not published

Prices change. Check code2nguyen.github.io before you buy.

c2n Web Components FAQ

How do I add it to Claude Code?

Run claude mcp add --transport stdio c2n -- npx -y @c2n/mcp.

Do I need the skill too?

MCP can run alone, but the skill adds conventions for applying components; installing both is recommended.

Which project does it read?

The one in C2N_PROJECT_ROOT, defaulting to the working directory.

Is c2n Web Components free?

Yes. c2n Web Components is open source, so you can use and self-host it for free.

How do I add c2n Web Components to Claude Code?

Run this command in your terminal: claude mcp add c2n -- npx -y @c2n/mcp

What are the best alternatives to c2n Web Components?

The closest alternatives to c2n Web Components are REA, Codebase Memory, GitHub, Serena MCP: the IDE for your agent and XERJ.

Alternatives to c2n Web Components

  1. REA

    MCP server

    CLI and MCP server that lets coding agents reverse engineer apps and binaries

    Runs locally
    • Open source
    • 464K GitHub stars
    • Developer tools
  2. Codebase Memory

    MCP server

    Local MCP server that builds a code knowledge graph for AI coding agents

    Runs locally
    • Open source
    • 48.7K GitHub stars
    • Knowledge and memory
  3. GitHub

    MCP server

    Official MCP server connecting AI assistants to GitHub repos, issues and workflows

    Not checked yet
    • Remote
    • Open source
    • 34.5K GitHub stars
    • Developer tools
  4. MCP toolkit giving coding agents symbol-level code retrieval and editing

    Runs locally
    • Open source
    • 31.5K GitHub stars
    • Developer tools
  5. XERJ

    MCP server

    Local search engine for AI agents with cited answers over your code and docs

    Runs locally
    • Open source
    • 19.2K GitHub stars
    • Knowledge and memory
  6. Ouroboros

    MCP server

    Spec-first layer that pins requirements and verifies results of AI coding agent work

    Runs locally
    • Open source
    • 6.4K GitHub stars
    • Developer tools