← 返回 Skills 市场
arterialist

Create MCP Server

作者 arterialist · GitHub ↗ · v1.0.0 · MIT-0
cross-platform ⚠ suspicious
113
总下载
0
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install create-mcp-server
功能描述
Create, deploy, and manage MCP (Model Context Protocol) servers using the MCPHero platform via the mcpheroctl CLI. Use this skill when the user wants to buil...
使用说明 (SKILL.md)

Create MCP Servers with MCPHero

MCPHero lets agents build their own tools. Instead of burning tokens on API schemas, SQL queries, and output parsing every run, the agent creates a persistent MCP server once and calls it forever. A 50,000-token integration becomes a 50-token tool call.

This skill covers the mcpheroctl CLI workflow for building servers end-to-end.

Production API base URL: https://api.mcphero.app/api


Prerequisites

Before using this skill, the user must have mcpheroctl installed and authenticated.

Install mcpheroctl

# via Homebrew (macOS/Linux)
brew install arterialist/mcpheroctl/mcpheroctl

# via uv (cross-platform)
uv tool install mcpheroctl

Authenticate

  1. Log in to the MCPHero Dashboard.
  2. Go to SettingsOrganizationDevelopers.
  3. Click Create API key and copy the token.
  4. Run:
mcpheroctl auth login --token \x3CYOUR_ORG_TOKEN>

Verify

mcpheroctl auth status

The Wizard Pipeline

The CLI follows this linear flow. After any async step, poll wizard state and check processing_status == "idle" before proceeding.

1. create-session          → Returns server_id (save it, needed everywhere)
2. conversation (loop)     → Gather requirements; stop when is_ready: true
3. start                   → Transition to tool suggestion (async → poll)
4. list-tools              → Review AI-suggested tools
5. refine-tools (optional) → Iterate on tools until satisfied (async → poll)
6. submit-tools            → Confirm selection (deletes unselected tools)
7. (auto env var suggest)  → Triggered automatically after submit-tools (async → poll)
8. list-env-vars           → Review suggested env vars
9. refine-env-vars (opt.)  → Iterate on env vars (async → poll)
10. submit-env-vars        → Provide actual values (call even if list is empty — backend needs it to transition)
11. set-auth               → Generate bearer token for the server
12. generate-code          → Trigger code generation (async → poll)
13. deploy                 → Deploy to MCPHero runtime → returns server_url + bearer_token

Always call submit-env-vars, even when list-env-vars returns []. The backend requires this step to transition to the next state. With no env vars, just call it with no --var flags.


State Machine

The setup_status field in wizard state tells you where you are:

gathering_requirements     → User is chatting about requirements
tools_generating           → LLM is generating tool suggestions (async, poll)
tools_selection            → Tools ready for review/selection
env_vars_generating        → LLM is generating env var suggestions (async, poll)
env_vars_setup             → Env vars ready for review/submission
auth_selection             → Ready for auth setup
code_generating            → LLM is generating code (async, poll)
code_gen                   → Code ready for review
deployment_selection       → Ready to deploy
ready                      → Server deployed and live

States ending in _generating are transient — poll until they transition. The processing_status field is the reliable check: "idle" means done, "processing" means wait, "error" means check processing_error.


Full Wizard Example

Always use --json for scriptable output. Without it, human-friendly messages go to stderr and can confuse parsing.

# 1. Create session
mcpheroctl wizard create-session --json
# → {"server_id": "abc-123-..."}
SERVER_ID="abc-123-..."

# 2. Describe requirements (iterate until is_ready: true)
mcpheroctl wizard conversation $SERVER_ID --json \
  -m "I have a PostgreSQL database with customers and orders tables. I need tools to find customers by name, fetch orders for a customer, and get last hour's orders."
# Repeat with follow-up messages until output shows: "is_ready": true

# 3. Start tool suggestion (async)
mcpheroctl wizard start $SERVER_ID --json
# → {"status": "processing"}

# Poll until processing is done (check processing_status, not setup_status)
until mcpheroctl wizard state $SERVER_ID --json 2>/dev/null | \
  python3 -c "import sys,json; exit(0 if json.load(sys.stdin).get('processing_status')=='idle' else 1)"; do
  sleep 3
done

# 4. Review tools (state should be "tools_selection")
mcpheroctl wizard list-tools $SERVER_ID --json

# 5. Refine if needed (async → poll again)
mcpheroctl wizard refine-tools $SERVER_ID --json \
  -f "Add error handling for missing customers. Rename get_customers_orders to get_orders_by_customer."

# 6. Submit selected tool IDs
mcpheroctl wizard submit-tools $SERVER_ID --json \
  --tool-id \x3Ctool-uuid-1> \
  --tool-id \x3Ctool-uuid-2> \
  --tool-id \x3Ctool-uuid-3>

# 7. Wait for env var suggestion (auto-triggered, state becomes "env_vars_setup")
until mcpheroctl wizard state $SERVER_ID --json 2>/dev/null | \
  python3 -c "import sys,json; exit(0 if json.load(sys.stdin).get('processing_status')=='idle' else 1)"; do
  sleep 3
done

# 8. Review env vars
mcpheroctl wizard list-env-vars $SERVER_ID --json

# 9. Submit env var values (format: VAR_UUID=VALUE)
# ALWAYS call this even if list-env-vars returned [] — backend needs it to transition.
# With env vars:
mcpheroctl wizard submit-env-vars $SERVER_ID --json \
  --var "\x3Cenv-var-uuid-1>=localhost" \
  --var "\x3Cenv-var-uuid-2>=5432"
# Without env vars (empty list):
mcpheroctl wizard submit-env-vars $SERVER_ID --json

# 10. Set authentication
mcpheroctl wizard set-auth $SERVER_ID --json
# → {"bearer_token": "..."}  ← SAVE THIS

# 11. Generate code (async → poll)
mcpheroctl wizard generate-code $SERVER_ID --json
until mcpheroctl wizard state $SERVER_ID --json 2>/dev/null | \
  python3 -c "import sys,json; exit(0 if json.load(sys.stdin).get('processing_status')=='idle' else 1)"; do
  sleep 3
done

# 12. Deploy
mcpheroctl wizard deploy $SERVER_ID --json
# → {"server_url": "/mcp/\x3Cserver-id>/mcp", "bearer_token": "...", "step": "complete"}

IMPORTANT: deploy returns a relative server_url like /mcp/\x3Cid>/mcp. Prepend the base domain to get the full URL:

https://api.mcphero.app/mcp/\x3Cserver-id>/mcp

Server Management

mcpheroctl server list --json [CUSTOMER_ID]  # List all servers
mcpheroctl server get SERVER_ID --json       # Get server details + status
mcpheroctl server update SERVER_ID           # Update name/description
mcpheroctl server delete SERVER_ID --yes     # Delete (irreversible)
mcpheroctl server api-key SERVER_ID --json   # Retrieve bearer token

Polling Pattern

The reliable way to poll is to check processing_status, not setup_status:

until mcpheroctl wizard state $SERVER_ID --json 2>/dev/null | \
  python3 -c "import sys,json; exit(0 if json.load(sys.stdin).get('processing_status')=='idle' else 1)"; do
  sleep 3
done

Connecting a Deployed Server to MCP Clients

After deploy, construct the full server URL:

https://api.mcphero.app{server_url}

Claude Desktop config

{
  "mcpServers": {
    "my-server": {
      "url": "https://api.mcphero.app/mcp/\x3Cserver-id>/mcp",
      "headers": {
        "Authorization": "Bearer \x3Cbearer_token>"
      }
    }
  }
}

Config file locations:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/claude/claude_desktop_config.json

Key Tips

Free tier: Max 5 tools per server. wizard_submit_tools will error if more are selected.

server_id is everything: Save the UUID returned from create_session. Every subsequent call needs it.

Env var format in CLI: --var "UUID=VALUE" — the UUID is the env var's id from list-env-vars, not its name.

Empty env vars: Even if list-env-vars returns [], you must still call submit-env-vars (with no vars) so the backend transitions to the next state.

Regenerate without redeploy: After using wizard_regenerate_tool_code, the code change takes effect immediately for already-deployed servers (the server auto-remounts).

Always use --json: In CLI commands, --json sends structured data to stdout. Without it, human-friendly messages go to stderr and can break piping/parsing.


Exit Codes

Code Meaning
0 Success
1 General failure
2 Usage/argument error
3 Resource not found
4 Not authenticated
5 Conflict
安全使用建议
This skill appears to do what it claims (it walks you through using mcpheroctl to create and deploy MCPHero servers). The key risk is data/credential exposure: the wizard will ask you to submit environment variables and bearer tokens that the MCPHero backend will store and use. Before using it: 1) confirm you trust mcphero.app and understand where secrets are stored and how they are protected; 2) prefer short‑lived or least‑privilege credentials (service accounts with minimal scope) rather than full production tokens; 3) test in a non‑production environment first; 4) if the skill or your workflow instructs you to edit local client configs (e.g., Claude Desktop), back up existing config files first; and 5) rotate or revoke any credentials you provide if you stop using the deployed server. If you need stronger assurance, ask for documentation from the MCPHero provider about secret handling or consider self‑hosting alternatives that keep credentials inside your network.
功能分析
Type: OpenClaw Skill Name: create-mcp-server Version: 1.0.0 The skill bundle provides instructions for an AI agent to manage the lifecycle of MCP servers using the `mcpheroctl` CLI and the `mcphero.app` platform. It involves high-risk behaviors including the installation of third-party software, execution of shell commands for automation, and the handling of sensitive API tokens and environment variables. While these actions are aligned with the stated purpose of server deployment and management in `SKILL.md`, the reliance on external network resources and shell-based execution environments constitutes a significant attack surface without further verification of the external tools.
能力评估
Purpose & Capability
The name/description match the SKILL.md: it documents an end‑to‑end mcpheroctl wizard workflow to create, configure, and deploy MCP servers. There are no unexpected credential requests, unrelated binaries, or unrelated install steps declared.
Instruction Scope
Instructions stay within the stated purpose (run mcpheroctl wizard commands, poll wizard state, submit tools/env vars, save bearer token, deploy). The skill explicitly tells the operator to submit environment variable values and to save/use the returned bearer token (and the evals indicate guidance to edit local client config like Claude Desktop). This is expected for the use case, but it means the agent/operator will be placing secrets into the MCPHero backend and potentially writing local config files — be deliberate and explicit with those steps.
Install Mechanism
This is instruction‑only and has no install spec. It suggests installing mcpheroctl via Homebrew or 'uv tool install', which are standard distribution mechanisms for CLI tools. No arbitrary URL downloads or archive extraction are instructed by the skill itself.
Credentials
Although the skill declares no required environment variables (it's instruction-only), its workflow requires you to provide environment variable values and bearer tokens to MCPHero (database credentials, API bearer tokens, etc.) during the wizard. That is functionally necessary for wrapping internal services, but it is a sensitive operation: you will be transmitting secrets to mcphero.app and storing them there. The skill does not document least‑privilege recommendations, token scopes, or secret handling/rotation — consider this before supplying production credentials.
Persistence & Privilege
The skill does not request always:true and is user‑invocable only. It does not attempt to modify other skills or system settings beyond instructing the user to save tokens or update a client config (which is within its scope). Autonomous invocation is allowed (platform default) but not combined with any unusual privileges.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install create-mcp-server
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /create-mcp-server 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
create-mcp-server 1.0.0 - Initial release. - Provides step-by-step guidance for creating, deploying, and managing MCP servers using the MCPHero platform and mcpheroctl CLI. - Includes workflow instructions, polling patterns, and troubleshooting tips. - Covers integration with MCP clients such as Claude Desktop. - Details server management via mcpheroctl commands.
元数据
Slug create-mcp-server
版本 1.0.0
许可证 MIT-0
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Create MCP Server 是什么?

Create, deploy, and manage MCP (Model Context Protocol) servers using the MCPHero platform via the mcpheroctl CLI. Use this skill when the user wants to buil... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 113 次。

如何安装 Create MCP Server?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install create-mcp-server」即可一键安装,无需额外配置。

Create MCP Server 是免费的吗?

是的,Create MCP Server 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。

Create MCP Server 支持哪些平台?

Create MCP Server 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。

谁开发了 Create MCP Server?

由 arterialist(@arterialist)开发并维护,当前版本 v1.0.0。

💬 留言讨论