The herocn MCP Server gives AI assistants direct access to the herocn documentation and component registry, making it easier to build with herocn in AI-powered development environments.
The MCP server uses stdio transport. Published at @herocn/mcp on npm.
As we add more components to the herocn registry, they'll be available in the MCP server too.
Add the herocn server to your project's opencode.json configuration file:
{
"$schema": "https://opencode.ai/config.json",
"mcp": {
"herocn": {
"type": "local",
"command": ["npx", "-y", "@herocn/mcp@latest"]
}
}
}After adding the configuration, restart OpenCode to activate the MCP server.
See the OpenCode MCP documentation for more details.
Run this command in your terminal:
claude mcp add herocn -- npx -y @herocn/mcp@latestOr manually add to your project's .mcp.json file:
{
"mcpServers": {
"herocn": {
"command": "npx",
"args": ["-y", "@herocn/mcp@latest"]
}
}
}After adding the configuration, restart Claude Code and run /mcp to see the herocn MCP server in the list. If you see Connected, you're ready to use it.
See the Claude Code MCP documentation for more details.
Add the herocn server to your ~/.codex/config.toml (or a project-scoped .codex/config.toml):
[mcp_servers.herocn]
command = "npx"
args = ["-y", "@herocn/mcp@latest"]After adding the configuration, restart Codex and run /mcp in the TUI to verify the server is active.
See the Codex MCP documentation for more details.
Add the herocn server to your project's .cursor/mcp.json configuration file:
{
"mcpServers": {
"herocn": {
"command": "npx",
"args": ["-y", "@herocn/mcp@latest"]
}
}
}Alternatively, add it through Cursor Settings → Tools → MCP Servers. After adding the configuration, restart Cursor to activate the MCP server.
See the Cursor MCP documentation for more details.
Add the herocn server to your claude_desktop_config.json configuration file:
{
"mcpServers": {
"herocn": {
"command": "npx",
"args": ["-y", "@herocn/mcp@latest"]
}
}
}After adding the configuration, restart Claude Desktop to activate the MCP server.
See the Claude Desktop MCP documentation for more details.
To configure MCP in VS Code with GitHub Copilot, add the herocn server to your project's .vscode/mcp.json configuration file:
{
"servers": {
"herocn": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@herocn/mcp@latest"]
}
}
}After adding the configuration, open .vscode/mcp.json and click Start next to the herocn server.
See the VS Code MCP documentation for more details.
Add the herocn server to your project's .windsurf/mcp.json configuration file:
{
"mcpServers": {
"herocn": {
"command": "npx",
"args": ["-y", "@herocn/mcp@latest"]
}
}
}After adding the configuration, restart Windsurf to activate the MCP server.
See the Windsurf MCP documentation for more details.
Add the herocn server to your settings.json configuration file. Open settings via Command Palette (zed: open settings) or use Cmd-, (Mac) / Ctrl-, (Linux):
{
"context_servers": {
"herocn": {
"command": "npx",
"args": ["-y", "@herocn/mcp@latest"],
"env": {}
}
}
}After adding the configuration, restart Zed and open the Agent Panel settings view. Check that the indicator dot next to the herocn server is green with "Server is active" tooltip.
See the Zed MCP documentation for more details.
Once configured, ask your AI assistant questions like:
The MCP server provides these tools to AI assistants:
| Tool | Description |
|---|---|
list_docs | List all available herocn documentation pages |
get_doc | Fetch the full markdown content of a documentation page |
search_docs | Keyword search over the documentation with ranked results and snippets |
list_components | List all available herocn registry components |
get_component | Fetch a component package including source, dependencies, CSS variables, and the install command |
get_install_command | Get the install command for a registry component |
Requirements: Node.js 22 or higher. The package will be automatically downloaded when using npx.
Need help? Open an issue on GitHub.