This is the documentation for v2 — looking for the v1 documentation?
Skip to content

MCP TypeScript SDK (V2) / @modelcontextprotocol/server / ext/skills/node

ext/skills/node ​

Functions ​

loadSkills() ​

loadSkills(root, options?): Promise<SkillCatalog>

Defined in: packages/server/src/ext/skills/node.ts:65

Loads every skill under root (a folder of skill folders, each with a SKILL.md) into a SkillCatalog. Same as SkillsExtension.load(nodeSkillFiles(root), options).

Parameters ​

root ​

string

options? ​

SkillCatalogOptions

Returns ​

Promise<SkillCatalog>

Example ​

ts
const skills = await loadSkills('./skills');
skills.attach(mcp);

nodeSkillFiles() ​

nodeSkillFiles(root): SkillFiles

Defined in: packages/server/src/ext/skills/node.ts:31

A SkillFiles adapter over a folder. list reports symlinks and other special files as unsupported, so a catalog skips the skill that contains one. read refuses anything that is not a regular file, and a symlink as the final path component where the platform has O_NOFOLLOW; symlinked folders earlier in a path passed to it directly are not checked. Both throw a TypeError for a path that could leave root (a .. segment, also .. on Windows).

Parameters ​

root ​

string

Returns ​

SkillFiles