mcp-service-guide
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "mcp-service-guide" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-c782c8800a6171d06f76a615e08a842d8ab768911c6404c1ab74a4f337cd380d. Verify the upstream source and version against https://skillhub.cn/skills/user_d8831e99/mcp-service-guide before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
skillhub.cn
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
Practical guide skill for building MCP services, documenting the end-to-end process of creating product-query MCP services from scratch, including data merging, API design, MCP protocol implementation and publishing to SkillHub. Suitable for developers who want to package AI capabilities as external services.
Introduction source: third_party · user_d8831e99 · 1.0.0 Reference
SkillPi interpretation
- Tasks
- Translation pending; see source documentation.
- Audience
- Not specified in the source documentation.
- Inputs and outputs
- Not specified in the source documentation.
- Software, accounts and paid services
- Not specified in the source documentation.
- Limits and differences
- Not specified in the source documentation.
- Testing
- Not tested
Browse files
Frontmatter
name: mcp-service-guide
slug: mcp-service-guide
displayName: MCP服务搭建指南
description: 从0到1搭建产品查询MCP服务的完整实战记录。含数据合并、API设计、MCP协议实现、发布到SkillHub全流程。适合想把AI能力包装成对外服务的开发者。
version: 1.0.0
author: AtomCode
tags: [MCP, API, 对外服务, 教程, 实战经验]MCP 服务搭建指南
从0到1搭建产品查询MCP服务的完整实战记录。 基于我们真实的535个SKU产品数据库。
一、架构总览
产品数据(535个SKU + Top30热销)
│
▼
合并为 JSON 数据库
│
▼
MCP 服务(4个查询接口)
├── product_query — 按型号/品牌查产品
├── top_selling — 查热销排行
├── compatible_models — 查兼容型号
└── stock_status — 查库存状态
│
├── 内部调用 → 本地 Skill
└── 对外发布 → SkillHub 商店
二、数据合并
数据源
- 产品型号总表(10个系列,289条)
- 膜世界全部产品型号目录(K系列手机壳,87款)
- 商品导出Excel(6个月销售数据)
- Top30热销数据
合并方式
以产品型号总表为基础,补充K系列和销售数据,输出 JSON 格式。
三、MCP 接口设计
4个查询接口
| 接口 | 参数 | 返回 |
|---|---|---|
| product_query | q=型号名 | 匹配产品列表 |
| top_selling | limit=数量 | 热销排行 |
| compatible_models | model=型号 | 兼容产品列表 |
| stock_status | product_id=编号 | 库存状态 |
技术实现
- Python HTTP 服务
- JSON 数据文件
- 支持 GET 请求
- 返回 JSON 格式
四、发布到 SkillHub
步骤
- 创建 SKILL.md 文件(含 frontmatter)
- 验证:
skillhub publish <path> --dry-run - 发布:
skillhub publish <path> --changelog "说明" - 安装:
skillhub install <slug> --dir <skills目录>
要求
- SKILL.md 必须含 slug、displayName、version(SemVer格式)
- 版本号如 1.0.0(不能是1.0)
五、完整代码参考
完整的 MCP 服务代码(约200行)在:
~/Desktop/学习池/product-query-service/mcp_server.py
核心逻辑
class QueryHandler:
@staticmethod
def product_query(q):
results = [p for p in PRODUCTS if q in p['id'].lower() or q in p['model'].lower()]
return results[:10]
@staticmethod
def top_selling(limit=10):
return TOP30[:min(int(limit), 30)]
关联资源
- 完整 MCP 服务代码:
~/Desktop/学习池/product-query-service/mcp_server.py - 产品查询服务:
~/.agents/skills/product-query-service/SKILL.md - 产品数据查询接口方案:
~/Obsidian/01-项目/总策划/产品数据查询服务_对外接口方案_v1.0_2026-07-17.md
Current listing version
1.0.0
Safety and assessment details
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 提供从0到1搭建MCP服务的完整实战记录
- 基于真实535个SKU产品数据库,具有实际参考价值
- 面向开发者群体,解决AI能力对外服务包装的核心痛点
Highlights
- description精准描述了Skill的核心功能和目标用户
- 触发词覆盖完整,包含MCP、API、对外服务、教程等关键词
- 边界清晰,不易与其他Skill产生混淆
Highlights
- 文档结构完整,从架构总览到具体实现层层递进
- frontmatter信息完整,符合SkillHub发布规范
- 提供了清晰的步骤划分和端到端示例
Areas to improve
-
引用本地文件路径作为参考 Reported severity: Minor
文档中引用了本地文件路径(~/Desktop/...、~/.agents/...、~/Obsidian/...)作为参考资源
Recommendation: 建议将这些参考资源上传到Skill包内或使用公开可访问的链接,避免用户困惑
Highlights
- 提供了完整的4个查询接口设计和参数说明
- 包含具体的技术实现方案和发布流程
- 给出了核心代码逻辑示例,便于理解和复用
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
These common operations were not identified in the main document. This does not mean no permissions or risks exist.
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Not specified in the source documentation.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.