-
Notifications
You must be signed in to change notification settings - Fork 488
mcp_proxy: FastMCP init uses name= (not title=) #2018
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Does this require us to specify the version of the fastmcp package it is depending on? |
|
Please run pre-commit: https://docs.ag2.ai/latest/docs/contributor-guide/pre-commit/ |
|
No pin needed. I updated get_mcp to be version-agnostic: it tries FastMCP(name=...) and on TypeError falls back to FastMCP(title=...). This keeps compatibility with both newer mcp releases (where the ctor uses name) and older ones (that used title). If you’d still prefer a lower bound, I can add mcp ≥ the first release with name, but the current patch works without changing dependencies. |
ef02708 to
8779f96
Compare
|
Updated get_mcp to only use name= after discussing with @marklysze. Change has been committed and pushed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @bassilkhilo-ag2, that attribute aligns with MCP's FastMCP implementation with our minimum version of the package, so looks good to me.
Codecov Report❌ Patch coverage is
... and 30 files with indirect coverage changes 🚀 New features to boost your workflow:
|
Why are these changes needed?
The FastMCP class in newer versions no longer accepts a title keyword argument.
This was causing a TypeError in MCPProxy.get_mcp when trying to initialize FastMCP.
This change updates the call to use name= instead, which matches the current constructor signature,
allowing MCP clients to initialize without error.
Related issue number
Closes #
(No existing issue found — discovered during local testing.)
Checks
I've reviewed whether any doc changes are needed for https://docs.ag2.ai/. (No doc changes required.)