WIP: add MCP Client with conversation tracking and chat UI#26343
WIP: add MCP Client with conversation tracking and chat UI#26343
Conversation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Implement an MCP Client in OpenMetadata that allows users to interact with the existing MCP Server tools through a chat UI, with full conversation and message persistence. Backend: - JSON schemas for McpConversation, McpMessage, and content types - SQL migrations for mcp_conversation and mcp_message tables (MySQL + PostgreSQL) - McpClientConfiguration for LLM provider settings (OpenAI/Anthropic) - LLM client abstraction with OpenAI and Anthropic implementations - McpConversationRepository and McpMessageRepository for CRUD - McpClientService orchestrator with tool call loop - McpClientResource REST API at /v1/mcp-client - MCP tool executor registration from openmetadata-mcp module Frontend: - mcpClientAPI.ts REST client for chat, conversations, and messages - McpChatPage with conversation sidebar, message list, and chat input - MUI-based components with markdown rendering and tool call display - Route, sidebar navigation, and i18n labels Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…eaming Introduce the foundational types for server-sent event streaming in the MCP chat feature. ChatEvent is a Java record with static factory methods for each event type (conversation_created, text, tool_call_start, tool_call_end, message_complete, error, done). ChatEventEmitter is a functional interface consumed by the streaming chat method. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add a new chatStream() method that mirrors the existing chat() logic but emits ChatEvent events via a ChatEventEmitter callback instead of accumulating results and returning a ChatResponse. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add POST /v1/mcp-client/chat/stream endpoint that returns text/event-stream using Jersey StreamingOutput. Each ChatEvent is written as an SSE frame with event name and JSON data. Includes writeSseEvent helper method and proper error handling with Cache-Control and X-Accel-Buffering headers. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add ChatStreamEvent discriminated union type, ChatStreamCallbacks interface, and streamChatMessage function that uses native fetch to consume the /chat/stream SSE endpoint with proper auth and SSE parsing. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace sendChatMessage with streamChatMessage for progressive UI updates. Shows assistant text and tool calls incrementally as SSE events arrive. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The method signature was missing the content parameter, causing compilation errors in McpClientService. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Sidebar title: "MCP Chat" → "Chat" - Empty state: clean centered heading + pill-shaped input with send icon - ChatInput: replace separate Button with Send01 icon inside TextField - Update i18n: mcp-chat-empty, mcp-chat-placeholder Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Human message bubbles: grey[200] bg with dark text (was unreadable white-on-primary-blue) - Assistant bubbles: white bg with border (was grey[100]) - Trash icon: only visible on conversation hover - Remove message count subtitle from conversation list - Simplify token display color Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Show a CircularProgress spinner with "Thinking..." text when the assistant message has no content yet (during streaming before the first text or tool_call event arrives). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Create McpChatApplication as a separate installable app (marketplace only, not auto-installed) - Move LLM config from openmetadata.yaml to app configuration (provided at install time) - McpClientResource dynamically looks up McpChatApplication from ApplicationContext - Simplify ToolExecutor interface (authorizer/limits captured in McpServer closure) - Add McpChatPlugin for conditional Chat sidebar item (only shown when app is installed) - Add UI application schema for install form (LLM provider, API key, model, endpoint, system prompt) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Verify MCP Chat nav item appears in sidebar when app is installed - Test sidebar click navigates to /mcp-chat and renders chat UI - Test send button enables with text input - Uses proper fixtures, API-based app install/teardown, test.step() Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
CompletableFuture.runAsync calls had no error handling, silently swallowing failures from repository calls after title generation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
TypeScript types have been updated based on the JSON schema changes in the PR |
|
🟡 Playwright Results — all passed (2 flaky)✅ 453 passed · ❌ 0 failed · 🟡 2 flaky · ⏭️ 2 skipped
🟡 2 flaky test(s) (passed on retry)
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |
🔍 CI failure analysis for a73638e: 1 test failure in integration tests caused by premature NDManager lifecycle closure in DjlEmbeddingClient, cascading to OpenSearch connection pool exhaustion and search index timeout. PR's new MCP/LLM client infrastructure increases concurrent resource demands, exposing improper resource cleanup timing.OverviewAnalyzed 53 logs across 43 error templates. CI pipeline shows a single critical test failure in integration tests (PostgreSQL + OpenSearch) with high confidence attribution to infrastructure resource management. The failure is a cascading consequence of DJL NDManager lifecycle mismanagement that degrades search indexing capabilities. FailuresSearch Index Entity Indexing Timeout (confidence: high)
Test Result
Summary
Code Review
|
| Auto-apply | Compact |
|
|
Was this helpful? React with 👍 / 👎 | Gitar
|



Screen.Recording.2026-03-10.at.17.31.58.mov
Summary
mcp_conversationandmcp_messagetablesmcpClientConfigurationinopenmetadata.yaml/v1/mcp-clientfor chat, conversation CRUD, and message listingChanges
Backend
McpConversation,McpMessage,MessageBlock,ToolCall,TokenUsage,ChatContentTypemcp_conversationandmcp_messagetables for MySQL and PostgreSQL with generated columns and indexesMcpClientConfigurationwithenabled,provider,apiKey,model,apiEndpoint,systemPromptLlmClient,LlmResponse,LlmMessage,LlmToolCall) with OpenAI and Anthropic implementationsMcpConversationDAOandMcpMessageDAOinCollectionDAOMcpConversationRepositoryandMcpMessageRepositoryfor CRUD operationsMcpClientServiceorchestrator with tool call loop (user message → LLM → tool calls → tool execution → LLM response)McpClientResourcewith endpoints for chat, conversations, and messagesopenmetadata-mcpmodule viaMcpServerFrontend
mcpClientAPI.tswith typed interfaces for all MCP client operationsMcpChatPagewith conversation sidebar, message list, chat input, and tool call accordion display/mcp-chatroute with sidebar navigation entryTest plan
mcpClientConfigurationinopenmetadata.yamlwith a valid LLM provider and API keyCloses https://github.com/open-metadata/ai-platform/issues/429