docs: add warning about module name conflicts in FileSystemProvider#3812
docs: add warning about module name conflicts in FileSystemProvider#3812vincent067 wants to merge 1 commit intoPrefectHQ:mainfrom
Conversation
Add a warning to the FileSystemProvider documentation advising users against naming their components directory 'mcp' when it contains an __init__.py file. This prevents import conflicts with the mcp package that FastMCP depends on. Fixes potential confusion reported in discussions about FileSystemProvider import errors.
|
Thanks for flagging this, but I don't want to add a warning. The real problem is that our own quickstart example tells users to name the directory FileSystemProvider(Path(__file__).parent / "mcp")That's the footgun — the directory name collides with the installed Going to close this, but happy to review a follow-up that just updates the example. |
Summary
This PR adds a warning to the FileSystemProvider documentation about potential import conflicts when naming the components directory
mcp.Problem
Users have reported confusion when using
mcpas their components directory name with an__init__.pyfile. This causes import conflicts with themcppackage that FastMCP depends on, resulting in errors like:Solution
Add a clear warning in the Quick Start section advising users to avoid naming their components directory
mcpwhen using package mode (with__init__.py).Changes
<Warning>block indocs/servers/providers/filesystem.mdxmcp_components,server, orcomponentsChecklist