# MCP Server · JGuang UI

> 本页提供 JGuang UI 技术内容、中文导航与术语适配。

- 页面: https://jiguang132.com/zh/systems/jguang-ui/docs/registry/mcp
- 改编自: shadcn/ui 文档 (MIT) @ bc0705384b51252af26dcc65425b216bf5eb063c
- 说明：正文保留英文原文。

The [JGuang UI MCP server](/systems/jguang-ui/docs/mcp) works out of the box with any JGuang UI-compatible registry. You do not need to do anything special to enable MCP support for your registry.

---

## Prerequisites

The MCP server works by requesting your registry index. Make sure you have a registry item file at the root of your registry named `registry`.

For example, if your registry is hosted at `https://acme.com/r/[name].json`, you should have a file at `https://acme.com/r/registry.json` or `https://acme.com/r/registry` if you're using a JSON file extension.

This file must be a valid JSON file that conforms to the [registry schema](/systems/jguang-ui/docs/registry/registry-json).

---

## Configuring MCP

Ask your registry consumers to configure your registry in their `components.json` file and install the JGuang UI MCP server:


  

    

**Claude Code**


    

**Cursor**


    

**VS Code**


    

**Codex**


    

**OpenCode**


  

  

    **Configure your registry** in your `components.json` file:

    ```json title="components.json" showLineNumbers
    {
      "registries": {
        "@acme": "https://acme.com/r/{name}.json"
      }
    }
    ```

    **Run the following command** in your project:

    ```text
Use the JGuang UI Registry URL provided on /systems/jguang-ui#install.
```

    **Restart Claude Code** and try the following prompts:
       - Show me the components in the acme registry
       - Create a landing page using items from the acme registry

    **Note:** You can use `/mcp` command in Claude Code to debug the MCP server.

  


  

    **Configure your registry** in your `components.json` file:

    ```json title="components.json" showLineNumbers
    {
      "registries": {
        "@acme": "https://acme.com/r/{name}.json"
      }
    }
    ```
    **Run the following command** in your project:
       ```text
Use the JGuang UI Registry URL provided on /systems/jguang-ui#install.
```

    Open **Cursor Settings** and **Enable the MCP server** for JGuang UI. Then try the following prompts:
       - Show me the components in the acme registry
       - Create a landing page using items from the acme registry

  


  

    **Configure your registry** in your `components.json` file:

    ```json title="components.json" showLineNumbers
    {
      "registries": {
        "@acme": "https://acme.com/r/{name}.json"
      }
    }
    ```
    **Run the following command** in your project:
       ```text
Use the JGuang UI Registry URL provided on /systems/jguang-ui#install.
```

    Open `.vscode/mcp.json` and click **Start** next to the JGuang UI server. Then try the following prompts with GitHub Copilot:
       - Show me the components in the acme registry
       - Create a landing page using items from the acme registry

  


  

    **Configure your registry** in your `components.json` file:

    ```json title="components.json" showLineNumbers
    {
      "registries": {
        "@acme": "https://acme.com/r/{name}.json"
      }
    }
    ```

    **Add the following configuration** to `~/.codex/config.toml`:
       ```text
Use the JGuang UI Registry URL provided on /systems/jguang-ui#install.
```

    **Restart Codex** and try the following prompts:
       - Show me the components in the acme registry
       - Create a landing page using items from the acme registry

  


  

    **Configure your registry** in your `components.json` file:

    ```json title="components.json" showLineNumbers
    {
      "registries": {
        "@acme": "https://acme.com/r/{name}.json"
      }
    }
    ```

    **Run the following command** in your project:
       ```text
Use the JGuang UI Registry URL provided on /systems/jguang-ui#install.
```

    **Restart OpenCode** and try the following prompts:
       - Show me the components in the acme registry
       - Create a landing page using items from the acme registry

  


You can read more about the MCP server in the [MCP documentation](/systems/jguang-ui/docs/mcp).

---

## Best Practices

Here are some best practices for MCP-compatible registries:

1. **Clear Descriptions**: Add concise, informative descriptions that help AI assistants understand what a registry item is for and how to use it.
2. **Proper Dependencies**: List all `dependencies` accurately so MCP can install them automatically.
3. **Registry Dependencies**: Use `registryDependencies` to indicate relationships between items.
4. **Consistent Naming**: Use kebab-case for component names and maintain consistency across your registry.

---

JGuang 全部资源索引: https://jiguang132.com/llms.txt
