Repository navigation
Fixes #39223: MCP connector uses the official MCP Python SDK - #39226
Conversation
✅ PR checks passedThe linked issue has a description and all required Shipping project fields set. Thanks! |
Code Review ✅ Approved 🟡 Medium riskSwitching the MCP connector to the official SDK adds pagination and strict page validation, which could leave listings incomplete when servers return malformed data. Migrates the MCP connector's client onto the official VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Not enabledFor more verification details, comment OptionsDisplay: compact → Showing compact verification results. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
… state reset (#39396) - openmetadata-airflow-apis/uv.lock: relock with uv 0.13.4 for the mcp extra ingestion gained in #39226; airflow-apis tests ran with --locked and failed. - Informix stored-procedure IT: stored_procedure_source_state is now a per-instance PerSourceState, so the class-level .clear() raised AttributeError and is no longer needed (each workflow builds a fresh source).
Describe your changes:
Fixes #39223
mcpPython SDK (2.3, a newmcpplugin extra) instead of our own HTTP and SSE code. It negotiates up to 2026-07-28 and falls back for older servers.Companion PRs: https://github.com/open-metadata/ai-platform/pull/2536 (Kotlin SDK for plugin tool calls) and https://github.com/open-metadata/openmetadata-collate/pull/9088 (Collate protocol version bump).
Type of change:
High-level design:
McpClientkeeps its public API (connect,initialize,list_*,close), sometadata.pyandconnection.pydon't change.initialize()untilclose().docs/decisions/2026-11-28-the-mcp-connector-reads-at-most-20-pages-per-listing.mdcovers the page cap and why the SDK's per-page check stays.Tests:
Use cases covered
Unit tests
tests/unit/source/mcp/(test_mcp_client.py,test_mcp_connection.py,test_connection.py,test_mcp_metadata.py): 83 passed.source/mcp/client.py: 89%.ruff checkandruff format --checkare clean, and so ischeck_decision_records.py.Ingestion integration tests
tests/integration/mcp/: 7 passed, 1 skipped ("Requires running HTTP MCP server"), run against a local server.Manual testing performed
McpClientagainst an MCP SDK server on localhost over Streamable HTTP and over SSE. Both listed tools (withinputSchema), resources and prompts. Streamable HTTP negotiated2026-07-28, andAuthorization: Bearerreached every request./mcp(Java SDK server) with a PAT. The SDK fell back to2025-11-25and listed 24 tools, 1 resource and 1 prompt.UI screen recording:
Not applicable: ingestion-only change.
Checklist:
Fixes <issue-number>: <short explanation>Fixes #<issue-number>above.REVIEW.md(thepr-checklistskill runs it) and fixed every 🔴 finding, or answered it on the line below.protocolVersion."tools": {}capability.docs/decisions/2026-11-28-the-mcp-connector-reads-at-most-20-pages-per-listing.md.