Team Skills
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
FastMCP Skills over MCP 範例
用 FastMCP 4.2 從 MCP Server 發布 Agent Skills(SEP-2640、io.modelcontextprotocol/skills),並附一個 Host 端載入器,示範按需讀檔與逐檔驗證。
Tools 定義可呼叫的操作:
format_release_notes。Skills 說明何時、如何使用這些操作:
release-notes技能指示模型呼叫上面的工具。
FastMCP 對 Skills 的支援為實驗性,Skills 擴充規格為 Beta(基線 MCP 2026-07-28)。本範例於 2026-11-30 以 FastMCP 4.2.6、Python 3.12+ 實測。升級前請先核對發布說明。
結構
skills/ # 每個含 SKILL.md 的資料夾就是一個技能
├── code-review/
│ ├── SKILL.md → skill://code-review/SKILL.md
│ └── references/checklist.md # 附屬檔,按需讀取
└── ops/release-notes/ # ops/ 是命名空間,不是技能
├── SKILL.md → skill://ops/release-notes/SKILL.md
└── templates/release-notes.md
src/fastmcp_skills_example/
├── server.py # FastMCP Server:SkillsDirectoryProvider + 一個工具
├── host.py # Host 端載入器:固定條目、按需讀檔、驗證 size/digest/frontmatter
└── demo.py # 端到端示範
tests/test_skills.py # 整合驗收技能資料夾名稱必須等於 SKILL.md frontmatter 的 name,否則 Server 啟動時就會報錯。
Related MCP server: dsh-skills-anywhere
快速開始
需要 uv。
uv sync
uv run skills-demo # 以 in-memory 方式啟動 Server 並跑完整個 Host 流程
uv run pytest # 8 個整合測試以 Streamable HTTP 啟動,再從另一個終端連線:
uv run skills-server --http --port 8000
uv run skills-demo --url http://127.0.0.1:8000/mcp不加 --http 時走 stdio,可直接接到支援 MCP 的 Host。編輯技能時可加 --reload,每次請求都重讀資料夾。SKILLS_DIR 環境變數可改用其他技能目錄。
Server 端
核心只有一行 Provider:
from fastmcp import FastMCP
from fastmcp.skills.provider import SkillsDirectoryProvider
mcp = FastMCP("Team Skills", providers=[SkillsDirectoryProvider("./skills")])Provider 會自動註冊 Skills 擴充,所以:
協商到擴充的 Client 可用
skills/list、skills/get;所有 Client 都能用一般的resources/read讀檔。每個條目帶完整 manifest:每個檔案的 URI、原始位元組數
size與 SHA-256digest。預設啟動時讀一次資料夾,manifest 與供應的位元組來自同一份快照。
注意事項:
不要使用 FastMCP 4.1 的
experimental_skills=True,該 API 已棄用,預計在 4.3 移除。FastMCP 4.2 未實作
directoryRead,Host 應從持有的 manifest 推導檔案樹。回應預設為
cacheScope: "private"、ttlMs: 0,是保守設定。
實際的 skills/list 回應(節錄):
{
"resultType": "complete",
"ttlMs": 0,
"cacheScope": "private",
"skills": [{
"uri": "skill://code-review/SKILL.md",
"frontmatter": { "name": "code-review", "description": "Review a code change ...", "metadata": { "author": "fastmcp-skills-example", "version": "1.0" } },
"resources": [
{ "uri": "skill://code-review/SKILL.md", "digest": "sha256:1367f2…", "size": 658 },
{ "uri": "skill://code-review/references/checklist.md", "digest": "sha256:765543…", "size": 439 }
]
}]
}直接以 HTTP 呼叫時,除了 body 的 _meta,還須帶 SEP-2243 標頭 MCP-Protocol-Version、Mcp-Method(resources/read 另須 Mcp-Name)。缺少時 Server 回 HTTP 400。使用 SDK 的 Transport 會自動加上。
Host 端
Client 須主動宣告擴充:
from fastmcp import Client
from fastmcp.skills import SkillsClientExtension
async with Client(url, extensions=[SkillsClientExtension()]) as client:
entries = await client.list_skills() # 只取 metadata,不讀檔
entry = await client.get_skill("skill://ops/release-notes/SKILL.md")FastMCP 內建的 client.read_skill(uri) 會一次下載並驗證整包技能,適合匯入。要把技能載入模型 context 時,host.py 的 SkillLoader 改為按需讀取:
固定(pin)載入時的條目。
dynamic條目依本範例政策直接拒絕。load_main()讀SKILL.md,比對位元組數、SHA-256,並逐欄比對完整 frontmatter。load_file("templates/release-notes.md")以技能根目錄解析相對路徑,只允許 manifest 已列出的 URI,同樣逐一驗證。跳出技能根目錄的路徑一律拒絕。approval_key綁定來源 Server、技能 URI 與完整的 (URI, digest) 集合。集合改變時,舊的持久核准不再適用。for_model()進入模型 context 前標上來源 Server 與 URI。
驗證失敗時丟出 SkillVerificationError(reason 為 unlisted、size、digest、frontmatter 或 dynamic)。Host 應丟棄該內容,以 skills/get 刷新條目,再依核准規則重新載入。
本範例未涵蓋的 Host 責任:載入同意的 UI、allowed-tools 的權限處理(遠端技能預設忽略)、執行本機程式或跨 Server 讀取的明確核准、累計容量上限(512 檔、16 MiB)及磁碟快取。
整合驗收(tests/test_skills.py)
測試 | 驗證內容 |
| 協商到 2026-07-28,Server 宣告 |
| 條目完整, |
| 未知技能回 |
| 主檔與附屬檔皆依 manifest 驗證 |
| 未列出或跳出根目錄的路徑被拒 |
| 條目多一個 frontmatter 欄位即拒載 |
| 發布更新後舊條目驗證失敗,刷新後可載入,核准鍵改變 |
| 技能指示的工具可呼叫 |
參考
授權
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Hosted MCP server and Agent Skills for specs, engineering threads, and project memory.
Governed AI agent skills — one library, distributed to devs and exposed to remote agents over MCP.
Search and inspect source-pinned agent skills, plugins and tools through a free public MCP.
Your org's skills, agents and MCP configs, versioned from GitHub and served to any agent.
Related MCP Servers
- AlicenseAqualityBmaintenanceEnables 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.71MIT
- AlicenseNot gradedqualityBmaintenanceEnables MCP clients to discover, search, and load agent skills from many sources, including other agents' skill directories, Claude Code plugin marketplaces, and remote git repositories, with no copying or syncing required.611 npm8MIT
- AlicenseNot gradedqualityCmaintenanceServes 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
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to discover, load, and recommend versioned skills from a self-hosted library over MCP, with scoped access and immutable revisions.283MIT