Skip to content

Preserve skill metadata through provider wrapping#3237

Merged
jlowin merged 2 commits intomainfrom
fix/skill-meta-survives-mounting
Feb 19, 2026
Merged

Preserve skill metadata through provider wrapping#3237
jlowin merged 2 commits intomainfrom
fix/skill-meta-survives-mounting

Conversation

@jlowin
Copy link
Copy Markdown
Member

@jlowin jlowin commented Feb 19, 2026

When skill resources live on a mounted sub-server, the parent's list_resources() wraps them in FastMCPProviderResource — which was copying resource.meta (the raw field) instead of resource.get_meta() (the computed metadata). Any component that builds metadata dynamically via get_meta() had it silently dropped during mounting.

This fixes both sides: SkillResource and SkillFileResource now populate _meta with skill identity, and all four wrap() methods (tool, resource, prompt, template) now use get_meta() so computed metadata survives wrapping.

mcp = FastMCP("parent")
child = FastMCP("child")
child.add_provider(SkillProvider(Path("my-skill")))
mcp.mount(child, "skills")

resources = await mcp.list_resources()
for r in resources:
    skill = r.get_meta().get("fastmcp", {}).get("skill")
    if skill:
        print(f"{skill['name']} (manifest={skill['is_manifest']})")

Closes #3220

@jlowin jlowin added bug Something isn't working. Reports of errors, unexpected behavior, or broken functionality. server Related to FastMCP server implementation or server-side functionality. provider Related to the FastMCP Provider class v3 Targeted for FastMCP 3 labels Feb 19, 2026
@jlowin jlowin merged commit aa7946d into main Feb 19, 2026
10 checks passed
@jlowin jlowin deleted the fix/skill-meta-survives-mounting branch February 19, 2026 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working. Reports of errors, unexpected behavior, or broken functionality. provider Related to the FastMCP Provider class server Related to FastMCP server implementation or server-side functionality. v3 Targeted for FastMCP 3

Projects

None yet

Development

Successfully merging this pull request may close these issues.

SkillResource in list_resources not available for mounted servers

1 participant