Skills over MCP (SEP-2640) support for the TuiML MCP server.
The bundled SKILL.md (the canonical TuiML agent guide, also installed by tuiml setup as a Claude Code skill) is served over MCP so any client that speaks the io.modelcontextprotocol/skills extension can discover and read it without a separate install step. The server:
-
advertises
capabilities.extensions["io.modelcontextprotocol/skills"]; -
serves
skills/listandskills/get(the extension's two methods); - exposes every skill file as an ordinary MCP resource under the
skill:// scheme (skill://tuiml/SKILL.md), so clients without the extension can still read the guide via resources/read.
The wire shapes follow the SEP-2640 working draft maintained by the Skills Over MCP working group (https://github.com/modelcontextprotocol/experimental-ext-skills).
>>> from tuiml.agent.mcp.skills import get_skill_entry, SKILL_MD_URI
>>> entry = get_skill_entry()
>>> entry["uri"] == SKILL_MD_URI
True
>>> entry["frontmatter"]["name"]
'tuiml'
>>> [r["uri"] for r in entry["resources"]][:2]
['skill://tuiml/SKILL.md', 'skill://tuiml/reference/cli.md']
>>> entry["resources"][0]["digest"][:7]
'sha256:'
Functions
Parse the flat key: value YAML frontmatter at the top of a SKILL.md.
name, description, version, ...). Nested or multi-line values are not needed by the bundled skill, so no YAML dependency is pulled in.Parameters
text
--- block.
Returns
dict of str -> str
Return the SKILL.md frontmatter as a dict.
Returns
dict of str -> str
name and description; the bundled file also carries version and mcp_server.
Build the SEP-2640 skill entry returned by skills/list and skills/get.
Returns
dict
{"uri", "frontmatter", "resources"} where resources lists every file with its uri, sha256: digest and size so a client can install and verify the skill.
Build the skills/list result.
Returns
dict
{"skills": [entry]} with the single bundled TuiML skill. The list is complete, so no nextCursor is set.
Resolve a skills/get request.
Parameters
uri
SKILL.md URI or its root URI.
Returns
dict or None
uri names no bundled skill.
Describe every skill file for resources/list.
Returns
list of dict
uri, name, description, mime_type and size, ready to unpack into mcp.types.Resource. SKILL.md takes its name and description from the frontmatter, as SEP-2640 recommends.