Skip to content

Conversation

@Pederzh
Copy link
Contributor

@Pederzh Pederzh commented Oct 13, 2025

🎯 Overview

This PR transforms mcp-use from a single-package MCP client library into a comprehensive
TypeScript framework for the Model Context Protocol ecosystem. The project is now a monorepo with
four packages providing end-to-end support for building, debugging, and deploying MCP
applications.

📦 New Package Architecture

1. mcp-use (Core Framework)

  • Client SDK: Existing MCP client functionality (moved from root)
  • Server SDK: NEW - Full server implementation with MCP UI widget support
  • React Hooks: NEW - useMcp hook for React applications
  • OAuth Support: Enhanced browser-based OAuth flow
  • Enhanced type safety and error handling

2. @mcp-use/cli (NEW)

  • Development server with hot reload
  • Build tool using tsup for production bundles
  • Auto-launching MCP Inspector integration
  • Port management and process orchestration

3. @mcp-use/inspector (NEW)

  • Full-featured web-based debugger for MCP servers
  • Real-time connection management and monitoring
  • Interactive tool, prompt, and resource testing
  • MCP UI widget rendering and preview
  • Multi-server support with visual dashboard
  • OAuth callback handling
  • Built with React, Vite, and shadcn/ui

4. create-mcp-use-app (NEW)

  • Project scaffolding tool for new MCP applications
  • Multiple templates (simple server, UI-enabled server)
  • Pre-configured development environment
  • Example implementations included

🎨 Key Features Added

MCP UI Integration

  • Full integration of @mcp-ui/client and @mcp-ui/server
  • Support for rich visual widgets in MCP resources
  • Kanban board template included as example
  • React component rendering within MCP resources

Developer Experience

  • Hot Reload: Automatic server restart on file changes
  • Auto-Inspector: Inspector launches automatically during development
  • Type Safety: Improved TypeScript types throughout
  • Better Logging: Enhanced request/response logging with timestamps

Infrastructure

  • Changesets: Professional version management system
  • Beta Releases: Separate beta release workflow
  • CI/CD: Comprehensive GitHub Actions workflows
  • Build System: Migrated to tsup for faster, more reliable builds
  • Workspace Management: Proper pnpm workspace configuration

🔧 Technical Changes

Monorepo Structure

packages/
├── mcp-use/ # Core SDK (client + server)
├── cli/ # Build & dev tools
├── inspector/ # Web-based debugger
└── create-mcp-use-app/ # Project scaffolder

Breaking Changes

  • Main package moved to packages/mcp-use/
  • CLI functionality extracted to @mcp-use/cli
  • Import paths unchanged for existing users
  • Removed bin entry from mcp-use package

Build & Tooling

  • Migrated from tsc to tsup for all packages
  • Centralized ESLint configuration (Next.js style)
  • Global prettier configuration
  • Unified testing with Vitest
  • Pre-commit hooks with lint-staged

Dependencies

  • Added @mcp-ui/client and @mcp-ui/server
  • Added @remote-dom/react for UI rendering
  • Updated to latest @modelcontextprotocol/sdk
  • Added react-resizable-panels for inspector UI
  • Workspace-wide dependency management with overrides

tonxxd and others added 30 commits October 7, 2025 23:01
- Replace Vite with esbuild for faster, more reliable builds
- Add file-based routing system for resources/**/*.tsx files
- Each TSX file becomes a route at /mcp-use/widgets/{filename}
- Self-contained React components with createRoot mounting
- Production-ready asset serving with proper hashing
- Fix ES module compatibility issues (require -> import)
- Add fallback routes for browser-resolved asset paths
- Update CLI templates with new build system
tonxxd and others added 20 commits October 10, 2025 21:15
- Update CLI to read version from package.json instead of hardcoding it.
- Replace fs.promises.access with fs.access for checking file existence.
- Update `@mcp-ui/server` patch hash in `pnpm-lock.yaml`.
- Add new dependencies for `@langchain` packages in `pnpm-lock.yaml`.
- Restore `express` version in `pnpm-lock.yaml`.
- Enhance CLI to dynamically read package version from `package.json`.
- Implement workspace dependency handling in `create-mcp-use-app`.
- Add a new standalone example for the MCP server.
- Refactor favicon proxy and middleware for improved functionality.
- Introduce shared utilities for favicon fetching and caching.
- Update inspector package to support new features and improve error handling.
…dencies

- Changed the directory name from `standalone` to `simple` in the workspace configuration.
- Updated dependencies in `pnpm-lock.yaml`, including removing `@types/bun` and adjusting TypeScript version.
- Modified CLI to use `stdio: 'inherit'` for better output handling.
- Enhanced resource definition in `mcp-server.ts` to include metadata fields.
- Updated resource definition interface in `types.ts` to improve documentation and structure.
- Updated resource definition in `server.ts` to include a title and improved description.
- Enhanced `listResources` method in `base.ts` to support optional pagination with a cursor.
- Introduced `listAllResources` method for automatic pagination of resource listings.
- Added `subscribeToResource` and `unsubscribeFromResource` methods for managing resource updates.
- Improved documentation for resource templates and annotations in `mcp-server.ts` and `types.ts`.
…erver resources

- Added new UI templates for data visualization and Kanban board in `create-mcp-use-app`.
- Updated `pnpm-lock.yaml` to include new dependencies for the UI templates.
- Refactored server resource definitions to improve structure and added annotations for better documentation.
- Modified `copy-templates` script in `package.json` to use a dedicated script for copying templates.
- Enhanced styling and layout for data visualization components to improve user experience.
… and improved user interactions

- Added a copy URL button in InspectorDashboard for easy access to connection URLs.
- Introduced preview and JSON toggle functionality in ResourcesTab for better resource visualization.
- Enhanced MCP UI resource handling in ResourcesTab to display content based on user selection.
- Updated McpUIRenderer to support new resource formats and improved UI action handling.
- Refactored input handling in ToolsTab to respect tool input schemas for better data management.
- Deleted the `data-visualization.tsx` and `todo-list.tsx` files as they are no longer needed in the project.
- Updated the `kanban-board.tsx` to ensure proper type handling for new tasks.
- Adjusted server resource definitions to streamline the UI component integration.
… UI improvements

- Added connection state monitoring in InspectorDashboard to handle pending connections and display success/error messages.
- Refactored connection handling logic to improve user experience during connection attempts.
- Replaced the empty state message with a NotFound component for better clarity.
- Updated button behavior to indicate connection status with a loading state.
- Cleaned up imports and adjusted layout styles for consistency.
@Pederzh Pederzh changed the title Feat/mcp UI apps feat: Transform mcp-use into MCP framework with monorepo, server SDK, visual inspector, CLI and scaffolding Oct 13, 2025
@Pederzh Pederzh merged commit 1310533 into main Oct 13, 2025
4 checks passed
@Pederzh Pederzh deleted the feat/mcp-ui-apps branch October 13, 2025 20:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants