zhin-mcp-server

Guides setup and usage of the Zhin MCP (Model Context Protocol) server plugin. Covers configuration, available tools, resources, and prompts for AI assistant integration. Use when integrating Zhin with AI coding assistants like Claude or Cursor via MCP.

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "zhin-mcp-server" with this command: npx skills add zhinjs/ai-skills/zhinjs-ai-skills-zhin-mcp-server

Zhin MCP Server Guide

Use this skill to set up the @zhin.js/mcp plugin, enabling AI assistants (Claude, Cursor, etc.) to understand and generate Zhin plugins via the Model Context Protocol.

Installation

pnpm add @zhin.js/mcp

Configuration

MCP requires the HTTP plugin. Enable both in zhin.config.yml:

plugins:
  - http
  - mcp

http:
  port: 8086

mcp:
  enabled: true
  path: /mcp

The MCP endpoint is available at http://localhost:8086/mcp.

Connecting AI Assistants

Claude Desktop

Edit ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "zhin": {
      "command": "curl",
      "args": ["-N", "http://localhost:8086/mcp"]
    }
  }
}

Cursor/VSCode

Install an MCP extension and configure the server URL in settings.

Available Tools

create_plugin

Create a new Zhin plugin file.

ParameterRequiredDescription
nameYesPlugin name
descriptionYesPlugin description
featuresNoFeature list: command, middleware, component, context, database
directoryNoSave directory (default: src/plugins)

create_command

Generate command code snippets.

ParameterRequiredDescription
patternYesCommand pattern, e.g. hello <name:text>
descriptionYesCommand description
hasPermissionNoWhether to include permission checks

create_component

Generate message component code.

ParameterRequiredDescription
nameYesComponent name
propsYesProperty definitions
usesJsxNoWhether to use JSX syntax

create_adapter

Generate platform adapter code.

ParameterRequiredDescription
nameYesAdapter name
descriptionYesAdapter description
hasWebhookNoWhether webhook support is needed

create_model

Generate database model definition.

ParameterRequiredDescription
nameYesModel name
fieldsYesField definitions

query_plugin

Query details of an existing plugin.

ParameterRequiredDescription
pluginNameYesPlugin name to query

list_plugins

List all loaded plugins (no parameters).

Available Resources

MCP exposes documentation as resources:

URIDescription
zhin://docs/architectureZhin architecture design
zhin://docs/plugin-developmentPlugin development guide
zhin://docs/best-practicesDevelopment best practices
zhin://docs/command-systemCommand system docs
zhin://docs/component-systemComponent system docs
zhin://docs/context-systemContext system docs
zhin://examples/basic-pluginBasic plugin example
zhin://examples/command-pluginCommand plugin example
zhin://examples/adapterAdapter example

Available Prompts

create-plugin-workflow

Guides the full plugin creation workflow.

Parameter: feature_typecommand, middleware, component, or adapter.

debug-plugin

Step-by-step plugin debugging guidance.

Parameter: error_message (optional) — the error to diagnose.

best-practices

Returns Zhin development best practices.

Usage Scenarios

Create a Plugin via AI

User: Create a plugin named "welcome" that replies when users say hello

AI: [Uses create_plugin tool] Created plugin with command feature...

Debug a Plugin via AI

User: My plugin reports "Context not found"

AI: [Uses query_plugin to inspect] This error usually means the context
    dependency hasn't been registered yet...

Generate an Adapter via AI

User: Create a WhatsApp adapter with webhook support

AI: [Uses create_adapter tool] Generated WhatsApp adapter scaffold...

Checklist

  • Install @zhin.js/mcp and @zhin.js/http.
  • Add both http and mcp to the plugins list.
  • Configure mcp.path (default /mcp).
  • Start the Zhin app, then connect your AI assistant.
  • Use MCP tools to scaffold plugins, commands, components, and adapters.
  • Access zhin://docs/* resources for framework documentation.

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

zhin-command-middleware

No summary provided by upstream source.

Repository SourceNeeds Review
General

zhin-helper

No summary provided by upstream source.

Repository SourceNeeds Review
General

zhin-ai-integration

No summary provided by upstream source.

Repository SourceNeeds Review
General

zhin-context-services

No summary provided by upstream source.

Repository SourceNeeds Review