diff --git a/.changeset/EXAMPLE_WORKFLOW.md b/.changeset/EXAMPLE_WORKFLOW.md deleted file mode 100644 index acbc2831..00000000 --- a/.changeset/EXAMPLE_WORKFLOW.md +++ /dev/null @@ -1,288 +0,0 @@ -# Complete Example: Adding a Feature and Publishing - -This is a step-by-step walkthrough of adding a feature and releasing it. - -## Scenario - -You want to add a new `useMcpTools()` React hook to the `mcp-use` package. - -## Step 1: Create Feature Branch - -```bash -git checkout main -git pull origin main -git checkout -b feat/add-use-mcp-tools-hook -``` - -## Step 2: Implement the Feature - -```typescript -// packages/mcp-use/src/react/hooks/useMcpTools.ts -import { useState, useEffect } from 'react'; -import { MCPClient } from '../../client.js'; - -export function useMcpTools(serverName: string) { - const [tools, setTools] = useState([]); - const [loading, setLoading] = useState(true); - - useEffect(() => { - // Implementation... - }, [serverName]); - - return { tools, loading }; -} - -// Export from packages/mcp-use/src/react/index.ts -export { useMcpTools } from './hooks/useMcpTools.js'; -``` - -## Step 3: Build and Test Locally - -```bash -# Build all packages -pnpm build - -# Output: -# packages/mcp-use build: ESM ⚡️ Build success in 42ms -# packages/mcp-use build: CJS ⚡️ Build success in 42ms -# ✓ All packages built successfully - -# Run tests -pnpm test - -# Run linter -pnpm lint -``` - -## Step 4: Create a Changeset - -```bash -pnpm changeset -``` - -**Interactive Prompts:** - -``` -🦋 Which packages would you like to include? -◉ mcp-use -◯ @mcp-use/cli -◯ @mcp-use/inspector -◯ create-mcp-use-app - -🦋 What kind of change is this for mcp-use? -◯ major -◉ minor ← Select this (new feature) -◯ patch - -🦋 Please enter a summary for this change (this will be written to the changelog): -Added useMcpTools React hook for easier tool management -``` - -**Result:** Creates `.changeset/random-name-here.md` - -```md ---- -"mcp-use": minor ---- - -Added useMcpTools React hook for easier tool management -``` - -## Step 5: Commit Everything - -```bash -git add . -git commit -m "feat: add useMcpTools React hook" -git push origin feat/add-use-mcp-tools-hook -``` - -## Step 6: Create Pull Request - -Create a PR on GitHub with: - -**Title:** `feat: add useMcpTools React hook` - -**Description:** -```markdown -## What - -Adds a new `useMcpTools()` React hook for managing MCP tools. - -## Why - -Simplifies tool management in React applications. - -## Changes - -- Added `useMcpTools` hook in `packages/mcp-use/src/react/hooks/` -- Exported from `mcp-use/react` -- Added tests for the new hook - -## Changeset - -✅ Changeset included (minor bump for mcp-use) -``` - -## Step 7: Review & Merge - -After review and approval: - -```bash -# Merge the PR to main -``` - -## Step 8: Release (Maintainer Task) - -On the `main` branch after merge: - -```bash -# Switch to main and pull -git checkout main -git pull origin main - -# Check what will be versioned -pnpm version:check -``` - -**Output:** -``` -🦋 info Packages to be bumped at minor: -🦋 - mcp-use (0.2.0 → 0.3.0) -🦋 -🦋 info Packages to be bumped at patch: -🦋 - @mcp-use/cli (2.0.1 → 2.0.2) ← depends on mcp-use -🦋 - @mcp-use/inspector (0.1.0 → 0.1.1) ← depends on mcp-use -``` - -```bash -# Apply the version changes -pnpm version -``` - -**This will:** -1. Update `mcp-use/package.json` to `0.3.0` -2. Update dependent packages (`@mcp-use/cli`, `@mcp-use/inspector`) with patch bumps -3. Generate/update `CHANGELOG.md` in each package: - -```markdown -# mcp-use - -## 0.3.0 - -### Minor Changes - -- abc1234: Added useMcpTools React hook for easier tool management - -## 0.2.0 -... -``` - -4. Delete `.changeset/random-name-here.md` -5. Update `pnpm-lock.yaml` - -```bash -# Review the changes -git diff - -# Commit the version changes -git add . -git commit -m "chore: version packages" -git push origin main -``` - -## Step 9: Publish to npm - -```bash -# Build everything -pnpm build - -# Publish to npm -pnpm release -``` - -**This will:** -1. Build all packages with tsup -2. Run `changeset publish` -3. Publish `mcp-use@0.3.0` to npm -4. Publish `@mcp-use/cli@2.0.2` to npm -5. Publish `@mcp-use/inspector@0.1.1` to npm -6. Create git tags for each version - -**Output:** -``` -🦋 info npm info mcp-use -🦋 info npm publish mcp-use@0.3.0 -🦋 success packages published successfully: -🦋 - mcp-use@0.3.0 -🦋 - @mcp-use/cli@2.0.2 -🦋 - @mcp-use/inspector@0.1.1 -``` - -```bash -# Push tags -git push --follow-tags -``` - -## Step 10: Verify Publication - -```bash -# Check on npm -npm view mcp-use version -# Output: 0.3.0 - -npm view @mcp-use/cli version -# Output: 2.0.2 - -# Or visit: -# https://www.npmjs.com/package/mcp-use -# https://www.npmjs.com/package/@mcp-use/cli -# https://www.npmjs.com/package/@mcp-use/inspector -# https://www.npmjs.com/package/create-mcp-use-app -``` - -## 📊 Timeline Summary - -1. **Day 1**: Developer creates feature + changeset, pushes PR -2. **Day 2-3**: Code review, changes, approval -3. **Day 3**: PR merged to main -4. **Day 3**: Maintainer runs `pnpm version` → Version PR created -5. **Day 3**: Maintainer reviews and merges Version PR -6. **Day 3**: Automated workflow publishes to npm -7. **Done!** ✨ - -## 🤖 Automated Workflow (GitHub Actions) - -With the included GitHub Actions workflows: - -1. **Developer** creates PR with changeset -2. **CI** validates build, tests, lint -3. **Merge** to main triggers release workflow -4. **Changesets Action** creates "Version Packages" PR automatically -5. **Maintainer** reviews and merges Version PR -6. **Action** automatically publishes to npm -7. **Done!** No manual commands needed - -## 🎓 Learning Resources - -- **Quick Reference**: See `CHANGESET_WORKFLOW.md` -- **Detailed Guide**: See `VERSIONING.md` -- **Changesets Docs**: https://github.com/changesets/changesets -- **Semantic Versioning**: https://semver.org/ - -## 💡 Tips - -- **Batch related changes** - Create one changeset for related changes across packages -- **Clear summaries** - Write what users need to know, not implementation details -- **Link to PRs** - Reference PR numbers in changeset summaries -- **Test before release** - Always build and test before publishing -- **Coordinate major bumps** - Plan breaking changes with the team - ---- - -**Ready to get started?** - -```bash -# Make some changes, then: -pnpm changeset -``` - diff --git a/.changeset/migrate-to-tsup.md b/.changeset/migrate-to-tsup.md deleted file mode 100644 index 9568f280..00000000 --- a/.changeset/migrate-to-tsup.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -"mcp-use": patch -"@mcp-use/cli": patch -"@mcp-use/inspector": patch -"create-mcp-use-app": patch ---- - -Migrated build system from tsc to tsup for faster builds (10-100x improvement) with dual CJS/ESM output support. This is an internal change that improves build performance without affecting the public API. - diff --git a/packages/cli/CHANGELOG.md b/packages/cli/CHANGELOG.md new file mode 100644 index 00000000..cb90db4b --- /dev/null +++ b/packages/cli/CHANGELOG.md @@ -0,0 +1,11 @@ +# @mcp-use/cli + +## 2.0.2 + +### Patch Changes + +- db54528: Migrated build system from tsc to tsup for faster builds (10-100x improvement) with dual CJS/ESM output support. This is an internal change that improves build performance without affecting the public API. +- Updated dependencies [db54528] +- Updated dependencies [db54528] + - mcp-use@0.3.0 + - @mcp-use/inspector@0.2.1 diff --git a/packages/cli/package.json b/packages/cli/package.json index 026c5ecc..fce07eff 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@mcp-use/cli", - "version": "2.0.1", + "version": "2.0.2", "description": "Build tool for MCP UI widgets - bundles React components into standalone HTML pages for Model Context Protocol servers", "author": "mcp-use, Inc.", "license": "MIT", diff --git a/packages/create-mcp-use-app/CHANGELOG.md b/packages/create-mcp-use-app/CHANGELOG.md new file mode 100644 index 00000000..91bd4d6b --- /dev/null +++ b/packages/create-mcp-use-app/CHANGELOG.md @@ -0,0 +1,7 @@ +# create-mcp-use-app + +## 0.2.1 + +### Patch Changes + +- db54528: Migrated build system from tsc to tsup for faster builds (10-100x improvement) with dual CJS/ESM output support. This is an internal change that improves build performance without affecting the public API. diff --git a/packages/create-mcp-use-app/package.json b/packages/create-mcp-use-app/package.json index 027c18ba..5293d773 100644 --- a/packages/create-mcp-use-app/package.json +++ b/packages/create-mcp-use-app/package.json @@ -1,6 +1,6 @@ { "name": "create-mcp-use-app", - "version": "0.2.0", + "version": "0.2.1", "type": "module", "description": "Create MCP-Use apps with one command", "author": "mcp-use, Inc.", diff --git a/packages/inspector/CHANGELOG.md b/packages/inspector/CHANGELOG.md new file mode 100644 index 00000000..4696f85b --- /dev/null +++ b/packages/inspector/CHANGELOG.md @@ -0,0 +1,10 @@ +# @mcp-use/inspector + +## 0.2.1 + +### Patch Changes + +- db54528: Migrated build system from tsc to tsup for faster builds (10-100x improvement) with dual CJS/ESM output support. This is an internal change that improves build performance without affecting the public API. +- Updated dependencies [db54528] +- Updated dependencies [db54528] + - mcp-use@0.3.0 diff --git a/packages/inspector/package.json b/packages/inspector/package.json index 9bd9f46e..b5bfb840 100644 --- a/packages/inspector/package.json +++ b/packages/inspector/package.json @@ -1,7 +1,7 @@ { "name": "@mcp-use/inspector", "type": "module", - "version": "0.2.0", + "version": "0.2.1", "description": "MCP Inspector - A tool for inspecting and debugging MCP servers", "author": "", "license": "MIT", diff --git a/packages/mcp-use/CHANGELOG.md b/packages/mcp-use/CHANGELOG.md new file mode 100644 index 00000000..6dfcb472 --- /dev/null +++ b/packages/mcp-use/CHANGELOG.md @@ -0,0 +1,213 @@ +# mcp-use + +## 0.3.0 + +### Minor Changes + +- db54528: Added useMcpTools React hook for easier tool management + + ```` + + ## Step 5: Commit Everything + + ```bash + git add . + git commit -m "feat: add useMcpTools React hook" + git push origin feat/add-use-mcp-tools-hook + ```` + + ## Step 6: Create Pull Request + + Create a PR on GitHub with: + + **Title:** `feat: add useMcpTools React hook` + + **Description:** + + ```markdown + ## What + + Adds a new `useMcpTools()` React hook for managing MCP tools. + + ## Why + + Simplifies tool management in React applications. + + ## Changes + + - Added `useMcpTools` hook in `packages/mcp-use/src/react/hooks/` + - Exported from `mcp-use/react` + - Added tests for the new hook + + ## Changeset + + ✅ Changeset included (minor bump for mcp-use) + ``` + + ## Step 7: Review & Merge + + After review and approval: + + ```bash + # Merge the PR to main + ``` + + ## Step 8: Release (Maintainer Task) + + On the `main` branch after merge: + + ```bash + # Switch to main and pull + git checkout main + git pull origin main + + # Check what will be versioned + pnpm version:check + ``` + + **Output:** + + ``` + 🦋 info Packages to be bumped at minor: + 🦋 - mcp-use (0.2.0 → 0.3.0) + 🦋 + 🦋 info Packages to be bumped at patch: + 🦋 - @mcp-use/cli (2.0.1 → 2.0.2) ← depends on mcp-use + 🦋 - @mcp-use/inspector (0.1.0 → 0.1.1) ← depends on mcp-use + ``` + + ```bash + # Apply the version changes + pnpm version + ``` + + **This will:** + 1. Update `mcp-use/package.json` to `0.3.0` + 2. Update dependent packages (`@mcp-use/cli`, `@mcp-use/inspector`) with patch bumps + 3. Generate/update `CHANGELOG.md` in each package: + + ```markdown + # mcp-use + + ## 0.3.0 + + ### Minor Changes + + - abc1234: Added useMcpTools React hook for easier tool management + + ## 0.2.0 + + ... + ``` + + 4. Delete `.changeset/random-name-here.md` + 5. Update `pnpm-lock.yaml` + + ```bash + # Review the changes + git diff + + # Commit the version changes + git add . + git commit -m "chore: version packages" + git push origin main + ``` + + ## Step 9: Publish to npm + + ```bash + # Build everything + pnpm build + + # Publish to npm + pnpm release + ``` + + **This will:** + 1. Build all packages with tsup + 2. Run `changeset publish` + 3. Publish `mcp-use@0.3.0` to npm + 4. Publish `@mcp-use/cli@2.0.2` to npm + 5. Publish `@mcp-use/inspector@0.1.1` to npm + 6. Create git tags for each version + + **Output:** + + ``` + 🦋 info npm info mcp-use + 🦋 info npm publish mcp-use@0.3.0 + 🦋 success packages published successfully: + 🦋 - mcp-use@0.3.0 + 🦋 - @mcp-use/cli@2.0.2 + 🦋 - @mcp-use/inspector@0.1.1 + ``` + + ```bash + # Push tags + git push --follow-tags + ``` + + ## Step 10: Verify Publication + + ```bash + # Check on npm + npm view mcp-use version + # Output: 0.3.0 + + npm view @mcp-use/cli version + # Output: 2.0.2 + + # Or visit: + # https://www.npmjs.com/package/mcp-use + # https://www.npmjs.com/package/@mcp-use/cli + # https://www.npmjs.com/package/@mcp-use/inspector + # https://www.npmjs.com/package/create-mcp-use-app + ``` + + ## 📊 Timeline Summary + 1. **Day 1**: Developer creates feature + changeset, pushes PR + 2. **Day 2-3**: Code review, changes, approval + 3. **Day 3**: PR merged to main + 4. **Day 3**: Maintainer runs `pnpm version` → Version PR created + 5. **Day 3**: Maintainer reviews and merges Version PR + 6. **Day 3**: Automated workflow publishes to npm + 7. **Done!** ✨ + + ## 🤖 Automated Workflow (GitHub Actions) + + With the included GitHub Actions workflows: + 1. **Developer** creates PR with changeset + 2. **CI** validates build, tests, lint + 3. **Merge** to main triggers release workflow + 4. **Changesets Action** creates "Version Packages" PR automatically + 5. **Maintainer** reviews and merges Version PR + 6. **Action** automatically publishes to npm + 7. **Done!** No manual commands needed + + ## 🎓 Learning Resources + - **Quick Reference**: See `CHANGESET_WORKFLOW.md` + - **Detailed Guide**: See `VERSIONING.md` + - **Changesets Docs**: https://github.com/changesets/changesets + - **Semantic Versioning**: https://semver.org/ + + ## 💡 Tips + - **Batch related changes** - Create one changeset for related changes across packages + - **Clear summaries** - Write what users need to know, not implementation details + - **Link to PRs** - Reference PR numbers in changeset summaries + - **Test before release** - Always build and test before publishing + - **Coordinate major bumps** - Plan breaking changes with the team + + *** + + **Ready to get started?** + + ```bash + # Make some changes, then: + pnpm changeset + ``` + +### Patch Changes + +- db54528: Migrated build system from tsc to tsup for faster builds (10-100x improvement) with dual CJS/ESM output support. This is an internal change that improves build performance without affecting the public API. +- Updated dependencies [db54528] + - @mcp-use/inspector@0.2.1 diff --git a/packages/mcp-use/package.json b/packages/mcp-use/package.json index b7701173..897d0555 100644 --- a/packages/mcp-use/package.json +++ b/packages/mcp-use/package.json @@ -1,7 +1,7 @@ { "name": "mcp-use", "type": "module", - "version": "0.2.1", + "version": "0.3.0", "packageManager": "pnpm@10.6.1", "description": "Opinionated MCP Framework for TypeScript (@modelcontextprotocol/sdk compatible) - Build MCP Agents and Clients + MCP Servers with support for MCP-UI.", "author": "mcp-use, Inc.", @@ -88,7 +88,7 @@ "example:observability": "npm run build && node dist/examples/observability.js" }, "peerDependencies": { - "@mcp-use/inspector": "^0.2.0", + "@mcp-use/inspector": "^0.2.1", "cors": "^2.8.5", "express": "^4.18.2", "langfuse": "^3.32.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 90690a8d..3fcbbb92 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -14,7 +14,7 @@ overrides: patchedDependencies: '@mcp-ui/server@5.11.0': - hash: q4o7znptjmfaz7quhzmm6hp4jy + hash: 5d24b4104a7d6d537b7de1dc183b27e42d9c1b3fde96a28dbeb722713ba85f11 path: patches/@mcp-ui__server@5.11.0.patch importers: @@ -288,7 +288,7 @@ importers: version: 0.6.14(@langchain/core@0.3.78(@opentelemetry/api@1.9.0)(openai@5.12.2(ws@8.18.3)(zod@3.25.76)))(ws@8.18.3) '@mcp-ui/server': specifier: ^5.11.0 - version: 5.11.0(patch_hash=q4o7znptjmfaz7quhzmm6hp4jy) + version: 5.11.0(patch_hash=5d24b4104a7d6d537b7de1dc183b27e42d9c1b3fde96a28dbeb722713ba85f11) '@mcp-use/inspector': specifier: workspace:* version: link:../inspector @@ -440,7 +440,7 @@ importers: dependencies: '@mcp-ui/server': specifier: ^5.11.0 - version: 5.11.0(patch_hash=q4o7znptjmfaz7quhzmm6hp4jy) + version: 5.11.0(patch_hash=5d24b4104a7d6d537b7de1dc183b27e42d9c1b3fde96a28dbeb722713ba85f11) '@mcp-use/inspector': specifier: workspace:* version: link:../packages/inspector @@ -7781,7 +7781,7 @@ snapshots: - preact - supports-color - '@mcp-ui/server@5.11.0(patch_hash=q4o7znptjmfaz7quhzmm6hp4jy)': + '@mcp-ui/server@5.11.0(patch_hash=5d24b4104a7d6d537b7de1dc183b27e42d9c1b3fde96a28dbeb722713ba85f11)': dependencies: '@modelcontextprotocol/sdk': 1.12.1 transitivePeerDependencies: