skills-over-mcp-ts-server
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.
skills-over-mcp-ts-server
A minimal MCP server that publishes Agent Skills over MCP (SEP-2640, io.modelcontextprotocol/skills) with the TypeScript SDK 2.4.0, plus an end-to-end smoke test that uses the SDK's own SkillsClient.
用 TypeScript SDK 2.4.0 撰寫的最小 MCP Server 範例:把 skills/ 目錄裡的 Agent Skills 透過 MCP 發布,並附一支以 SkillsClient 走完整個探索、驗證、讀取流程的整合測試。
MCP 2026-07-28 · SEP-2640 Final · Skills 擴充規格 Beta · @modelcontextprotocol/server 2.4.0 · 最後驗證 2026-11-30
功能
以
loadSkills()在啟動時掃描skills/,建立固定快照。manifest 的size/SHA-256digest與實際供應的位元組來自同一版。提供
skills/list、skills/get、resources/read,以及 SDK 內建的resources/directory/read。用
createMcpHandler同時服務 2026-07-28 與 2025-11-25 的 Client。strict: true:超過 512 檔/16 MiB 或 frontmatter 有誤時直接啟動失敗。快取提示採 SDK 預設
ttlMs: 0、cacheScope: "private"。預設只綁
127.0.0.1。執行中在終端機輸入
r再按 Enter,會重新掃描技能目錄並通知訂閱中的 Client。
Related MCP server: skill-mcp
快速開始
需要 Node.js 20 以上。
git clone https://github.com/stevenke1981/skills-over-mcp-ts-server
cd skills-over-mcp-ts-server
npm install
npm start # MCP endpoint: http://127.0.0.1:3000/mcp環境變數:PORT(預設 3000)、HOST(預設 127.0.0.1)、SKILLS_DIR(預設 ./skills)。
整合測試
npm test # tsc 型別檢查 + scripts/smoke.ts測試會在隨機埠啟動 Server,逐項檢查:
檢查 | 預期 |
擴充宣告 |
|
| 兩項完整條目,沒有無效條目, |
manifest 完整性 | 每個檔案的 |
| 依 URI 取得條目, |
讀主檔 | 通過 size、digest、frontmatter 驗證 |
讀附屬檔 | 按需讀取並通過驗證 |
未列出的檔案 | 送出請求前就以 |
未知技能 |
|
自動協商 |
|
舊版 Client | 2025-11-25 握手也能列出並驗證技能 |
用 curl 看線路格式
2026-07-28 的 HTTP 請求除了 body 內的 _meta,還須帶 MCP-Protocol-Version 與 Mcp-Method 標頭,且要與 body 一致,否則 Server 以 HTTP 400 回 -32020。讀檔的 resources/read 另須帶 Mcp-Name,值等於 params.uri。用 SDK 的 Client 時這些標頭會自動加上。
curl -s -X POST http://127.0.0.1:3000/mcp \
-H 'content-type: application/json' \
-H 'accept: application/json, text/event-stream' \
-H 'mcp-protocol-version: 2026-07-28' \
-H 'mcp-method: skills/list' \
-d '{"jsonrpc":"2.0","id":1,"method":"skills/list","params":{"_meta":{
"io.modelcontextprotocol/protocolVersion":"2026-07-28",
"io.modelcontextprotocol/clientCapabilities":{},
"io.modelcontextprotocol/clientInfo":{"name":"curl","version":"1"}}}}'讀取檔案時加上 Mcp-Name:
curl -s -X POST http://127.0.0.1:3000/mcp -H 'content-type: application/json' -H 'accept: application/json, text/event-stream' -H 'mcp-protocol-version: 2026-07-28' -H 'mcp-method: resources/read' -H 'mcp-name: skill://code-review/SKILL.md' -d '{"jsonrpc":"2.0","id":2,"method":"resources/read","params":{"uri":"skill://code-review/SKILL.md","_meta":{
"io.modelcontextprotocol/protocolVersion":"2026-07-28",
"io.modelcontextprotocol/clientCapabilities":{}}}}'skills/list 回應中每項技能都有 uri、原樣映射的 frontmatter,以及列出主檔與附屬檔 digest/size 的 resources。
專案結構
skills-over-mcp-ts-server/
├── src/
│ ├── app.ts # loadSkills + createMcpHandler + Node http 轉接
│ └── server.ts # 進入點:環境變數、重新載入、結束處理
├── scripts/
│ └── smoke.ts # 以 SkillsClient 執行的整合測試
├── skills/ # 要發布的技能,每個資料夾一項
│ ├── code-review/
│ │ ├── SKILL.md
│ │ └── references/checklist.md
│ └── release-notes/
│ ├── SKILL.md
│ └── templates/release-notes.md
└── package.json新增技能
在
skills/下建立資料夾,資料夾名稱必須等於SKILL.mdfrontmatter 的name。寫
SKILL.md(必填name、description),附屬檔放在子資料夾並以相對路徑連結。重新啟動,或在執行中輸入
r。URI 會是skill://<name>/SKILL.md。
.gitattributes 固定 LF 換行,避免 Windows 簽出時把檔案轉成 CRLF,讓 digest 與 Git 內的內容不同。
上線前要補的部分
這是本機範例,沒有身分驗證。對外部署前至少要:
加上授權:在
handler.fetch(request, { authInfo })前驗證呼叫者,並在探索、取得條目及每次讀檔時依身分過濾技能。依身分變動的回應維持
cacheScope: "private",並確認代理與 CDN 不會跨身分共用快取。檢查 Host/Origin:若綁到
127.0.0.1以外的位址,加上 Host 標頭驗證以防 DNS rebinding。確認目標 Host 支援 Skills 擴充:支援一般 Resources 的客戶端不一定能原生載入技能。
相關資源
skills-over-mcp 技能:本範例依此技能的發布流程與整合驗收撰寫
授權
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
Search and discover Agent Skills from the skills.sh registry. Powered by HAPI MCP server.
Discover and inspect public Runx skills before installing them. This read-only hosted MCP exposes search_skills and get_skill. The Apache-2.0 Rust runtime executes skills locally with scoped authority, approval gates and signed receipts. Docs: https://runx.ai/docs/mcp.
Governed AI agent skills — one library, distributed to devs and exposed to remote agents over MCP.
Scan AI skill packages, apply policy and human approval, and distribute approved versions via MCP.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceServes Agent Skills over MCP using the SEP-2640 Skills Extension, enabling skills discovery, retrieval, and resource reading via MCP.Apache 2.0
- AlicenseAqualityBmaintenanceEnables 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.4201 npmMIT
- 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 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