MCP-skill-library-dynamic
MCP-skill-library-dynamic 🚀
AIエージェントにオンデマンドでスキルファイルとルールファイルをローカルディレクトリから提供する、エンタープライズグレードのMCP(Model Context Protocol)サーバーです。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" }))をサポートし、スキルを直接フィルタリングしてトークンを節約します。再帰的な複数ファイルルール集約:
fetch_skill_ruleは、より深いドキュメントをスキップすることなく、ネストされたすべてのMarkdownファイル(例:rules/*.md、references/*.md)を自動的にスキャンして結合します。ゼロ設定の自動パス解決: コンパイル済みサーバーの場所を基準に
.agents/skillsをインテリジェントに解決し、手動でのSKILLS_DIR設定の問題を排除します。ゴーストスキル排除: 空のディレクトリを自動的に無視し、検証済みの
.mdルールファイルがあるフォルダのみを提供します。メモリ安全なキャッシング: ディレクトリ一覧にはTTLキャッシュを、ファイル読み取りには非同期I/Oを利用し、100,000以上のスキルがあってもOut-Of-Memory(OOM)クラッシュの可能性を0%に保証します。
パストラバーサル保護: 暗号学的グレードのパス解決により、AIを
.agents/skills/ディレクトリ内に厳格にサンドボックス化します。グレースフルシャットダウン:
SIGINT/SIGTERMおよび未捕捉例外を適切に処理し、MCPソケットのクリーンなクローズを保証します。トークンダイエットアーキテクチャ(コスト削減):
list_skillsは生のフォルダ名(スラッグ)のみを返し、1,000以上のスキルがあっても注入されるコンテキストを約1,500トークンに最小化します。fetch_skill_ruleはオンデマンドで一度に1つのスキルのみを厳密に取得し、AIの幻覚と莫大なAPIコストを防ぎます。
Related MCP server: docubridge
📦 インストール&ビルド
リポジトリをクローンまたはダウンロードします:
git clone https://github.com/Guslaier/MCP-skill-library-dynamic.git
cd skill-library-mcp依存関係をインストールします:
npm installTypeScriptソースコードをコンパイルします:
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エージェントがスキルライブラリを自動的に使用するように、以下のプロンプトを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
Available Tools
2 toolsfetch_skill_ruleARead-onlyIdempotent
Fetch the full markdown content and nested rule guidelines of a specific skill.
| Name | Required | Description | Default |
|---|---|---|---|
| skill_name | Yes | Exact name of the skill folder (e.g., 'nestjs-best-practices') |
Output Schema
| Name | Required | Description |
|---|---|---|
| files | No | |
| content | No | |
| skill_name | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false, covering the safety profile. The description adds value by specifying exactly what is returned (full markdown content and nested rule guidelines), which is beyond the annotations. It does not claim any side effects, and the read-only nature is consistent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, concise sentence of 12 words. It is front-loaded with the verb and clearly states the output. No unnecessary words or repetition; every word earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple one-parameter read tool, the description is quite complete given the presence of an output schema (which presumably explains the return format) and annotations covering safety. It does not mention error behavior (e.g., missing skill), but that is likely handled by the output schema. Overall, adequate for the tool's simplicity.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100%, and the schema provides a clear description for skill_name. The tool description does not add any additional meaning to the parameter, so it relies on the schema. Baseline 3 is appropriate when the schema already documents the parameter fully.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the specific verb 'Fetch' and the resource (full markdown content and nested rule guidelines of a skill). It distinguishes this from list_skills, which likely only provides an overview. The purpose is unambiguous and distinct from its sibling.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The usage context is implied by the description and the presence of list_skills as a sibling, but it does not explicitly state when to use this tool versus list_skills. No exclusions or alternative conditions are mentioned, so guidance is only implicit.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_skillsARead-onlyIdempotent
List all available skills/rules in the knowledge base. Supports optional search query for token efficiency.
| Name | Required | Description | Default |
|---|---|---|---|
| query | No | Optional keyword to filter skills (e.g., 'react', 'python', 'review') |
Output Schema
| Name | Required | Description |
|---|---|---|
| count | No | |
| skills | No |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
Annotations already declare readOnlyHint=true and idempotentHint=true, and the description adds the behavioral context that it returns the full list unless filtered, plus the token-efficiency rationale. This supplements the annotations without contradicting them.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single sentence packs the core purpose and the optional usage hint with zero redundancy or filler. The most important information is front-loaded, and every word earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the simple nature of the tool, the presence of an output schema, and comprehensive annotations, the description covers the essential aspects. It does not explicitly address when to use fetch_skill_rule, but that is a minor omission for a list operation.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 100% for the single optional 'query' parameter, so the description's addition of 'token efficiency' provides extra semantic value beyond the schema, explaining why one would use the filter. This meaningfully enhances the parameter's purpose.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool lists all available skills/rules in the knowledge base, using a specific verb ('List') and resource. It distinguishes from sibling fetch_skill_rule by semantic contrast (list vs fetch), making the purpose unambiguous.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description mentions an optional search query for token efficiency, which hints at usage for large lists, but does not explicitly contrast with fetch_skill_rule or state when to use one over the other. The guidance is implied rather than explicit.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
2 tool updates
v1.0.0- First observed
fetch_skill_rule - First observed
list_skills
TDQS
Scored across 2 tools
The two tools have completely distinct purposes: one lists available skills, the other fetches a specific skill's content. There is no overlap or ambiguity between them.
Both tools follow the same verb_noun pattern (list_skills, fetch_skill_rule), making the naming predictable and consistent.
With only 2 tools, the set is on the thin side, but it fits the narrow scope of a read-only skill library. It feels borderline rather than clearly inadequate.
For a read-only knowledge base, list and fetch cover the essential operations. The search option on list_skills adds flexibility. Minor gaps like versioning or metadata retrieval are not critical.
Maintenance
Related MCP Connectors
Read-only catalog of prompt packs and rule files: Cursor, CLAUDE.md, AGENTS.md, SKILL.md.
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.
Search, install and submit Markdown skills for AI agents; private Brain files when signed in.
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.4 npmMIT
- 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.13211 npm1MIT
- AlicenseNot gradedqualityCmaintenanceTurns any folder of Markdown agent skills into a local MCP server, exposing them as tools, prompts, and resources for MCP-compatible clients.MIT