skills-mcp-server

skills-mcp-server

Serves SKILL.md-based skills as MCP resources and tools over streamable HTTP, enabling remote discovery and retrieval of skill files with full YAML frontmatter parsing.

Category
访问服务器

README

skills-mcp-server

An MCP server, built with FastMCP, that serves a directory of SKILL.md-based "skills" over the network — as both MCP resources and MCP tools.

How it works

  • Resources come from FastMCP's built-in fastmcp.server.providers.skills.SkillsDirectoryProvider. It scans a root directory, and treats every subdirectory containing a SKILL.md file as one skill, exposing:

    • skill://{name}/SKILL.md — the skill's main file
    • skill://{name}/_manifest — a synthetic JSON file listing (path/size/hash) for the skill
    • skill://{name}/{relative/path} — every other file in the skill folder (e.g. references/*.md)

    This server configures the provider with supporting_files="resources", so every supporting file is individually listed by list_resources() up front (not hidden behind a lazy URI template) — good for upfront discoverability by clients that just call list_resources() once.

  • Tools (list_skills, get_skill) are hand-written on top of the same skills directory, since the provider only exposes resources, not tools. They parse full YAML frontmatter (interface: blocks, nested lists, etc.) rather than relying on the provider's internal simplified line-based frontmatter parser, so nested metadata (e.g. risk_level, confirmation_points) comes through correctly.

    • list_skills() → name, description, argument hint, risk level, and path for every skill.
    • get_skill(name) → full parsed frontmatter, the markdown body, and a list of that skill's supporting reference files.
  • Transport: streamable-HTTP (mcp.run(transport="http", ...)), since this is meant to run in a container and be reached by remote MCP clients rather than over stdio.

  • Skills directory is never baked into the image. The Dockerfile only ships the server code; the actual skills live on the host and are mounted as a read-only volume at container runtime (docker-compose.yml mounts them to /skills). Swap in a different skills directory by changing the compose volume mount or the SKILLS_DIR env var — no rebuild needed.

Configuration

All configuration is via environment variables (see .env.example):

Variable Default Meaning
SKILLS_DIR /skills Root directory to scan for skill folders
MCP_HOST 0.0.0.0 Host/interface the HTTP transport binds to
MCP_PORT 8010 Port the HTTP transport binds to
SKILLS_RELOAD true If true, re-scan the skills directory on every request. Default on since an external process (e.g. a cron job re-cloning a skills repo into the mounted volume) may mutate content behind the server's back. Set false for a static skills directory to skip re-scan overhead.
SKILLS_SUPPORTING_FILES resources resources (list every file upfront) or template (lazy URI template)
LOG_LEVEL INFO Standard Python logging level

A GET /health route is also registered for container/orchestrator liveness checks.

Local development quickstart

Requires Python 3.11+ and uv.

uv venv .venv
source .venv/bin/activate
uv pip install -e .

# Point at any skills directory you like — this repo bundles a minimal
# example under ./example-skills:
export SKILLS_DIR=./example-skills
skills-mcp-server
# -> Starting MCP server 'Skills MCP Server' with transport 'http' on http://0.0.0.0:8010/mcp

(pip install -e . in a plain venv works too, if you'd rather not use uv.)

Quick smoke test with the FastMCP client

import asyncio
from fastmcp import Client

async def main():
    async with Client("http://127.0.0.1:8010/mcp") as client:
        tools = await client.list_tools()
        print([t.name for t in tools])

        resources = await client.list_resources()
        print([str(r.uri) for r in resources])

        result = await client.call_tool("list_skills", {})
        print(result.data)

asyncio.run(main())

Or with curl against the health route:

curl http://127.0.0.1:8010/health
# {"status": "ok", "skills_dir": "./example-skills"}

Docker quickstart

docker compose up --build

This builds the image (server code only — no skills baked in), mounts the bundled ./example-skills directory from the repo to /skills inside the container read-only, and serves on http://localhost:8010/mcp. No configuration is required for this to work on a fresh clone.

Pointing at a different skills directory

Copy docker-compose.override.yml.example to docker-compose.override.yml (untracked — see .gitignore) and edit the path:

services:
  skills-mcp-server:
    volumes:
      - /path/to/your/skills:/skills:ro

Compose automatically merges docker-compose.override.yml over docker-compose.yml, so your own skills directory is used without editing the tracked file.

Or, if running the container directly instead of via compose:

docker run --rm -p 8010:8010 \
  -v /path/to/your/skills:/skills:ro \
  -e SKILLS_DIR=/skills \
  skills-mcp-server:local

Connecting an MCP client

Any MCP client that supports streamable-HTTP transport can connect directly to http://<host>:8010/mcp. Example generic client config:

{
  "mcpServers": {
    "skills": {
      "url": "http://localhost:8010/mcp",
      "transport": "http"
    }
  }
}

Project layout

skills-mcp-server/
├── pyproject.toml
├── Dockerfile
├── docker-compose.yml
├── docker-compose.override.yml.example  # template for pointing at your own skills dir
├── .env.example
├── .gitignore
├── LICENSE
├── README.md
├── example-skills/            # bundled fixture so the server works out of the box
│   └── hello-world/
│       ├── SKILL.md
│       └── references/
│           └── greeting-styles.md
└── src/skills_mcp_server/
    ├── __init__.py
    ├── config.py      # env-driven Settings
    ├── discovery.py    # full YAML frontmatter parsing for list_skills/get_skill
    ├── tools.py        # list_skills / get_skill MCP tool definitions
    └── server.py       # FastMCP app wiring, provider, health route, entrypoint

License

Apache License 2.0 — see LICENSE.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选