You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Python: Bug: AttributeError: module 'mcp.types' has no attribute 'ToolUseContent' after PR #2597 #2734
PR #2597 introduced a breaking change that prevents agent-framework from importing. The code references types.ToolUseContent and types.ToolResultContent which don't exist in any released version of the mcp package.
def_mcp_type_to_ai_content(
mcp_type: types.ImageContent|types.TextContent|types.AudioContent|types.EmbeddedResource|types.ResourceLink|types.ToolUseContent# ❌ DOES NOT EXIST in mcp package|types.ToolResultContent# ❌ DOES NOT EXIST in mcp package|Sequence[...],
) ->list[Contents]:
Verification
I've tested with multiple mcp package versions (1.13.0, 1.19.0, 1.23.3). None contain these attributes.
Available Tool-related types in mcp.types:
Tool
ToolAnnotations
CallToolRequest
CallToolRequestParams
CallToolResult
ListToolsRequest
ListToolsResult
ToolListChangedNotification
ToolsCapability
Not available:
❌ ToolUseContent
❌ ToolResultContent
Reproduction
fromagent_frameworkimportChatMessage, Role, SequentialBuilder# Fails immediately with AttributeError
Environment
agent-framework:1.0.0b251204
mcp:1.13.0 / 1.19.0 / 1.23.3 (all fail)
Python: 3.13
OS: macOS
Impact
⚠️Breaks all imports of agent-framework
⚠️ Affects DeepLearning.AI Microsoft Agent Framework course materials
⚠️ Students and developers cannot use the package at all
Possible Solutions
Remove the references to ToolUseContent and ToolResultContent if they're not needed
Pinmcp to a specific version that contains these types (if one exists)
Add these types to the mcp package first, then reference them
changed the title [-]Bug: `AttributeError: module 'mcp.types' has no attribute 'ToolUseContent'` after PR #2597[/-][+]Python: Bug: `AttributeError: module 'mcp.types' has no attribute 'ToolUseContent'` after PR #2597[/+]on Dec 9, 2025
Activity
[-]Bug: `AttributeError: module 'mcp.types' has no attribute 'ToolUseContent'` after PR #2597[/-][+]Python: Bug: `AttributeError: module 'mcp.types' has no attribute 'ToolUseContent'` after PR #2597[/+]gauravbrills commentedon Dec 10, 2025
ya seeing the same is there a workaround what version to use till this gets fixed
eavanvalkenburg commentedon Dec 10, 2025
This is strange, I suggest updating MCP, those types were added in modelcontextprotocol/python-sdk#1594 that was released as part of
mcp>=1.23.0gauravbrills commentedon Dec 10, 2025
yes worked post upgrading to
"mcp==1.23.3",eavanvalkenburg commentedon Dec 12, 2025
I fix has gone out to sets the minimum MCP dependency to 1.23 to resolve this.