Skip to main content

fastmcp.utilities.skills

Client utilities for discovering and downloading skills from MCP servers.

Functions

list_skills

list_skills(client: Client) -> list[SkillSummary]
List all available skills from an MCP server. Discovers skills by finding resources with URIs matching the skill://{name}/SKILL.md pattern. Args:
  • client: Connected FastMCP client
Returns:
  • List of SkillSummary objects with name, description, and URI

get_skill_manifest

get_skill_manifest(client: Client, skill_name: str) -> SkillManifest
Get the manifest for a specific skill. Args:
  • client: Connected FastMCP client
  • skill_name: Name of the skill
Returns:
  • SkillManifest with file listing
Raises:
  • ValueError: If manifest cannot be read or parsed

download_skill

download_skill(client: Client, skill_name: str, target_dir: str | Path) -> Path
Download a skill and all its files to a local directory. Creates a subdirectory named after the skill containing all files. Args:
  • client: Connected FastMCP client
  • skill_name: Name of the skill to download
  • target_dir: Directory where skill folder will be created
  • overwrite: If True, overwrite existing skill directory. If False (default), raise FileExistsError if directory exists.
Returns:
  • Path to the downloaded skill directory
Raises:
  • ValueError: If skill cannot be found or downloaded
  • FileExistsError: If skill directory exists and overwrite=False

sync_skills

sync_skills(client: Client, target_dir: str | Path) -> list[Path]
Download all available skills from a server. Args:
  • client: Connected FastMCP client
  • target_dir: Directory where skill folders will be created
  • overwrite: If True, overwrite existing files
Returns:
  • List of paths to downloaded skill directories

Classes

SkillSummary

Summary information about a skill available on a server.

SkillFile

Information about a file within a skill.

SkillManifest

Full manifest of a skill including all files.