-
Notifications
You must be signed in to change notification settings - Fork 72
[LG-5666] MCP-UI App Scaffolding #3280
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
|
Size Change: +1.18 kB (+0.07%) Total Size: 1.79 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR scaffolds the foundational infrastructure for an MCP UI system within the LeafyGreen UI monorepo. It introduces a new Next.js application for iframe-embeddable micro-UIs, along with supporting workspace configurations and build scripts.
Key Changes:
- New Next.js app (
@lg-apps/mcp-ui-app) with CORS/CSP configuration for iframe embedding - New
@lg-mcp-uinamespace containing a micro-UI component (list-databases) and an SDK package - Workspace and build system updates to support new scopes while excluding the Next.js app from default builds
Reviewed Changes
Copilot reviewed 19 out of 20 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| turbo.json | Adds dev task configuration for running Next.js development server |
| pnpm-workspace.yaml | Registers new workspace paths for apps and mcp-ui packages |
| pnpm-lock.yaml | Adds dependencies for Next.js 14.2.33 and associated packages |
| package.json | Updates build scripts to exclude Next.js app and adds new scope mappings |
| mcp-ui/sdk/src/mapper.ts | Defines tool name mappings for MCP UI components |
| mcp-ui/sdk/src/index.ts | Exports stub function for SDK (to be implemented) |
| mcp-ui/sdk/index.ts | Re-exports SDK functionality |
| mcp-ui/micro-uis/list-databases/* | Implements React component for displaying database lists |
| apps/mcp-ui-app/* | Next.js application with routing, configuration, and deployment setup |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
| "@lg-chat": "chat", | ||
| "@lg-tools": "tools" | ||
| "@lg-tools": "tools", | ||
| "@lg-mcp-ui": "mcp-ui" |
Copilot
AI
Nov 6, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The new scope '@lg-mcp-ui' is defined but there's no corresponding '@lg-apps' scope definition for the apps directory. For consistency with the new 'apps/*' workspace and the '@lg-apps/mcp-ui-app' package name, consider adding an entry like '@lg-apps': 'apps' to the scopes configuration.
| "@lg-mcp-ui": "mcp-ui" | |
| "@lg-mcp-ui": "mcp-ui", | |
| "@lg-apps": "apps" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not necessary as we're not publishing anything in the apps folder as of right now
| <h1>MCP UI App</h1> | ||
| <p>Welcome to the MCP UI Application!</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
beautiful 😆
| Configuration | ||
| </h2> | ||
| <p> | ||
| <strong>Base URL:</strong> {config.baseUrl} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume we'll probably want to list all the available pages here at some point
| 'use client'; | ||
|
|
||
| import React from 'react'; | ||
| import { ListDatabases } from '@lg-mcp-ui/list-databases'; | ||
|
|
||
| export default function ListDatabasesPage() { | ||
| return <ListDatabases databases={[]} />; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Future consideration — this could probably be a [microui].tsx slug file, with getStaticPaths checking for all the installed micro-ui packages
| @@ -0,0 +1,24 @@ | |||
| { | |||
| "name": "@lg-apps/mcp-ui-app", | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: This probably doesn't need to be scoped since we're not publishing it to npm
| "private": true, | ||
| "scripts": { | ||
| "dev": "next dev", | ||
| "build": "next build", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Turbo is complaining that there's nothing to cache when I run this. Probable need to add a custom turbo config for the app that sets the outputs https://turborepo.com/docs/reference/configuration#outputs
...Finishing writing to cache...
WARNING no output files found for task @lg-apps/mcp-ui-app#build. Please check your `outputs` key in `turbo.json`
* update r17 scripts * filter apps from r17 build workflow * add mcpui to caches
|
Coverage after merging ar/LG-5666-mcpui-app into main will be
Coverage Report
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
tsck
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
| '/apps/', | ||
| '/mcp-ui/', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any additional context on why we are choosing to ignore these test paths?
| '@lg-tools/test-harnesses', | ||
| '@lg-tools/update', | ||
| '@lg-tools/validate', | ||
| '@lg-mcp-ui/list-databases', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should @lg-apps/mcp-ui-app be included here?
| // Read the root package.json to get package directories dynamically | ||
| const rootPackage = JSON.parse( | ||
| fs.readFileSync(ROOT_PACKAGE_JSON_PATH, 'utf-8'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we check that this doesn't inadvertently bring in packages from the deprecated-packages` directory?
| @@ -0,0 +1,37 @@ | |||
| # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would think that a benefit of keeping these different components in a monorepo is being able to centralize .gitignore patterns in the root .gitignore file. Is there an explicit reason we need a separate one defined here?
✍️ Proposed changes
This PR introduces the foundational infrastructure for the MCP UI system, including:
apps/mcp-ui-app) configured for iframe embedding with CORS and CSP headerslist-databases) for displaying database listsmcp-ui/sdk) with tool mappings and anaugmentWithUIfunction stub@lg-mcp-uiand@lg-appsnamespacesThe Next.js app is configured with environment-based CORS settings and is excluded from the default build to avoid impacting existing build processes.
🎟️ Jira ticket: LG-5666
Next Steps:
✅ Checklist
🧪 How to test changes
cd apps/mcp-ui-app.env.localfile with the required environment variables (see the app's README)pnpm dev:mcp-uifrom the workspace roothttp://localhost:3000to verify the app loadshttp://localhost:3000/list-databasesto verify the list-databases component renders