formachines / errata

Errata / Errors

ImportError: cannot import name 'session' from 'mcp.shared'

ImportError (name cannot be imported) raised by code that AI models write for mcp 2.3.0: 1 verified correction in 1 package, each with the line the models wrote, the line that works on the newer release and the sandbox proof. Updated 2026-10-27.

Corrections
1
Packages
1
Error type
ImportError
Updated
2026-10-27

Error text as printed in the sandbox

ImportError: cannot import name 'session' from 'mcp.shared' (/usr/local/lib/python3.11/site-packages/mcp/shared/__init__.py)
Corrections for this error
PackageFails onChanged APIChangeStatusFix
mcp PyPI2.3.0mcp.shared.sessionbehaviour changedverifiedanyio.create_memory_object_stream(1)

Wide table: scroll it sideways to see every column.

Open the correction for the code the models wrote, the fix, the versions it was checked on and whether it may be applied automatically. All errors.

For agents