MCP Hello World
name: mcp-hello-world
by crystaria · published 2026-03-22
$ claw add gh:crystaria/crystaria-mcp-hello-world---
name: mcp-hello-world
description: 最小可行 MCP 服务器示例 - 在 OpenClaw 中调用 MCP 工具(add 计算 + hello_world 问候)
homepage: https://clawhub.ai/skills/mcp-hello-world
tags: [mcp, tool-server, hello-world, demo, beginner-friendly]
metadata:
{
"openclaw":
{
"emoji": "🔧",
"requires": { "bins": ["node"] },
"install":
[
{
"id": "npm",
"kind": "npm",
"package": "mcp-hello-world",
"path": ".",
"label": "安装 MCP Hello World 服务器",
},
],
},
}
---
# MCP Hello World
**Version:** 1.0.2 · 标签与链接优化版
**Author:** 小爪 🦞
**License:** MIT
**Tags:** #mcp #tool-server #hello-world #demo #beginner-friendly
最小可行的 MCP 服务器示例,用于演示如何在 OpenClaw 中以 Skill 形式调用 MCP 工具。
功能特性
🎯 这个技能能帮你做什么?
快速开始
1. 安装 Skill
clawhub install mcp-hello-world或手动安装:
cd /path/to/skill
npm install2. 启动服务器
npm start3. 在 OpenClaw 中调用
通过 mcporter CLI:
# 列出工具
mcporter list --stdio "npm start"
# 调用 add 工具
mcporter call --stdio "npm start" add a:10 b:20
# 调用 hello_world 工具
mcporter call --stdio "npm start" hello_world name:"朋友"工具说明
add
两数相加工具。
**参数:**
**示例:**
mcporter call --stdio "npm start" add a:5 b:7
# 输出:5 + 7 = 12hello_world
问候语工具,返回个性化问候。
**参数:**
**示例:**
mcporter call --stdio "npm start" hello_world name:"老板"
# 输出:你好,老板!👋 欢迎使用 MCP Hello World 服务器!开发指南
添加新工具
编辑 `src/server.js`:
server.tool(
"new_tool",
"工具描述",
{
param: z.string().describe("参数描述")
},
async ({ param }) => {
return {
content: [{ type: "text", text: `结果:${param}` }]
};
}
);运行测试
npm test技术栈
常见问题
Q: 这个技能对我来说有什么用?
A: 它本身是一个最小可行的示例,但它的价值远不止于此:
Q: 服务器无法启动?
A: 确保已安装依赖:`npm install`
Q: 工具调用失败?
A: 检查参数格式,确保符合 JSON Schema
Q: 如何在 OpenClaw 中集成?
A: 使用 mcporter 的 stdio 模式连接服务器
更新日志
v1.0.2 (2026-03-17)
v1.0.1 (2026-03-17)
v1.0.0 (2026-03-17)
许可证
MIT License
---
**作者:** 小爪 🦞
**GitHub:** (仓库筹备中,敬请期待)
**ClawHub:** mcp-hello-world
More tools from the same signal band
Order food/drinks (点餐) on an Android device paired as an OpenClaw node. Uses in-app menu and cart; add goods, view cart, submit order (demo, no real payment).
Sign plugins, rotate agent credentials without losing identity, and publicly attest to plugin behavior with verifiable claims and authenticated transfers.
The philosophical layer for AI agents. Maps behavior to Spinoza's 48 affects, calculates persistence scores, and generates geometric self-reports. Give your...