Skip to content

mcp serve: directory reads and the remaining SEP-2640 conformance gaps #895

Closed

Description

@salmonumbrella

The situation

skillshare mcp serve already speaks the required half of the Skills extension (io.modelcontextprotocol/skills, SEP-2640). On v0.30.7, server/discover declares resources and the extension, and the server implements skills/list, skills/get, and resources/read with a complete manifest (full frontmatter, sha256 digests, sizes, 512 files / 16 MiB). #428 left directory reads for later: "Directory reads can wait."

The published spec still has that method, optional until the server advertises it. The conformance suite skips sep-2640-skills-directory unless directoryRead is true. Two other checks warn because a served SKILL.md never appears in resources/list, so its resource name and description are not observable.

What works today, and why it is not enough

  • The extension object is {} (internal/skillserve/server.go). That is the specified way to say "no optional features." Clients must not call resources/directory/read, and a server that has not declared the flag is not required to recognize the method.
  • Skill files are readable at skill://<skill-path>/SKILL.md and supporting URIs, and reads stay inside the listed manifest. There is no way to ask what templates/ contains without already knowing the names. A host that holds the manifest can answer from it. A host that calls the live method, and the conformance scenario, cannot.
  • Only a skill://{+path} template is registered. resources/list therefore has no SKILL.md resource, so sep-2640-skillmd-metadata-name and sep-2640-skillmd-metadata-description come back untestable. The spec says those fields SHOULD be the frontmatter name and description.
  • I have not run the suite against this server. The gaps above are from v0.30.7 against the published spec and those scenarios. Anything else they fail should be fixed here, not left for another issue.

Ask

Make mcp serve pass the official Skills server scenarios, including the optional directory surface. Declare directoryRead: true only together with a working method. Declaring it alone turns today's skip into a failure.

  • Directory reads. Implement resources/directory/read for every directory implied by a served skill: the skill root (skill://<skill-path>, no trailing slash) and each subdirectory. Direct children only. A subdirectory is mimeType: "inode/directory". A file uses its content type (text/markdown for .md). The SKILL.md child uses the frontmatter name and description. Other children use the final path segment as name. Same target filters and containment as resources/read: only files the catalog lists, nothing skipped, nothing outside the skill. An unknown URI or a non-directory returns -32602. A served directory with no children returns an empty resources array. Paginate with the same cursor style as skills/list. A single page is fine when the directory fits. Carry resultType, ttlMs, and cacheScope like skills/list. This is the current catalog, not a promise that it matches a client's older held entry.
  • SKILL.md resource metadata. Include each served SKILL.md in resources/list, paginated, with uri, mimeType: text/markdown, and name and description from frontmatter. Metadata only. Do not read file bytes to answer the list. Keep the template so supporting-file reads still resolve. Leave supporting files off the global list. Directory read is how those are browsed. A large catalog must not get slower because of this.
  • Prove it. Run sep-2640-skills-enumeration, sep-2640-skills-manifest, and sep-2640-skills-directory against mcp serve. Directory checks must run, not skip. The two metadata checks must succeed, not warn as untestable. Fix any other failure those scenarios report, including a frontmatter object that does not match the SKILL.md the server just returned. Extend the mcp serve runbook with a directory read, a non-directory -32602, and a listed SKILL.md whose name and description match its frontmatter.

Out of scope: the list_skills / read_skill fallback, the Executor /.well-known/agent-skills/ index, forcing unique skill names (the spec allows collisions and hosts disambiguate), resources: "dynamic", and a row in the ext-skills implementations list. That listing can wait until the suite is green.

Refs #428.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions