Skip to content

feat[core]: implement FastMCP 2.11+ resource template support#101

Merged
aschlean merged 2 commits intomainfrom
asch/resource-templates
Aug 17, 2025
Merged

feat[core]: implement FastMCP 2.11+ resource template support#101
aschlean merged 2 commits intomainfrom
asch/resource-templates

Conversation

@aschlean
Copy link
Contributor

Description

Add proper distinction between static resources and templated resources

Type of change

  • New feature (non-breaking change which adds functionality)

Add proper distinction between static resources and templated resources:
- Static resources (no URI params) use Resource.from_function() + mcp.add_resource()
- Templated resources (with URI params) use ResourceTemplate.from_function() + mcp.add_template()
- Added ResourceTemplate import to generated server code
- Enhanced telemetry integration to handle both resource types

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@aschlean aschlean self-assigned this Aug 17, 2025
Minor formatting improvements to resource template implementation:
- Fix line spacing and indentation
- Break long comment line for better readability

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@aschlean aschlean merged commit 4fa9ebd into main Aug 17, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant