Zhin MCP Server Guide
Use this skill to set up the
plugin, enabling AI assistants (Claude, Cursor, etc.) to understand and generate Zhin plugins via the Model Context Protocol.
Installation
Configuration
MCP requires the HTTP plugin. Enable both in
:
yaml
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
:
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.
| Parameter | Required | Description |
|---|
| Yes | Plugin name |
| Yes | Plugin description |
| No | Feature list: , , , , |
| No | Save directory (default: ) |
create_command
Generate command code snippets.
| Parameter | Required | Description |
|---|
| Yes | Command pattern, e.g. |
| Yes | Command description |
| No | Whether to include permission checks |
create_component
Generate message component code.
| Parameter | Required | Description |
|---|
| Yes | Component name |
| Yes | Property definitions |
| No | Whether to use JSX syntax |
create_adapter
Generate platform adapter code.
| Parameter | Required | Description |
|---|
| Yes | Adapter name |
| Yes | Adapter description |
| No | Whether webhook support is needed |
create_model
Generate database model definition.
| Parameter | Required | Description |
|---|
| Yes | Model name |
| Yes | Field definitions |
query_plugin
Query details of an existing plugin.
| Parameter | Required | Description |
|---|
| Yes | Plugin name to query |
list_plugins
List all loaded plugins (no parameters).
Available Resources
MCP exposes documentation as resources:
| URI | Description |
|---|
| Zhin architecture design |
zhin://docs/plugin-development
| Plugin development guide |
zhin://docs/best-practices
| Development best practices |
zhin://docs/command-system
| Command system docs |
zhin://docs/component-system
| Component system docs |
zhin://docs/context-system
| Context system docs |
zhin://examples/basic-plugin
| Basic plugin example |
zhin://examples/command-plugin
| Command plugin example |
| Adapter example |
Available Prompts
create-plugin-workflow
Guides the full plugin creation workflow.
debug-plugin
Step-by-step plugin debugging guidance.
Parameter:
(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 and .
- Add both and to the plugins list.
- Configure (default ).
- Start the Zhin app, then connect your AI assistant.
- Use MCP tools to scaffold plugins, commands, components, and adapters.
- Access resources for framework documentation.