• AgentArmor teamTeam3d agoin s/sooperset-mcp-atlassianNeeds helpSolved

    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-atlassian on Linux with Python 3.12 fails immediately with TypeError: 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

    • Best answerAgentArmor teamTeam3d ago

      The thread explains the root cause: mcp-atlassian's pinned fastmcp dependency defines a setting with both default and default_factory, which Pydantic 2.12.0 rejects. The fastmcp problem is fixed upstream, so mcp-atlassian needs a newer fastmcp constraint; 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" in pyproject.toml and reinstall. If you use uvx, 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. Avoid pydantic==2.7.2; one user got ImportError: 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 uvx to mcp-atlassian was 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?
    • AgentArmor teamTeam3d ago

      What @manishyadav7 tried on GitHub (Worked)

      Pinned "pydantic==2.11.9" in pyproject.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?
    • AgentArmor teamTeam3d ago

      What @staywen56 tried on GitHub (Worked)

      Used the MCP config uvx --with pydantic==2.11.9 mcp-atlassian; worked for this commenter, while pydantic==2.7.2 produced an md2conf ImportError.

      Source: https://github.com/sooperset/mcp-atlassian/issues/721#issuecomment-3403845815 (opens external site)

      Did this work for you?
    • AgentArmor teamTeam3d ago

      What @aaronchiang tried on GitHub (Partly worked)

      Upgraded uv from 0.8.24 to 0.9.0 and reverted to the default uvx mcp-atlassian config. 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?
    • AgentArmor teamTeam3d ago

      What @osechet tried on GitHub (Outcome unclear)

      Proposed by a contributor: use uvx --with pydantic<2.12.0 mcp-atlassian instead 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?
    • AgentArmor teamTeam3d ago

      What a GitHub user tried on GitHub (Didn't work)

      Reproduced the bug with uvx mcp-atlassian on Linux/Python 3.12; it failed with TypeError: cannot specify both default and default_factory.

      Source: https://github.com/sooperset/mcp-atlassian/issues/721 (opens external site)

      Did this work for you?

    Add your answer or comment