feat(mcp): add MCP server settings: model, GraphQL API and settings page
Stack. Part of the series that adds a built-in MCP server to DataHub Core. Based on na--mcp-tags (#21501, the write tools); review only its own commits. Everything user-facing is behind MCP_SERVER_ENABLED, off by default.
Stack so far:
1–22. Merged to master as #21332.
23–34. #21435, the read tools.
35–46. #21501, the write tools (PRs 36–46 merged into it).
47–55. #21587, MCP settings: model, API and UI. ← this PR
56–60. #21588, telemetry, metrics, usage events and the stdio server.
61–64. #21589, docs, release notes and smoke tests.
65–68. #21590, settings enforcement and the tool catalog.
69–70. #21591, the home page module.
71–74. #21623, the ingestion tools.
What this does
Adds the MCP server settings: a model, a GraphQL API and a settings page. It combines what would have been stack PRs 47–55, one commit each.
Model and API
- Settings model:
mcpSettingsinGlobalSettingsInfo. It holds the master switch, scoped servers and default-server overrides. The records match DataHub Cloud's, includingToolRefType'sPLUGINvalue, which DataHub Core doesn't use. Cloud's later merge is a schema no-op. It also adds thecreateMcpServersEnabledflag, off by default. mcpSettingsquery: in a newmcp.graphql, so Cloud can keep an identical copy and add its own fields withextend. Any signed-in user can read it, because datahub-ai-service enforces the switch and the default server's overrides with each MCP caller's own token. Scoped servers are returned only to users who can manage platform settings; others get an empty list.updateMcpSettingsmutation: requires Manage Platform Settings. It upserts scoped servers by slug, validates slugs and View URNs, and refuses new scoped servers unlesscreateMcpServersEnabledis on.
Settings UI
- A Platform › AI settings page with an MCP Servers tab. Deployments can add their own tabs.
- A tool picker backed by the tool catalog.
- A server form for name, instructions and tools.
- A Connect card with setups for Claude Code, Cursor, Claude Desktop (through mcp-remote), VS Code, other clients, and a Claude connector for public HTTPS URLs.
- Core has a single server, so the page shows one server card with a single switch.
Testing
- Java:
McpSettingsResolverTest,UpdateMcpSettingsResolverTest,AppConfigResolverTest, the schema wiring and aspect-mapping tests, andPropertiesCollectorConfigurationTest. - Frontend: vitest on
settingsV2,context/agentsandhomeV3: 743 tests.tsc --noEmitis clean once GraphQL types are regenerated.
Checklist
- The PR conforms to DataHub's Contributing Guideline (particularly PR Title Format)
- Tests for the changes have been added/updated (if applicable)
- Docs related to the changes have been added/updated (if applicable). The MCP docs come in #21589.
- For any breaking change/potential downtime/deprecation/big changes an entry has been made in Breaking Changes. Not applicable: off by default.
🤖 Generated with Claude Code