MCP-skill-library-dynamic
MCP-skill-library-dynamic 🚀
一个企业级的 MCP(Model Context Protocol)服务器,可按需从本地目录向 AI 代理提供技能和规则文件。它允许 AI 代理动态列出并获取以 Markdown 格式编写的特定技能指令,而不会遭受上下文膨胀(Context Bloat)的问题。
✨ 功能特性(v1.2.0)
原生 TypeScript:100% 类型安全,编译为优化的 ES Modules。
精选 200+ 核心技能库:高质量、去重且符合社区标准的技能集,已预先索引在
skills-base.json中。确定性离线优先下载器:使用
npx skills add直接从精选基础列表中快速、可靠地批量下载,并带有指数退避重试机制。智能搜索与过滤:
list_skills支持可选的query参数(例如list_skills({ query: "react" }))来直接过滤技能并节省 token。递归多文件规则聚合:
fetch_skill_rule自动扫描并合并所有嵌套的 Markdown 文件(例如rules/*.md、references/*.md),不会跳过更深层的文档。零配置自动路径解析:智能地相对于编译后的服务器位置解析
.agents/skills,消除了手动设置SKILLS_DIR的问题。幽灵技能消除:自动忽略空目录,仅提供包含已验证
.md规则文件的文件夹。内存安全缓存:利用 TTL 缓存进行目录列表,并使用异步 I/O 进行文件读取,即使有 100,000+ 个技能,也能保证 0% 的内存溢出(OOM)崩溃几率。
路径遍历防护:采用加密级路径解析,将 AI 严格限制在
.agents/skills/目录的沙箱中。优雅关闭:正确处理
SIGINT/SIGTERM和未捕获的异常,确保 MCP 套接字干净关闭。Token 精简架构(节省成本):
list_skills仅返回原始文件夹名称(slugs),即使有 1,000+ 个技能,也能将注入的上下文最小化到仅约 ~1,500 个 token。fetch_skill_rule严格按需获取内容,一次只获取一个技能,防止 AI 幻觉和巨额 API 费用。
Related MCP server: SkillMCP
📦 安装与构建
克隆或下载仓库:
git clone https://github.com/Guslaier/MCP-skill-library-dynamic.git
cd skill-library-mcp安装依赖:
npm install编译 TypeScript 源代码:
npm run build🧠 下载与管理技能
技能被加载到项目根目录下的 .agents/skills/ 中(或通过 SKILLS_DIR 配置)。
精选基础技能(skills-base.json)
下载器使用 skills-base.json 作为唯一事实来源,其中包含来自官方和顶级仓库(anthropics/skills、obra/superpowers、affaan-m/ecc、browser-use 等)的 200+ 个精选且去重的技能。
CLI 命令
命令 | 描述 |
| 下载并安装所有 200+ 基础技能 |
| 仅下载与给定名称筛选条件匹配的技能 |
示例
# Download all 200+ curated base skills
npm run download
# Download only specific skills matching 'caveman'
npm run download -- caveman
# Download all React / Frontend related skills
npm run download -- react📁 目录结构
skill-library-mcp/
├── package.json
├── tsconfig.json
├── skills-base.json # Curated index of 200+ skills (name, repo url, description)
├── src/
│ ├── index.ts # MCP Server entry point
│ └── download-skills.ts # Batch downloader from skills-base.json
├── dist/
│ ├── index.js
│ └── download-skills.js
└── .agents/
└── skills/ # Local skill files served to AI agents
├── code-review/
│ └── SKILL.md
├── test-driven-development/
│ └── SKILL.md
└── ...🚀 运行服务器
使用以下命令启动服务器:
npm start⚙️ MCP 配置
要将此服务器与 MCP 客户端(如 Antigravity、Cursor、Roo Code 或 Cline)连接,请将以下配置添加到客户端的设置文件中:
{
"mcpServers": {
"skill-library": {
"command": "node",
"args": [
"C:/path/to/skill-library-mcp/dist/index.js"
],
"env": {
"SKILLS_DIR": "C:/path/to/skill-library-mcp/.agents/skills"
}
}
}
}重要提示: 将
C:/path/to/skill-library-mcp替换为你的实际仓库路径,指向dist/index.js。
🤖 系统提示词(知识库协议)
将以下提示词添加到你的 AI 代理规则(.clinerules、.cursorrules 或自定义指令)中,以便代理自动使用技能库:
# UNIVERSAL KNOWLEDGE BASE PROTOCOL
You are equipped with the Enterprise "Skill Library MCP". Before starting any architectural planning, refactoring, or feature implementation, you MUST:
1. Use `list_skills` (or `list_skills({ query: "keyword" })`) to check for relevant domain rules or coding standards.
2. If found, use `fetch_skill_rule({ skill_name: "..." })` to read the full context and nested rule guidelines.
3. Explicitly acknowledge the rules and apply them strictly to your code generation.📜 许可证
MIT
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Tools
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceServes markdown instructions as tools to provide LLMs with team playbooks, coding standards, domain knowledge, and personal workflows through version-controlled files.9MIT
- FlicenseNot gradedqualityCmaintenanceServes project-specific skills and behavioral rules to AI agents via MCP, enabling automatic injection of behavioral rules and on-demand knowledge for coding assistants like Claude Code and Gemini CLI.1
- AlicenseNot gradedqualityDmaintenanceProvides AI assistants with direct access to local Markdown documentation libraries, enabling them to list, read, and search through docs on demand.MIT
- AlicenseAqualityAmaintenanceEnables AI agents to discover, read, search, and install Markdown-based knowledge (rules, skills, workflows) from a local directory via MCP tools.1238MIT
Related MCP Connectors
Serve a folder of Markdown notes as an MCP server: hybrid search, reading, and sourced answers.
Agent-native MCP server over the public saagarpatel.dev corpus. Read-only, stateless.
Securely search and manage workspace context files for AI agents and teams.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/Guslaier/MCP-skill-library-dynamic'
If you have feedback or need assistance with the MCP directory API, please join our Discord server