Skip to main content
Glama

mcp_skills 🧠

One copy of your Agent Skills, served to every agent that connects.

An MCP server that publishes Agent Skills — folders of a SKILL.md plus whatever it points to — over the Model Context Protocol. Instead of every laptop carrying its own slightly different copy of a skill, the skills live in one repository, ship as a container image, and every agent reads the same version.

A skill is served three ways at once, because clients disagree about what they can see:

How a client reads it

What it gets

tools/call — any client

Four read-only tools: skills_list, skill_search, skill_load, skill_read_file

resources/read — any client

Every file of every skill as skill://<path>/<file>, plus a _manifest with sizes and SHA-256 digests

skills/list — clients with the Skills extension

The catalog with a hashed manifest per skill, so a host can offer a skill without downloading it

The tools follow the three levels of progressive disclosure the Skills spec describes: metadata first, then the instructions, then one supporting file at a time. Nothing is loaded before it is needed, so a catalog of thirty skills costs about as much context as thirty short sentences.

English · En français


What is already done for you

Concern

Where it lives

What you get

Publication

server.py

SkillsDirectoryProvider serves every folder as resources and skills/list entries

Configuration

settings.py, .env.example

Every knob in one typed class, read from the environment or .env

Validation

provider at startup, scripts/validate_skills.py

A folder that breaks the spec stops the server, naming the fix

Search

catalog.py

Ranked matches over names, descriptions and instructions, with the reason for each

Logging

logging.py, server.py

One-line format, level from LOG_LEVEL, request/tool logging via middleware

Rate limiting

server.py

Sliding window per client address, 100 req/min by default

Error contract

errors/

One exception type whose message actually reaches the caller, with codes

Host protection

server.py

Host / Origin checks against ALLOWED_HOSTS and ALLOWED_ORIGINS

Model-facing instructions

server.py

Handshake instructions that state the order to use the tools in

Container

Dockerfile

Multi-stage, non-root, healthcheck (needs --format docker under podman), pinned uv, --locked build

Kubernetes

k8s/manifest.yaml

Service + Deployment + Ingress with the env vars that matter

Quality gates

pyproject.toml, .pre-commit-config.yaml, .github/workflows/ci.yml

ruff lint + format, a pytest suite that speaks the real protocol, both gated on every push

Related MCP server: ThirdBrain skills-mcp

Quickstart

Prerequisites: Python 3.12+ and uv. uv can install the Python version for you, so the only thing you really need is uv:

curl -LsSf https://astral.sh/uv/install.sh | sh   # once, if `uv` is not installed

Install and start it:

git clone https://github.com/Mirlon382/mcp_skills.git
cd mcp_skills
uv sync
uv run mcpskills
INFO | uvicorn.error | Uvicorn running on http://0.0.0.0:8000

The server answers on http://localhost:8000/mcp (Streamable HTTP transport) and serves the two skills in skills/. To have a client launch it instead of calling a URL, run it over stdio: MCP_TRANSPORT=stdio uv run mcpskills.

"It's alive 🧟"

npx @modelcontextprotocol/inspector

Open the inspector, choose Streamable HTTP, enter http://localhost:8000/mcp, connect, and you will see four tools and six resources. Call skills_list: it answers with release-notes and skill-authoring. Then skill_load with release-notes and follow what comes back.

Over the command line, without an inspector:

uv run fastmcp list http://localhost:8000/mcp --skills

What a skill is

A folder with a SKILL.md at its root. Everything else in that folder is a resource the skill may point to:

skills/
└── release-notes/
    ├── SKILL.md          # frontmatter + instructions: the skill itself
    ├── TEMPLATE.md       # read on demand
    └── STYLE.md          # read on demand

SKILL.md opens with YAML frontmatter:

---
name: release-notes          # lowercase, digits, hyphens; must equal the folder name
description: Write release notes from merged pull requests. Use when the user asks what shipped.
license: MIT                 # optional
metadata:                    # optional, string values only
  tags: "release, git, writing"
---

The description does two jobs: what the skill does and when to reach for it. An agent matches its task against that text, so the "Use when…" half is what makes the skill fire. tags is this server's convention — a comma-separated string inside metadata — and is what skills_list and skill_search filter on.

The name, the folder, and the path it is served under must agree. A skill in a subfolder keeps its name and gains a path: skills/writing/release-notes/ is served at skill://writing/release-notes/SKILL.md.

The four tools

Every tool is read-only: this server never writes to the folders it serves, so a client can call any of them without asking the user first.

Tool

Level

Call it when

Returns

skills_list

1

You want to know what exists

Name, description, tags, URI, file count; plus every tag in use

skill_search

1

You know the task, not the skill

Ranked matches with matched_in (name > description > instructions) and the line that matched

skill_load

2

A description matches what you are doing

The SKILL.md body, frontmatter removed, plus the files it points to

skill_read_file

3

The loaded instructions name a file

That one file's text

A skill is not a tool: loading one performs nothing. It tells the agent how the work is done here, with the tools it already has. That is the whole design — and why the server handshake says so.

skill_read_file refuses anything not published with the skill, so path='../../etc/passwd' is a NOT_FOUND, not a file read. A file larger than SKILL_FILE_MAX_BYTES comes back truncated with truncated=true rather than silently cut.

Resources and the Skills extension

Nothing above is required to read a skill. A client that speaks only resources gets the folder itself:

skill://release-notes/SKILL.md          # the raw file, frontmatter included
skill://release-notes/TEMPLATE.md
skill://release-notes/_manifest         # every file with its size and sha256 digest

A client that supports the experimental Skills extension gets discovery without downloading anything:

from fastmcp import Client
from fastmcp.skills import SkillsClientExtension

client = Client("http://localhost:8000/mcp", extensions=[SkillsClientExtension()])
async with client:
    for entry in await client.list_skills():
        print(entry.uri, entry.frontmatter.description)

    # Reads every file, verifies each digest against the manifest, then installs it locally.
    skill = await client.read_skill("skill://release-notes/SKILL.md")
    skill.to_directory(pathlib.Path.home() / ".claude" / "skills" / skill.name, overwrite=True)

read_skill + to_directory is how a host that only knows local folders consumes this server: it gets the same skill, verified, in the agent's own skills directory.

Adding a skill

  1. Create the folder, named exactly like the skill: mkdir -p skills/deploy-check && $EDITOR skills/deploy-check/SKILL.md

  2. Write the frontmatter and the body. Rules that matter:

    • the description says what the skill does and when to use it;

    • every file the body mentions exists, spelled exactly as it is on disk;

    • no secrets: every served file is readable by every caller that reaches the server.

  3. Validate, then run:

uv run python scripts/validate_skills.py      # every folder, all problems at once
uv run mcpskills                             # or SKILLS_RELOAD=true uv run mcpskills while editing

A skill that breaks the spec stops the server at startup with a message naming the folder and the fix — a server never comes up quietly missing a skill. SKILLS_RELOAD=true re-scans on every request so you can edit while an agent is connected; while a re-read finds a broken folder, the last valid catalog keeps serving. Never use it in production: a deploy is the update.

Configuration

Everything is read from the environment, or from .env in the working directory. Copy the example first: cp .env.example .env.

Variable

Default

Meaning

MCP_NAME

Skills

Server name sent in the handshake, shown by most clients

MCP_TRANSPORT

http

http serves Streamable HTTP; stdio talks over pipes for a client that launches the process

SKILLS_DIRS

["skills"]

Folders scanned for skills. First root wins a duplicate path

SKILLS_RELOAD

false

Re-scan on every request, for editing. Never in production

SKILL_FILE_MAX_BYTES

200000

Largest file skill_read_file returns in full

MCP_HOST

0.0.0.0

Interface to bind (0.0.0.0 is what a container needs)

MCP_PORT

8000

Port to listen on

ALLOWED_HOSTS

["*"]

Hostnames accepted in the Host header. ["*"] disables the check

ALLOWED_ORIGINS

[]

Browser origins allowed to call POST /mcp. Empty rejects all cross-origin browsers

TRUSTED_PROXY_HOSTS

["127.0.0.1"]

Peers whose X-Forwarded-For is believed. Widen to your reverse proxy only

RATE_LIMIT_MAX_REQUESTS

100

Requests allowed per window, per client address

RATE_LIMIT_WINDOW_MINUTES

1

Window length in minutes

LOG_LEVEL

INFO

Root level; FastMCP's middlewares log under fastmcp.*

Lists are JSON strings, not comma-separated: ALLOWED_HOSTS='["mcp.example.com"]'. That is also the exact form the Kubernetes manifest uses.

Connecting a client

Two transports, one set of skills.

stdio — the client launches the process and talks over pipes. This is what Claude Desktop, Claude Code, Cursor and most editors do:

{
  "mcpServers": {
    "skills": {
      "command": "uv",
      "args": ["run", "--directory", "/absolute/path/to/mcp_skills", "mcpskills"],
      "env": { "MCP_TRANSPORT": "stdio" }
    }
  }
}

HTTP — a long-running server answering POST /mcp on port 8000:

{
  "mcpServers": {
    "skills": { "type": "http", "url": "http://localhost:8000/mcp" }
  }
}

MCP_TRANSPORT picks one; the default is http so the quickstart works without a client. Check the shape your client expects: the stdio command/args form and the remote url form are not interchangeable, and some hosts need a bridge for remote servers.

Deploy

Container — podman (rootless, recommended)

podman build --format docker -t mcp-skills .
podman run --rm -p 8000:8000 -e ALLOWED_HOSTS='["localhost"]' mcp-skills

--format docker matters: podman's default OCI format drops HEALTHCHECK and warns, so the container would run with no health status. With the docker format the probe survives: podman inspect --format '{{.State.Health.Status}}' <container> answers starting, then healthy about twenty seconds in.

Container — docker

docker build -t mcp-skills .
docker run --rm -p 8000:8000 -e ALLOWED_HOSTS='["localhost"]' mcp-skills

The image builds with uv sync --locked, so uv.lock must be current (uv lock after changing dependencies). It runs as a non-root user, ships skills/ at /app/skills, and its healthcheck opens a TCP connection rather than making an HTTP request — the MCP endpoint answers 400 without a session handshake, so an HTTP probe would fail on a healthy server.

Kubernetes

k8s/manifest.yaml contains the Service, the Deployment and the Ingress. Edit the namespace, the image and the hostname, then:

kubectl apply -f k8s/manifest.yaml

Two values are not optional once you are behind an Ingress:

  • ALLOWED_HOSTS must contain the hostname the Ingress routes, or host protection returns 421 to every request.

  • TRUSTED_PROXY_HOSTS must include the Ingress controller (the manifest uses ["*"], safe only because the pod is reachable exclusively through the Ingress). Without it, uvicorn sees every request coming from the Ingress and rate-limits all your users as one caller.

The skills are content: keep them in the image and rebuild to publish a change, or mount a ConfigMap/PVC over /app/skills and set SKILLS_DIRS to the mount.

Project layout

.
├── .env.example                  # every variable, documented — copy to .env
├── .github/workflows/ci.yml      # ruff + pytest on 3.12 and 3.13, skill validation, container healthcheck
├── Dockerfile                    # multi-stage, non-root, healthcheck, ships skills/
├── k8s/manifest.yaml             # Service + Deployment + Ingress
├── pyproject.toml                # deps, console script, ruff + pytest config
├── scripts/
│   └── validate_skills.py        # validate every folder without starting the server
├── skills/
│   ├── release-notes/            # example: a skill with two supporting files
│   └── skill-authoring/          # the guide an agent reads before writing one
├── src/mcpskills/
│   ├── server.py                 # entrypoint: settings, provider, middlewares, transports
│   ├── catalog.py                # the index: entries, tags, ranking, the error on a miss
│   ├── lifespan.py               # the catalog, built once and shared by every tool
│   ├── settings.py               # every configurable value
│   ├── logging.py                # log format and level
│   ├── errors/                   # AppToolError + ErrorCode
│   ├── models/skills.py          # the schemas the tools accept and return
│   ├── tools/
│   │   ├── __init__.py           # the single registration point
│   │   └── skills/tools.py       # the four tools
│   └── utils/
│       ├── dependencies.py       # catalog and settings, as tool dependencies
│       └── client_host.py        # rate-limit key resolution
└── tests/                        # run the real app over the real protocol

Development

uv run pytest -q                                  # protocol-level, no network
uv run ruff check . && uv run ruff format --check .
uv run pre-commit install                         # lint and format on every commit
uv run python scripts/validate_skills.py          # check the served folders

The tests speak to the app through fastmcp.Client, so they prove a tool is registered, that its schema is right and that its answer reaches a caller — not merely that a function works when called directly. tests/conftest.py writes a throwaway skills folder per test; no test reads the real one.

Errors your users will read

from ...errors import AppToolError, ErrorCode

raise AppToolError(
    ErrorCode.NOT_FOUND,
    f"Skill `{entry.name}` has no file at `path={path!r}`. Available: {available}.",
)

The message reaches the caller prefixed with its code, [NOT_FOUND] …; with retryable=True it becomes [BACKEND_UNAVAILABLE, retryable] … so a client knows a retry is safe. Every message must say what failed, why, and what to do next — it is the only thing the caller gets.

Code

Meaning

INVALID_INPUT

The arguments are wrong or impossible

INVALID_QUERY

The query is well-formed but not allowed

NOT_FOUND

The skill or the file does not exist

PARSE_ERROR

An upstream answer could not be read

BACKEND_UNAVAILABLE

A dependency is down (usually retryable)

UPSTREAM_ERROR

A dependency answered with an error

INTERNAL_ERROR

Our fault, not the caller's — logged in full, reported generically

This server produces INVALID_INPUT and NOT_FOUND; the rest of the vocabulary is there for the tools you add.

Limits and security

  • No authentication. mcp_skills serves whoever can reach the port. Put it behind a gateway, a VPN or your platform's auth proxy before exposing it.

  • Every served file is public to every caller. Never put a token, an internal URL or a secret in a skill folder; skill_read_file and resources/read return exactly what is on disk.

  • Only the configured folders are reachable. Paths are looked up in the published skill's file map, so a traversal attempt is a NOT_FOUND rather than a read outside the folder.

  • ALLOWED_HOSTS defaults to ["*"] and logs a warning. Set the real hostname.

  • Rate limiting is in memory, per process. Two replicas allow twice the requests, and a restart resets the counters. Use the platform's rate limiter for a hard guarantee.

  • stdio has no network surface at all. Host and origin protection only apply to the HTTP transport.

  • mask_error_details=True is the point: only AppToolError text is public. Never put a token, an internal URL or a stack trace in a tool's error message.

  • One process, one catalog. Skills are scanned at startup; publishing a new one is a deploy, not a write over MCP. SKILLS_RELOAD=true exists for development and says so.


En français

Une seule copie de vos Agent Skills, servie à tous les agents qui se connectent.

Un serveur MCP qui publie des Agent Skills — des dossiers avec un SKILL.md et les fichiers qu'il mentionne — sur le Model Context Protocol. Au lieu d'une copie légèrement différente sur chaque machine, les skills vivent dans un dépôt, partent dans une image de conteneur, et chaque agent lit la même version.

Trois façons de lire un skill

Ce que le client sait faire

Ce qu'il reçoit

tools/call

Quatre outils en lecture seule : skills_list, skill_search, skill_load, skill_read_file

resources/read

Chaque fichier de chaque skill en skill://<chemin>/<fichier>, plus un _manifest avec tailles et empreintes SHA-256

skills/list (extension Skills)

Le catalogue avec un manifeste haché par skill, sans rien télécharger

Les outils suivent les trois niveaux de divulgation progressive de la spécification : d'abord les métadonnées, puis les instructions, puis un fichier de support à la fois. Un skill n'est pas un outil : le charger n'exécute rien, il dit comment le travail se fait ici.

Démarrage rapide

Prérequis : Python 3.12+ et uv.

git clone https://github.com/Mirlon382/mcp_skills.git
cd mcp_skills
uv sync
uv run mcpskills

Le serveur répond sur http://localhost:8000/mcp et sert les deux skills du dossier skills/. npx @modelcontextprotocol/inspector, transport Streamable HTTP, URL http://localhost:8000/mcp : les quatre outils et les six ressources apparaissent. Appelez skills_list, puis skill_load avec release-notes.

Pour un client qui lance lui-même le processus : MCP_TRANSPORT=stdio uv run mcpskills.

Un skill, c'est un dossier

skills/release-notes/
├── SKILL.md      # frontmatter + instructions : le skill lui-même
├── TEMPLATE.md   # lu à la demande
└── STYLE.md      # lu à la demande
---
name: release-notes          # minuscules, chiffres, tirets ; identique au nom du dossier
description: Write release notes from merged pull requests. Use when the user asks what shipped.
license: MIT                 # facultatif
metadata:                    # facultatif, valeurs en chaînes uniquement
  tags: "release, git, writing"
---

La description fait deux choses : ce que le skill fait et quand l'utiliser. C'est le texte sur lequel l'agent compare sa tâche ; la partie « Use when… » est celle qui déclenche le skill. Les tags sont une convention de ce serveur (une chaîne séparée par des virgules dans metadata) et servent de filtre à skills_list et skill_search.

Le nom, le dossier et le chemin de publication doivent concorder : un skill dans un sous-dossier garde son nom et gagne un chemin, skill://writing/release-notes/SKILL.md.

Les quatre outils

Tous en lecture seule : le serveur n'écrit jamais dans les dossiers qu'il sert.

Outil

Niveau

À appeler quand

Réponse

skills_list

1

Vous voulez savoir ce qui existe

Nom, description, tags, URI, nombre de fichiers, et tous les tags en usage

skill_search

1

Vous connaissez la tâche, pas le skill

Résultats classés avec matched_in (name > description > instructions) et la ligne trouvée

skill_load

2

Une description correspond

Le corps du SKILL.md sans le frontmatter, et les fichiers cités

skill_read_file

3

Les instructions nomment un fichier

Ce fichier, et rien d'autre

skill_read_file refuse tout ce qui n'est pas publié avec le skill : path='../../etc/passwd' donne NOT_FOUND. Un fichier plus gros que SKILL_FILE_MAX_BYTES revient tronqué avec truncated=true, jamais coupé en silence.

Ajouter un skill

mkdir -p skills/deploy-check && $EDITOR skills/deploy-check/SKILL.md
uv run python scripts/validate_skills.py     # tous les dossiers, tous les problèmes d'un coup
SKILLS_RELOAD=true uv run mcpskills          # pour éditer pendant qu'un agent est connecté

Un dossier qui enfreint la spécification empêche le démarrage, avec un message qui nomme le dossier et la correction : un serveur ne démarre jamais en perdant un skill en silence. SKILLS_RELOAD=true relit le dossier à chaque requête ; si une relecture trouve un dossier cassé, le dernier catalogue valide continue de servir. Jamais en production : un déploiement, c'est la mise à jour.

Configuration

Tout est lu depuis l'environnement, ou depuis .env à la racine. cp .env.example .env pour partir de l'exemple. Les listes sont du JSON, pas des virgules : ALLOWED_HOSTS='["mcp.example.com"]'.

Variable

Défaut

Rôle

MCP_NAME

Skills

Nom envoyé au handshake

MCP_TRANSPORT

http

http sert en Streamable HTTP ; stdio parle par les pipes

SKILLS_DIRS

["skills"]

Dossiers scannés. Le premier gagne en cas de chemin en double

SKILLS_RELOAD

false

Relecture à chaque requête, pour l'édition. Jamais en production

SKILL_FILE_MAX_BYTES

200000

Taille maximale d'un fichier renvoyé en entier

MCP_HOST / MCP_PORT

0.0.0.0 / 8000

Écoute

ALLOWED_HOSTS

["*"]

En-tête Host accepté. ["*"] désactive le contrôle

ALLOWED_ORIGINS

[]

Origines navigateur autorisées sur POST /mcp

TRUSTED_PROXY_HOSTS

["127.0.0.1"]

Pairs dont X-Forwarded-For est cru

RATE_LIMIT_MAX_REQUESTS / _WINDOW_MINUTES

100 / 1

Fenêtre glissante par adresse client

LOG_LEVEL

INFO

Niveau racine ; les middlewares FastMCP journalisent sous fastmcp.*

Déployer

podman build --format docker -t mcp-skills .
podman run --rm -p 8000:8000 -e ALLOWED_HOSTS='["localhost"]' mcp-skills

--format docker n'est pas décoratif : le format OCI par défaut de podman supprime HEALTHCHECK. L'image tourne en non-root, embarque skills/ dans /app/skills, et sa sonde ouvre une connexion TCP plutôt qu'une requête HTTP (le point d'entrée MCP répond 400 sans handshake).

Pour Kubernetes, k8s/manifest.yaml contient Service, Deployment et Ingress. Derrière un Ingress, deux valeurs ne sont pas facultatives : ALLOWED_HOSTS doit contenir le nom d'hôte routé (sinon 421 partout) et TRUSTED_PROXY_HOSTS doit inclure le contrôleur (sinon tous vos utilisateurs partagent un seul quota).

Développement

uv run pytest -q
uv run ruff check . && uv run ruff format --check .
uv run python scripts/validate_skills.py

Les tests parlent à l'application via fastmcp.Client : ils prouvent que l'outil est enregistré, que son schéma est correct et que sa réponse atteint l'appelant. tests/conftest.py crée un dossier de skills jetable par test ; aucun test ne lit le vrai.

Limites et sécurité

  • Aucune authentification. Placez le serveur derrière une passerelle, un VPN ou un proxy d'authentification avant de l'exposer.

  • Chaque fichier servi est public. Jamais de jeton, d'URL interne ou de secret dans un skill : skill_read_file et resources/read renvoient exactement ce qui est sur le disque.

  • Seuls les dossiers configurés sont joignables. Les chemins sont cherchés dans la table des fichiers du skill publié, donc une tentative de traversée donne NOT_FOUND.

  • ALLOWED_HOSTS vaut ["*"] par défaut et journalise un avertissement. Mettez le vrai nom d'hôte.

  • La limitation de débit est en mémoire, par processus. Deux réplicas autorisent deux fois plus de requêtes ; un redémarrage remet les compteurs à zéro.

  • Un processus, un catalogue. Les skills sont scannés au démarrage ; publier un nouveau skill est un déploiement, pas une écriture MCP.

Licence

MIT — voir LICENSE.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      B
      maintenance
      Enables serving a directory of Agent Skills to MCP clients, listing available skills, delivering their instructions and bundled files, and running only the scripts each skill explicitly declares under strict execution limits.
      4
      203 npm
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Enables MCP hosts to discover, browse, and load Agent Skills from one or many SKILL.md libraries over the Model Context Protocol, with namespaced libraries, search/list/get tools, progressive disclosure, and a digest-verified pull client for syncing skills to disk.
      7
      1
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Serves any directory of Agent Skills (SKILL.md folders) over MCP, exposing skills/list, skills/get, and skill:// resources so clients can enumerate and retrieve each skill's frontmatter and files. Every returned file comes with a real SHA-256 digest, letting clients verify content rather than merely trust it.
      MIT
    • A
      license
      A
      quality
      B
      maintenance
      Local checks for coding agents over stdio, no account: list Claude Code, Codex and Gemini processes and sessions still running with no human input, grade and security-scan SKILL.md files and MCP configs, and compile skills for other agents.
      6
      571 npm
      MIT