Commit Graph

161 Commits

Author SHA1 Message Date
Andrew Khadder 33e30cb8e3 Canary (#2117)
* fix(cli): report success from mcp-use typecheck (#2099)

`tsc --noEmit` prints nothing on a clean project, so `mcp-use typecheck`
exited 0 with no output at all, which is indistinguishable from the
command hanging or silently failing.

Print `[mcp-use] no type errors (<duration>ms)` on exit code 0, matching
the existing `[mcp-use] built ... (<duration>ms)` line from `build`.
Failing runs are untouched and still show only the compiler's own
diagnostics.

Closes #2083

* chore: enter canary prerelease mode

* chore(typescript): version packages (canary)

* chore: sync main into canary (#2119)

* chore(release): exit prerelease mode and publish npm README hotfix

Publishes mcp-use 2.0.1 and @mcp-use/inspector 20.0.1 with the repository README included in the mcp-use package tarball.

* chore(release): exit prerelease mode and publish npm README metadata hotfix

Publishes mcp-use 2.0.2 and @mcp-use/inspector 20.0.2 after preparing README metadata before npm publication.

* chore(release): exit prerelease mode and commit npm package README

Publishes mcp-use 2.0.3 and @mcp-use/inspector 20.0.3 with a committed package-root README.

* chore(release): exit prerelease mode and fix npm README assets

Fix npm README asset and repository links, publish mcp-use 2.0.4, and keep Inspector aligned at 20.0.4.

* Update libraries/typescript/packages/server/README.md

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Signed-off-by: Andrew Khadder <54488379+khandrew1@users.noreply.github.com>

* docs: sync migration guide link

---------

Signed-off-by: Andrew Khadder <54488379+khandrew1@users.noreply.github.com>
Co-authored-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com>
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>

* fix(cli): say whether `start` mounted the inspector (#2100)

* fix(cli): say whether start mounted the inspector

`mcp-use dev` advertises the inspector in its banner, but `mcp-use start`
says nothing about it and `${basePath}/inspector` 404s unless
`--with-inspector` was passed. With no hint, that reads as a broken
production build rather than an opt-in.

Plain `start` now prints that the inspector is not mounted and how to
mount it, and `--with-inspector` prints the URL it was mounted at, which
was previously silent too.

Closes #2084

* fix(cli): drop the inspector-not-mounted line from start

Per review: most people running start do not want the inspector, so
announcing its absence is noise. Plain start is now silent about the
inspector again, and only the --with-inspector path prints its URL.

Updates the spec, the changeset, and swaps the test to pin the silence
instead of the message.

* chore(typescript): version packages (canary)

* chore: upgrade changesets cli to 2.31.1 (#2121)

* fix(ci): pin pnpm in the docs workflow so the job can start (#2116)

The docs job fails in "Set up pnpm" before it generates anything:

  Error: No pnpm version is specified.

pnpm/action-setup@v4 was used with no version:, so it falls back to
reading packageManager from package_json_file, which defaults to the
repository root. This repo has no root package.json, so the step could
never succeed and the check was red on every branch including main.

Pins 11.13.1, matching all nine action-setup uses in ci.yml and the
packageManager field in libraries/typescript/package.json.

* fix(cli): support package-manager dev arg forwarding (#2124)

* fix(cli): support package-manager dev arg forwarding (MCP-2549)

* chore: add MCP-2549 changeset

* fix(cli): normalize forwarded arguments across commands

* chore(typescript): version packages (canary)

* docs: fix TypeScript README links into the removed mcp-use package (#2114)

The v2 merge deleted libraries/typescript/packages/mcp-use, but the
TypeScript README still pointed at it in four places: the three logo
sources at the top of the page, and the documentation link at the bottom.

The logo now uses the absolute raw.githubusercontent.com URL that every
sibling package README already uses, and the docs link points at
packages/server, which is where the mcp-use package lives in v2 and what
the create-mcp-use-app and inspector READMEs already link to.

* fix(create-mcp-use-app): drop stale main field and give templates distinct descriptions (#2085)

* fix(create-mcp-use-app): drop stale main field and give templates distinct descriptions

Two small things in the scaffolded package.json, both visible as soon as
you generate a project.

main pointed at dist/index.js. v2 builds emit .mcp-use/build instead, so
that path never exists and main never resolves. These templates are apps
you run with mcp-use start, not packages anyone imports, and .mcp-use is
gitignored build output, so the field is dropped rather than repointed.

All three templates also carried the description 'an mcp-use server'.
--list-templates reads that field, so the three were indistinguishable
from the CLI, and every generated project inherited the same string.
Each now says what it actually gives you.

Closes #2080
Closes #2081

* chore: add changeset for the template package.json fixes

* fix(create-mcp-use-app): stop discarding the template description

updatePackageJson overwrote description with a generic
"<name>: an mcp-use server" on every scaffold, so the per-template
descriptions only ever reached --list-templates and never the generated
project. It now fills that in only when the template has no description
of its own, which keeps the previous behaviour for templates without one.

* chore(typescript): version packages (canary)

* fix(client): stop leaking parent env to stdio servers (#2125)

Port the security fix from #1949 to the v2 client package and verify the child process receives only safe defaults plus explicitly configured variables.

Co-authored-by: VihaanAgarwal <72850668+VihaanAgarwal@users.noreply.github.com>

* chore(typescript): version packages (canary)

* fix(client): bound conformance auth scenarios (#2126)

* fix(client): make stdio errlog actually receive the child's stderr (#2086)

* fix(client): make stdio errlog actually receive the child's stderr

StdioConnectionManager takes an errlog stream and documents that the
child server's stderr is piped to it, but the transport was created
without stderr: "pipe". The SDK defaults to "inherit", which leaves
transport.stderr null, so the forwarding block guarding on it never
ran and the child's stderr always went to the parent instead.

Spawn with stderr: "pipe" by default, spread so an explicit mode in
server params still wins. Tests spawn real child processes: one checks
a custom errlog receives the output, one checks stderr: "ignore" still
opts out.

* chore: drop stray version.ts that does not belong on beta

Left over from a main checkout; packages/mcp-use does not exist on this
branch.

* fix(client): expose stderr mode on the public stdio APIs

Per review, the compatibility escape hatch only worked for callers that
built StdioConnectionManager directly. StdioConnector did not accept or
forward stderr and StdioServerConfig did not expose it, so users of the
normal public APIs could not opt back into inherited stderr.

- Add a StdioStderrMode of "pipe" | "inherit" | "ignore", default "pipe".
- Accept it on StdioConnector and StdioServerConfig, forward it into
  StdioServerParameters, and thread it through the config path.
- Apply the default after the spread so an explicit stderr: undefined no
  longer defeats it.
- Only forward transport.stderr when the mode leaves a readable stream.
- Pipe with { end: false } and unpipe on close, since errlog is
  caller-owned and may be reused across reconnects.
- Handle stream errors instead of letting a destroyed errlog surface as
  an unhandled 'error' event.

Tests now start the transport before asserting, so the non-pipe cases are
exercised against a real child instead of passing by construction.

* fix(client): handle errlog write errors

---------

Co-authored-by: Andrew Khadder <andrew@manufact.com>

* chore(typescript): version packages (canary)

* fix(inspector): block loopback proxy targets by default (#2134)

mountInspector defaulted oauthProxyAllowLoopback to true, and the standalone
CLI hardcoded it — including in the published Docker image, which runs the
CLI with NODE_ENV=production on a public port. A publicly reachable inspector
could therefore proxy requests to the host's loopback services (SSRF), while
RFC1918/metadata targets were already blocked.

- mountInspector: default allowLoopback to false; local dev tooling opts in
- CLI: allow loopback unless NODE_ENV=production; INSPECTOR_ALLOW_LOOPBACK
  overrides either way
- Express-adapter test opts in explicitly (it proxies to its own 127.0.0.1
  echo server); new regression test covers the default and the opt-in

* chore(typescript): version packages (canary)

* docs: add v2 changelog updates

* chore: remove retired beta release flow (#2141)

* fix: keep prerelease versioning visible to Knip (#2142)

* fix: patch dependency vulnerabilities (#2151)

* fix: patch vulnerable dependencies

* fix: use mcp-use in client demo servers

* chore(typescript): version packages (canary)

---------

Signed-off-by: Andrew Khadder <54488379+khandrew1@users.noreply.github.com>
Co-authored-by: Ayaan Gazali <ayaangazali.work@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com>
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Co-authored-by: VihaanAgarwal <72850668+VihaanAgarwal@users.noreply.github.com>
2026-08-05 10:26:37 -07:00
Andrew Khadder 3619d26910 ci: schedule SDK agentic evals (#2130) 2026-08-04 14:02:23 -07:00
Ayaan Gazali 64e6772618 ci: remove the dead MCP SDK fork update workflow (#2115)
update-mcp-sdk-fork.yml maintained the @mcp-use/modelcontextprotocol-sdk
version in libraries/typescript/packages/mcp-use. The v2 merge deleted
that package, and v2 depends on the upstream @modelcontextprotocol
packages instead, so the fork is referenced nowhere in the tree or the
lockfile.

Every path the workflow touches is gone: the package.json it reads, and
the tests/deno/deno.json it also rewrites. Its first run against the v2
tree would fail on the version check.
2026-08-03 12:18:55 -07:00
Enrico Toniato dcd8f63c80 chore(release): exit prerelease mode and commit npm package README
Publishes mcp-use 2.0.3 and @mcp-use/inspector 20.0.3 with a committed package-root README.
2026-08-03 16:02:39 +02:00
Enrico Toniato d8c62f2bbc chore(release): exit prerelease mode and publish npm README metadata hotfix
Publishes mcp-use 2.0.2 and @mcp-use/inspector 20.0.2 after preparing README metadata before npm publication.
2026-08-03 14:57:01 +02:00
Enrico 06ff3075b5 release: merge v2 beta into main 2026-08-03 14:35:58 +02:00
Enrico Toniato e1c8aa4685 fix: prepare v2 stable release channels and launch surfaces (#2106)
* fix: prepare v2 stable release channels

* fix: normalize peers only when exiting prerelease
2026-08-03 14:29:26 +02:00
Ayaan Gazali 6e3b9001e6 fix(ci): pin ruff in python-lint so releases cannot change the check (#2069)
The python-lint job installs ruff unpinned, so it always resolves to the
latest release. ruff 0.16.0 started formatting fenced code blocks inside
Markdown, which brought libraries/python/README.md into the scope of
`ruff format --check .` for the first time. Its quickstart examples were
never formatted that way, so the job now fails on every pull request that
touches libraries/python, regardless of what the change is.

Pin to 0.15.22, the newest release that passes both steps on current main.
This restores a reproducible check and leaves the Markdown question as a
deliberate choice rather than something a tool release decides.

Refs #1856
2026-07-31 12:09:09 -07:00
Andrew Khadder 8d856b6034 docs(typescript): add TypeDoc generation and source API docs (#2039)
* docs(typescript): document public source APIs

* chore(typescript): enforce TSDoc syntax

* docs(typescript): add TypeDoc generation
2026-07-28 11:53:40 -07:00
Enrico Toniato feda006831 fix: publish stable inspector image to Docker Hub (#2016) 2026-07-24 18:17:52 -07:00
Enrico 2768f5bfec Merge main into beta 2026-07-23 15:20:16 -07:00
Enrico ac3d1eb3bb fix(typescript): resolve CodeQL security alerts 2026-07-23 12:24:46 -07:00
Enrico 8cc6367f0c ci: skip CI pushes on beta 2026-07-23 12:24:16 -07:00
Enrico Toniato 066f449cd7 fix(release): rebuild prereleases after versioning (#1989) 2026-07-23 11:38:14 -07:00
Enrico Toniato 7d2adffa10 fix(agent): native OpenAI e2e + reasoning/mcpServers regressions (#1981)
Fix MCPAgent not spawning MCPClient for explicit llm + mcpServers URL config, omit reasoning.effort unless opted in, and add CI e2e against remote analytics-demo.
2026-07-22 19:41:16 -07:00
Andrew Khadder 2d1450fdc1 Fix Windows CLI artifact verification (#1979) 2026-07-22 19:05:48 -07:00
Enrico Toniato 392d36c079 Optimize the standalone Inspector package (#1968)
* fix inspector hosted proxy and oauth recovery

* remove inspector compatibility report

* refactor(inspector): mount project-local dev inspector

* refactor(inspector): remove CDN application delivery

* fix(inspector): finalize local mount and proxy health checks

* refactor(typescript): optimize inspector packages

* fix(typescript): build CLI for server examples

* fix(typescript): keep CLI build deps development-only
2026-07-22 12:21:51 -07:00
Andrew Khadder 6827ab20a1 Resolve Inspector beta assets to immutable CDN releases (#1952)
* Resolve Inspector CDN releases before loading assets

* fix(ci): pin pnpm for server examples

* fix(ci): relink server example CLI

* fix(examples): support clean Next builds in CI

* fix(examples): expose built workspace CLI

* fix(inspector): address CDN loader review

* fix(inspector): support legacy abort signals
2026-07-20 15:45:49 -07:00
Enrico Toniato f3fc8dab1b fix(client): surface manual OAuth failures (#1953)
* fix(client): surface manual OAuth failures

* ci: publish TypeScript previews for beta PRs

* ci: pin pnpm for server example checks

* revert: keep server example CI out of OAuth fix
2026-07-20 15:08:39 -07:00
Enrico Toniato 17d15d8bde fix(ci): use Node 24 for TypeScript releases (#1946) 2026-07-20 13:00:03 -07:00
Enrico 78266950f9 feat(server): add Next.js drop-in adapter and example suite 2026-07-20 10:50:19 -07:00
Enrico 856d90626e fix(ci): retry beta npm verify after publish
npm registry replication can lag behind trusted publishing; retry up to 2 minutes before failing the release job.
2026-07-18 10:58:55 -07:00
Enrico 15798394a4 chore(typescript): raise Node floor to 22.22.2 and CI to 22.23.1
Excludes pre–March 2026 security patches and satisfies npm 12 for trusted beta publishing.
2026-07-18 10:53:48 -07:00
Enrico b47e268f61 chore(typescript): raise Node.js engine floor to 22.13
Unblocks beta releases on pnpm 11.13 and aligns CI, Docker, build targets, and scaffolds with Maintenance LTS Node 22.
2026-07-18 10:47:42 -07:00
Enrico Toniato 50df3a1611 Create mcp use app version (#1924)
* refactor(create-mcp-use-app): replace --canary flag with --sdk-version for version pinning

- Updated GitHub Actions workflows to use --sdk-version instead of --canary for creating apps.
- Modified CLI options and internal logic to support --sdk-version for specifying npm dist-tags or semver.
- Updated documentation and tests to reflect the change from --canary to --sdk-version.

* chore(ci, workflows): downgrade Node.js version to 20.19.0 across all workflows

- Updated GitHub Actions workflows to use Node.js version 20.19.0 instead of 24.15.0.
- Adjusted package.json files to reflect the new Node.js engine requirements.
- Updated pnpm-lock.yaml and TypeScript dependencies to ensure compatibility with the new Node.js version.
2026-07-18 10:30:27 -07:00
Andrew Khadder 3bffd70dfe fix beta preview packaging and docs (#1913) 2026-07-17 14:08:43 -07:00
Andrew Khadder 5c09447160 fix(ci): repair beta workflow checks (#1909) 2026-07-17 12:25:20 -07:00
Andrew Khadder 5f25d3c8ad fix conformance workflow for beta layout (#1908) 2026-07-17 12:24:12 -07:00
Andrew Khadder 96c649db95 fix(ci): retarget server typecheck workflow (#1907) 2026-07-17 12:23:44 -07:00
Andrew Khadder b7b5ec0dc6 ci(typescript): align beta checks with Node 24 (#1895) 2026-07-16 17:22:07 -07:00
Enrico 25b1e678fa ci(typescript): publish beta tarballs with explicit tag 2026-07-16 13:36:30 -07:00
Enrico 16cf9228e0 ci(typescript): prepare Changesets base branch on beta 2026-07-16 13:29:17 -07:00
Enrico 289cf2cbcc Merge branch 'v2-server-scaffold' into beta 2026-07-16 13:24:25 -07:00
Enrico 791f745cc4 ci(typescript): publish beta exclusively with OIDC 2026-07-16 13:14:44 -07:00
Enrico 0b8f68ba04 ci(typescript): preserve non-beta npm tags 2026-07-16 13:09:36 -07:00
Enrico c51331530b test(typescript): port Deno preview smoke test to v2 2026-07-16 13:02:23 -07:00
Enrico ba1c2b051a ci(typescript): gate beta publishing on package tests 2026-07-16 12:41:01 -07:00
Enrico 4498176657 ci(typescript): add guarded beta npm releases 2026-07-16 12:39:06 -07:00
Enrico f00b811205 ci(typescript): run PR preview workflow for PRs targeting v2 2026-07-16 10:03:15 -07:00
Enrico e395884302 ci(typescript): run PR preview workflow for PRs targeting v2 2026-07-16 08:19:21 -07:00
Enrico 8843e2ef0d fix(ci): simplify version generation command in CI workflow
- Removed redundant version generation command for @mcp-use/client in the CI workflow.
- Updated documentation links in code-mode.mdx and other files to reflect new paths.
- Changed installation instructions from yarn to npm for consistency across documentation.
- Enhanced error handling in client authentication and session management.
- Added a utility function to compare semantic versions in telemetry.
- Removed outdated unit tests for FileKVStore.
2026-07-14 19:28:38 -07:00
Enrico e6ce060a1b refactor(docs): update README and documentation for MCP SDK v2
- Improved formatting and consistency in README.md and various documentation files.
- Updated import paths to reflect the new package structure for @mcp-use/client and @mcp-use/agent.
- Enhanced examples and descriptions for MCPAgent and related components.
- Cleaned up whitespace and formatting for better readability across multiple files.
2026-07-14 18:54:00 -07:00
Enrico e649639d5d fix(workflow): streamline pnpm and Node.js setup in CI configuration
- Adjusted the GitHub Actions workflow to conditionally set up pnpm only for pnpm repositories, preventing errors related to multiple version specifications.
- Simplified the Node.js setup process by ensuring it is always configured, enhancing the reliability of the CI pipeline.
2026-07-06 11:47:49 +02:00
Enrico 7a192d63aa fix(workflow): remove unnecessary flag from pnpm install command in CI configuration
- Updated the `bump-mcp-use-reusable.yml` workflow file to remove the `--config.dangerously-allow-all-builds=true` flag from the `pnpm install` command, streamlining the installation process during CI runs.
2026-06-16 12:51:05 +02:00
Pietro Zullo 332a0a77a4 fix(ci): configure git identity before tagging in typescript release (#1675)
changesets creates annotated tags (git tag -m), which fail silently
without user.name/user.email configured. On the main release path no
prior step set the git identity, so stable releases were published to
npm but never tagged - skipping GitHub releases and the Discord
notification. Also fail the publish step loudly when no tags are
created instead of exiting 0.
2026-06-07 13:12:53 +02:00
Enrico Toniato b182d98404 fix(ci): remove untrusted PR checkout from Claude workflow (#1664)
Resolves CodeQL alert #83 by dropping manual PR head checkout in the
privileged issue_comment workflow and letting claude-code-action handle
PR refs with its built-in base-branch config restore.
2026-06-05 16:40:44 +02:00
Andrew Khadder db69471a54 Revert "chore: have dependabot create against canary (#1630)" (#1654)
This reverts commit 546dc1ad80.
2026-06-04 10:50:36 -07:00
Andrew Khadder 546dc1ad80 chore: have dependabot create against canary (#1630) 2026-06-04 10:09:49 -07:00
Andrew Khadder 83271e869f Canary (#1508)
* chore: remove unused mcp-use source files (#1476)

* chore: enter canary prerelease mode

* chore(typescript): version packages (canary)

* docs(cli): clarify inspector skipped-in-production log + start section (#1505)

* docs(cli): clarify inspector skipped-in-production log + start section

The runtime log "[INSPECTOR] Skipped in production (use --with-inspector
flag during build)" reads as if the flag can be passed to `mcp-use
start`, which it can't (the flag is only registered under `build`). The
new wording spells out the rebuild command, and `cli-reference.mdx`
gains a short note under `start` pointing at the build flag for
inspector-in-production.

Closes #1495

* docs(cli): apply reviewer reword on inspector note

* chore(typescript): version packages (canary)

* chore(inspector): remove unused source files (#1510)

Drops the 18 inspector files reported by `pnpm knip` from
libraries/typescript and stops generating the unused client-side
version.ts (the client reads the version from the
window.__INSPECTOR_VERSION__ global injected by the server).

Part of #1446.

* chore(typescript): version packages (canary)

* chore(typescript): prune 187 unused exports and 161 unused export types flagged by knip (#1511)

* chore(typescript): prune 161 unused exported types flagged by knip

Phase 2 of #1450: remove or de-export types that knip flags as unused.
Skipped tuning knip.json (Phase 1) — focused only on the type cleanup.

For each flagged type:
- Used only within its source file → drop `export`
- Re-exported through a barrel but never imported downstream → remove the re-export
- Genuinely dead → delete

No public-API removals: types exposed through the `mcp-use`, `@mcp-use/cli`,
`@mcp-use/inspector`, or `create-mcp-use-app` package entry points remain
exported. `client.ts` switches from inline `import("...")` to a top-level
import so knip can see the `ToolSearchResponse` usage.

Verified `pnpm knip` reports 0 unused types (down from 161) and
`pnpm build` passes across all packages.

* chore(typescript): prune 187 unused exports flagged by knip

Closes #1450.

* chore(typescript): fix prettier formatting

* chore(typescript): delete orphaned PropsSelect.tsx

Removing the unused barrel re-export in the prior commit left this file
with no consumers.

* chore(typescript): version packages (canary)

* ci(knip): enforce knip and clear final baseline findings (#1512)

* chore(knip): clear remaining baseline findings so knip passes clean

- Mark `src/index.tsx` as an entry for create-mcp-use-app so its
  CLI dependencies (chalk, commander, ink, ora, tar, react, etc.)
  stop being flagged as unused.
- Add `lsof`, `sleep`, and `dev` to ignoreBinaries for the mcp-use
  workspace — these appear in example scripts and are either system
  utilities or pnpm script names, not npm-resolvable binaries.
- Turn off the `optionalPeerDependencies` rule. Optional peer deps
  (langchain/langfuse/e2b/etc.) are loaded conditionally by design;
  flagging them as referenced is noise.

After this change `pnpm exec knip` exits 0 against canary.

* ci(knip): enforce knip in CI

The baseline is now clean (canary + previous PRs cleared all findings),
so drop `--no-exit-code` and let the job fail when knip reports issues.
Also generate `packages/mcp-use/src/version.ts` before knip runs so the
gitignored `version.js` imports resolve.

* chore(deps): bump better-auth in /libraries/typescript (#1515)

Bumps [better-auth](https://github.com/better-auth/better-auth/tree/HEAD/packages/better-auth) from 1.6.1 to 1.6.11.
- [Release notes](https://github.com/better-auth/better-auth/releases)
- [Changelog](https://github.com/better-auth/better-auth/blob/main/packages/better-auth/CHANGELOG.md)
- [Commits](https://github.com/better-auth/better-auth/commits/better-auth@1.6.11/packages/better-auth)

---
updated-dependencies:
- dependency-name: better-auth
  dependency-version: 1.6.11
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* docs: tighten PR readiness and docs hygiene (#1509)

* docs: tighten review readiness and doc links

* docs: anchor api-reference redirect and fix missed node note

Move the /typescript/server/api-reference target from a bare redirect
to an anchored one (#mcpserver-api-reference) so existing "API Reference"
links land on the renamed section directly. Drop the self-link in
server/index.mdx and bring the commonjs example's Node note in line with
the package engines range.

---------

Co-authored-by: Andrew Khadder <andrew@manufact.com>

* feat(server/oauth): allow Supabase URL override for self-hosted/local instances (#1517)

* feat(server/oauth): allow overriding Supabase URL for self-hosted/local instances

`oauthSupabaseProvider` previously hardcoded `https://${projectId}.supabase.co`,
preventing use against local Supabase (`http://localhost:54321`) or self-hosted
deployments — even though those instances expose the same OAuth 2.1 server.

Add an optional `supabaseUrl` config (and `MCP_USE_OAUTH_SUPABASE_URL` env var)
that overrides the projectId-derived URL. `projectId` is now optional when
`supabaseUrl` is set; hosted-project users are unaffected.

Closes mcp-use/mcp-oauth-supabase-template#2

* test(server/oauth): trim supabase provider tests to factory contract

Drop low-value string-concatenation and pre-existing-behavior tests; keep
the two that cover the new behavior (supabaseUrl alone is accepted; empty
config throws). Isolate process.env in the factory describe so the
"throws when neither configured" assertion isn't defeated by local
MCP_USE_OAUTH_SUPABASE_* env vars.

* docs(server/oauth): document supabaseUrl override for local/self-hosted Supabase

* chore(typescript): version packages (canary)

* chore: use cross-platform clean commands (#1523)

* chore: use cross-platform clean commands

* chore: add empty changeset for cross-platform clean scripts

---------

Co-authored-by: Andrew Khadder <andrew@manufact.com>

* chore(typescript): version packages (canary)

* fix(server/oauth): use URL constructor to avoid double slash in metadata proxy (#1483)

* fix(server/oauth): use URL constructor to avoid double slash in metadata proxy

The DCR-direct metadata proxy was string-concatenating a path onto the
issuer, which canonically ends with a trailing slash:

    `${issuer}/.well-known/oauth-authorization-server`
    // → "https://tenant.auth0.com//.well-known/oauth-authorization-server"

Auth0 returns 404 for any path starting with "//", which broke OAuth
discovery end-to-end against real Auth0 tenants in DCR-direct mode.

new URL(path, base) normalizes the join regardless of trailing slash, so
this works for any provider whose canonical issuer ends with "/".

Fixes #1482.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* fix(server/oauth): normalize issuer trailing slash instead of using URL constructor

`new URL("/.well-known/...", issuer)` resolves the leading-slash path against
the issuer's origin, stripping any path on the issuer. That breaks providers
like Supabase whose issuer is `https://<project>.supabase.co/auth/v1`. Replace
with a trailing-slash-stripping template literal, which handles both Auth0
(issuer ends with `/`) and Supabase (issuer has a path).

* chore(changeset): trim oauth metadata fix entry

* chore(changeset): drop issue reference

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Andrew Khadder <andrew@manufact.com>

* chore(typescript): version packages (canary)

* test(inspector): add OAuth e2e against emulated Google issuer (#1481)

* test(inspector): add OAuth e2e test using emulated Google issuer

Covers the inspector's OAuth redirect flow end-to-end against an
`emulate`-backed Google issuer + MCP server in oauthProxy mode, run
twice across the Direct and Via Proxy connection-type matrix. Both
variants share one fixture in serial mode since the registered redirect
URI pins the MCP server to a fixed port.

* test(inspector): switch loop to factory to satisfy no-loop-func

The for-loop variant captured the mutable `fixture` binding from beforeAll,
which eslint's no-loop-func flags. Hoisting the body into a small factory
keeps the shared fixture without the closure-over-loop pattern.

* test(inspector): close emulator if MCPServer setup fails

Wrap post-createEmulator work in try/catch so the emulator port
doesn't stay bound when MCPServer construction or listen() throws.

* chore(typescript): version packages (canary)

* fix(inspector): surface MCP server auth failures with reconnect banner (#1485)

* fix(inspector): surface MCP server auth failures with reconnect banner (MCP-2111)

When the hosted inspector's chat backend returns 401 because the upstream
MCP server rejected the user's OAuth token (e.g. Linear token expired),
the inspector previously threw a generic `HTTP error! status: 401` and
the cloud response misleadingly pointed users at the Manufact account
login.

The chat now recognises the cloud's `{ error: "mcp_auth_required",
mcpServerUrl }` response and renders an inline banner above the input
("Reconnect to <server>") with a button that calls
`connection.authenticate()`. Reconnect refreshes the OAuth token in
localStorage; the banner clears on success and chat resumes.

Pairs with a cloud-side change that drops the misleading `loginUrl`
field from the 401 response.

* fix(inspector): harden mcp_auth_required handling

- Drop the no-op setMessages filter in the 401 branch; the optimistic
  assistant message is only added after the response check, so there's
  nothing to remove.
- Guard `new URL(serverUrl)` in McpReconnectBanner so a malformed URL
  falls back to the raw string instead of crashing the chat tab.

* refactor(inspector): rename mcpAuthRequired to mcpServerAuthRequired

The hook's internal state was already named `mcpServerAuthRequired`, but
the returned key and clear callback used the shorter `mcpAuthRequired`,
forcing the ChatTab consumer to re-alias them. The shorter name was
also ambiguous in a codebase that has two distinct auth flows: the
Manufact account login (429 path) and the upstream MCP server OAuth
(401 path).

Align the public surface of `useChatMessages` with the internal state
and the consumer's local name. The backend wire value
`"mcp_auth_required"` is unchanged.

* chore(inspector): remove mcpServerAuthRequired comment

* chore(typescript): version packages (canary)

* fix(inspector): keep tab count badges visible in collapsed mode (#1490)

* fix(inspector): keep tab count badges visible in collapsed mode

* Keep tab badges aligned in collapsed mode

* extract TabCountBadge and fix badge visibility

* chore(typescript): version packages (canary)

* fix(inspector): drop unused TabCountBadge barrel re-export (#1533)

The only consumer (LayoutHeader.tsx) imports TabCountBadge directly
from ./shared/TabCountBadge, so the re-export in shared/index.ts is
unused. Knip flagged it and started failing CI on canary after the
TabCountBadge change landed.

* chore(typescript): version packages (canary)

* feat(inspector): add local LLM provider support for chat in Inspector (#1395)

* feat(inspector): integrate ollama provider

* feat(inspector): integrate lmstudio provider

* fix(inspector): preserve no-icon behavior for openai-compatible provider

* refactor(inspector): remove LM Studio provider and address PR feedback

* fix(inspector): remove duplicate ollama union members

Collapses the accidental `"ollama" | "ollama"` duplicates in
ProviderName, MCPChatMessageEventData, and LLMConfig.

* refactor(inspector): drop LLM proxy and call Ollama directly

Ollama allows localhost origins by default, so the inspector talks to
the daemon over CORS and skips the server-side proxy entirely. Surface
an OLLAMA_ORIGINS hint when the browser fetch fails so tunneled or
remote setups know what to configure. Theme the Ollama logo and tighten
its size so the non-circular mark sits cleanly next to the other
provider icons.

* chore(inspector): revert gratuitous field reorders

Restore original ordering of temperature/baseUrl and useCallback deps;
remove stray blank line in vite.config.ts to keep the diff focused.

* test(inspector): add unit tests for parseNDJSON

* refactor(inspector): tighten Ollama provider integration

- Guard Ollama streamChat against duplicate tool-call emissions when a
  chunk's tool_calls are repeated by proxies/forks
- Key the models cache on (provider, baseUrl) for any base-url provider
  so openai-compatible no longer serves stale entries on URL changes;
  normalize Ollama variants (trailing slash, /api suffix) to one entry
- Move OllamaCorsError into the Ollama provider module
- Replace hand-written provider unions in telemetry events and
  server shared-utils with ProviderName
- Single-source DEFAULT_OLLAMA_BASE_URL from ollama/utils.ts
- Drop the unrelated tempApiKey/tempModel trim() drift in saveLLMConfig
- Make OPENROUTER_ICON_URL module-private, clean up merge-artifact
  blank lines

* chore: simplify changeset

* style(inspector): apply prettier to shared-utils

* fix(inspector): drop unused export on DEFAULT_BASE_URLS

DEFAULT_BASE_URLS is only consumed by getDefaultBaseUrl in the same
module. Knip flagged the export as unused and failed CI.

* ci: retrigger after canary knip fix (#1533)

---------

Co-authored-by: Andrew Khadder <andrew@manufact.com>

* chore(typescript): version packages (canary)

* fix(inspector): resolve CodeQL polynomial-regex alert in Ollama url normalizer (#1534)

* fix(inspector): replace trailing-slash regex in Ollama url normalizer

CodeQL flagged `/\/+$/` in `normalizeOllamaBaseUrl` as a polynomial
regular expression on uncontrolled input. Swap the regex for an
explicit linear scan and add unit tests covering the trimming
behaviour plus a pathological-input case.

* chore: drop unit test for trivial regex refactor

* chore: drop accidentally committed .antigravitycli symlink

* chore(typescript): version packages (canary)

* chore: remove dead typescript-format-and-lint pre-commit hook (#1541)

The hook entry pointed to `.git/hooks/typescript-pre-commit.sh`, a path
that is never tracked and was never populated by any setup step, so the
hook could not run for anyone. TypeScript formatting and linting are
already handled by Husky (libraries/typescript/.husky/pre-commit),
installed automatically via `pnpm install`'s `prepare` script.

Closes #1536

* fix(inspector): stop ToolInputForm from mutating live tool inputSchema (#1545)

* fix(inspector): stop ToolInputForm from mutating live tool inputSchema

`ToolInputForm` was writing `required: boolean` onto each property of the
live tool inputSchema during render. `required` is not valid as a per-
property boolean — it belongs on the parent object as a `string[]`.
Anthropic's draft 2020-12 validator rejected the resulting payload with
`tools.0.custom.input_schema invalid`, breaking the Inspector chat after
any tool had been opened in the Tools tab.

Replace the mutation with a local `isRequired` const used only for the
`*` indicator render.

Fixes MCP-1970.

* chore(inspector): trim comment on schema-mutation fix

* chore: remove verbose comment

* style(inspector): apply prettier to ToolInputForm

* chore(typescript): version packages (canary)

* Improve tab switch animation timing (#1544)

* chore(ui): improve tab switch animation timing

* chore(changeset): add changeset for tab animation improvement

* chore(typescript): version packages (canary)

* fix(inspector): propagate server alias updates through mcp server wrapper (#1539)

* fix(inspector): propagate server alias updates through McpServerWrapper onUpdate

* chore: add changeset for mcp-use server alias propagation fix

---------

Co-authored-by: Andrew Khadder <andrew@manufact.com>

* chore(typescript): version packages (canary)

* chore(typescript): add 3-day install cooldown via pnpm minimumReleaseAge (#1516)

Blocks `pnpm install` from fetching npm versions published less than 3
days ago, mitigating supply-chain attacks where a malicious release is
typically yanked within hours of discovery.

The setting (introduced in pnpm 10.16) lives in pnpm-workspace.yaml — in
modern pnpm only auth/registry config is read from .npmrc, so putting it
there would be silently ignored.

Workspace-published names (`mcp-use`, `@mcp-use/*`, `create-mcp-use-app`)
are exempted so the cooldown never interferes with local development or
fresh releases of our own packages.

* fix(react): improve server management in McpClientProvider (#1561)

Refactor server removal and update logic to use a ref for synchronous access to the latest server state. This change prevents React's warning about updating a component during rendering by ensuring that teardown side effects (`disconnect()` and `clearStorage()`) are executed outside of the state updater functions. The ref is updated in a useEffect hook to maintain the latest server state for event handlers.

* chore(typescript): version packages (canary)

* fix(inspector): forward MCP image tool results as image content (#1487)

* fix(inspector): forward MCP image tool results as image content (MCP-1941)

Previously, the inspector's chat loop and provider adapters serialized MCP
tool results with JSON.stringify, which buried the base64 `data` field of
`image` content blocks inside a text payload. Vision-capable models
received a wall of base64 text instead of the image.

Extract MCP `content` blocks into provider-neutral `ContentPart[]` and
route image bytes through each provider's vision channel:

- Anthropic: image blocks inside `tool_result.content` (base64 source).
- OpenAI: tool role keeps text; image bytes forwarded as a follow-up
  user turn with `image_url` parts.
- Google: `functionResponse.response` keeps text/metadata; image bytes
  forwarded as a follow-up user turn with `inlineData` parts.

Text-only tool results keep the legacy `content: string` path on every
provider.

* style(inspector): apply prettier formatting

* chore(inspector): drop unused export on collapseToString

Only called internally by toolResultToContent — knip flagged it as an
unused export.

* fix(inspector): propagate MCP isError flag and fix image example tools

- Add isToolResultError() helper and use it in toolLoop + replay so
  tool calls that return { isError: true } are flagged the same as
  thrown errors on both live and saved-conversation paths.
- Pick a no-content fallback for OpenAI's tool role when there are
  no image parts to forward.
- Replace via.placeholder.com URLs in the everything example with
  real base64-encoded bytes fetched from picsum.photos, since the
  image() helper expects MCP ImageContent base64 data, not URLs.

* style(inspector): apply prettier formatting

* chore(typescript): version packages (canary)

* fix(server/inspector): normalize 0.0.0.0 to localhost in autoConnect URL (#1552)

* fix(server/inspector): normalize 0.0.0.0 to localhost in autoConnect URL

Browsers cannot resolve 0.0.0.0 as a destination, and the MCP SDK's
OAuth resource validator does strict origin equality — so the inspector
auto-connecting to http://0.0.0.0:PORT/mcp mismatches the resource
metadata published as http://localhost:PORT (which goes through
normalizeUrlHost in server-helpers.ts). Result: OAuth-protected mcp-use
apps fail at the inspector's post-callback validation with "Protected
resource X does not match expected Y".

Mirror the existing normalization for the autoConnect URL and the
banner log so both reflect the browser-reachable host.

Closes #1551

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* chore: add changeset for inspector autoConnect loopback normalization

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Andrew Khadder <andrew@manufact.com>

* chore(typescript): version packages (canary)

* fix(cli): align widget Vite base with /mcp-use/widgets (#1560)

* fix(cli): align widget Vite base with /mcp-use/widgets/ when MCP_URL is set

* chore: add changeset for cli widget base path fix

* chore: format widget-paths.ts

---------

Co-authored-by: Andrew Khadder <andrew@manufact.com>

* chore(typescript): version packages (canary)

* feat(cli): headless screenshot with auto-sizing and external MCP server support (#1579)

* feat(cli): headless screenshot command with auto-sizing and external MCP server support

- Make width/height optional; when omitted, clips to the widget's natural rendered size
  by reading body[data-view-*] rect attrs set by the preview page
- Add useBundleReadinessSignal in ViewPreview that uses ResizeObserver to wait for the
  iframe to stabilize before setting data-view-ready, serializing the iframe's bounding
  rect so the CLI can clip tightly instead of capturing the full viewport
- Switch ViewPreviewBundle to displayMode="inline" so widgets auto-size to content height
- Add inlineWidthOverride prop to MCPAppsRenderer to bypass the 768px inline cap when
  screenshotting at an explicit width
- Fix extractViewName to handle external MCP server URIs (ui://<server>/<name>.html)
  by flattening to <server>-<name>; previously only ui://widget/ was handled, causing
  React Router to fail to match the preview route for third-party servers like Excalidraw

* chore: add changeset for screenshot auto-sizing and external MCP fix

* fix(cli): unexport CaptureScreenshotResult to satisfy knip

* chore(typescript): version packages (canary)

* feat(auth): enhance OAuth callback handling with improved state management and user feedback (#1580)

* feat(auth): enhance OAuth callback handling with improved state management and user feedback

- Introduced a module-level cache for in-flight authorization promises to prevent duplicate network requests during the same page load.
- Added utility functions to determine if the current window is a popup and to render user-friendly messages for closing the window after authentication.
- Improved handling of redirect flows and popup scenarios to ensure a seamless user experience, including error handling and messaging for lost opener situations.

* fix(auth): BroadcastChannel fallback when popup opener is severed

Popup callback now broadcasts success/failure over a same-origin
BroadcastChannel("mcp_auth_callback") in the lost-opener branch, and
useMcp subscribes to that channel alongside the existing window.message
listener. Without this, popups whose window.opener was severed by COOP
or cross-origin intermediate redirects would save tokens but leave the
parent stuck in `authenticating`.

Matches the dual-transport pattern used by oidc-client-ts and MSAL.js
for the same COOP scenario.

* chore(auth): unexport MCP_AUTH_BROADCAST_CHANNEL to satisfy knip

It's only used inside callback.ts; the parent side hard-codes the same
string in useMcp.ts. Removing the export drops knip's "unused export"
finding while keeping a single source-of-truth comment that links the
two files.

* fix(mcp-use): split langchain agents out of mcp-use/browser entry

Move MCPAgent, RemoteAgent, adapters, and observability to
mcp-use/browser/agent so Next.js clients importing MCPClient only
no longer pull @langchain/* into the browser bundle.

* chore: format browser bundle test file

* chore(typescript): version packages (canary)

* fix(inspector): add copy button to user messages (#1556)

* fix(inspector): add copy button to user messages

Extract CopyButton into a shared component and add it to UserMessage,
matching the existing assistant message UX.

Resolves #1555

* chore: add inspector copy button changeset

---------

Co-authored-by: Jefsky <jefsky@users.noreply.github.com>
Co-authored-by: Andrew Khadder <andrew@manufact.com>

* chore(typescript): version packages (canary)

* feat(server): add publicLandingPage option for OAuth-protected servers (#1550)

* feat(server): add publicLandingPage option for OAuth-protected servers

* fix(server): keep public landing auth gate in oauth setup

* docs(server): add public landing page example

* chore(server): format mcp endpoint

* chore(server): simplify accept header lookup

* chore(server): restore mcp mount diff

* fix(server): align oauth exports with canary

* chore(server): format oauth exports

* fix(server): remove unused oauth barrel exports

---------

Co-authored-by: Andrew Khadder <andrew@manufact.com>

* Move mcp-apps template pnpm settings to workspace config (#1602)

* fix(inspector): widget fullscreen above embedded host chrome (MCP-2181) (#1605)

* fix(inspector): portal widget fullscreen above host chrome

MCP-2181: cloud chat headers at z-50 covered the fullscreen exit control
because the overlay used z-40 inside a nested stacking context. Portals
the fullscreen shell to document.body at z-[100], sets
data-mcp-widget-fullscreen for hosts, and shows the Apps SDK exit navbar
in CSS fullscreen fallback.

* fix(inspector): native fullscreen first, no portal remount (MCP-2181)

Revert conditional createPortal that remounted widgets on fullscreen toggle.
Use requestFullscreen() as the primary path; apply CSS z-[100] overlay only
when the API fails. Keep exit navbar and data-mcp-widget-fullscreen for both.

* refactor(inspector): consolidate widget fullscreen into shared hook

Extract useWidgetFullscreenControls for native-first fullscreen + CSS
fallback. Removes duplicated handlers, unused helpers, and OpenAI edge-case
branches from MCPAppsRenderer and OpenAIComponentRenderer.

* fix(inspector): preserve widget state when entering fullscreen (MCP-2181)

Route ui/request-display-mode through native fullscreen handling, target
requestFullscreen on the iframe wrapper, and avoid resetting load state on
display-mode-only changes. Stabilize OpenAI iframe listeners so chat
re-renders do not flash the skeleton.

* style(inspector): format OpenAIComponentRenderer for Prettier

* fix(inspector): fullscreen shell includes navbar and fills viewport

Promote the outer widget shell via requestFullscreen so FullscreenNavbar
stays visible and bg-background fills the screen instead of browser black
letterboxing around a nested iframe wrapper.

* fix(inspector): PiP portal and sandbox remount bridge reconnect (MCP-2181)

Port PiP to document.body with z-[100]. Re-run AppBridge when the sandbox
iframe remounts; keep the host spinner until initCount recovers. Unify
display-mode document attributes for optional host chrome hiding.

* fix(inspector): resend widget data after PiP remount

* chore(typescript): version packages (canary)

* Hash Claude resource domains from authored ui.domain (#1599)

* Apply Claude resource domain hashing for UI metadata

* chore: format Claude domain helper

* fix(inspector): drop unused widget-fullscreen exports to satisfy knip (#1607)

widget-fullscreen.ts (added in #1605) exported several symbols that
nothing outside the file consumes, plus pre-emptive @deprecated aliases
for an API that never shipped. Only useWidgetDisplayModeControls is used
(by MCPAppsRenderer and OpenAIComponentRenderer).

- Unexport internal-only constants, the WidgetDisplayMode type, and the
  useWidgetDisplayModeDocumentChrome helper
- Remove the dead useWidgetFullscreenControls / useWidgetFullscreenDocumentChrome aliases

* test(agent): drop live Langfuse API integration tests (#1608)

The observability integration tests queried the live Langfuse REST API
(via getRecentTraces) to verify traces landed. cloud.langfuse.com has
been returning 403 Forbidden for both ingestion and queries, failing the
'should send traces to Langfuse when observability is enabled' test and
reddening canary CI.

Remove the two tests that depend on the live API (the failing test and
the already-skipped manual-trace test) plus the now-unused getRecentTraces
helper. Keep the two tests that verify observability enable/disable
behavior locally with no network dependency.

* chore(typescript): version packages (canary)

* fix(oauth): redact token verification errors (#1573)

* fix(oauth): redact token verification errors

* chore: add oauth error redaction changeset

---------

Co-authored-by: Andrew Khadder <andrew@manufact.com>

* chore(typescript): version packages (canary)

* fix(inspector): skip emulate oauth tests in builtin e2e (#1609)

* chore: add codex to gitignore (#1612)

* fix(docs): update server API reference links (#1611)

* fix(mcp-use): pin published dependency versions (#1610)

* docs(changelog): document v1.29.0 / inspector v7.0.0 release

TypeScript changelog gains a v1.29.0 entry (public landing pages, Supabase URL override, Claude UI-resource domain hashing, OAuth callback + React-provider hardening). Inspector changelog gains a major v7.0.0 entry (local Ollama provider, image tool results, MCP-server reconnect banner, widget fullscreen/PiP rework).

* Fix builtin inspector auto-connect to use HTTP (#1613)

* Switch builtin inspector auto-connect to HTTP

* Use plain URL autoConnect in builtin e2e helper

* Fix built-in inspector auto-connect to use HTTP

* chore(typescript): version packages (canary)

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: asim48-ctrl <asim48@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Truffle <truffleagent@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: SSharma1103 <shivamsharma11032009@gmail.com>
Co-authored-by: Polæ <steven@polae.com>
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Arpit Maurya <arpitbabu802@gmail.com>
Co-authored-by: Udaykumar Dhokia <udaykumardhokia@gmail.com>
Co-authored-by: Neha Prasad <nehaa9863pd@gmail.com>
Co-authored-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com>
Co-authored-by: Jefsky Wong <hwj3344@hotmail.com>
Co-authored-by: Jefsky <jefsky@users.noreply.github.com>
Co-authored-by: Ritwij Aryan Parmar <88580521+RitwijParmar@users.noreply.github.com>
2026-06-03 13:12:45 -07:00
Enrico d6e9f2cc98 ci: drop pnpm cache from bump reusable workflow (fixes post-step failure) 2026-06-03 12:07:47 +02:00