Skip to main content
Glama

English Version: README_en.md

MCP Skills Server

基于 Model Context Protocol (MCP) 的技能管理服务器,提供技能的发现、展示和调用功能。

功能特性

  • 📚 list_skills - 展示所有可用技能的描述信息

  • 🔧 use_skill - 调用指定技能并返回详细使用方法

Related MCP server: skills-mcp

安装

使用 uv 管理虚拟环境和依赖:

# 安装依赖(如果尚未安装)
uv sync

配置

在 MCP 客户端中配置

将以下配置添加到你的 MCP 客户端配置文件中(如 Claude Desktop 配置):

Windows 配置:

{
  "mcpServers": {
    "skills": {
      "command": "uv",
      "args": ["--directory", "<PROJECT_PATH>", "run", "python", "server.py"],
      "cwd": "<PROJECT_PATH>"
    }
  }
}

或使用已激活的虚拟环境:

{
  "mcpServers": {
    "skills": {
      "command": "<PROJECT_PATH>/.venv/Scripts/python",
      "args": ["<PROJECT_PATH>/server.py"]
    }
  }
}

Unix/Mac 配置:

{
  "mcpServers": {
    "skills": {
      "command": "uv",
      "args": ["--directory", "<PROJECT_PATH>", "run", "python", "server.py"]
    }
  }
}

注意: 将 <PROJECT_PATH> 替换为实际的项目路径。

安全说明

  • 技能名称仅允许字母、数字、连字符(-)和下划线(_)

  • 自动阻止路径遍历攻击(如 ../ 等)

  • 错误信息经过处理,不会泄露内部路径

使用方法

工具 1: list_skills

列出所有可用技能的基本信息。

调用示例:

list_skills()

返回内容:

  • 技能名称

  • 技能描述

  • 技能主页

  • 使用场景简介

工具 2: use_skill

调用指定技能,获取详细的使用说明。

参数:

  • skill_name (必需): 技能名称,如 "weather"

  • return_path (可选): 是否返回技能目录的绝对路径,默认 false。当技能包含 Python 脚本或其他可执行文件时,设置为 true 以获取路径信息。

调用示例:

use_skill(skill_name="weather")
use_skill(skill_name="weather", return_path=true)  // 返回技能目录路径,用于执行脚本

返回内容:

  • 完整的 SKILL.md 文件内容

  • 当 return_path=true 时,额外返回:

    • 技能目录的绝对路径

    • SKILL.md 文件的完整路径

技能目录结构

skills/
└── weather/
    └── SKILL.md

每个技能是一个独立的文件夹,包含一个 SKILL.md 文件。

SKILL.md 标准格式

---
name: skill_name
description: "技能的简短描述"
homepage: https://example.com
metadata:
  openclaw:
    emoji: "🔧"
    requires:
      bins: ["command1", "command2"]
---

# Skill Title

## When to Use

✅ 使用场景列表

## Commands

```bash
# 命令示例
command --option value

Notes

  • 注意事项


## 运行和测试

### 使用 uv 运行

```bash
# 直接运行 MCP 服务器
uv run python server.py

# 或者使用项目脚本入口
uv run skills-mcp

测试解析器

uv run python skill_parser.py

添加新技能

  1. 在 skills 目录下创建新文件夹

  2. 按照标准格式创建 SKILL.md 文件

  3. 重启 MCP 服务器

示例:

mkdir skills/my-new-skill

然后创建 skills/my-new-skill/SKILL.md 文件。

技术架构

  • MCP Protocol: 遵循 Model Context Protocol 规范

  • JSON-RPC 2.0: 通信协议

  • Python 3.12+: 运行环境

  • uv: 包管理和虚拟环境管理

  • PyYAML: 解析 Frontmatter 元数据

项目结构

use-skills-mcp/
├── pyproject.toml      # 项目配置和依赖
├── server.py           # MCP 服务器主入口
├── skill_parser.py     # 技能文件解析器
├── README.md           # 使用说明
├── skills/             # 技能目录
│   └── weather/
│       └── SKILL.md
└── .venv/              # uv 管理的虚拟环境

许可证

MIT

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Converts AI Skills (following Claude Skills format) into MCP server resources, enabling LLM applications to discover, access, and utilize self-contained skill directories through the Model Context Protocol. Provides tools to list available skills, retrieve skill details and content, and read supporting files with security protections.
      3
      30
      Apache 2.0
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables MCP-compatible harnesses to load and invoke Claude Code style skills from SKILL.md folders, including listing and reading skill files with user-approval gating for model-invocation restrictions.
      GPL 2.0
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables MCP clients to discover, search, and load agent skills from many sources, including other agents' skill directories, Claude Code plugin marketplaces, and remote git repositories, with no copying or syncing required.
      806 npm
      7
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables on-demand discovery and loading of locally registered skills through read-only MCP tools, respecting explicit-invocation policies and returning skill instructions with paths to scripts, templates, and references.
      MIT