Expose local_provider property, deprecate FastMCP.remove_tool()#3155
Expose local_provider property, deprecate FastMCP.remove_tool()#3155
Conversation
Component removal now goes through mcp.local_provider.remove_*() which makes it clear you're operating on locally-registered components.
WalkthroughThis PR exposes the FastMCP server's LocalProvider instance through a new public Possibly related PRs
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 🧹 Recent nitpick comments
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
FastMCP.remove_tool()only operated on the local provider but gave misleading errors if a tool existed on a different provider (e.g. a mounted subserver). Rather than adding parallelremove_resource()/remove_prompt()/remove_template()methods that all share this limitation, the server'sLocalProvideris now accessible as a public property — making it explicit that removal is scoped to locally-registered components.FastMCP.remove_tool()still works but emits aDeprecationWarning.Closes #2880