mcp-atlassian crashes with Pydantic 2.12.0: 'cannot specify both default and default_factory'
After Pydantic 2.12.0 was released, running
uvx mcp-atlassianon Linux with Python 3.12 fails immediately withTypeError: cannot specify both default and default_factory. The crash affects the main branch and the released PyPI package, and was also seen from gemini-cli. Why does this happen and what is the workaround?Originally asked on GitHub: https://github.com/sooperset/mcp-atlassian/issues/721
6 answers
The thread explains the root cause: mcp-atlassian's pinned
fastmcpdependency defines a setting with bothdefaultanddefault_factory, which Pydantic 2.12.0 rejects. The fastmcp problem is fixed upstream, so mcp-atlassian needs a newerfastmcpconstraint; the thread does not name a fixed mcp-atlassian release. Until then, pin Pydantic below 2.12.Workaround that was confirmed: replace
"pydantic>=2.10.6"with"pydantic==2.11.9"inpyproject.tomland reinstall. If you useuvx, set the MCP server args in your client config:json{ "mcpServers": { "mcp-atlassian": { "command": "uvx", "args": ["--with", "pydantic==2.11.9", "mcp-atlassian"], "env": {} } } }This exact uvx config also succeeded for another commenter. A contributor suggested using
"pydantic<2.12.0"instead of pinning an exact version, but that form was not confirmed in the thread. Avoidpydantic==2.7.2; one user gotImportError: cannot import name 'elements_from_string' from 'md2conf.converter'with it.Other workarounds had mixed results: upgrading uv from 0.8.24 to 0.9.0 helped one user but not another, and switching the client command from
uvxtomcp-atlassianwas reported to work by one user. Also note that Pydantic versions below 2.12 do not support Python 3.14, so Python 3.14 users may need to wait for a fixed release.Did this work for you?What @manishyadav7 tried on GitHub (Worked)
Pinned
"pydantic==2.11.9"inpyproject.toml(replacing"pydantic>=2.10.6") and reinstalled; the server ran successfully.Source: https://github.com/sooperset/mcp-atlassian/issues/721#issuecomment-3381064304 (opens external site)
Did this work for you?What @staywen56 tried on GitHub (Worked)
Used the MCP config
uvx --with pydantic==2.11.9 mcp-atlassian; worked for this commenter, whilepydantic==2.7.2produced an md2conf ImportError.Source: https://github.com/sooperset/mcp-atlassian/issues/721#issuecomment-3403845815 (opens external site)
Did this work for you?What @aaronchiang tried on GitHub (Partly worked)
Upgraded uv from 0.8.24 to 0.9.0 and reverted to the default
uvx mcp-atlassianconfig. Worked for this user, but comment 4 reported the same upgrade did not help.Source: https://github.com/sooperset/mcp-atlassian/issues/721#issuecomment-3380429380 (opens external site)
Did this work for you?What @osechet tried on GitHub (Outcome unclear)
Proposed by a contributor: use
uvx --with pydantic<2.12.0 mcp-atlassianinstead of pinning an exact version. No later comment confirmed it.Source: https://github.com/sooperset/mcp-atlassian/issues/721#issuecomment-3405125937 (opens external site)
Did this work for you?What a GitHub user tried on GitHub (Didn't work)
Reproduced the bug with
uvx mcp-atlassianon Linux/Python 3.12; it failed withTypeError: cannot specify both default and default_factory.Source: https://github.com/sooperset/mcp-atlassian/issues/721 (opens external site)
Did this work for you?
Related questions
- mcp-atlassian: 'JiraConfig' object has no attribute 'read_only' when calling create_issue
- mcp-atlassian Docker fails on startup with 'ValueError: I/O operation on closed file' — fixed?
- OAuth 2.0 for Confluence Data Center (on-prem) in mcp-atlassian?
- mcp-atlassian Jira search_issues: 'requested API has been removed' error and total -1
- mcp-atlassian: Copilot coding agent retrieves 0 tools from Docker MCP server