Skip to content
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

Question: version in create_initialization_options is the pkg_ver for "mcp" #87

Open
restlessronin opened this issue Dec 3, 2024 · 4 comments

Comments

@restlessronin
Copy link

This is more in the nature of a request for clarification.

The sample code in the SDK here:

https://github.com/modelcontextprotocol/python-sdk/blob/main/examples/servers/simple-prompt/mcp_simple_prompt/server.py

shows the use of create_initialization_options to set the initialization options. However this function is setting the version to 'pkg_ver("mcp")' which seems to indicate that it is the protocol version that is being indicated.

In the sqlite example, the version is manually set to 0.1.0, so it won't use the protocol version. Is this a mistake?

Is the version meant to record the version of whatever the actual server program is? or is it mean to be the protocol version.

@dsp-ant
Copy link
Member

dsp-ant commented Dec 4, 2024

This version is pure informational and for debugging purposes. The protocol version is exchanged differently and hardcoded into the current version of the SDK.

@restlessronin
Copy link
Author

If it's for user visible debugging, perhaps the create_initialization_options could take the version as a parameter? it could be set to the pkg_ver of the server, that's more useful in the Claude Desktop UX than the the mcp version, which is relatively static. it's a small change, but i can submit the PR if that's of interest.

@dsp-ant
Copy link
Member

dsp-ant commented Dec 4, 2024

I think that would be an improvement. If you are so kind and create a PR @restlessronin

@restlessronin
Copy link
Author

@dsp-ant here it is: #90

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

No branches or pull requests

2 participants