Commit Graph

1563 Commits

Author SHA1 Message Date
github-actions[bot] b7bd10b37a chore(release): exit prerelease mode and version packages (#2320)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
mcp-use@2.3.1 @mcp-use/inspector@20.3.0
2026-08-23 23:24:38 +02:00
Enrico Toniato 99f76cc418 Canary (#2319)
* fix(typescript): truncate landing page hero URL instead of overflowing past copy button (#2313)

* docs: add Scalekit provider sidebar logo (#2306)

The other first-class providers use a custom SVG. shield-halved did not
render in the Mintlify sidebar.

* fix(typescript): truncate landing page hero URL instead of overflowing past copy button

On narrow (mobile) viewports the server URL is an unbreakable string
that overflowed the pill-shaped box and reappeared beyond the copy
button. The hero .url-box now truncates with an ellipsis, keeping the
full URL available via the copy button.

---------

Co-authored-by: saif-at-scalekit <saif.shaik@scalekit.com>

* chore: enter canary prerelease mode

* chore(typescript): version packages (canary)

* feat(inspector): export connection settings form (#2318)

* chore(typescript): version packages (canary)

---------

Co-authored-by: Marcin Zajkowski <zajkowski.dev@gmail.com>
Co-authored-by: saif-at-scalekit <saif.shaik@scalekit.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-08-23 23:18:14 +02:00
Enrico Toniato 0a510b1ec8 fix(typescript): truncate landing page hero URL instead of overflowing past copy button (#2313) (#2314)
* docs: add Scalekit provider sidebar logo (#2306)

The other first-class providers use a custom SVG. shield-halved did not
render in the Mintlify sidebar.

* fix(typescript): truncate landing page hero URL instead of overflowing past copy button

On narrow (mobile) viewports the server URL is an unbreakable string
that overflowed the pill-shaped box and reappeared beyond the copy
button. The hero .url-box now truncates with an ellipsis, keeping the
full URL available via the copy button.

---------

Co-authored-by: Marcin Zajkowski <zajkowski.dev@gmail.com>
Co-authored-by: saif-at-scalekit <saif.shaik@scalekit.com>
2026-08-23 09:28:54 +02:00
saif-at-scalekit 5865e5c142 docs: add Scalekit provider sidebar logo (#2306)
The other first-class providers use a custom SVG. shield-halved did not
render in the Mintlify sidebar.
2026-08-21 11:25:34 -07:00
github-actions[bot] ccab78a0b8 chore(release): exit prerelease mode and version packages (#2305)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
mcp-use@2.3.0 @mcp-use/inspector@20.2.5 @mcp-use/agent@2.0.8
2026-08-20 11:27:01 -07:00
Andrew Khadder d0107b3484 Canary (#2304)
* fix(agent): count Anthropic cache tokens and stop message_delta erasing usage (#2127)

* fix(agent): count Anthropic cache tokens and stop message_delta erasing usage

Two counting bugs on the Anthropic path, both silent.

Anthropic reports `input_tokens` net of the prompt cache and bills
`cache_read_input_tokens` and `cache_creation_input_tokens` separately, so
`input_tokens + output_tokens` is not what the call is charged on. It never sends
`total_tokens`, so the computed branch is always the one that runs. A call billed on
21,623 tokens reported 123. `cache_creation_input_tokens` was not read anywhere in the
repository, and Anthropic bills cache writes above the base rate.

OpenAI is the opposite: its `cached_tokens` sits inside `prompt_tokens`, so adding it
would double count. Only the Anthropic-shaped keys are summed, and a test pins that.

Second, `tokenUsageFromRecord` returns every key and sets the ones it did not find to
`undefined`. Anthropic's streaming `message_delta` carries `output_tokens` only, so
`usage = { ...usage, ...deltaUsage }` overwrote `inputTokens` and `cachedInputTokens`
with `undefined`, discarding what `message_start` had already reported. After any
streamed call the whole input side of the accounting was gone, with nothing raised.
`mergeTokenUsage` merges only defined values. It does not touch `totalTokens`, because
whether a cache counter is additive is a provider question and that information is gone
once usage has been normalised, so the caller owns the total.

Three of the added tests fail on main.

* fix(agent,inspector): one owner for the Anthropic total, and stop the inspector dropping cache

Follow-up on the review. Four points were raised; three were right and are fixed, one
would have introduced a bug and the reasoning is below.

The same wrong total existed in a third place. `message_stop` recomputed it as
`inputTokens + outputTokens`, so the fix at `message_delta` survived only because `??`
short-circuited on the total already set. Two places knowing how Anthropic bills is how
this drifts, so `message_stop` now owns it alone and `message_delta` just merges. Added an
end-to-end test that drives real `message_start` then `message_delta` SSE through
`streamChat`, rather than exercising `mergeTokenUsage` in isolation. On the base commit it
reports `totalTokens: undefined`, not merely a wrong number, because the input counters
were gone by the time `message_stop` ran.

The inspector was dropping more than the new field. `InspectorTokenUsage` declares
`cachedInputTokens` and `reasoningTokens`, the trace view reads them, and
`inspectorTokenUsageFromUnknown` returned only `inputTokens`, `outputTokens` and
`totalTokens`. Both have always rendered as absent whatever the provider sent. It also
repeated the same input-plus-output total. Both fixed, and `cacheCreationInputTokens` is
carried through.

The merge test now seeds `cache_creation_input_tokens` too, since cache writes are billed
above base rate and need the same protection as cache reads.

Not done, deliberately: adding `cachedInputTokens` to the computed total inside
`tokenUsageFromRecord`. On Anthropic that counter sits outside `input_tokens`; on OpenAI
`cached_tokens` sits inside `prompt_tokens`. Once usage is normalised that distinction is
gone, so summing it would double count OpenAI. Only the Anthropic-shaped keys are added,
and a test pins the OpenAI case at 14.

* style(inspector): run prettier on trace.ts

format:check fails the typescript-lint job on this one file. Prettier wraps
the cachedInputTokens call across three lines, the way the two calls below it
already are. Formatting only, no behaviour change.

* fix(inspector): aggregate cacheCreationInputTokens and stop double-counting OpenAI cache reads

Addresses @khandrew1's review on #2127.

addUsage dropped cacheCreationInputTokens: the field was parsed onto individual
usage events but never summed, so it vanished from state.usage, the LLM span's
usage, and the aggregate tokenUsage in the raw-chat payload. It is now summed
alongside the other counters.

The fallback total could also over-count. uncountedCache was built from the
provider-neutral cachedInputTokens, but on OpenAI those tokens are already inside
inputTokens, so { inputTokens: 10, outputTokens: 4, cachedInputTokens: 3 }
totalled 17 instead of 14. The total now adds only the Anthropic-shaped
cache_read_input_tokens, mirroring the provider-safe path in agent/src/llm/usage.ts.
cachedInputTokens is still parsed and returned for observability.

Two tests in trace.test.ts pin both: the OpenAI-vs-Anthropic total distinction,
and that cacheCreationInputTokens survives aggregation and the LLM span. Changesets
added for @mcp-use/agent and @mcp-use/inspector.

* chore: enter canary prerelease mode

* chore(typescript): version packages (canary)

* fix(inspector): scope loading state by chat session (#2232)

* fix(inspector): give each chat session one id and one state record

Chat state lived in hook-wide React state, so starting a new chat cleared
the values an in-flight stream was still writing to: the fresh chat
inherited the previous session's loading state and could not send.

Rework it around a single identity. A session is created with one id and
keeps it; that id is handed to ChatStorageProvider.createChat, so runtime
state, chat history and OAuth retry all name the same chat. All of a
session's state and turn machinery live in one record inside
ChatSessionStore, which notifies only the subscribers of the session that
changed, so a background turn keeps streaming into its own record.

useChatSessions owns the lifecycle: minting ids, activating a session,
reattaching to persisted chats, and reopening the session a full-page
OAuth redirect interrupted. New Chat now only switches the active id.

Closes #2217

* refactor(inspector): simplify chat session state

* fix(inspector): harden chat session recovery

---------

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

* chore(typescript): version packages (canary)

* fix(ci): give inspector tests the same timeout as every other package (canary) (#2290)

* fix(ci): give inspector tests the same timeout as every other package

Same one-line change as #2268, which targets main. canary carries the same
10s cap and is failing on it independently:

  run 32053629834  compressed-assets.test.ts  10230ms  Test timed out in 10000ms
  run 32051250836  same test

main is red on it too (run 32054211669). Recent margins are 10029ms, 10230ms
and 10837ms, all just over the cap.

The inspector is the only package at 10s; agent, client, cli and server all
use 60000, and these cases mount a server and decompress the bundled app.

45 files, 217 tests still pass locally.

* chore(ci): remove timeout rationale comment

---------

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

* feat(oauth): add Scalekit provider (#2272)

* feat(oauth): add Scalekit provider

Add oauthScalekitProvider next to Auth0 and Clerk. The verifier accepts
both environment-root and resource-scoped issuers, binds audience to the
res_… resource id, and advertises DCR plus CIMD. No Scalekit SDK.

* fix(oauth): keep Scalekit resource-id audience with extra aud

Always verify aud includes the resource id. Optional audience is an extra
AND check, not a replacement. Drop the new v1 provider page.

* fix(oauth): drop Scalekit issuerBoundAccessTokens option

Scalekit binds tokens to the resource id. The dashboard will own
that opt-in. Keep the static oauthMetadata copy because mcp-use
requires it. Custom claims stay on ctx.auth.payload.

* docs: drop v1 and legacy skill changes

* docs: fix Scalekit environment variables

---------

Co-authored-by: Saif Shines <saifshine7@gmail.com>
Co-authored-by: Andrew Khadder <andrew@manufact.com>

* chore(typescript): version packages (canary)

* fix(inspector): add a test script so pnpm test covers this package (#2289)

* fix(inspector): add a test script so pnpm test covers this package

The root test script is `pnpm run -r test`, and the inspector only had
test:unit. pnpm skips a package with no matching script and reports nothing,
so 217 unit tests were absent from the workspace-wide run:

  $ pnpm --filter @mcp-use/inspector test
  (no output)
  $ pnpm --filter @mcp-use/inspector test:unit
  Test Files  45 passed (45)
  Tests  217 passed (217)

CI is unaffected; its step calls test:unit directly. This is the documented
`pnpm test` contributors run.

Uses run mode rather than watch, matching tunnel, so a recursive run cannot
sit waiting on a watcher.

* chore(inspector): remove test-only changeset

---------

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

* fix(types): align pnpm workspace tooling (#2301)

* docs: update TypeScript release changelogs

* fix(inspector): use secure chat session ids

---------

Co-authored-by: Arthi Arumugam <62213284+arthi-arumugam-git@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Mert Çetin <97505365+merttcetn@users.noreply.github.com>
Co-authored-by: Ayaan Gazali <ayaangazali.work@gmail.com>
Co-authored-by: saif-at-scalekit <saif.shaik@scalekit.com>
Co-authored-by: Saif Shines <saifshine7@gmail.com>
2026-08-20 11:25:02 -07:00
Ayaan Gazali 02258c2c96 docs(skills): drop baseUrl from the openapi-to-mcp server config (#2287)
* docs(skills): drop baseUrl from the openapi-to-mcp server config

The skills rewrite in #2286 did not reach this one. MCPServer still rejects
baseUrl on current main:

  error TS2353: Object literal may only specify known properties,
  and 'baseUrl' does not exist in type 'ServerConfig<never>'.

The skill also says the scaffold provides that field; it does not, the
create-mcp-use-app template sets name, title, version and description.

Unrelated and left alone: MCPServer.fromOpenAPI() does accept baseUrl
(FromOpenAPIOptions), so the advanced-features references are correct.

* Apply suggestion from @cubic-dev-ai[bot]

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>

* Apply suggestion from @cubic-dev-ai[bot]

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>

---------

Signed-off-by: Andrew Khadder <54488379+khandrew1@users.noreply.github.com>
Co-authored-by: Andrew Khadder <54488379+khandrew1@users.noreply.github.com>
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
2026-08-19 13:41:32 -07:00
Ayaan Gazali bcd9befbcd docs: use createJwtVerifier in the custom OAuth provider guide (#2265)
The guide hand-rolled a verifier with jose: signature and issuer checks, sub
and exp guards, scope splitting, client_id/azp fallback, and the resource
binding. That is 33 lines of security-sensitive code for readers to copy and
get right.

#2234 exported createJwtVerifier, which is the helper the six built-in
providers already use and does all of it. Show that instead, and keep the
hand-written path documented for providers that do not issue JWTs.
2026-08-18 09:46:44 -07:00
Bobo 5710d284d1 docs: use canonical templates URL (#2279)
Co-authored-by: Bo Zhang <187063395+Tethys0@users.noreply.github.com>
2026-08-17 12:57:32 -07:00
Andrew Khadder d75ea01fb2 docs(skills): rewrite mcp-use skills (#2286) 2026-08-17 12:07:58 -07:00
Enrico Toniato 9e54290c4f release(typescript): Exit prerelease mode and version packages (#2285)
release(typescript): Exit prerelease mode and version packages
mcp-use@2.2.4 @mcp-use/inspector@20.2.4 @mcp-use/client@2.1.5 @mcp-use/cli@4.1.5 @mcp-use/agent@2.0.7
2026-08-17 20:21:27 +02:00
github-actions[bot] eb4ba58d3b chore(release): exit prerelease mode and version packages 2026-08-17 18:19:01 +00:00
Enrico Toniato deed2d5793 chore: promote Canary to main (#2284)
chore: promote Canary to main
2026-08-17 20:17:36 +02:00
github-actions[bot] 9e7e7b7538 chore(typescript): version packages (canary) mcp-use@2.2.4-canary.0 @mcp-use/inspector@20.2.4-canary.0 @mcp-use/client@2.1.5-canary.0 @mcp-use/cli@4.1.5-canary.0 @mcp-use/agent@2.0.7-canary.0 2026-08-17 17:40:25 +00:00
github-actions[bot] c1f62627f1 chore: enter canary prerelease mode 2026-08-17 17:40:15 +00:00
Enrico Toniato bdd8ec88d5 fix(client): preserve legacy widget state promise contract (#2282) 2026-08-17 19:38:43 +02:00
github-actions[bot] 9afeeb6d3e chore(release): exit prerelease mode and version packages (#2263)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
mcp-use@2.2.3 @mcp-use/inspector@20.2.3
2026-08-13 17:47:28 -07:00
Andrew Khadder a7447ef1b1 Canary (#2262)
* Surface protocol selection and prioritize configuration settings (#2261)

* Surface protocol selection in connection settings

* chore(inspector): add changeset for protocol selection

* refactor(inspector): centralize protocol selector

* fix(inspector): show protocol in configuration modal

* chore: enter canary prerelease mode

* chore(typescript): version packages (canary)

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-08-13 17:45:32 -07:00
Ayaan Gazali 13ca58db78 fix(ci): actually run the mcp-use unit tests (#2213)
The step ran `pnpm --filter mcp-use --if-present test:unit`, but the mcp-use
package has no test:unit script, so --if-present turned it into a silent pass
and 447 tests never ran.

Point it at test:run, which is the script that exists and the same one the
client step above already uses.

Two failures were hiding behind the skip:

- usage.test.ts asserted telemetry was sent, but the step sets
  MCP_USE_ANONYMIZED_TELEMETRY=false, which short-circuits recordUsage. Those
  cases are about identity persistence, not the opt-out, so capture() now sets
  the variable itself. The file already tracks and restores it in afterEach.
- budgets/runtime-boundary.test.ts compared the builtin list with toEqual, so
  it depended on module resolution order between node:process and node:http.
  Sorted, which is what the case means by "loads only".

Verified with the step's own env: MCP_USE_ANONYMIZED_TELEMETRY=false
pnpm --filter mcp-use test:run gives 43 files, 447 passed, exit 0.

Closes #2203
2026-08-13 15:14:26 -07:00
Ayaan Gazali 68a0a48465 fix(ci): run the create-mcp-use-app unit tests (#2214)
The package has 25 vitest cases under src/__tests__, and no workflow ran
them. create-mcp-use-app-build builds and packs, and create-app-tests only
scaffolds a project with each package manager and checks the files exist.

Add the step to the build job, which already installs and builds, so the
unit tests run before the artifact is packed.

Verified: pnpm --filter create-mcp-use-app test gives 2 files, 25 passed.
2026-08-13 15:12:15 -07:00
Ayaan Gazali dbe5b8a4e8 fix(ci): actually run the inspector unit tests (#2201)
The "Run Inspector Tests" step calls `--if-present test`, but
@mcp-use/inspector has no `test` script, only `test:unit`. With
--if-present a missing script is a silent success, so the step has been
passing without running anything while 159 unit tests sat unexecuted.

Points it at test:unit, matching the sibling steps for mcp-use and
@mcp-use/agent. Dropped --if-present since the script exists and a
missing one should fail rather than pass quietly.
2026-08-13 15:09:06 -07:00
Andrew Khadder 64480f083c docs(examples): add json-render generative UI example (#2222)
* docs(examples): add json-render generative UI example

* style(examples): format generative UI view

* fix(examples): guard incomplete streamed UI elements

* docs: add generative UI guide
2026-08-13 14:19:17 -07:00
Enrico Toniato e7f5899f33 Merge pull request #2259 from mcp-use/release/exit-prerelease-1786637631
release(typescript): Exit prerelease mode and version packages
mcp-use@2.2.2 @mcp-use/inspector@20.2.2 @mcp-use/client@2.1.4 @mcp-use/cli@4.1.4 @mcp-use/agent@2.0.6
2026-08-13 18:15:58 +02:00
github-actions[bot] 2e20852330 chore(release): exit prerelease mode and version packages 2026-08-13 16:13:57 +00:00
Enrico Toniato 2bd2d79cc8 Merge pull request #2257 from mcp-use/canary
Canary
2026-08-13 18:12:25 +02:00
github-actions[bot] d8e1061b19 chore(typescript): version packages (canary) @mcp-use/client@2.1.4-canary.1 @mcp-use/agent@2.0.6-canary.1 2026-08-13 15:59:17 +00:00
Enrico Toniato 6343150e68 fix(client): refresh OAuth discovery on new challenges (#2258) 2026-08-13 17:57:32 +02:00
github-actions[bot] 030ab3e5a0 chore(typescript): version packages (canary) mcp-use@2.2.2-canary.0 @mcp-use/inspector@20.2.2-canary.0 @mcp-use/client@2.1.4-canary.0 @mcp-use/cli@4.1.4-canary.0 @mcp-use/agent@2.0.6-canary.0 2026-08-13 15:12:12 +00:00
github-actions[bot] 2064a59f8f chore: enter canary prerelease mode 2026-08-13 15:12:01 +00:00
Enrico Toniato c9c944b65a fix stale browser OAuth discovery (#2256) 2026-08-13 17:10:33 +02:00
github-actions[bot] 5ff1cc3684 chore(release): exit prerelease mode and version packages (#2255)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
mcp-use@2.2.1 @mcp-use/inspector@20.2.1 @mcp-use/client@2.1.3 @mcp-use/cli@4.1.3 @mcp-use/agent@2.0.5
2026-08-13 15:40:33 +02:00
Andrew Khadder aba43460f6 Canary (#2250)
* fix(client): defer Node OAuth state writes (#2249)

* chore: enter canary prerelease mode

* chore(typescript): version packages (canary)

* fix(client): avoid blocking on legacy SSE readiness (#2253)

* docs: move Skills over MCP navigation (#2248)

* fix(client): avoid blocking on legacy SSE readiness

---------

Co-authored-by: Andrew Khadder <54488379+khandrew1@users.noreply.github.com>

* chore(typescript): version packages (canary)

* fix inspector OAuth resource compatibility (#2254)

* chore(typescript): version packages (canary)

---------

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>
2026-08-13 15:33:56 +02:00
Andrew Khadder b6a720b912 docs: move Skills over MCP navigation (#2248) 2026-08-12 12:14:57 -07:00
github-actions[bot] b782eeaec2 chore(release): exit prerelease mode and version packages (#2247)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
mcp-use@2.2.0 create-mcp-use-app@2.0.4 @mcp-use/inspector@20.2.0 @mcp-use/client@2.1.2 @mcp-use/cli@4.1.2 @mcp-use/agent@2.0.4
2026-08-12 17:24:09 +02:00
Enrico Toniato 4104309fda Canary (#2231)
* fix: restore Vibe apps and HMR (#2229)

* chore: enter canary prerelease mode

* chore(typescript): version packages (canary)

* fix(cli): route Vibe HMR through public origin

* chore(typescript): version packages (canary)

* fix(cli): prebundle the Vibe view runtime (#2236)

* fix(cli): prebundle the Vibe view runtime

* test(cli): update view optimizer contract

* fix(cli): skip view optimization for tool-only dev

* chore(typescript): version packages (canary)

* fix(cli): prebundle Zod for Vibe views

* chore(typescript): version packages (canary)

* fix(cli): ignore Vibe dev server logs in HMR (#2238)

* chore(typescript): version packages (canary)

* fix(oauth): restore zero-config provider environment variables (#2241)

* fix(oauth): restore v1 environment contract

* chore: add OAuth environment changeset

* chore(typescript): version packages (canary)

* fix(client): replay tool state after guest reinitializes (#2240)

* chore(typescript): version packages (canary)

* fix(ci): clear the knip findings failing canary (#2235)

* fix(ci): clear the knip findings failing canary

typescript-knip has been red on canary, so every PR against it shows the
failure. The job reports seven items.

Three exported types nothing imports. Each is used only inside its own
module, as a return type or parameter, so the export keyword was doing
nothing. Dropped it.

Four stale knip.json entries. test_app is a scaffold output directory that
no longer exists, and the three cli ignoreDependencies are detected properly
now, which is why knip asks for them to be removed.

Build passes, so nothing depended on those type exports for declaration
emit.

* fix(ci): clear the two knip findings that landed with #2216

Canary moved while this PR was open. #2216 added an inspector test that opts
into jsdom via a @vitest-environment pragma without the package declaring
jsdom, and an exported reconnect storage key that is only read inside its own
module.

Declare jsdom in the inspector devDependencies, matching the ^27.0.0 the
client package already uses, and drop the unused export.

* chore(typescript): version packages (canary)

* fix(inspector): ship embedded theme styles (#2243)

* chore(typescript): version packages (canary)

* feat(inspector): expose CSP audit to Vibe agents (#2244)

* fix(create-app): preserve canary skill channel (#2245)

* fix(release): move SDK changesets into workspace (#2246)

* chore(typescript): version packages (canary)

* feat(server): export createJwtVerifier from mcp-use/oauth (#2234)

The oauth entry point exports oauthCustomProvider so consumers can build a
custom OAuth provider, but not createJwtVerifier, so anyone doing that had to
reimplement signature, issuer, audience and expiry checking that all six
built-in providers already share.

Export it along with JwtVerifierOptions and VerifiedPayload, and drop the
@internal tags now that they are public. Documented the option properties,
which the package requires for public exports.

Closes #2215

* chore(typescript): version packages (canary)

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Andrew Khadder <54488379+khandrew1@users.noreply.github.com>
Co-authored-by: Ayaan Gazali <ayaangazali.work@gmail.com>
2026-08-12 15:20:27 +00:00
github-actions[bot] 247cb2f9ae chore(release): exit prerelease mode and version packages (#2228)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
mcp-use@2.1.1 create-mcp-use-app@2.0.3 @mcp-use/inspector@20.1.1 @mcp-use/client@2.1.1 @mcp-use/cli@4.1.1 @mcp-use/agent@2.0.3
2026-08-11 13:06:50 +02:00
Andrew Khadder e17cd7b8ca Canary (#2216)
* feat(client): support mixed OAuth servers

* fix(inspector): pause mixed-auth tool calls

* Revert "fix(inspector): pause mixed-auth tool calls"

This reverts commit 9bac9ddfe7.

* chore: finalize mixed OAuth changeset

* docs: explain mixed OAuth client flows

* fix: bound mixed auth metadata discovery

* docs(server): add runnable mixed oauth example

* fix(inspector): recover stale local connections

* fix(inspector): resume tools after mixed auth

* fix: address mixed auth review feedback

* fix(inspector): scope mixed auth retries

* test(inspector): remove jsdom-only regressions

* chore: enter canary prerelease mode

* chore(typescript): version packages (canary)

* fix(inspector): stream v2 subscription acknowledgements

* fix(client): discover mixed auth after ready

* test(client): preserve mocked connection compatibility

* fix(client): defer mixed auth discovery until ready

* fix(client): discover mixed auth after ready paint

* perf(client): expose tools before auxiliary inventories

* fix(client): refresh mixed auth discovery after reconnect

* chore(typescript): version packages (canary)

* fix(client): make codeMode custom executor functions actually work (#2123)

* fix(client): make codeMode custom executor functions actually work

`_ensureCodeExecutor()` handled a function-valued `codeMode.executor` by
assigning `this._customCodeExecutor` and then throwing
"Custom executor function should be handled in executeCode". Since
`executeCode()` read that field *before* calling `_ensureCodeExecutor()`,
and only `_ensureCodeExecutor()` ever populated it, the first
`executeCode()` call always rejected and only the second succeeded.
`searchTools()` had no such fallback, so it rejected on every call --
including via the `search_tools` meta tool on `CodeModeConnector`. Because
`_codeExecutor` stayed null, `close()` also skipped executor cleanup.

Route function executors through a new `FunctionCodeExecutor` adapter so
they participate in the normal executor lifecycle, and drop the now-unused
`_customCodeExecutor` field and its pre-check in `executeCode()`.

Also fix `detail_level` validation in `CodeModeConnector.callTool`: it
used `detailLevel in ["names", "descriptions", "full"]`, and `in` tests
property keys, so an array literal only has `"0"`/`"1"`/`"2"`/`"length"`.
Every valid detail level failed the guard and was silently rewritten to
`"full"`, so an agent requesting `"names"` received full input schemas for
every tool. Replaced with a `Set` membership test.

Adds 10 unit tests: first-call success, timeout forwarding, `searchTools`,
`close()` cleanup, the `BaseCodeExecutor` instance path, each valid
`detail_level`, and the unknown/omitted fallbacks.

Closes #2122

* fix(client): preserve `this` for custom executors, tighten tests, document the contract

Addresses review feedback on the code-mode custom-executor fix.

The `this` binding regression is real -- I measured it both ways. On the
pre-fix code the executor function was invoked as
`this._customCodeExecutor(code, timeout)`, so a non-arrow function saw the
`MCPClient` as its `this`; through the new adapter it saw the
`FunctionCodeExecutor`. `FunctionCodeExecutor.execute` now calls
`this.fn.call(this.client, ...)` so a `function`-form executor keeps the same
context it had before, and a test asserts it.

Two tests were weaker than their titles claimed:

- the `searchTools` test ran against an empty client, so it only proved the
  call did not throw. It now registers a stub session with one tool and
  asserts the full `{ meta, results }` payload, including the namespace and
  the tool's `input_schema`.
- the `close()` test only asserted the promise resolved, which would pass
  even if cleanup were skipped. It now spies on the resolved executor's
  `cleanup()` and asserts it ran exactly once.

Documentation: the API reference listed one "Custom" executor row saying to
implement `execute()` + `cleanup()`, which is only true for the
`BaseCodeExecutor` subclass form. Split it into separate class and function
rows, add the `CodeExecutorFunction` signature to the types block, and add a
worked example to the code-mode guide (current and v2) stating the `this`
context and that the function owns its runtime cleanup.

* docs(client): use a non-arrow custom executor in the code-mode example

The example demonstrated the documented `this` context with an arrow function,
which has lexical `this` and therefore cannot observe it. Switched to
`async function (this: MCPClient, code, timeout)` and had it actually call
`this.getServerNames()`, so the snippet exercises the contract it describes.
Type-checked the snippet shape against the real `MCPClient` type with
`tsc --noEmit` before committing.

Also reworded the surrounding paragraph: the `this` binding is specific to the
non-arrow form, whereas the cleanup-ownership rule applies to every custom
function.

* docs(client): drop v1 code-mode custom executor docs

This change is v2-only; keep the custom-executor contract on the v2 docs path.

* chore(typescript): version packages (canary)

* fix(create-app): sanitize the npm name for named projects, not just "." (#2209)

deriveProjectInfo only ran sanitizePackageName on the "." branch. A named
project passed the raw argument straight through as packageName, which is
then written into package.json and substituted into the template's index.ts.

The CLI rejects path separators, ".." and a few protected names, but not
spaces, quotes or capitals, so `create-mcp-use-app 'My "App"'` emitted
`name: "My "App""` in index.ts, which is not valid TypeScript.

Sanitize on both branches. The directory still uses the name as typed.

* chore(typescript): version packages (canary)

* fix: enable skills tab after HMR (#2220)

* chore(typescript): version packages (canary)

* fix(create-app): strip leading underscores when sanitizing a package name (#2221)

sanitizePackageName removed leading dots and dashes but not underscores, so
create-mcp-use-app _foo wrote "name": "_foo" into package.json.

npm publish rejects that outright:

  npm error code EINVALIDPACKAGENAME
  npm error Invalid package name "_foo": name cannot start with an underscore.

Widen the leading-character class to [._-] and cover both the sanitizer and a
named project starting with an underscore.

Closes #2219

* chore(typescript): version packages (canary)

* fix(client): surface auth for protected operations

* fix(inspector): resume mixed-auth chat tools (#2226)

* chore(typescript): version packages (canary)

* fix: harden stable mixed-auth flows

---------

Co-authored-by: Enrico <2827496+tonxxd@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: LHMQ878 <72402929@cityu-dg.edu.cn>
Co-authored-by: Ayaan Gazali <ayaangazali.work@gmail.com>
2026-08-11 12:52:52 +02:00
Enrico Toniato 01d3e7ed25 Disable browser auto-open in Inspector container (#2224) 2026-08-11 10:46:10 +02:00
Ayaan Gazali afcc55d7d8 docs: repoint dead OAuth example links and drop a leaked docs preview domain (#2211)
The skills auth references pointed at
libraries/typescript/packages/mcp-use/examples/server/oauth/<provider>,
which is the deleted v1 package path. Those examples live at
libraries/typescript/packages/server/examples/auth/<provider> in v2.

README.md and packages/server/README.md both linked the self-hosting guide
to a Mintlify preview deployment, mcpuse-codex-v1-v2-docs-split.mintlify.site,
which 404s. The server README ships with the published package.

Reported in #2210.
2026-08-10 12:07:10 -07:00
Andrew Khadder a4fcdaa10f docs: remove duplicate migration guide link (#2218) 2026-08-10 11:57:28 -07:00
Enrico Toniato daf7c12d92 Merge pull request #2208 from mcp-use/release/exit-prerelease-1786289743
release(typescript): Exit prerelease mode and version packages
mcp-use@2.1.0 create-mcp-use-app@2.0.2 @mcp-use/tunnel@0.2.0 @mcp-use/inspector@20.1.0 @mcp-use/client@2.1.0 @mcp-use/cli@4.1.0 @mcp-use/agent@2.0.2
2026-08-09 17:37:48 +02:00
github-actions[bot] 65e548b660 chore(release): exit prerelease mode and version packages 2026-08-09 15:35:49 +00:00
Enrico Toniato 1a6fa53adf Merge pull request #2159 from mcp-use/canary
Canary
2026-08-09 17:34:09 +02:00
github-actions[bot] b3078144db chore(typescript): version packages (canary) mcp-use@2.1.0-canary.10 @mcp-use/tunnel@0.2.0-canary.1 @mcp-use/cli@4.1.0-canary.8 2026-08-09 14:40:19 +00:00
Enrico Toniato 42fe28705c fix production tunnel host forwarding (#2207) 2026-08-09 16:38:47 +02:00
github-actions[bot] d8685ee348 chore(typescript): version packages (canary) mcp-use@2.1.0-canary.9 @mcp-use/inspector@20.1.0-canary.9 @mcp-use/cli@4.1.0-canary.7 2026-08-09 12:34:48 +00:00
Enrico Toniato 1f7df2a82c fix release blockers before stable promotion (#2206)
* fix release blockers before stable promotion

* fix conformance summary expected outcomes

* harden release and conformance validation
2026-08-09 14:33:14 +02:00
github-actions[bot] abe90507d9 chore(typescript): version packages (canary) mcp-use@2.1.0-canary.8 @mcp-use/inspector@20.1.0-canary.8 2026-08-09 10:59:22 +00:00
Enrico Toniato 173b2d54a2 fix: make canary conformance release evidence explicit (#2205) 2026-08-09 12:58:06 +02:00
github-actions[bot] b141c5b6c1 chore(typescript): version packages (canary) mcp-use@2.1.0-canary.7 create-mcp-use-app@2.0.2-canary.1 @mcp-use/tunnel@0.2.0-canary.0 @mcp-use/inspector@20.1.0-canary.7 @mcp-use/client@2.1.0-canary.5 @mcp-use/cli@4.1.0-canary.6 @mcp-use/agent@2.0.2-canary.5 2026-08-08 08:11:34 +00:00