Skip to main content
Glama
Guslaier

MCP-skill-library-dynamic

by Guslaier

MCP-skill-library-dynamic šŸš€

An Enterprise-grade MCP (Model Context Protocol) server that serves skill and rule files from a local directory to AI agents on demand. It allows AI agents to dynamically list and fetch specific skill instructions formatted in Markdown without suffering from Context Bloat.


✨ Features (v1.2.0)

  • TypeScript Native: 100% Type-safe, compiled to optimized ES Modules.

  • Curated 200+ Core Skills Base: High-quality, deduplicated, and community-standard skill set pre-indexed in skills-base.json.

  • Deterministic Offline-First Downloader: Fast, reliable batch downloads directly from the curated base list using npx skills add with exponential backoff retries.

  • Smart Search & Filter: list_skills supports optional query parameter (e.g. list_skills({ query: "react" })) to filter skills directly and save tokens.

  • Recursive Multi-File Rule Aggregation: fetch_skill_rule automatically scans and combines all nested Markdown files (e.g. rules/*.md, references/*.md) without skipping deeper documentation.

  • Zero-Config Auto-Path Resolution: Intelligently resolves .agents/skills relative to the compiled server location, eliminating manual SKILLS_DIR setup issues.

  • Ghost Skill Elimination: Automatically ignores empty directories and only serves folders with verified .md rule files.

  • Memory-Safe Caching: Utilizes a TTL cache for directory listing and async I/O for file reading to guarantee 0% chance of Out-Of-Memory (OOM) crashes, even with 100,000+ skills.

  • Path Traversal Protection: Cryptographic-grade path resolution to strictly sandbox the AI to the .agents/skills/ directory.

  • Graceful Shutdown: Properly handles SIGINT/SIGTERM and uncaught exceptions to ensure clean MCP socket closures.

  • Token Diet Architecture (Cost Saving):

    • list_skills only returns raw folder names (slugs), minimizing injected context to just ~1,500 tokens even with 1,000+ skills.

    • fetch_skill_rule strictly fetches content on-demand, one skill at a time, preventing AI hallucination and massive API bills.


Related MCP server: SkillMCP

šŸ“¦ Installation & Build

  1. Clone or download the repository:

git clone https://github.com/Guslaier/MCP-skill-library-dynamic.git
cd skill-library-mcp
  1. Install dependencies:

npm install
  1. Compile TypeScript source code:

npm run build

🧠 Downloading & Managing Skills

Skills are loaded into .agents/skills/ located in the root of the project (or configured via SKILLS_DIR).

Curated Base Skills (skills-base.json)

The downloader uses skills-base.json as the single source of truth containing 200+ curated and deduplicated skills from official and top-tier repositories (anthropics/skills, obra/superpowers, affaan-m/ecc, browser-use, etc.).

CLI Commands

Command

Description

npm run download

Download and install all 200+ base skills

npm run download -- <skill-name>

Download only skills matching the given name filter

Examples

# 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

šŸ“ Directory Structure

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
        └── ...

šŸš€ Running the Server

Start the server using:

npm start

āš™ļø MCP Configuration

To connect this server with an MCP client (such as Antigravity, Cursor, Roo Code, or Cline), add the following configuration to your client's settings file:

{
  "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"
      }
    }
  }
}

Important: Replace C:/path/to/skill-library-mcp with your actual repository path, pointing to dist/index.js.


šŸ¤– System Prompt (Knowledge Base Protocol)

Add the following prompt to your AI agent rules (.clinerules, .cursorrules, or Custom Instructions) so the agent automatically uses the Skill Library:

# 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.

šŸ“œ License

MIT

Install Server
A
license - permissive license
A
quality
B
maintenance

Maintenance

–Maintainers
–Response time
–Release cycle
–Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

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

Related MCP Servers

  • F
    license
    Not graded
    quality
    C
    maintenance
    Serves 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
  • A
    license
    A
    quality
    A
    maintenance
    Enables AI agents to discover, read, search, and install Markdown-based knowledge (rules, skills, workflows) from a local directory via MCP tools.
    12
    38
    MIT

View all related MCP servers

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.

View all MCP Connectors

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/Guslaier/MCP-skill-library-dynamic'

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