Skip to main content
Glama

skills-mcp-server

一个高性能的 MCP (Model Context Protocol) 服务器,通过 BM25 排序搜索、结构化元数据和上下文高效响应,提供 1300 多种 AI 技能的目录访问。

旨在解决一个核心问题:数以千计的技能会耗尽你的上下文窗口。该服务器对它们进行索引、排序,并仅提供你所需要的内容。

┌────────────────────────────────────────────────────────────┐
│  IDE / AI Client                                           │
│  (Claude, Cursor, Gemini, Copilot, Windsurf, ...)         │
│                                                            │
│  "find me a skill for React dashboards"                    │
└──────────────────────┬─────────────────────────────────────┘
                       │ MCP Protocol
                       ▼
┌────────────────────────────────────────────────────────────┐
│  skills-mcp-server                                         │
│                                                            │
│  ┌──────────┐  ┌──────────┐  ┌──────────┐                │
│  │ Indexer   │  │ BM25     │  │ 6 MCP    │                │
│  │ 1300+    │──│ Search   │──│ Tools    │                │
│  │ skills   │  │ Engine   │  │          │                │
│  └──────────┘  └──────────┘  └──────────┘                │
│                                                            │
│  Transports: stdio | HTTP/SSE | AWS Lambda                 │
└────────────────────────────────────────────────────────────┘

特性

  • BM25 排序搜索 — 不仅仅是关键词匹配。基于字段权重的真实相关性评分(名称 3 倍,描述 2 倍,标签 2 倍,正文 1 倍)

  • 上下文高效 — 读取技能元数据(约 500 字符)、摘要(约 2K 字符)或完整内容(上限 25K 字符)。你可以控制消耗多少上下文

  • 结构化元数据 — 解析为类型化字段的 YAML 前置元数据:名称、描述、标签、类别、风险、作者、工具

  • 全方位分页 — 每个列表/搜索工具都支持 offsetlimit

  • 3 种传输模式 — 用于本地 IDE 的 stdio,用于远程访问的 HTTP/SSE,以及用于无服务器架构的 AWS Lambda

  • 快速启动 — 1300 多种技能在约 1.5 秒内完成索引。内存占用约 3MB(相比原始的 65MB)

  • 6 种专用工具 — 浏览、列出、搜索、读取、检查、刷新


快速开始

前置要求

  • Node.js 18+

  • 包含 SKILL.md 文件的 skills/ 目录(参见 技能格式

安装与构建

git clone https://github.com/LucasRomanzin/skills-mcp-server.git
cd skills-mcp-server
npm install
npm run build

本地运行 (stdio)

node dist/index.js

作为 HTTP 服务器运行 (SSE)

node dist/http.js
# Server starts on http://localhost:3000
# MCP endpoint: http://localhost:3000/mcp
# Health check: http://localhost:3000/health

MCP 工具

skills_browse_categories

列出所有技能类别及其数量。优先使用此工具。

Input:  { response_format?: "markdown" | "json" }
Output: Table with 9 categories and skill counts

跨名称、描述、标签和内容的 BM25 排序全文搜索。

Input:  { query: string, category?: string, risk?: string, offset?: 0, limit?: 10 }
Output: Ranked results with name, description, category, tags, score

skills_list_by_category

按类别列出技能,支持分页。

Input:  { category: string, offset?: 0, limit?: 20 }
Output: Paginated skill list with metadata

skills_read

在上下文控制下读取技能内容。

Input:  { slug: string, section?: "metadata" | "summary" | "full", file?: string }

section="metadata"  →  ~500 chars   (frontmatter fields + file list)
section="summary"   →  ~2500 chars  (metadata + first 2000 chars of body)
section="full"      →  up to 25000 chars (complete content, truncated if larger)

skills_inspect

获取多个技能的结构化元数据,以及通过标签重叠关联的技能。

Input:  { slugs: string[] (1-10), response_format?: "json" }
Output: Metadata + related_skills for each slug

skills_refresh_index

在磁盘上添加/删除/修改技能后重建内存索引。

Input:  {}
Output: Previous count, new count, duration

IDE 配置

Claude Desktop / Claude Code

{
  "mcpServers": {
    "skills": {
      "command": "node",
      "args": ["/path/to/skills-mcp-server/dist/index.js"],
      "env": {
        "SKILLS_DIR": "/path/to/skills-mcp-server/skills"
      }
    }
  }
}

远程 (HTTP/SSE) — Cursor, VS Code, 任何 MCP 客户端

{
  "mcpServers": {
    "skills": {
      "url": "http://localhost:3000/mcp"
    }
  }
}

AWS Lambda (部署后)

{
  "mcpServers": {
    "skills": {
      "url": "https://<function-url-id>.lambda-url.<region>.on.aws/mcp"
    }
  }
}

查看 docs/SETUP.md 获取所有模式和 IDE 的完整分步设置指南。


部署模式

模式

命令

使用场景

SSE 流式传输

stdio

node dist/index.js

本地 IDE (Claude, Cursor, Gemini CLI)

N/A

HTTP

node dist/http.js

开发服务器, EC2, VPS, Docker

Lambda

SAM deploy

无服务器, 自动扩缩容, 按量付费

是 (响应流式传输)


技能格式

每个技能都是 skills/ 下的一个目录,至少包含一个带有 YAML 前置元数据的 SKILL.md 文件:

skills/
├── CATALOG.md              # Category-to-skill mapping (auto-generated)
├── my-skill/
│   ├── SKILL.md            # Required: frontmatter + content
│   ├── references/         # Optional: additional .md files
│   └── scripts/            # Optional: helper scripts

SKILL.md 结构

---
name: my-skill
description: What this skill does in one sentence.
tags:
  - react
  - dashboard
  - frontend
risk: safe
source: community
author: your-name
tools:
  - claude-code
  - cursor
---

# My Skill

## Overview
...

## When to Use This Skill
...

前置元数据字段

字段

类型

必填

描述

name

string

技能标识符

description

string

一行描述

tags

string[]

可搜索的关键词

risk

enum

safe, critical, offensive, unknown, none

source

string

来源 (community, official)

author

string

创建者名称

tools

string[]

兼容的 AI 工具


架构

src/
├── index.ts              # stdio entry point
├── http.ts               # Express HTTP/SSE entry point
├── lambda.ts             # AWS Lambda handler
├── server.ts             # McpServer factory (shared)
├── constants.ts          # CHARACTER_LIMIT, pagination defaults
├── types.ts              # TypeScript interfaces
├── indexer.ts            # Frontmatter parser + skill index builder
├── catalog.ts            # CATALOG.md parser → category mapping
├── search.ts             # BM25 scoring engine
├── tools/
│   ├── browse.ts         # skills_browse_categories
│   ├── list.ts           # skills_list_by_category
│   ├── search.ts         # skills_search
│   ├── read.ts           # skills_read
│   ├── inspect.ts        # skills_inspect
│   └── refresh.ts        # skills_refresh_index
└── utils/
    ├── frontmatter.ts    # gray-matter wrapper + tag normalization
    ├── format.ts         # Markdown/JSON response formatters
    ├── truncate.ts       # CHARACTER_LIMIT enforcement
    └── paginate.ts       # Generic pagination

搜索引擎

BM25 实现将每个技能索引为加权文档:

字段

权重

示例

name

3x

"react-patterns" 重复 3 次

description

2x

"Modern React patterns..." 重复 2 次

tags

2x

"react frontend hooks" 重复 2 次

category

1x

"development"

summary

1x

正文前 500 字符

评分使用 k1=1.5, b=0.75 的 BM25。结果按相关性得分降序排列。

性能:跨 1300 多种技能的搜索可在 <10ms 内完成。


环境变量

变量

默认值

描述

SKILLS_DIR

~/skills-mcp/skills

技能目录路径

PORT

3000

HTTP 服务器端口 (仅限 http.ts)


技术栈

  • TypeScript — 严格模式, ESM

  • MCP SDK v1.29+ — StreamableHTTPServerTransport, WebStandardStreamableHTTPServerTransport

  • gray-matter — YAML 前置元数据解析

  • Zod — 输入验证模式

  • BM25 — 自定义实现(约 80 行),零外部依赖


许可证

MIT

-
security - not tested
F
license - not found
-
quality - not tested

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/LucasRomanzin/skills-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server