Skip to content

Commit 1310533

Browse files
Pederzhtonxxdpietrozullogithub-actions[bot]
authored
feat: Transform mcp-use into MCP framework with monorepo, server SDK, visual inspector, CLI and scaffolding (#68)
* Fix OAuth flow and session API issues - skip ESLint for now * feat: implement esbuild-based file routing for UI resources - 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 * up * format * fix eslint format issues * BR: folder structure * BR: folder structure remove node modules * chore:bump version * chore: lock for test ui - not important * fix pre commit using installed lint-staged from mcp-use * chore: update gitignore * chore: update gitignore * fix * ignore * rename sdk folder * fix package json * chore: no individual lock files * Global linting * minor fix * Global linting setup with Next.js-style configuration * chore: moved test application in example folder * feat: cli build command * fix: rename mcp-use package * chore: remove legacy .eslintrc.json * chore: remove legacy .eslintrc.cli.json * feat: mcp-use cli in example app * chore: bump cli version * chore: info about CLI * chore: bump v * make mcp server work * remove legacy eslint files, deprecated in eslint 9 * Add watch option * remove build script -> now in CLI * chore: move create mcp-use app to its package * feat: create mcp app v0 * remove duplication in package * make template work * feat: server great design from express extension * feat: move static file serving to server implementaiton * refactor(inspector): update package.json and tsconfig, enhance build scripts, and remove unused index.ts * feat: add React integration and OAuth authentication support - Add React hooks and components for MCP integration - Implement OAuth authentication with browser provider - Add auth callback handling and types - Update examples to use new React components - Add utility functions for assertions - Update package configurations and dependencies * fix * cleanup * chore: remove redundancy * Moved tempate application for UI * feat: add mcp-ui to server package * patch mcp-ui/server (issue: MCP-UI-Org/mcp-ui#110) * fix tool types * chore: some type annotation * chore: test app in home folder for local deps * revert: type annotations * eslint as workspace dep * feat(inspector): enhance MCP Inspector with new features and improvements - Add support for new dependencies including @hono/node-server and @modelcontextprotocol/sdk - Implement OAuth authentication flow handling in the main application - Update README with detailed usage instructions and server configurations - Refactor components to utilize context for managing MCP connections - Improve UI with new animations and status indicators for server connections - Enhance error handling and retry logic for tool execution - Update package configurations and dependencies for better performance * feat(inspector): integrate react-resizable-panels and enhance UI components - Add react-resizable-panels dependency for improved layout management - Implement Discord button and deploy dialog in the Layout component - Enhance ToolsTab with search functionality and responsive design - Refactor badge and tab components for better styling and usability - Update package.json to include new dependencies and improve overall structure * chore: update mcp-use dependency to use workspace link in pnpm-lock.yaml and package.json * add test app * feat(inspector): integrate MCP Inspector with automatic mounting and enhanced server capabilities - Add automatic mounting of the MCP Inspector at `/inspector` for all MCP servers created with `createMCPServer` - Update README with usage instructions for embedded and standalone inspector modes - Enhance server setup to dynamically import and mount the inspector - Include new dependencies and update package configurations for improved functionality - Refactor inspector server code for better structure and maintainability * chore: update pnpm-lock.yaml and README for CLI enhancements - Add new dependencies and update versions in pnpm-lock.yaml - Enhance README with detailed usage instructions for development and production modes - Introduce new commands for starting development and production servers - Improve clarity on project structure and command options * chore: fixed tsconfig removing src dir * fix: use otuput types from spec * chore: update return types in test app * feat: more accurate typing * chore: docstrings * chore: logs * feat: remove lame emojy * feat: ok logs * fix: recreate createMCPServer functio * fix: removed non existing type expors * chore: remove lameness * feat: requests logs and timestamps * feat: port check * feat(inspector): enhance routing and server connection handling - Update Router in App component to use basename for inspector path - Modify InspectorDashboard to simplify server URL input placeholder - Improve error display for connection issues with clearer formatting - Ensure server IDs are properly encoded in links across components - Add URL decoding for server IDs in Layout and ServerDetail components - Implement favicon proxy endpoint in middleware for improved asset handling - Clean up invalid connections from localStorage in McpProvider - Remove outdated React example files and configurations from mcp-use * feat(inspector): integrate MCP UI client and enhance ToolsTab functionality - Add @mcp-ui/client dependency to inspector package - Implement PromptsTab and ResourcesTab components for improved layout - Enhance ToolsTab to display MCP UI resources and JSON content conditionally - Update Layout component to support new tab functionality and server connection states - Refactor code for better readability and maintainability * added proper pnpm settings for workspace management * add publishConfig to packages that will be published * remove @mcp-use/inspector from mcp-use's peer dependencies * add overrides to ensure ensure that anywhere in the dependency tree, if any package requests these packages, they get the workspace version, not a version from npm * make it ready for publishing * feat(inspector): update dependencies and enhance UI components - Add cmdk, next-themes, and sonner dependencies to improve UI functionality - Refactor App component to include ThemeProvider and Toaster for better user experience - Enhance InspectorDashboard with new connection management features and export options - Update Layout component to support command palette and keyboard shortcuts - Improve styling and animations in various components for a more polished look - Add new CSS animations for status indicators in index.css - Implement version injection from package.json in vite.config.ts * feat(inspector): implement OAuth callback handling and improve redirect logic - Add a custom Vite plugin to manage OAuth callback redirects in development mode - Update InspectorDashboard and McpContext to dynamically set the redirect URL based on the current environment - Enhance server middleware to redirect OAuth callbacks to the correct inspector path - Modify the MCP authorization callback to determine the base path for redirection after authentication * fix: fix dark mode * refactor: update build scripts and improve inspector middleware - Modify build script to separate mcp-use and other builds for better clarity - Adjust inspector middleware to enhance routing and serve the main HTML file for the root path - Ensure proper handling of trailing slashes in inspector routes * fix mcp-use package has an outdated bin entry that should be removed since the CLI has been moved to the create-mcp-use-app package * min fix * clean lock * override for @remote-dom/react (a dependency of @mcp-ui/client) only declares support for React 17 or 18 * refactor(inspector): streamline development setup and enhance server functionality - Simplify development script by removing concurrent execution of client and server - Update Vite configuration to remove unnecessary proxy settings - Refactor inspector CLI to use Hono framework, adding automatic port selection and improved health checks - Enhance resource handling in UI components, including automatic resource reading and improved loading states - Update ToolsTab to conditionally display MCP UI resources and JSON content based on user selection * feat(inspector): enhance ToolsTab with MCP UI resource preview functionality - Add conditional rendering for MCP UI resources in ToolsTab component - Implement buttons to toggle between preview and JSON modes for better user interaction - Remove redundant URI display logic to streamline the component * feat(inspector): implement auto-connect feature for MCP server in Layout component - Update inspector URL to include autoConnect query parameter for seamless connection - Add state management for auto-connection and loading spinner in Layout component - Enhance user experience by navigating to the server page while displaying a loading state * fix: @mcp-use/inspector back to mcp-use as an optional peer dependency * add test_app as package * fix(inspector): update connection type and enhance retry logic in MCP client - Change default connection type from 'Via Proxy' to 'Direct' in InspectorDashboard - Modify connection retry logic in useMcp to prevent infinite authentication loops - Improve logging for connection attempts and authentication success scenarios * feat(inspector): enhance development and server functionality - Introduce new development scripts for concurrent client and server execution. - Update Vite configuration to allow external connections and add proxy settings for API requests. - Replace standalone server implementation with unified server logic for better maintainability. - Add new dependencies for improved functionality, including vite-express for serving static assets. - Remove deprecated standalone server file and streamline server startup process with port availability checks. * refactor(inspector): adjust layout and panel sizes for improved UI consistency - Update border color in Layout component for better visual distinction. - Modify default sizes of ResizablePanels in PromptsTab, ResourcesTab, and ToolsTab for enhanced layout balance. - Introduce Wrench icon in ToolsTab for improved tool identification and user interaction. - Replace loading spinner with a new Spinner component for consistent loading indicators. * fix: paddings * minor * use tsup for packages build * use changeset to manage versioning and changelogs * remove old lint workflow * chore: add beta release workflow and documentation * update packages * update token sercer * update * change it back to mcp-use * different tokens for mcp-use and other packages * add release beta * fix: remove frozen-lockfile flag for release workflows * fix: explicitly use --no-frozen-lockfile in workflows * fix: add ts-expect-error for optional inspector import * fix: exclude test_app from build process * chore: remove duplicate beta workflow file * fix: use 'pnpm run version' instead of 'pnpm version' in workflows * chore: version packages (beta) (#61) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * fix: remove unused @ts-expect-error directive * fix: use @ts-ignore instead of @ts-expect-error for optional inspector import * changes * fix cli * chore: version packages - @mcp-use/inspector: 0.2.1 → 0.3.0 - @mcp-use/cli: 2.0.2 → 2.1.0 - create-mcp-use-app: 0.2.1 → 0.3.0 - Update test_app dependencies to latest versions * feat: add changesets for beta release - @mcp-use/inspector: patch bump - @mcp-use/cli: patch bump - create-mcp-use-app: patch bump * fix: update beta release workflow to handle patchedDependencies - Add --no-frozen-lockfile flag to pnpm install in GitHub Actions - This should resolve the lockfile mismatch error with patchedDependencies - Fixes the ERR_PNPM_LOCKFILE_CONFIG_MISMATCH error in the workflow * chore: version packages (beta) (#63) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * fix: add missing CLI build step and update peer dependencies - Add build:cli script to inspector package to build mcp-inspect binary - Update React peer dependency to accept React 19 - This should fix the missing mcp-inspect binary and peer dependency warnings * feat: add changeset for inspector CLI fix - Fix missing CLI binary in @mcp-use/inspector package - This should resolve the ENOENT errors when using create-mcp-use-app * chore: version packages (beta) (#64) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * fix hardcoded version * update mcp-use * Fix mcp-ui template * add cursor pointer * fix: dynamically set CLI version from package.json - Update CLI to read version from package.json instead of hardcoding it. - Replace fs.promises.access with fs.access for checking file existence. * chore: update dependencies and improve CLI functionality - 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. * refactor: rename standalone server example to simple and update dependencies - 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. * feat: enhance resource handling and add pagination support - 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`. * feat: enhance create-mcp-use-app with new UI templates and improved server 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. * feat: enhance InspectorDashboard and ResourcesTab with MCP UI support 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. * refactor: remove unused data visualization and todo list components - 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. * fix entrypoint * simplify release workflows with single npm token * remove ignored pkg in changeset * remove test_app * moved versioning changest stuff * update sdk version * feat: enhance InspectorDashboard with connection state management and 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. * Update readme for each package * add changeset * add lock * fix * no tests for create-mcp-use-app * changeset check use origin/main * fix lint * remove vitest --------- Co-authored-by: Enrico Toniato <[email protected]> Co-authored-by: pietrozullo <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 94bee70 commit 1310533

File tree

226 files changed

+45132
-4655
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

226 files changed

+45132
-4655
lines changed

.changeset/README.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Changesets
2+
3+
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
4+
with multi-package repos, or single-package repos to help you version and publish your code. You can
5+
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
6+
7+
We have a quick list of common questions to get you started engaging with this project in
8+
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
9+
10+
## Quick Start
11+
12+
### Creating a Changeset
13+
14+
```bash
15+
pnpm changeset
16+
```
17+
18+
This will prompt you to:
19+
1. Select which packages have changes
20+
2. Choose the version bump type (major/minor/patch)
21+
3. Write a summary of the changes
22+
23+
### Applying Changesets (Versioning)
24+
25+
```bash
26+
pnpm version
27+
```
28+
29+
This will:
30+
- Apply all pending changesets
31+
- Update package versions
32+
- Generate/update CHANGELOG.md files
33+
- Update dependencies
34+
35+
### Publishing to npm
36+
37+
```bash
38+
pnpm release
39+
```
40+
41+
This will:
42+
- Build all packages
43+
- Publish updated packages to npm
44+
- Create git tags
45+
46+
---
47+
48+
For detailed documentation, see [VERSIONING.md](../VERSIONING.md) in the project root.

.changeset/config.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
3+
"changelog": "@changesets/cli/changelog",
4+
"commit": false,
5+
"fixed": [],
6+
"linked": [],
7+
"access": "public",
8+
"baseBranch": "main",
9+
"updateInternalDependencies": "patch",
10+
"ignore": []
11+
}

.changeset/every-roses-sell.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
'create-mcp-use-app': patch
3+
'@mcp-use/inspector': patch
4+
'mcp-use': patch
5+
'@mcp-use/cli': patch
6+
---
7+
8+
add MCP server feature to mcp-use + add mcp-use inspector + add mcp-use cli build and deployment tool + add create-mcp-use-app for scaffolding mcp-use apps

.github/BETA_RELEASES.md

Lines changed: 252 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,252 @@
1+
# Beta Release Workflow
2+
3+
This guide explains how to release beta versions using the `beta` branch and automated GitHub Actions.
4+
5+
## 🎯 Overview
6+
7+
- **`main` branch** → Stable releases (automated via `release.yml`)
8+
- **`beta` branch** → Beta/prerelease versions (automated via `release-beta.yml`)
9+
- Feature branches → Work in progress (no releases)
10+
11+
## 🚀 Quick Start: Releasing a Beta
12+
13+
### 1. Create and Push to Beta Branch
14+
15+
```bash
16+
# From your feature branch (e.g., feat/mcp-ui-apps)
17+
git checkout -b beta
18+
19+
# Push to trigger the beta release workflow
20+
git push origin beta
21+
```
22+
23+
The GitHub Action will automatically:
24+
- Enter prerelease mode (creates `.changeset/pre.json`)
25+
- Create a "Version Packages (beta)" PR
26+
- Publish beta versions when the PR is merged
27+
28+
### 2. Make Changes and Create Changesets
29+
30+
```bash
31+
# Make your changes
32+
# ... edit files ...
33+
34+
# Create a changeset
35+
pnpm changeset
36+
37+
# Commit and push
38+
git add .
39+
git commit -m "feat: add new feature"
40+
git push origin beta
41+
```
42+
43+
### 3. The Automated Flow
44+
45+
When you push to `beta`:
46+
47+
1. **If no changesets exist**: Nothing happens (waiting for changesets)
48+
2. **If changesets exist**:
49+
- A PR is created with version bumps (e.g., `0.2.1-beta.0`)
50+
- Review and merge the PR
51+
- On merge, packages are automatically published to npm with `@beta` tag
52+
53+
## 📝 Manual Beta Release (Alternative)
54+
55+
If you prefer manual control:
56+
57+
```bash
58+
# On beta branch
59+
git checkout beta
60+
61+
# Enter prerelease mode (first time only)
62+
pnpm changeset pre enter beta
63+
64+
# Create changesets
65+
pnpm changeset
66+
67+
# Version packages
68+
pnpm version
69+
70+
# Commit version changes
71+
git add .
72+
git commit -m "chore: version packages (beta)"
73+
git push
74+
75+
# Publish to npm
76+
pnpm release
77+
```
78+
79+
## 🔄 Continuous Beta Releases
80+
81+
While on the `beta` branch, you can continue making changes:
82+
83+
```bash
84+
# Make more changes
85+
# ... edit code ...
86+
87+
# Create another changeset
88+
pnpm changeset
89+
90+
# Push to trigger versioning
91+
git push origin beta
92+
```
93+
94+
Each release will increment the beta number: `0.2.1-beta.0``0.2.1-beta.1``0.2.1-beta.2`, etc.
95+
96+
## ✅ Promoting Beta to Stable
97+
98+
When beta testing is complete and you're ready for a stable release:
99+
100+
### Option 1: Merge Beta to Main (Recommended)
101+
102+
```bash
103+
# Switch to main and merge beta
104+
git checkout main
105+
git pull origin main
106+
git merge beta
107+
108+
# Exit prerelease mode
109+
pnpm changeset pre exit
110+
111+
# Commit the pre.json removal
112+
git add .changeset/pre.json
113+
git commit -m "chore: exit prerelease mode"
114+
115+
# Push to main (triggers stable release workflow)
116+
git push origin main
117+
```
118+
119+
The stable release workflow will:
120+
- Version packages as stable (e.g., `0.2.1`)
121+
- Publish to npm with `@latest` tag
122+
123+
### Option 2: Cherry-pick Changes
124+
125+
If you only want specific changes from beta:
126+
127+
```bash
128+
git checkout main
129+
git cherry-pick <commit-hash>
130+
# ... resolve any conflicts ...
131+
git push origin main
132+
```
133+
134+
## 📦 Installing Beta Versions
135+
136+
Users can install beta versions:
137+
138+
```bash
139+
# Install latest beta
140+
npm install mcp-use@beta
141+
npm install @mcp-use/cli@beta
142+
143+
# Install specific beta version
144+
npm install [email protected]
145+
```
146+
147+
## 🔍 Checking Beta Releases
148+
149+
View published versions and tags:
150+
151+
```bash
152+
# See all versions
153+
npm view mcp-use versions
154+
155+
# See dist-tags
156+
npm view mcp-use dist-tags
157+
# {
158+
# latest: '0.2.0',
159+
# beta: '0.2.1-beta.0'
160+
# }
161+
```
162+
163+
## 🛠️ Workflow Features
164+
165+
The `release-beta.yml` workflow includes:
166+
167+
- ✅ Automatic prerelease mode entry
168+
- ✅ Version PR creation
169+
- ✅ Automatic publishing on merge
170+
- ✅ Comment on commits with published versions
171+
- ✅ Manual trigger via GitHub UI (workflow_dispatch)
172+
173+
## 🔧 Manual Trigger
174+
175+
You can manually trigger a beta release from GitHub:
176+
177+
1. Go to **Actions** tab
178+
2. Select **Release Beta** workflow
179+
3. Click **Run workflow**
180+
4. Select `beta` branch
181+
5. Click **Run workflow** button
182+
183+
## 📋 Best Practices
184+
185+
1. **Keep beta branch up to date with main**
186+
```bash
187+
git checkout beta
188+
git merge main
189+
git push
190+
```
191+
192+
2. **Create meaningful changesets**
193+
- Describe what changed from a user's perspective
194+
- Mark breaking changes clearly
195+
196+
3. **Test beta versions thoroughly**
197+
- Install beta versions in test projects
198+
- Verify all packages work together
199+
- Check for breaking changes
200+
201+
4. **Clean up after stable release**
202+
```bash
203+
# After merging to main and releasing stable
204+
git checkout beta
205+
git merge main # Sync beta with main
206+
git push
207+
```
208+
209+
## 🐛 Troubleshooting
210+
211+
### "Already in prerelease mode" Error
212+
213+
The workflow handles this automatically, but if you see this message, it means `.changeset/pre.json` already exists. This is normal and expected.
214+
215+
### Beta Branch Out of Sync
216+
217+
```bash
218+
# Reset beta branch to match a starting point
219+
git checkout beta
220+
git reset --hard main # or feat/your-feature
221+
git push --force origin beta
222+
```
223+
224+
### Want to Start Fresh
225+
226+
```bash
227+
# Exit prerelease mode
228+
pnpm changeset pre exit
229+
230+
# Remove all pending changesets
231+
rm -rf .changeset/*.md
232+
233+
# Commit changes
234+
git add .
235+
git commit -m "chore: reset changesets"
236+
git push
237+
```
238+
239+
### Workflow Not Triggering
240+
241+
Check:
242+
1. Branch name is exactly `beta`
243+
2. You have changesets in `.changeset/*.md`
244+
3. GitHub Actions is enabled in your repository
245+
4. `NPM_TOKEN` secret is configured in GitHub Settings
246+
247+
## 📚 Resources
248+
249+
- [Changesets Prerelease Documentation](https://github.com/changesets/changesets/blob/main/docs/prereleases.md)
250+
- [Main Release Workflow](./VERSIONING.md)
251+
- [Changeset Workflow Guide](./CHANGESET_WORKFLOW.md)
252+

0 commit comments

Comments
 (0)