Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Both modules should change "from server import main" to "from .server import main", otherwise it will prompt that the file cannot be found.
Motivation and Context
Fixed the issue of errors when executing the commands python -m mcp_simple_resource and python -m mcp_simple_tool.
Mainly used in vscode's continue plugin and python code.
I am an AI product developer. When mcp appeared, I started to pay attention to mcp Resources, mcp Tools, and mcp Prompts. Whenever I use python-sdk to demonstrate the three functions of mcp to my friends, the python -m mcp_simple_resource and python -m mcp_simple_tool functions always fail, so I have to modify the local code and then execute it. Whenever the python-sdk project updates its version, I need to update the local code first. So I filed an RP to permanently solve this error.
How Has This Been Tested?
Go to the corresponding directory and execute
python -m mcp_simple_resource
and
python -m mcp_simple_tool