MCPcopy Index your code
hub / github.com/modelcontextprotocol/python-sdk / version

Function version

src/mcp/cli/cli.py:210–217  ·  view source on GitHub ↗

Show the MCP version.

()

Source from the content-addressed store, hash-verified

208
209@app.command()
210def version() -> None: # pragma: no cover
211 """Show the MCP version."""
212 try:
213 version = importlib.metadata.version("mcp")
214 print(f"MCP version {version}")
215 except importlib.metadata.PackageNotFoundError:
216 print("MCP version unknown (package not installed)")
217 sys.exit(1)
218
219
220@app.command()

Callers

nothing calls this directly

Calls 2

versionMethod · 0.80
exitMethod · 0.45

Tested by

no test coverage detected