Skip to content

Support for path convertor {value:path} in FastMCP #220

Description

@dsp-ant

Currently we do not allow for matching paths in resource templates, meaning that

@app.resource("test://{foo}")

will not match test://foo/bar. This is intended. However at times people want to explicitly match paths. FastAPI offers in this case a path convertor, such that

@app.resource("test://{foo:path}")

would match test://foo/bar.

We should consider adding a convertor approach or something similar to resource templates.

Activity

  1. added
    good first issue
    ready for work
    on Oct 3, 2025
  2. beaterblank commented on Oct 7, 2025

    @beaterblank

    Hello, I'd like to work on this issue.

    FastAPI uses starlette converters for this, like here: https://github.com/Kludex/starlette/blob/main/starlette/convertors.py

    will implement something similar.

  3. added a commit that references this issue on Oct 7, 2025
  4. beaterblank commented on Oct 7, 2025

    @beaterblank

    Hello, I've addressed this in the pull request above.
    The URI matching logic now supports multiple parameter types, not just {foo : path}, but also {foo : int}, {foo : float}, {foo : str} and {foo : uuid}. (defaults to {foo : str})
    The design is also easily extensible to support additional types in the future.
    Please review it.
    Thank you!

  5. added
    enhancement
    P1
    needs maintainer
    on Oct 7, 2025
  6. removed
    good first issue
    needs maintainer
    on Dec 9, 2025
  7. fernando-torres-blip-ai commented on Dec 29, 2025

    @fernando-torres-blip-ai

    Any updates on this ?

  8. beaterblank commented on Dec 29, 2025

    @beaterblank

    please check #1439

  9. added
    needs decision
    and removed
    ready for work
    on Apr 17, 2026
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

    P1enhancementneeds decision

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions