diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 15abce0cf1..d88acb1b59 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -32,7 +32,6 @@ jobs: path: | charts/*/dist/* chat/*/dist/* - mcp-ui/*/dist/* packages/*/dist/* tools/*/dist/* key: ${{ runner.os }}-build-cache-${{ hashFiles('package.json', 'pnpm-lock.yaml', '**/src/') }} @@ -74,7 +73,6 @@ jobs: path: | charts/*/dist/* chat/*/dist/* - mcp-ui/*/dist/* packages/*/dist/* tools/*/dist/* key: ${{ steps.build-cache.outputs.cache-primary-key }} @@ -113,7 +111,6 @@ jobs: path: | charts/*/dist/* chat/*/dist/* - mcp-ui/*/dist/* packages/*/dist/* tools/*/dist/* key: ${{needs.build.outputs.cache-primary-key}} @@ -153,7 +150,6 @@ jobs: path: | charts/*/dist/* chat/*/dist/* - mcp-ui/*/dist/* packages/*/dist/* tools/*/dist/* key: ${{needs.build.outputs.cache-primary-key}} @@ -205,7 +201,6 @@ jobs: path: | charts/*/dist/* chat/*/dist/* - mcp-ui/*/dist/* packages/*/dist/* tools/*/dist/* key: ${{needs.build.outputs.cache-primary-key}} @@ -252,7 +247,6 @@ jobs: path: | charts/*/dist/* chat/*/dist/* - mcp-ui/*/dist/* packages/*/dist/* tools/*/dist/* key: ${{needs.build.outputs.cache-primary-key}} diff --git a/.github/workflows/react17.yml b/.github/workflows/react17.yml index d316728e75..a02895031d 100644 --- a/.github/workflows/react17.yml +++ b/.github/workflows/react17.yml @@ -32,7 +32,6 @@ jobs: path: | charts/*/dist/* chat/*/dist/* - mcp-ui/*/dist/* packages/*/dist/* tools/*/dist/* key: ${{ runner.os }}-REACT17-build-cache-${{ hashFiles('package.json', 'pnpm-lock.yaml', '**/src/') }} @@ -61,7 +60,6 @@ jobs: path: | charts/*/dist/* chat/*/dist/* - mcp-ui/*/dist/* packages/*/dist/* tools/*/dist/* key: ${{ steps.build-cache.outputs.cache-primary-key }} @@ -87,7 +85,6 @@ jobs: path: | charts/*/dist/* chat/*/dist/* - mcp-ui/*/dist/* packages/*/dist/* tools/*/dist/* key: ${{needs.build.outputs.cache-primary-key}} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 83c208d0c9..7cffae719a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -39,7 +39,6 @@ jobs: chat/*/dist/* chat/*/tsdoc.json chat/*/stories.js - mcp-ui/*/dist/* packages/*/dist/* packages/*/tsdoc.json packages/*/stories.js @@ -80,7 +79,6 @@ jobs: chat/*/dist/* chat/*/tsdoc.json chat/*/stories.js - mcp-ui/*/dist/* packages/*/dist/* packages/*/tsdoc.json packages/*/stories.js @@ -124,7 +122,6 @@ jobs: chat/*/dist/* chat/*/tsdoc.json chat/*/stories.js - mcp-ui/*/dist/* packages/*/dist/* packages/*/tsdoc.json packages/*/stories.js @@ -178,7 +175,6 @@ jobs: chat/*/dist/* chat/*/tsdoc.json chat/*/stories.js - mcp-ui/*/dist/* packages/*/dist/* packages/*/tsdoc.json packages/*/stories.js @@ -231,7 +227,6 @@ jobs: chat/*/dist/* chat/*/tsdoc.json chat/*/stories.js - mcp-ui/*/dist/* packages/*/dist/* packages/*/tsdoc.json packages/*/stories.js @@ -284,7 +279,6 @@ jobs: chat/*/dist/* chat/*/tsdoc.json chat/*/stories.js - mcp-ui/*/dist/* packages/*/dist/* packages/*/tsdoc.json packages/*/stories.js diff --git a/apps/mcp-ui-app/.gitignore b/apps/mcp-ui-app/.gitignore deleted file mode 100644 index c1cf3d2709..0000000000 --- a/apps/mcp-ui-app/.gitignore +++ /dev/null @@ -1,37 +0,0 @@ -# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. - -# dependencies -/node_modules -/.pnp -.pnp.js - -# testing -/coverage - -# next.js -/.next/ -/out/ - -# production -/build - -# misc -.DS_Store -*.pem - -# debug -npm-debug.log* -yarn-debug.log* -yarn-error.log* - -# local env files -.env*.local -.env.local - -# vercel -.vercel - -# typescript -*.tsbuildinfo -next-env.d.ts - diff --git a/apps/mcp-ui-app/README.md b/apps/mcp-ui-app/README.md deleted file mode 100644 index dc6a87250a..0000000000 --- a/apps/mcp-ui-app/README.md +++ /dev/null @@ -1,73 +0,0 @@ -# MCP UI App - -A Next.js application for the MCP UI, configured for iframe embedding with CORS and CSP headers. - -## Getting Started - -### 1. Environment Setup - -Create a `.env.local` file in the app root with the following variables: - -```bash -# Base URL for the application -NEXT_PUBLIC_BASE_URL=http://localhost:3000 - -# Allowed parent origins for iframe embedding (comma-separated) -ALLOWED_IFRAME_ORIGINS=http://localhost:3000,http://localhost:3001,https://your-app.com -``` - -Configuration options: - -- `NEXT_PUBLIC_BASE_URL`: The base URL of your application -- `ALLOWED_IFRAME_ORIGINS`: Comma-separated list of allowed parent origins for iframe embedding - -### 2. Install dependencies - -```bash -pnpm install -``` - -### 3. Run the development server - -```bash -pnpm dev -``` - -Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. - -## Configuration - -### Base URL - -The base URL is configured via the `NEXT_PUBLIC_BASE_URL` environment variable and can be accessed in your code: - -```typescript -import config from '@/config'; - -console.log(config.baseUrl); // http://localhost:3000 -``` - -### CORS and Iframe Embedding - -The app is configured with: - -- **CORS headers**: Allow cross-origin requests from specified origins -- **CSP headers**: Content Security Policy appropriate for iframe embedding -- **Frame ancestors**: Controls which domains can embed this app in an iframe - -To allow your app to be embedded in an iframe from specific domains, add them to the `ALLOWED_IFRAME_ORIGINS` environment variable. - -## Build - -This app is excluded from the default `pnpm build` command in the workspace. To build this app specifically, run: - -```bash -cd apps/mcp-ui-app -pnpm build -``` - -Or from the workspace root: - -```bash -pnpm build:apps -``` diff --git a/apps/mcp-ui-app/next.config.js b/apps/mcp-ui-app/next.config.js deleted file mode 100644 index 6c1d08e0c8..0000000000 --- a/apps/mcp-ui-app/next.config.js +++ /dev/null @@ -1,60 +0,0 @@ -/** @type {import('next').NextConfig} */ -const nextConfig = { - reactStrictMode: true, - transpilePackages: [ - '@lg-mcp-ui/list-databases', - '@leafygreen-ui/card', - '@leafygreen-ui/typography', - '@leafygreen-ui/emotion', - '@leafygreen-ui/tokens', - '@leafygreen-ui/lib', - ], - - async headers() { - // Get allowed origins from environment variable - const allowedOrigins = process.env.ALLOWED_IFRAME_ORIGINS?.split(',') || [ - '*', - ]; - - return [ - { - // Apply to all routes - source: '/:path*', - headers: [ - // CORS headers for iframe embedding - { - key: 'Access-Control-Allow-Origin', - value: allowedOrigins[0] || '*', // Use first origin or wildcard - }, - { - key: 'Access-Control-Allow-Methods', - value: 'GET, POST, PUT, DELETE, OPTIONS', - }, - { - key: 'Access-Control-Allow-Headers', - value: 'Content-Type, Authorization', - }, - { - key: 'Access-Control-Allow-Credentials', - value: 'true', - }, - // Content Security Policy for iframe embedding - { - key: 'Content-Security-Policy', - value: [ - "default-src 'self'", - "script-src 'self' 'unsafe-eval' 'unsafe-inline'", - "style-src 'self' 'unsafe-inline'", - "img-src 'self' data: https:", - "font-src 'self' data:", - "connect-src 'self'", - `frame-ancestors ${allowedOrigins.join(' ')}`, // Allows embedding in iframes from these origins - ].join('; '), - }, - ], - }, - ]; - }, -}; - -module.exports = nextConfig; diff --git a/apps/mcp-ui-app/package.json b/apps/mcp-ui-app/package.json deleted file mode 100644 index 7f52989096..0000000000 --- a/apps/mcp-ui-app/package.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name": "@lg-apps/mcp-ui-app", - "version": "0.1.0", - "private": true, - "scripts": { - "dev": "next dev", - "build": "next build", - "start": "next start", - "lint": "next lint" - }, - "dependencies": { - "@lg-mcp-ui/list-databases": "workspace:*", - "next": "^14.2.0", - "react": "^18.2.0", - "react-dom": "^18.2.0" - }, - "devDependencies": { - "@types/node": "^20.12.5", - "@types/react": "18.2.23", - "@types/react-dom": "18.2.8", - "typescript": "~5.8.0" - } -} - diff --git a/apps/mcp-ui-app/src/app/layout.tsx b/apps/mcp-ui-app/src/app/layout.tsx deleted file mode 100644 index 9ae2c7da9c..0000000000 --- a/apps/mcp-ui-app/src/app/layout.tsx +++ /dev/null @@ -1,19 +0,0 @@ -import React from 'react'; -import type { Metadata } from 'next'; - -export const metadata: Metadata = { - title: 'MCP UI App', - description: 'MCP UI Application', -}; - -export default function RootLayout({ - children, -}: { - children: React.ReactNode; -}) { - return ( - - {children} - - ); -} diff --git a/apps/mcp-ui-app/src/app/list-databases/page.tsx b/apps/mcp-ui-app/src/app/list-databases/page.tsx deleted file mode 100644 index 43e4e0dfb5..0000000000 --- a/apps/mcp-ui-app/src/app/list-databases/page.tsx +++ /dev/null @@ -1,8 +0,0 @@ -'use client'; - -import React from 'react'; -import { ListDatabases } from '@lg-mcp-ui/list-databases'; - -export default function ListDatabasesPage() { - return ; -} diff --git a/apps/mcp-ui-app/src/app/page.tsx b/apps/mcp-ui-app/src/app/page.tsx deleted file mode 100644 index aca119d09b..0000000000 --- a/apps/mcp-ui-app/src/app/page.tsx +++ /dev/null @@ -1,31 +0,0 @@ -import React from 'react'; - -import config from '@/config'; - -export default function Home() { - return ( -
-

MCP UI App

-

Welcome to the MCP UI Application!

-
-

- Configuration -

-

- Base URL: {config.baseUrl} -

-

- Allowed Origins:{' '} - {config.allowedIframeOrigins.join(', ') || 'Not configured'} -

-
-
- ); -} diff --git a/apps/mcp-ui-app/src/config/index.ts b/apps/mcp-ui-app/src/config/index.ts deleted file mode 100644 index 85009db6c0..0000000000 --- a/apps/mcp-ui-app/src/config/index.ts +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Application configuration - */ - -export const config = { - /** - * Base URL of the application - * Defaults to localhost:3000 in development - */ - baseUrl: process.env.NEXT_PUBLIC_BASE_URL || 'http://localhost:3000', - - /** - * Allowed origins for iframe embedding - */ - allowedIframeOrigins: process.env.ALLOWED_IFRAME_ORIGINS?.split(',') || [], -} as const; - -export default config; diff --git a/apps/mcp-ui-app/tsconfig.json b/apps/mcp-ui-app/tsconfig.json deleted file mode 100644 index 7f64e8882a..0000000000 --- a/apps/mcp-ui-app/tsconfig.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "compilerOptions": { - "target": "ES2017", - "lib": ["dom", "dom.iterable", "esnext"], - "allowJs": true, - "skipLibCheck": true, - "strict": true, - "noEmit": true, - "esModuleInterop": true, - "module": "esnext", - "moduleResolution": "bundler", - "resolveJsonModule": true, - "isolatedModules": true, - "jsx": "preserve", - "incremental": true, - "plugins": [ - { - "name": "next" - } - ], - "paths": { - "@/*": ["./src/*"] - } - }, - "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"], - "exclude": ["node_modules"] -} - diff --git a/mcp-ui/list-databases/package.json b/mcp-ui/list-databases/package.json deleted file mode 100644 index 8140ece94c..0000000000 --- a/mcp-ui/list-databases/package.json +++ /dev/null @@ -1,34 +0,0 @@ -{ - "name": "@lg-mcp-ui/list-databases", - "version": "0.1.0", - "private": true, - "main": "./dist/umd/index.js", - "module": "./dist/esm/index.js", - "types": "./dist/types/index.d.ts", - "license": "Apache-2.0", - "scripts": { - "build": "lg-build bundle", - "tsc": "lg-build tsc", - "docs": "lg-build docs", - "dev": "lg-build bundle --watch" - }, - "peerDependencies": { - "react": "^18.2.0" - }, - "dependencies": { - "@leafygreen-ui/tokens": "workspace:^", - "@leafygreen-ui/lib": "workspace:^", - "@leafygreen-ui/palette": "workspace:^" - }, - "devDependencies": { - "@lg-tools/build": "workspace:^" - }, - "exports": { - ".": { - "development": "./src/index.ts", - "types": "./dist/types/index.d.ts", - "import": "./dist/esm/index.js", - "require": "./dist/umd/index.js" - } - } -} diff --git a/mcp-ui/list-databases/src/ListDatabases.tsx b/mcp-ui/list-databases/src/ListDatabases.tsx deleted file mode 100644 index 7161bb3e44..0000000000 --- a/mcp-ui/list-databases/src/ListDatabases.tsx +++ /dev/null @@ -1,88 +0,0 @@ -// 'use client'; - -import React from 'react'; - -import { palette } from '@leafygreen-ui/palette'; -import { - borderRadius, - fontFamilies, - fontWeights, - spacing, - typeScales, -} from '@leafygreen-ui/tokens'; - -import { ListDatabasesProps } from './ListDatabases.types'; - -const H3 = ({ children }: { children: React.ReactNode }) => { - return ( -

- {children} -

- ); -}; - -const Body = ({ children }: { children: React.ReactNode }) => { - return ( -

- {children} -

- ); -}; - -const Card = ({ children }: { children: React.ReactNode }) => { - return ( -
- {children} -
- ); -}; - -export default function ListDatabases({ databases }: ListDatabasesProps) { - if (databases.length === 0) { - return ( - -

No databases found

-
- ); - } - - return ( - -

Databases

- -
- ); -} diff --git a/mcp-ui/list-databases/src/ListDatabases.types.ts b/mcp-ui/list-databases/src/ListDatabases.types.ts deleted file mode 100644 index b492356476..0000000000 --- a/mcp-ui/list-databases/src/ListDatabases.types.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface ListDatabasesProps { - databases: Array; -} diff --git a/mcp-ui/list-databases/src/index.ts b/mcp-ui/list-databases/src/index.ts deleted file mode 100644 index 75629fbd30..0000000000 --- a/mcp-ui/list-databases/src/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export { default as ListDatabases } from './ListDatabases'; -export type { ListDatabasesProps } from './ListDatabases.types'; diff --git a/mcp-ui/list-databases/tsconfig.json b/mcp-ui/list-databases/tsconfig.json deleted file mode 100644 index ba0251cda9..0000000000 --- a/mcp-ui/list-databases/tsconfig.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "extends": "@lg-tools/build/config/package.tsconfig.json", - "compilerOptions": { - "paths": { - "@leafygreen-ui/*": [ - "../../packages/*/src" - ] - } - }, - "include": [ - "src/**/*" - ], - "exclude": [ - "**/*.stories.*" - ], - "references": [ - { - "path": "../../packages/card" - }, - { - "path": "../../packages/typography" - }, - { - "path": "../../packages/emotion" - }, - { - "path": "../../packages/lib" - } - ] -} - diff --git a/package.json b/package.json index 55beeb1352..8ab808fe9d 100644 --- a/package.json +++ b/package.json @@ -98,8 +98,7 @@ "@leafygreen-ui": "packages", "@lg-charts": "charts", "@lg-chat": "chat", - "@lg-tools": "tools", - "@lg-mcp-ui": "mcp-ui" + "@lg-tools": "tools" } }, "keywords": [ diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 89652f8019..67fa950c87 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -3,6 +3,5 @@ packages: - 'apps/*' - 'charts/*' - 'chat/*' - - 'mcp-ui/*' - 'packages/*' - 'tools/*' diff --git a/tools/install/src/ALL_PACKAGES.ts b/tools/install/src/ALL_PACKAGES.ts index c2964f5cfc..64cba25311 100644 --- a/tools/install/src/ALL_PACKAGES.ts +++ b/tools/install/src/ALL_PACKAGES.ts @@ -117,5 +117,4 @@ export const ALL_PACKAGES = [ '@lg-tools/test-harnesses', '@lg-tools/update', '@lg-tools/validate', - '@lg-mcp-ui/list-databases', ] as const;