MCP Skills Server

io.github.srprasanna由 GitHub 账号 srprasanna 发布v1.0.0更新于 Oct 24, 2026

MCP server that loads and serves skills from a mounted directory with hot reload.

已验证STDIO仅桌面知识与记忆

概览

AI 生成的概览

从本地挂载目录加载 SKILL.md 技能文件,让助手搜索、读取并应用这些技能,并支持热重载。

可以做什么
搜索技能:按关键词、分类、标签或难度查找匹配的技能。
适用场景
当你已有一批以 SKILL.md 编写的个人或团队技能文档,希望助手按需搜索、读取并应用时;或希望在编辑技能文件后无需重启服务器即可生效时。
运行要求
需在本机以 Docker 容器或 Python 3.13 与 Poetry 运行;用 MCP_SKILLS_DIR 指定技能根目录,技能须各自放在独立文件夹并含 SKILL.md。可选 MCP_SKILLS_HOT_RELOAD 与 MCP_SKILLS_LOG_LEVEL 调整行为。
安装前请注意
服务器会读取 MCP_SKILLS_DIR 指向的整个目录,请避免把含机密或私人文件的文件夹设为技能目录;技能内容会提供给连接的助手,编写时勿放入敏感信息。

安装

在 SourceWeft 中

  1. 打开 控制台中的 MCP Skills Server,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

MCP Skills Server

[Python 3.13+] [Poetry] [License: MIT] [MCP Registry] [Docker] [Docker Pulls]

A production-ready Model Context Protocol (MCP) server that dynamically loads and exposes skills from a mounted volume with hot-reloading support.

📦 Available on MCP Registry - Install with one command!

Features

  • Dynamic Skill Loading: Automatically discovers and loads skills from a directory
  • Hot-Reloading: Detects changes to SKILL.md files and reloads without restart
  • Folder Structure Validation: Enforces best practices with clear error messages
  • MCP Protocol Compliant: Full implementation of resources and tools
  • Production Ready: Comprehensive error handling, logging, and validation
  • Docker Support: Run in containers with volume mounting
  • Type Safe: Full type hints using Python 3.13 features
  • Well Tested: >80% code coverage with comprehensive test suite

Table of Contents

Skills Directory Structure

CRITICAL REQUIREMENT: Each skill MUST be in its own dedicated folder within the skills directory. The server will ONLY recognize skills that follow this structure.

✅ Valid Structure

your-skills-directory/├── skill-one/│   └── SKILL.md          ← Required├── skill-two/│   ├── SKILL.md          ← Required│   └── examples/         ← Optional│       └── example.py└── skill-three/    ├── SKILL.md    ├── examples/    │   └── demo.py    └── templates/        └── template.txt

❌ Invalid Structures (Will Be Ignored)

your-skills-directory/├── SKILL.md                  ❌ Not in a folder - WILL BE SKIPPED├── random-file.txt           ❌ Not a skill folder├── .hidden-folder/           ❌ Hidden folder - WILL BE SKIPPED│   └── SKILL.md└── __pycache__/              ❌ System folder - WILL BE SKIPPED    └── SKILL.md

Folder Naming Conventions

Valid folder names:

  • Lowercase with hyphens: my-skill-name
  • Lowercase with underscores: excel_advanced
  • Alphanumeric: skill-name-v2

Invalid (will be skipped):

  • Hidden folders starting with .
  • Private folders starting with _
  • System folders: __pycache__, node_modules, .git, etc.

Quick Start

Using Docker (Recommended)

  1. Create your skills directory:
bash
mkdir -p ~/claude-skills/my-first-skill
  1. Create a skill file:
bash
cat > ~/claude-skills/my-first-skill/SKILL.md << 'EOF'---name: "my-first-skill"description: "My first Claude skill"---
# My First Skill
This is my first skill for Claude!
## Usage
Simply describe what your skill does here.EOF
  1. Run the server:
bash
docker run -i --rm \  -v ~/claude-skills:/skills:ro \  mcp-skill-hub

Using Poetry (Development)

  1. Clone and install:
bash
git clone https://github.com/srprasanna/mcp-skill-hub.gitcd mcp-skill-hubpoetry install
  1. Create your skills directory:
bash
mkdir -p ~/claude-skills/my-first-skill# Create SKILL.md as shown above
  1. Run the server:
bash
export MCP_SKILLS_DIR=~/claude-skillspoetry run mcp-skills

Installation

Prerequisites

  • Python 3.13+ (for development)
  • Poetry 1.7+ (for dependency management)
  • Docker (optional, for containerized deployment)

Install with Poetry

bash
# Clone the repositorygit clone https://github.com/srprasanna/mcp-skill-hub.gitcd mcp-skill-hub
# Install dependenciespoetry install
# Verify installationpoetry run mcp-skills --help

Build Docker Image

bash
# Build the imagedocker build -t mcp-skill-hub .
# Or use docker-composedocker-compose build

Usage

Running Locally

bash
# Set the skills directoryexport MCP_SKILLS_DIR=/path/to/your/skills
# Run the serverpoetry run mcp-skills

Running with Docker

bash
docker run -i --rm \  -v /path/to/your/skills:/skills:ro \  -e MCP_SKILLS_LOG_LEVEL=INFO \  mcp-skill-hub

Running with Docker Compose

bash
# Edit docker-compose.yml to set your skills directory pathdocker-compose up mcp-skills

Integrating with Claude Desktop

Add to your Claude Desktop configuration (claude_desktop_config.json):

json
{  "mcpServers": {    "skills": {      "command": "docker",      "args": [        "run",        "-i",        "--rm",        "-v",        "${HOME}/claude-skills:/skills:ro",        "mcp-skill-hub"      ]    }  }}

Or using Poetry:

json
{  "mcpServers": {    "skills": {      "command": "poetry",      "args": ["run", "mcp-skills"],      "cwd": "/path/to/mcp-skill-hub",      "env": {        "MCP_SKILLS_DIR": "/path/to/your/skills"      }    }  }}

Important: Make sure your ${HOME}/claude-skills directory contains skill folders, not loose SKILL.md files!

Configuration

Configuration is done via environment variables with the prefix MCP_SKILLS_:

VariableDefaultDescription
MCP_SKILLS_DIR/skillsRoot directory containing skill folders
MCP_SKILLS_HOT_RELOADtrueEnable automatic reloading
MCP_SKILLS_DEBOUNCE_DELAY0.5Delay (seconds) before reload
MCP_SKILLS_LOG_LEVELINFOLog level (DEBUG, INFO, WARNING, ERROR)
MCP_SKILLS_SCAN_DEPTH1Scan depth (always 1)

Example .env File

bash
MCP_SKILLS_DIR=/path/to/skillsMCP_SKILLS_HOT_RELOAD=trueMCP_SKILLS_DEBOUNCE_DELAY=0.5MCP_SKILLS_LOG_LEVEL=INFO

Skill File Format

Skills are defined in SKILL.md files with YAML frontmatter:

Minimal Example

markdown
---name: "my-skill"description: "Brief description"---
# My Skill
Your skill content here in Markdown.

Complete Example

markdown
---# Required fieldsname: "excel-advanced"description: "Advanced Excel automation techniques"
# Version and authorshipversion: "1.2.0"author: "Your Name"created: "2025-01-15"updated: "2025-10-23"
# Dependenciesdependencies:  python: ["openpyxl>=3.0.0", "pandas>=2.0.0"]  system: ["libreoffice"]
# Categorizationcategory: "office-automation"tags: ["excel", "spreadsheet", "automation"]complexity: "intermediate"  # beginner|intermediate|advanced
# Usage guidancewhen_to_use:  - "Automating Excel report generation"  - "Processing multiple Excel files"  - "Creating complex formulas programmatically"
# Relationshipsrelated_skills: ["csv-processing", "data-analysis"]
# Exampleshas_examples: trueexample_files: ["examples/report_generator.py", "templates/report_template.xlsx"]---
# Excel Advanced Automation
This skill covers advanced Excel automation techniques...
## Features
- Automated report generation- Formula creation- Bulk processing
## Examples
See `examples/report_generator.py` for a working example.

Available Metadata Fields

Required:

  • name: Unique identifier (kebab-case recommended)
  • description: Brief description

Optional:

  • version: Semantic version
  • author: Creator name
  • created, updated: ISO dates (YYYY-MM-DD)
  • dependencies: Python packages or system tools
  • category: Main category for grouping
  • tags: Array of tags for search
  • complexity: beginner, intermediate, or advanced
  • when_to_use: Array of usage scenarios
  • related_skills: Names of related skills
  • has_examples: Boolean flag
  • example_files: Paths to example files (relative to skill folder)

MCP Resources and Tools

Resources

The server exposes these MCP resources:

  1. skill://catalog - JSON catalog of all skills with metadata
  2. skill://{name} - Individual skill markdown content

Tools

Four tools are available for interacting with skills:

1. search_skills

Search for skills by query, category, tag, or complexity.

json
{  "query": "excel",  "category": "office-automation",  "tag": "automation",  "complexity": "intermediate"}
2. reload_skills

Manually trigger a reload of all skills from the directory.

json
{}
3. get_skill_info

Get metadata for a specific skill without loading full content.

json
{  "name": "excel-advanced"}
4. list_skill_folders

List all valid skill folders found in the skills directory.

json
{}

Development

Setup Development Environment

bash
# Clone repositorygit clone https://github.com/srprasanna/mcp-skill-hub.gitcd mcp-skill-hub
# Install dependencies (including dev dependencies)poetry install
# Activate virtual environmentpoetry shell

Running Tests

bash
# Run all testspoetry run pytest
# Run with coveragepoetry run pytest --cov=mcp_skills --cov-report=html
# Run specific test filepoetry run pytest tests/test_scanner.py
# Run with verbose outputpoetry run pytest -v

Code Quality

bash
# Format codepoetry run black .
# Lint codepoetry run ruff check .
# Type checkingpoetry run mypy src
# Run all quality checkspoetry run black . && poetry run ruff check . && poetry run mypy src

Development Workflow

  1. Create a branch:

    bash
    git checkout -b feature/my-feature
  2. Make changes and test:

    bash
    poetry run pytestpoetry run mypy src
  3. Format and lint:

    bash
    poetry run black .poetry run ruff check .
  4. Commit and push:

    bash
    git commit -m "Add feature: description"git push origin feature/my-feature

Project Structure

mcp-skill-hub/├── src/mcp_skills/          # Source code│   ├── models/              # Data models│   ├── parsers/             # Skill parsers│   ├── storage/             # Repository pattern│   ├── scanner.py           # Directory scanning│   ├── watcher.py           # Hot-reload watcher│   ├── server.py            # MCP server│   ├── config.py            # Configuration│   └── __main__.py          # CLI entry point├── tests/                   # Test suite├── examples/                # Example skills├── docs/                    # Documentation└── pyproject.toml           # Poetry configuration

Troubleshooting

Common Issues

Skills Not Loading

Problem: No skills are loaded when the server starts.

Solution:

  1. Check that your skills are in dedicated folders:
    /skills/my-skill/SKILL.md  ✓/skills/SKILL.md           ✗
  2. Verify folder names don't start with . or _
  3. Check logs for detailed error messages
Hot-Reload Not Working

Problem: Changes to SKILL.md files aren't detected.

Solution:

  1. Ensure MCP_SKILLS_HOT_RELOAD=true
  2. Check file is named exactly SKILL.md
  3. Verify file is in a valid skill folder
  4. Look for file watcher errors in logs
Parsing Errors

Problem: SKILL.md files fail to parse.

Solution:

  1. Validate YAML frontmatter syntax
  2. Ensure frontmatter is between --- delimiters
  3. Check required fields (name, description) are present
  4. Use a YAML validator to check syntax

Validation Command

Check your skills directory structure:

bash
poetry run mcp-skills --validate

Expected output:

✓ /skills/excel-advanced: Valid skill✓ /skills/python-automation: Valid skill✗ /skills/SKILL.md: Error - Skills must be in folders✗ /skills/.hidden: Skipped - Hidden folder⚠ /skills/empty-folder: Warning - No SKILL.md found
Summary: 2 valid, 1 error, 1 warning, 1 skipped

Logging

Enable debug logging for detailed information:

bash
export MCP_SKILLS_LOG_LEVEL=DEBUGpoetry run mcp-skills

Logs include:

  • Folder structure validation messages
  • Scan progress and results
  • Parse successes and failures
  • Hot-reload events
  • Detailed error context

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines.

Quick Contributing Guide

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes with tests
  4. Ensure all tests pass and code is formatted
  5. Submit a pull request

Code Standards

  • Python 3.13+ with type hints
  • Black for formatting (88 char line length)
  • Ruff for linting
  • Mypy for type checking (strict mode)
  • Pytest for testing (>80% coverage)

Releases

This project uses automated releases via GitHub Actions.

Creating a Release

  1. Go to Actions → Release workflow
  2. Click Run workflow
  3. Choose version bump type:
    • patch - Bug fixes (0.1.0 → 0.1.1)
    • minor - New features (0.1.0 → 0.2.0)
    • major - Breaking changes (0.1.0 → 1.0.0)
    • Or specify exact version (e.g., 1.2.3)
  4. Select Docker registry (docker.io or ghcr.io)
  5. Click Run workflow

The workflow will:

  • ✅ Bump version in pyproject.toml
  • ✅ Create Git tag and GitHub release
  • ✅ Build and push Docker image
  • ✅ Run tests to verify release

Docker Images:

  • Docker Hub: {username}/mcp-skill-hub:{version}
  • GitHub: ghcr.io/{owner}/mcp-skill-hub:{version}

See RELEASING.md for detailed release documentation.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • Built with MCP Python SDK
  • Inspired by the need for dynamic skill management in Claude
  • Thanks to all contributors!

Note: This server makes it impossible to misunderstand the folder structure requirement through:

  • Clear error messages with folder context
  • Comprehensive logging
  • Validation at multiple levels
  • Detailed documentation
  • Working examples

Each skill MUST be in its own folder. This design decision ensures clean organization, easy management, and unambiguous structure. 🎯

来源:README.md,提交 09b22be

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

1
  1. v1.0.0最新Sep 16, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分