Skip to content

fix(mcp): complete Streamable HTTP and tool-schema compatibility (#118) - #121

Closed
wxai-space wants to merge 3 commits into
mainfrom
codex/fix-pr118-mcp-compat
Closed

wxai-space wants to merge 3 commits into
mainfrom
codex/fix-pr118-mcp-compat

Conversation

@wxai-space

Copy link
Copy Markdown
Collaborator

Summary

  • Retain the original contribution and commits from fix(mcp): connect to Streamable HTTP servers on mcp 2.x #118.
  • Define unavailable modern transport helpers explicitly for locked SDK compatibility.
  • Support both SDK 1.x inputSchema and SDK 2.x input_schema tool fields during registration and calls.
  • Verify credential-header merging, failed-initialization reconnect, LIFO cleanup, and unaffected SSE/stdio paths.
  • Add an MCP 1.12.4 / 1.30.0 / 2.3.0 CI job alongside the Python 3.10-3.13 full-suite matrix.
  • Add a local Postman stateless MCP contract simulation and loopback-only real-SDK probe, with reproducible commands and scope notes.

Testing

  • Full suite with MCP 1.12.4: 372 passed, 1 opt-in backend test skipped.
  • Full suite with MCP 2.3.0: 372 passed, 1 opt-in backend test skipped.
  • Focused compatibility tests: 11 passed for locked and modern SDKs.
  • Real HTTP initialization, list/call, credential header, and cleanup passed against the local contract stand-in on MCP 1.12.4, 1.30.0, and 2.3.0.
  • compileall and git diff --check passed.
  • No real vendor service was contacted; stateful SSE/OAuth are not certified by the local probe.

Review

Submitted for review only. No automatic merge or release is requested. Preserves contributor attribution from #118.

vishalhabib99 and others added 2 commits October 26, 2026 14:26
pyproject asks for mcp>=1.9.0, so pip install lightagent now resolves mcp
2.3.0. mcp 2.x removed streamablehttp_client, the import fell into the
'older SDK' fallback, and every streamable-http server failed with
'installed MCP SDK does not support Streamable HTTP'. Keep the old call when
it exists; otherwise use streamable_http_client with an httpx client from
create_mcp_http_client carrying the headers (2.x has no headers argument),
closed with the session's exit stack.
@wxai-space

Copy link
Copy Markdown
Collaborator Author

Final integration acceptance: the combined changes from #120, #121, and #122 pass 420 tests with one explicitly opt-in Mem0 Graph test skipped, both on MCP 1.12.4 and MCP 2.3.0. All seven checks on this PR are green (Python 3.10-3.13 and the three supported MCP dependency combinations). Real local HTTP probes passed on SDK 1.12.4, 1.30.0, and 2.3.0. All three follow-ups remain open for maintainer approval; main has not been changed.

@wxai-space

Copy link
Copy Markdown
Collaborator Author

All fixes have now been fast-forwarded directly into the original PR #118 at c1852e3. Its new CI run passed all 7 checks: https://github.com/wanxingai/LightAgent/actions/runs/40616540724 . Closing this supplemental PR as redundant, without merging or deleting its branch. Continue review in #118; main is unchanged.

@wxai-space wxai-space closed this Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants