fix(deps): Avoid DOA-pin mcp below 2.0.0 ahead of upstream MCP v2 release

Merged
SH
4mo ago
+2-2

MCP v2

MCP Python SDK v2.0.0 ships 2026-07-28 alongside the new spec revision and is a breaking release. The mcp extra declared mcp>=1.3.0 with no upper bound, so every fresh pip install 'stackone-ai[mcp]' would have resolved to 2.0.0 and broken fetch_tools() on day one:
Python SDK will be DOA once the v2 ships for every fresh install.

Lockfile

uv.lock pinned 1.25.0, which protects CI and local development but not consumers a library's lockfile does not constrain downstream installs. The published constraint in pyproject.toml is 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.0b1 locally. _fetch_mcp_tools (stackone_ai/toolset.py) has seven incompatibilities:

BreakDetail
mcp.types removedTypes moved to a separate mcp-types distribution
streamablehttp_clientRenamed to streamable_http_client
headers= kwarg removedAuth must move to a caller-supplied httpx.AsyncClient
Transport return shapeYields a 2-tuple; the session-id getter is gone (sessions removed from the protocol)
list_tools(cursor)Now keyword-only: params=PaginatedRequestParams(cursor=...)
tool.inputSchemaRenamed tool.input_schema
result.nextCursorRenamed result.next_cursor

The first two raise ImportError, which the existing handler converts to:

ToolsetConfigError: MCP dependencies are required for fetch_tools. Install with 'pip install "stackone-ai[mcp]"'.

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

  • The 19 fixture errors are caused by vendor/stackone-ai-node/node_modules being absent, so tests/mocks/serve.ts can't start. Tracked separately

Summary by cubic

Pin the mcp extra to <2.0.0 to avoid breaking changes from the MCP Python SDK v2 and prevent fresh installs of stackone-ai[mcp] from failing. Updates pyproject.toml and uv.lock to enforce the bound until v2 support is added.