saltstack / saltstack/raas-mcp
Track: migrate to mcp python-sdk 2.x
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 0
- Forks
- 0
- Avg merge
- 5h 49m
- Merged PRs (30d)
- 12
Description
Why
pyproject.toml intentionally caps mcp at <2 (see commit cbd8842, "Cap mcp dependency below breaking 2.x line") after dependabot PR #3 (bump 1.27.0 → 2.1.1) broke CI on all fronts:
lint-and-test(3.11/3.12/3.13):tests/test_server_integration.pyfails to collect —ImportError: cannot import name 'create_connected_server_and_client_session' from 'mcp.shared.memory'.Release checks:scripts/check_release.pyhits the same missing import.Docker build: the smoke-test container exits before the health check ever succeeds (consistent with the same breaking-change family surfacing at server startup).
.github/dependabot.yml now has an ignore rule for mcp major-version bumps so this doesn't keep reopening weekly — this issue is the deliberate placeholder to come back to it.
What changed in mcp 2.x (per upstream release notes / migration guide)
- Architecture overhaul: session-centric design → dispatcher/runner pipeline. Low-level
Servernow takes handlers as constructor params with snake_case fields, not decorator registration. FastMCPrenamed toMCPServer(decorator API stable, implementation moved).- New unified
Clientreplaces transport +ClientSession+initialize; this is whymcp.shared.memory.create_connected_server_and_client_sessionis gone. - Protocol types split into a separate
mcp-typespackage. - Protocol bumped to the 2026-07-28 revision (stateless requests, no handshake) while still serving 2025-era clients (Claude Desktop, Cursor) from the same
MCPServer. - OAuth surface simplified —
RFC7523OAuthClientProviderdeprecated,Context.client_idremoved. Directly relevant toraas_mcp/auth/vidb_auth.pyandraas_mcp/auth/verifier.py, which importTokenVerifier/AccessTokenfrommcp.server.auth.middleware.bearer_auth. v1.xis now maintenance-only (security fixes on thev1.xbranch).
Scope of the migration
Touches at least:
raas_mcp/server.py,raas_mcp/server_http.py(Server construction,StreamableHTTPSessionManager)raas_mcp/auth/vidb_auth.py,raas_mcp/auth/verifier.py(bearer-auth middleware surface)tests/test_server_integration.py,scripts/check_release.py(newClientAPI instead ofmcp.shared.memory)
Why do it (eventually)
No consumers depend on this server yet, so this is the cheapest point to absorb a breaking migration — it only gets more expensive once RaaS UI/clients are wired up. mcp 2.x's stateless protocol target also lines up with the VCF SSO statelessness/HPA design already written up in salt-sdd spec 010, so the migration may validate or simplify that design rather than fight it.
Suggested approach
Treat as a proper scoped task (design pass on the auth path, not a drive-by dependency bump):
- Read the full upstream migration guide (
docs/migration.mdon themcppython-sdk repo) end to end. - Rewrite
server.py/server_http.pyagainst the newServerconstructor + dispatcher/runner model. - Re-validate
vidb_auth.py/verifier.pyagainst the simplified OAuth/bearer-auth surface. - Port
tests/test_server_integration.pyandscripts/check_release.pyoffmcp.shared.memoryonto the newClient. - Bump
mcpcap inpyproject.toml/requirements.txt, remove the dependabot ignore rule for mcp major bumps.
Related: PR #3 (closed, not merged).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read the upstream mcp Python SDK migration guide first, then inspect raas_mcp/server.py and server_http.py for the Server and session-manager migration. Review raas_mcp/auth/vidb_auth.py and verifier.py for bearer-auth changes, and port tests/test_server_integration.py plus scripts/check_release.py to the new Client API. Done means CI and Docker checks pass, the dependency cap is updated, and the Dependabot major-version ignore is removed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api, authentication, backend, testing
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100