fix(deps): Avoid DOA-pin mcp below 2.0.0 ahead of upstream MCP v2 release - #194
Conversation
There was a problem hiding this comment.
Pull request overview
Adds an upper bound to the mcp extra dependency to prevent downstream installs of stackone-ai[mcp] from automatically resolving to the breaking mcp Python SDK v2.x when it releases, avoiding day-one failures for consumers.
Changes:
- Constrain the
mcpoptional dependency to>=1.3.0,<2.0.0for the published package metadata. - Align the lockfile metadata to reflect the same constrained specifier.
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| pyproject.toml | Adds an upper bound (<2.0.0) to the mcp optional dependency to protect downstream resolvers. |
| uv.lock | Updates the recorded requires-dist entry for the mcp extra to match the new constraint. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
No issues found across 2 files
Auto-approved: Pins mcp dependency to <2.0.0 to prevent breaking changes from the upcoming v2 release. This is a bounded, clearly beneficial constraint that does not expand exposure or alter behavior beyond version restriction.
Re-trigger cubic
MCP v2
MCP Python SDK v2.0.0 ships 2026-07-28 alongside the new spec revision and is a breaking release. The
mcpextra declaredmcp>=1.3.0with no upper bound, so every freshpip install 'stackone-ai[mcp]'would have resolved to 2.0.0 and brokenfetch_tools()on day one:Python SDK will be DOA once the v2 ships for every fresh install.
Lockfile
uv.lockpinned 1.25.0, which protects CI and local development but not consumers a library's lockfile does not constrain downstream installs. The published constraint inpyproject.tomlis what resolvers use.Potential Breaking Changes with mcp V2
This change is to avoid DOA but there are few things might break that needs separate fix
Verified against
mcp==2.0.0b1locally._fetch_mcp_tools(stackone_ai/toolset.py) has seven incompatibilities:mcp.typesremovedmcp-typesdistributionstreamablehttp_clientstreamable_http_clientheaders=kwarg removedhttpx.AsyncClientlist_tools(cursor)params=PaginatedRequestParams(cursor=...)tool.inputSchematool.input_schemaresult.nextCursorresult.next_cursorThe first two raise
ImportError, which the existing handler converts to:So affected users would be told to install a package they already have, a misleading error on top of a hard failure.
Upstream explicitly recommends this bound for library maintainers (SDK beta announcement).
Notes
vendor/stackone-ai-node/node_modulesbeing absent, sotests/mocks/serve.tscan't start. Tracked separatelySummary by cubic
Pin the
mcpextra to<2.0.0to avoid breaking changes from the MCP Python SDK v2 and prevent fresh installs ofstackone-ai[mcp]from failing. Updatespyproject.tomlanduv.lockto enforce the bound until v2 support is added.Written for commit ec5e9d9. Summary will update on new commits.