# Inspector Updates Source: https://docs.mcp-use.com/inspector/changelog New updates and improvements to the MCP Inspector ## OAuth Proxy release alignment Canary patch release (`@mcp-use/inspector@20.3.20-canary.3`) paired with `mcp-use@2.10.0-canary.4`, rebuilding bundled workspace code with the framework's OAuth Proxy and build changes. Stable v20.3.20 has not shipped; this wave has no Inspector-specific source changes. * **Update**: rebuild bundled workspace code and synchronize published internal package metadata * **Update**: Updated mcp-use to v2.10.0 (canary.4) ## Composer mention search release alignment Patch release paired with `mcp-use` v2.9.0, rebuilding bundled workspace code with the framework's composer mention search helper. This release has no Inspector-specific source changes. * **Update**: rebuild bundled workspace code and synchronize published internal package metadata * **Update**: Updated mcp-use to v2.9.0 ## Framework release alignment Patch release paired with `mcp-use` v2.8.2, rebuilding the bundled Inspector and synchronizing internal package metadata. * **Update**: rebuild bundled workspace code and synchronize published internal package metadata * **Update**: Updated mcp-use to v2.8.2 ## Saved tool timeout settings Patch release paired with `mcp-use` v2.8.1, applying connection timeout settings to tool calls and preserving cleared values. * **Fix**: tool calls use the saved request timeout, maximum total timeout, and reset-on-progress setting instead of hard-coded defaults (`#2656`) * **Fix**: cleared timeout fields stay cleared when reopening or renaming a connection (`#2656`) * **Fix**: changing a connection URL rejects duplicates before removing the existing connection (`#2656`) * **Enhancement**: connection settings explain that a blank request timeout uses the 10-minute default and a blank maximum total timeout removes the overall time limit while retaining the request timeout (`#2656`) * **Update**: Updated mcp-use to v2.8.1 ## Framework release alignment Patch release paired with `mcp-use` v2.8.0, rebuilding the bundled Inspector with the ChatGPT Plugin Extensions framework updates. * **Update**: rebuild bundled workspace code and synchronize published internal package metadata * **Update**: Updated mcp-use to v2.8.0 ## Chat input toolbar spacing Patch release paired with `mcp-use` v2.7.3, keeping multiline messages clear of the chat toolbar and updating dependencies. * **Fix**: chat input reserves space above the bottom toolbar so multiline text no longer overlaps its controls (`#2735`) * **Update**: update Hono to `^4.13.7` and refresh workspace dependency security floors (`#2746`) * **Update**: Updated mcp-use to v2.7.3 ## Disconnect abort & UserInfo proxy Patch release paired with `mcp-use` v2.7.2. The Express adapter stops holding upstream streams after the client leaves, and the OAuth proxy can fetch UserInfo. * **Fix**: disconnecting an Express client aborts the outbound fetch and the proxy read loop, so a long-lived SSE response no longer writes to a dead socket or leaves the upstream connection open (`#2394`) * **Enhancement**: the OAuth proxy allows GET to UserInfo endpoints listed on the authorization server's metadata, and rejects other methods and URLs that are not in that set (`#2688`) * **Update**: Updated mcp-use to v2.7.2 ## View cancellation release alignment Patch release paired with `mcp-use` v2.7.1; rebuilds the bundled Inspector with no Inspector-specific source changes. * **Update**: rebuild bundled workspace code and synchronize published internal package metadata * **Update**: Updated mcp-use to v2.7.1 ## Mixed authentication release alignment Patch release paired with `mcp-use` v2.7.0; rebuilds the bundled Inspector with no Inspector-specific source changes. * **Update**: rebuild bundled workspace code and synchronize published internal package metadata * **Update**: Updated mcp-use to v2.7.0 ## TanStack Start release alignment Patch release paired with `mcp-use` v2.6.0; there are no Inspector-specific source changes. * **Update**: Updated mcp-use to v2.6.0 ## Scrollable MCP App results Patch release paired with `mcp-use` v2.5.2, keeping tall tool results accessible. * **Fix**: tall MCP App tool results scroll within the result panel instead of extending beyond it (`#2598`) * **Update**: Updated mcp-use to v2.5.2 ## Managed chat model branding & provider selection Patch release paired with `mcp-use` v2.5.1, showing the selected cloud model accurately and simplifying provider selection. * **Fix**: managed chat badges use the selected cloud model's name and provider logo instead of the default transport model's branding (`#2575`) * **Enhancement**: the Manufact cloud provider picker offers OpenAI, Anthropic, and Google; existing selections from other providers remain visible with accurate labels, while evals retain the full catalog and BYOK OpenRouter remains available (`#2576`) * **Update**: `MCPServerConfig.auth_token` is deprecated but retained for type compatibility; use `authToken` to send an authentication token (`#2486`) * **Update**: update Hono to `^4.13.5` (`#2492`) * **Update**: Updated mcp-use to v2.5.1 ## Bundled Inspector rebuild Patch release paired with `mcp-use` v2.5.0, rebuilding the standalone Inspector with the agent OpenRouter fix. * **Fix**: rebuild the standalone Inspector with the OpenRouter Responses API agent fix and repair published framework peer metadata (`#2504`) * **Update**: Updated mcp-use to v2.5.0 ## Workspace package alignment Patch release paired with `mcp-use` v2.4.3; there are no Inspector-specific source changes. * **Update**: Updated mcp-use to v2.4.3 ## Publish artifact preservation Patch release paired with `mcp-use` v2.4.2, keeping package builds intact while npm pack runs. * **Fix**: concurrent publishing no longer drops the Client build while its tarball is created, and packed artifacts are checked for declared files and entry points (`#2428`) * **Update**: Updated mcp-use to v2.4.2 ## Chat widgets use the connection id Patch release paired with `mcp-use` v2.4.1, rendering chat MCP Apps against the registered connection. * **Fix**: chat MCP Apps render with the registered MCP connection id while preserving the logical server id for chat state and storage (`#2404`) * **Update**: Updated mcp-use to v2.4.1 ## Request duration & screenshot init failures Patch release paired with `mcp-use` v2.4.0, showing RPC duration, failing screenshots when an MCP App fails to initialize, and raising the embedded chat step cap. * **Enhancement**: RPC traffic rows show request duration in milliseconds instead of wall-clock time; unmatched rows omit the timing column (`#2364`) * **Fix**: `mcp-use screenshot` fails with `view_load_failed` when the MCP App fails to initialize (`#2355`) * **Enhancement**: embedded client-side chats can configure up to 100 agent steps (`#2401`) * **Update**: Updated mcp-use to v2.4.0 ## RPC latency in the timing column Patch release paired with `mcp-use` v2.3.4, moving response latency into the traffic timing column and labeling colocated Inspector logs. * **Enhancement**: response rows show latency in the traffic timing column instead of repeating it in the method label; unmatched rows still show the wall-clock time (`#2349`) * **Enhancement**: when Inspector shares the `mcp-use dev` process, proxy and OAuth BFF logs are prefixed `[inspector]` (`#2351`) * **Update**: Updated mcp-use to v2.3.4 ## Model tool-limit warnings Patch release paired with `mcp-use` v2.3.3, making model tool limits visible before a chat request is sent. * **Enhancement**: chat warns when a connected MCP server exposes more than the documented 128 tools supported by OpenAI or Gemini models (`#2333`) * **Update**: Updated mcp-use to v2.3.3 ## Correlated JSON-RPC responses Patch release paired with `mcp-use` v2.3.2, adding request context and timing to JSON-RPC response rows. * **Enhancement**: response rows show the matched request method and elapsed time and flag errors while keeping simultaneous bidirectional requests isolated by source, server, widget, direction, and ID type (`#2303`) * **Update**: Updated mcp-use to v2.3.2 Release 20.3.0 ## Reusable connection settings Minor release paired with `mcp-use` v2.3.1, exposing the Inspector connection form and configuration state for embedded consumers. * **New**: `@mcp-use/inspector/client` exports `ConnectionSettingsForm`, `useConnectionFormState`, custom-header controls, connection configuration types, and normalization helpers, with optional consumer URL validation (`#2319`) * **Update**: Updated mcp-use to v2.3.1 ## Isolated chat sessions & accurate cache usage Patch release paired with `mcp-use` v2.3.0, keeping concurrent chat sessions independent and preserving provider cache-token accounting. * **Fix**: each chat session owns one identifier and state record, so **New Chat** starts a fresh session while another is streaming; persistence and OAuth retry use the same identifier, and `ChatStorageProvider.createChat` accepts an optional caller-supplied `id` (`#2232`) * **Fix**: Anthropic `cacheCreationInputTokens` survives aggregation, LLM spans, and raw-chat `tokenUsage`, while totals avoid double-counting OpenAI cached input tokens (`#2127`) * **Update**: Updated mcp-use to v2.3.0 ## Workspace package alignment Patch release paired with `mcp-use` v2.2.4; there are no Inspector-specific source changes. * **Update**: Updated mcp-use to v2.2.4 ## Protocol version controls Patch release making MCP protocol selection visible in connection setup. * **Enhancement**: the connect form and connection settings expose protocol version selection and make configuration options easier to find * **Update**: Updated mcp-use to v2.2.3 ## Workspace package alignment Patch release paired with `mcp-use` v2.2.2; there are no Inspector-specific source changes. * **Update**: Updated mcp-use to v2.2.2 ## OAuth protected-resource compatibility Patch release accepting secure parent-path resource metadata during OAuth discovery. * **Fix**: protected-resource metadata may identify a same-origin, segment-aware parent of the MCP endpoint, matching the official MCP TypeScript SDK while rejecting cross-origin, sibling-path, credential-bearing, fragmented, and insecure non-loopback values * **Update**: Updated mcp-use to v2.2.1 Release 20.2.0 ## CSP auditing & embedded Inspector styles Minor release paired with `mcp-use` v2.2.0, adding host-visible CSP verification and a consistent embedded surface contract. * **New**: the embedded Chat bridge exposes CSP mode and audit commands so hosts and coding agents can verify MCP Apps in Widget-Declared mode * **Enhancement**: a canonical client stylesheet provides the Inspector surface, shadow, hover, and active theme contract for embedded dialogs, dropdowns, and selects * **Fix**: embedded MCP Apps render in Vibe and preserve React state during remote HMR updates * **Fix**: remove unreachable exports and declare the Inspector tool-execution test's `jsdom` development dependency explicitly * **Update**: Updated mcp-use to v2.2.0 ## Mixed-auth chat recovery Patch release paired with `mcp-use` v2.1.1, allowing anonymous sessions to authenticate only when a protected operation requires it. * **Enhancement**: mixed-auth tool calls stay on the browser MCP connection, pause with an Authenticate action, and resume the same client-side turn after popup or redirect authorization * **Enhancement**: the Skills tab becomes available when a development HMR reload adds Skills after the initial connection negotiated without the extension * **Fix**: optional OAuth discovery and token projection no longer block connection readiness, transient metadata failures recover, and authenticated state remains accurate after a challenge * **Fix**: reverse-proxy buffering is disabled for open-ended MCP SSE responses so subscription acknowledgements arrive immediately * **Update**: Updated mcp-use to v2.1.1 Release 20.1.0 ## Skills over MCP & Inspector runtime Minor release paired with `mcp-use` v2.1.0 — typed Skills operations, an integrity-checked file explorer, and development/runtime fixes for the v2 Inspector. * **New**: typed Skills over MCP client operations, a capability-gated Inspector file explorer with integrity verification, and removable progressive skill context in Inspector chat * **Enhancement**: Skills discovery omits invalid skills from fresh development snapshots * **Enhancement**: the `window.openai` compatibility bridge exposes tool lifecycle globals and host actions while preserving the native MCP Apps handshake for v2 views; iframe console records are not parsed as MCP Apps JSON-RPC messages * **Fix**: provider assets load from the development server, widget-declared sandbox CSPs can use dynamic compilation within their declared domains, and embedded layouts fill their iframe height without the empty desktop header gap or standalone sidebar footer controls * **Fix**: avoid the Inspector tunnel flash while connection state transitions complete * **Update**: Updated mcp-use to v2.1.0 ## Stable npm README links Patch release fixing absolute links in the published Inspector documentation. * **Fix**: README images and repository links use stable absolute URLs so npm renders the published Inspector documentation correctly * **Update**: Updated mcp-use to v2.0.4 ## Stable package README metadata Patch release making the published Inspector README reliable on npm. * **Fix**: Publish a package-root README and verify that it stays synchronized with the repository README before packing * **Update**: Updated mcp-use to v2.0.3 ## Safer loopback proxy defaults Patch release paired with `mcp-use` v2.0.1, preventing publicly reachable Inspector mounts from proxying requests to host loopback services by default. * **Fix**: `mountInspector` defaults `oauthProxyAllowLoopback` to `false`; the standalone CLI permits loopback for local development but blocks it in production unless `INSPECTOR_ALLOW_LOOPBACK=true` * **Update**: runtime and bundled dependencies use patched stable releases with tightened transitive resolutions * **Update**: Updated mcp-use to v2.0.1 Release 20.0.0 ## MCP SDK v2 & hosted Inspector Major release paired with `mcp-use` v2.0.0 — the Inspector moves to the official MCP SDK v2 and a project-pinned, secure relay/runtime architecture. * **Update**: The Inspector and client move to the official MCP SDK v2 with automatic protocol negotiation, ESM-only packages, Node.js 22.22.2+, redesigned OAuth, and v1 API cleanup * **New**: Project-pinned Inspector development owns the MCP/OAuth relay and serves local assets without a remote application fallback; the standalone package adds the full proxy and OAuth BFF * **New**: Hosted and localhost chat, MCP Apps tool lifecycle delivery, fullscreen chat controls, and streamed tool-call input improve interactive Inspector sessions * **Fix**: OAuth session values are encrypted at rest, secret connection fields are not persisted, browser launches and Inspector routes are hardened, and proxy/OAuth APIs are rate-limited * **Enhancement**: Immutable CDN asset resolution and zero-dependency packaging prevent mixed-version assets and keep standalone installs clean * **Update**: Updated mcp-use to v2.0.0 ## CLI version heading Patch release paired with `mcp-use` v1.34.6; includes the unpublished 12.0.4 docs-link fix. * **Enhancement**: the CLI help heading shows the installed Inspector version * **Documentation**: Inspector README drops dead documentation links * **Update**: Updated mcp-use to v1.34.6 ## Tunneling docs link Patch release fixing the tunnel popover documentation link. * **Documentation**: The tunnel popover now links to `https://mcp-use.com/docs/tunneling` instead of the removed Manufact URL * **Update**: Updated mcp-use to v1.34.3 ## Backend-less CDN shell support Patch release improving the Inspector bundle used by the SDK v2 backend-less shell. * **Fix**: CDN auto-connect reads `window.__MCP_USE_INSPECTOR__.autoConnectUrl`, and the version badge and MCP `clientInfo` fall back to the compile-time bundle version when runtime injection is absent * **Update**: Updated mcp-use to v1.34.2 ## mcp-use v1.34.1 Patch release paired with `mcp-use` v1.34.1; there are no Inspector-specific source changes. * **Update**: Updated mcp-use to v1.34.1 ## Hosted OAuth reliability (mcp-use v1.34.0) Major release paired with `mcp-use` v1.34.0 — peer dependency bump; runtime OAuth fixes come from the updated `mcp-use` dependency (no inspector-specific source changes in this wave). * **Fix**: gateway-fronted and hosted OAuth servers no longer drop to `failed` with "Server does not support OAuth" when discovery succeeded on an earlier pass — inherits `oauthProxyUrl` wiring and `pending_auth` handling from mcp-use v1.34.0 (`#1840`) * **Update**: Peer dependency on `mcp-use` moves to `>=1.34.0-canary.0` * **Update**: Updated mcp-use to v1.34.0 Release 11.0.0 ## MCP Apps runtime, Auto connections & host context styles Major release paired with `mcp-use` v1.33.0 — widgets now render with MCP Apps as the primary runtime, new connections default to Auto mode with proxy fallback, and host context style variables are applied while the Apps SDK preview tab remains for `window.openai`-only widgets. * **New**: widgets render with the MCP Apps bridge as the primary runtime and apply host context style variables; the Apps SDK ("Component (Apps SDK)") preview tab remains for widgets that only speak `window.openai` (`#1739`) * **Enhancement**: new connections default to Auto mode, trying a direct browser connection first and falling back to the configured Inspector proxy when CORS or other proxy-resolvable connection errors occur; Direct and Proxy remain available as advanced overrides (`#1795`) * **Fix**: OAuth proxy fetch is scoped per server configuration, so connecting one server Via Proxy no longer mutates global `fetch`, changes unrelated requests, or affects other servers configured for Direct mode (`#1770`) * **Fix**: stale saved auto-connect entries are replaced when the advertised transport changes, so embedded Inspector instances stop retrying deprecated SSE connections after switching to streamable HTTP (`#1792`) * **Fix**: signed-in users on the hosted free tier are no longer shown the "sign in to increase your limits" prompt — the free-tier upgrade chrome only renders for anonymous visitors (`#1767`) * **Fix**: the inspector CLI handles `--version` and unknown options and reads its version from `package.json`, so canary builds and CLI version output stay in sync (`#1722`) * **Update**: Bumped `vite` to 8.0.16 (`#1742`) * **Update**: Peer dependency on `mcp-use` moves to `>=1.33.0-canary.0` * **Update**: Updated mcp-use to v1.33.0 ## Hosted localhost chat & chat scroll helper Patch release paired with `mcp-use` v1.32.1 — hosted inspector chat falls back to browser-side streaming for loopback MCP servers and adds a scroll-to-bottom affordance in long chats. * **Fix**: Hosted inspector chat detects localhost and loopback MCP server URLs and uses client-side streaming because the managed cloud backend cannot reach a user's local server; the configure-key empty state explains why a personal API key is needed (`#1736`) * **New**: Centered animated scroll-to-bottom button appears when viewing older chat messages (`#1538`) * **Update**: Peer dependency on `mcp-use` moves to `>=1.32.1-canary.0` * **Update**: Updated mcp-use to v1.32.1 ## mcp-use v1.32.0 Major release paired with `mcp-use` v1.32.0 — peer dependency moves to `>=1.32.0-canary.0`; no inspector-specific runtime changes. * **Update**: Peer dependency on `mcp-use` moves to `>=1.32.0-canary.0` * **Update**: Updated mcp-use to v1.32.0 ## mcp-use v1.31.1 Patch release paired with `mcp-use` v1.31.1 — picks up workspace dependency alignment; no inspector-specific runtime changes. * **Update**: Updated mcp-use to v1.31.1 Release 9.0.0 ## OAuth credential lifecycle & mcp-use v1.31.0 Major release paired with `mcp-use` v1.31.0 — peer dependency moves to `>=1.31.0-canary.1`; explicit OAuth credential cleanup when removing a saved server. * **Fix**: delete-server passes `{ clearCredentials: true }` to `removeConnection` so an explicit user removal forgets persisted OAuth credentials instead of leaving tokens behind (`#1703`) * **Update**: Peer dependency on `mcp-use` moves to `>=1.31.0-canary.1` * **Update**: Updated mcp-use to v1.31.0 ## mcp-use v1.30.2 Patch release paired with `mcp-use` v1.30.2 — picks up the chalk CJS compatibility fix; no inspector-specific runtime changes. * **Update**: Updated mcp-use to v1.30.2 ## Widget status label pointer-events fix Patch release paired with `mcp-use` v1.30.1 - invoking/invoked labels in the MCP Apps preview pane no longer block iframe interactions. * **Fix**: MCP Apps preview status label used an absolutely positioned `h-full` wrapper that intercepted hover, click, and form controls along the left edge of the widget iframe; apply `pointer-events-none`, remove the full-height wrapper, and align the Apps SDK label in `OpenAIComponentRenderer` (`#1694`, `#1678`) * **Update**: Updated mcp-use to v1.30.1 ## mcp-use v1.30.0 Major release paired with `mcp-use` v1.30.0 - peer dependency moves to `>=1.30.0-canary.0`; no inspector-specific runtime changes. * **Update**: Peer dependency on `mcp-use` moves to `>=1.30.0-canary.0` * **Update**: Updated mcp-use to v1.30.0 ## mcp-use v1.29.1 Patch release paired with `mcp-use` v1.29.1 - picks up OAuth transport auth hardening and workspace security dependency bumps; no inspector-specific runtime changes. * **Update**: Updated mcp-use to v1.29.1 Release 7.0.0 ## Local LLM provider, image tool results & widget display modes Major release paired with `mcp-use` v1.29.0: chat against a local Ollama daemon, MCP image tool results forwarded to vision models as real images, an MCP-server reconnect banner, and a reworked widget fullscreen / picture-in-picture path - plus a large dead-code cleanup. * **New**: Ollama as a local LLM chat provider - local model discovery and streaming chat, talking to the daemon directly over CORS (no server-side proxy) with an `OLLAMA_ORIGINS` hint surfaced when the browser fetch is blocked (`#1395`) * **New**: MCP-server reconnect banner - chat recognises the cloud's `mcp_auth_required` 401 (e.g. an expired upstream OAuth token) and renders an inline reconnect banner for the affected server that refreshes the token in place, instead of pointing users at the Manufact account login (`#1485`) * **New**: copy button on user messages, matching the assistant-message UX (`#1556`) * **Enhancement**: `mcp-use client screenshot` auto-sizes to the widget's natural dimensions when `--width`/`--height` are omitted and handles external MCP server URIs (`ui:///.html`) (`#1579`) * **Enhancement**: snappier tab-switch animation timing (`#1544`) * **Fix**: MCP image tool results are forwarded to the model as real image content instead of base64-encoded JSON - image bytes route through each provider's vision channel (Anthropic `tool_result` image blocks; OpenAI / Google follow-up user turns), and text-only results now reach the model unwrapped (`#1487`) * **Fix**: widget fullscreen renders above embedded host chrome - native `requestFullscreen()` on the widget shell with an exit navbar, picture-in-picture portaled to `document.body` at `z-[100]`, and AppBridge reconnect after the sandbox iframe remounts (`#1605`) * **Fix**: stop `ToolInputForm` from writing an invalid per-property `required: boolean` onto the live tool `inputSchema` during render, which made Anthropic reject the chat request with `tools.0.custom.input_schema invalid` after a tool was opened in the Tools tab (`#1545`) * **Fix**: keep per-tab count badges visible and right-aligned in collapsed header tabs (`#1490`) * **Fix**: propagate server alias updates through the MCP server wrapper so the tile heading reflects a renamed alias immediately (`#1539`) * **Fix**: replace the trailing-slash regex in `normalizeOllamaBaseUrl` with a linear scan, resolving a CodeQL polynomial-regex alert (`#1534`) * **Chore**: add an OAuth redirect e2e against an emulated Google issuer, exercising both Direct and Via Proxy connection types (`#1481`, `#1609`) * **Chore**: remove 18 unused source files, stop generating the unused client-side `version.ts`, and drop dead barrel re-exports flagged by Knip (`#1510`, `#1533`, `#1607`) * **Update**: Updated mcp-use to v1.29.0 Release 6.0.0 ## Widget preview route & dark-mode scrollbars Major release paired with `mcp-use` v1.28.0: new `ViewPreview` component and `/preview/:view` client-side route that back the `mcp-use client screenshot` CLI pipeline, dark-mode aware scrollbars across the UI, and a cleanup of duplicate Knip-flagged exports. * **New**: `` internal component and `/preview/:view` client-side route — a chromeless surface the CLI screenshot pipeline drives via CDP. `MCPAppsRenderer` gains an optional `onReady` callback that the preview route uses to signal `body[data-view-ready="true"]`, which the CLI waits for before capturing. The preview route detects `globalThis.__mcpUsePreviewBundle` (injected by the CLI via CDP `Page.addScriptToEvaluateOnNewDocument`) and renders the widget inline, skipping the browser-side MCP connection entirely (`#1432`) * **Enhancement**: dark-mode aware scrollbars styled to match the inspector theme, with improved hover visibility (`#1484`) * **Fix**: removed the redundant default export of `JsonRpcLoggerView`; the named export is unchanged (`#1453`) * **Update**: Updated mcp-use to v1.28.0 ## MCP App width fix in chat Patch release paired with `mcp-use` v1.27.1: MCP App width is pinned in chat so only height responds to widget-reported sizes. * **Fix**: Pin MCP App width in chat - `onSizeChange` only updates height, and the inline transition no longer animates `width`; prevents the chat panel from collapsing when widgets report narrower content (`#1462`) * **Update**: Updated mcp-use to v1.27.1 Release 5.0.0 ## OpenRouter, pre-registered OAuth & telemetry env Major release paired with `mcp-use` v1.27.0: OpenRouter and OpenAI-compatible providers in chat configuration, pre-registered OAuth client credentials in the connection dialog, and `MCP_USE_ANONYMIZED_TELEMETRY` honored in browser telemetry. * **New**: OpenRouter as a first-class chat provider - a single OpenRouter API key fronts upstream OpenAI / Anthropic / Google models; internally reuses the OpenAI provider with an override base URL and the required `HTTP-Referer` / `X-Title` headers (`#1403`) * **New**: "OpenAI Compatible" entry in the chat provider dropdown - point inspector chat at any OpenAI-compatible API (LM Studio, Ollama, OpenRouter, etc.) with a required Base URL field and an optional API key; the standard OpenAI provider is unchanged (`#1437`) * **New**: `Client ID`, `Client Secret`, and `Scope` fields in the Authentication dialog wired through `addServer` / `updateServer` for pre-registered OAuth flows against providers that strip `registration_endpoint` from metadata (`#1400`) * **Fix**: Browser telemetry honors `MCP_USE_ANONYMIZED_TELEMETRY=false` - the inspector server mirrors the env var into `window.__MCP_USE_ANONYMIZED_TELEMETRY__` before the client bundle loads, so a single env var disables both `mcp-use`'s in-browser `posthog-js` and the inspector's own client telemetry (`#1443`) * **Update**: Updated mcp-use to v1.27.0 ## E2E alignment for Settings dropdown Patch release updating Playwright coverage for the command palette Settings entry after the navbar refactor; paired with `mcp-use` v1.25.2. * **Fix**: Command palette e2e test targets the Settings option via the dropdown trigger introduced in the inspector settings UX (`#1428`) * **Update**: Updated mcp-use to v1.25.2 ## OAuth single-tab flow, embed fixes & Hono detection Patch release fixing OAuth redirect flows, embedded `ChatTab` UI leaks, and Hono duck-type detection in `mountInspector`; paired with `mcp-use` v1.25.1. * **Fix**: OAuth authorization now opens in the current tab (`useRedirectFlow: true`, `preventAutoAuth: true`) and the callback navigates the same tab back - users no longer end up with two inspector tabs (`#1391`) * **Fix**: Store connection config in `sessionStorage` before OAuth redirect so auto-reconnect works after the callback without a `?autoConnect` param (`#1404`) * **Fix**: OAuth callback redirects back to the inspector with error parameters on failure (user denies, server error) instead of showing a raw error page; surfaced as a persistent app-level toast (`#1381`) * **Fix**: `mountInspector(app)` detects Hono via duck-typing (`.fetch(Request) => Response`) instead of `instanceof`, resolving crashes when the host and inspector resolve different Hono module records (`#1417`) * **Fix**: MCP App widget z-index - removed explicit `z-20`/`z-10` from sandboxed iframe wrappers so widgets scroll beneath the chat header instead of painting over it (`#1407`) * **Fix**: Free-tier upgrade UI (`Model & usage` dialog, model badge) is now opt-in via `enableFreeTierUpgrade` on `ChatTab` (default `false`) and is hidden for host-app embeds that manage their own session (`#1399`) * **Fix**: Suppress duplicate model chrome (landing pill, `ChatHeader` badge) when host passes `managedLlmConfig` + `hideModelBadge`; chat no longer auto-switches to client-side streaming when `localLlmConfig` exists in localStorage and the host owns the chat stream (`#1418`) * **Documentation**: `--no-open` CLI flag added to the inspector CLI reference (`#1397`) * **Update**: Updated mcp-use to v1.25.1 Release 3.0.0 ## Inline elicitation & social meta tags Major release paired with `mcp-use` v1.25.0: chat-initiated elicitation requests render inline in the chat thread, hosted inspector links get rich previews, and the peer dependency on `mcp-use` tracks the 1.25 OAuth refactor. * **New**: Elicitation requests triggered from the Chat tab render inline in the chat thread instead of routing users through a toast to the Elicitation tab; Tools-tab triggers keep the existing toast flow, and the Elicitation tab remains available as an audit view (`#1336`) * **New**: Links to the hosted inspector now render rich previews on Slack, X/Twitter, LinkedIn, Discord, and other platforms (`#1376`) * **Update**: Peer dependency on `mcp-use` moves to `>=1.25.0-canary.9` to pick up the OAuth DCR-direct refactor * **Update**: Updated mcp-use to v1.25.0 Release 2.2.0 ## Hosted chat runtime, LLM providers & chat export Minor release paired with `mcp-use` v1.24.2: first-party inspector LLM streaming (no LangChain on the chat path), copy/export chat, runtime hosted-chat URL, hosted free-tier chat, and cloud env tooling via the CLI (`#1372`). * **New**: First-party LLM providers for inspector chat (Anthropic, OpenAI, Google) with shared message formatting, SSE streaming, and tool loops - the inspector no longer depends on LangChain for chat (`#1372`) * **New**: "Copy Chat" and "Export Chat" in the chat header - markdown to clipboard; download as JSON or Markdown with tool calls in order (`#1324`) * **New**: Free tier chat on the hosted inspector (`#1368`) * **New**: Hosted chat URL from runtime config - inspector server reads `MANUFACT_CHAT_URL` and injects `window.__MANUFACT_CHAT_URL__`; `InspectorProvider` prefers that value and falls back to `VITE_MANUFACT_CHAT_URL` for local dev (`#1370`) * **Fix**: OAuth login popup - drop `noopener` and redirect `callbackURL` to `/inspector/oauth-popup-closed.html` so the popup self-closes instead of loading the full inspector (`#1370`) * **Update**: Updated mcp-use to v1.24.2 ## Navbar, theme & debug controls Minor release with MCP Apps debug theme toggle and navbar/settings UX improvements; dependency bump to `mcp-use` v1.24.1. * **New**: Theme toggle button in MCP Apps debug controls toolbar * **Enhancement**: Navbar - chat tab first with label and separator; `alwaysExpanded` on tab triggers so the active label stays visible when collapsed; Deploy links to manufact.com/signup with inspector referrer; tunnel control between Add to Client and Deploy with updated styling and mobile visibility; theme toggle, command palette, and GitHub under a settings dropdown; "Report a Bug" prefills a GitHub issue with the inspector label * **Update**: Updated mcp-use to v1.24.1 Release 2.0.0 ## Subpath OAuth, chat UX & tab persistence Major release paired with `mcp-use` v1.24.0: correct OAuth redirects when the inspector is served under `/inspector`, clearer chat streaming UI, and restored tab state after reload. * **Fix**: `McpClientProvider` receives `defaultCallbackUrl` so OAuth redirects target `/inspector/oauth/callback` (matches React Router `basename`); removes the authentication dialog "Redirect URL" field that was not wired to the live connection * **Fix**: Hide the thinking indicator when the assistant message already has rendered parts so the spinner does not linger after streaming completes * **Enhancement**: Persist the active inspector tab across page refresh * **Update**: Updated mcp-use to v1.24.0 ## Embedded inspector without LangChain Patch release fixing server routes that imported `telFetch` from the root `mcp-use` package. * **Fix**: Import `telFetch` from `mcp-use/telemetry/tel-fetch` so shared routes do not load the root entry (which eagerly pulls the agent graph); resolves embedded inspector failures when `langchain` is not installed * **Update**: Updated mcp-use to v1.23.1 Release 1.0.0 ## Stream protocol, aliases & chat tooling Major release with MCP stream support in chat, connection UX improvements, and dependency hardening. * **New**: MCP data stream protocol support in `ChatTab` and `useChatMessages` * **Enhancement**: `disabledTools` prop on `ChatTab` and `useChatMessages` for finer tool control * **New**: Editable MCP server aliases in connection settings; `updateServerMetadata()` from `McpClientProvider` updates display names without a full reconnect; shared `getServerDisplayName` across dashboard tiles, server dropdown, header actions, command palette, server info modal, and server icon * **Fix**: Alias-only edits no longer trigger a full reconnect; IME composition no longer submits the connection form when pressing Enter mid-composition * **Enhancement**: Persist tabs on refresh; sync URL `tab` query param when switching tabs so state survives reload * **Enhancement**: Tool-invocation serialization, screenshots, and message list refs for integrations such as manufact.build * **Update**: Removed unused `transportType` / `setTransportType` props from `ConnectionSettingsForm` * **Fix**: Tighter `pnpm` overrides and lockfile refresh for `pnpm audit`; `lodash` override in the mcp-apps scaffold template for standalone installs * **Update**: Vite 8.0.5, Hono 4.12.12, `@hono/node-server` 1.19.13 * **Update**: Updated mcp-use to v1.23.0 ## Dependency & bundling alignment Patch release aligning how `@mcp-use/inspector` packages `mcp-use` for bundling and shared types. * **Fix**: Restore `mcp-use` as both a `dependency` and `peerDependency` - tsup bundles non-React subpaths with transitive deps; `peerDependency` preserves shared `mcp-use`/`react` types with the host app * **Update**: Updated mcp-use to v1.22.3 ## Peer Dependency Alignment & MCP UI v7 Minor release aligning inspector dependency strategy for shared type safety and upgrading MCP UI client rendering internals. * **Fix**: Moved `mcp-use` from `dependencies` to `peerDependencies` in `@mcp-use/inspector` so consumers reuse a single `mcp-use` type instance (prevents pnpm duplicate-type TS2322 conflicts) * **Enhancement**: Upgraded `@mcp-ui/client` from v6 to v7 * **Enhancement**: Replaced removed legacy `UIResourceRenderer` path with sandboxed iframe rendering for legacy `ui://` resources * **Enhancement**: Removed remote-dom usage to align with upstream `@mcp-ui/client` v7 changes * **Update**: Updated mcp-use to v1.22.2 ## Chat History Tool Results & ErrorBoundary Customization Patch release improving chat history reconstruction so tool calls/results (including `structuredContent`) persist across turns, plus ErrorBoundary fallback/reporting hooks. * **Fix**: Preserve tool invocation context across chat turns - reconstruct assistant messages as `AIMessage` tool calls plus `ToolMessage` results; keep `structuredContent` and strip `_meta` before sending to the model * **Enhancement**: Chat message conversion supports tool results and multimodal content more reliably * **Enhancement**: `ErrorBoundary` now supports `fallback` (node or `(error) => node`) and `onError` for reporting (default UI unchanged) * **Update**: Updated mcp-use to v1.22.1 ## Tunnel Controls & Vite 8 Minor release with tunnel management for `mcp-use dev`, Vite 8 build stack, and elicit payload alignment with the MCP spec. * **New**: Start/stop the `mcp-use dev` tunnel from the Inspector * **Enhancement**: Vite 8.0 with Rolldown bundler and `@vitejs/plugin-react` 6 in the inspector build * **Fix**: Elicit - send `content` instead of `data` per the MCP spec; aligns with `createElicitMethod` validation on the client * **Update**: Updated mcp-use to v1.22.0 ## Dependency Updates Patch release with dependency updates. * **Fix**: Dependabot security alerts - updated vulnerable dependencies (hono, dompurify, etc.) * **Update**: Updated mcp-use to v1.21.5 ## Dependency Update Patch release with dependency update. * **Update**: Updated mcp-use to v1.21.4 ## Sandbox Host Fix Patch release fixing sandbox host derivation for cloud-embedded inspector pages. * **Fix**: Sandbox host derivation for cloud-embedded pages - apex hosts (e.g. manufact.com) now resolve to `sandbox-inspector.{domain}` instead of `sandbox-{domain}` * **Update**: Updated mcp-use to v1.21.3 ## Embedded Inspector Proxy Fix Patch release fixing auto-connect when inspector is served from MCP server (Python, custom servers). * **Fix**: Skip proxy when inspector origin matches MCP server origin - no longer routes through missing `/inspector/api/proxy` on embedded servers * **Fix**: Detect proxy availability via runtime config injection (`__MCP_PROXY_URL__`); disable autoProxyFallback when no proxy is available * **Update**: Updated mcp-use to v1.21.2 ## Chat Components & Dark Mode Fixes Patch release with exported chat component enhancements and proxy header handling. * **Fix**: Tools selection and attachment button icons invisible in dark mode * **Enhancement**: Strip infra headers from proxied requests * **New**: Initial messages support for exported chat components (`ChatTab`, `useChatMessages`) * **Update**: Updated mcp-use to v1.21.1 ## Inspector Embedding & MCP Apps Minor release with embedding support and logger improvements. * **New**: Inspector embedding support - build fix and `InspectorProvider` for embedded usage * **New**: MCP Apps support in `clientInfo.capabilities` - inspector advertises `io.modelcontextprotocol/ui` * **Enhancement**: Logger middleware filters noisy API endpoints (telemetry, RPC stream/log) * **Fix**: `--no-open` flag respected in standalone dev mode (was always opening browser) * **Update**: Updated mcp-use to v1.21.0 ## Dependency Update Patch release with dependency update. * **Update**: Updated mcp-use to v1.20.5 ## Embedded Chat Improvements Minor release improving embedded chat experience. * **Enhancement**: Improved embedded chat * **Update**: Updated mcp-use to v1.20.4 ## Standalone Deployment Fix Patch release fixing version import in standalone deployment. * **Fix**: Standalone deployment was importing the version from the wrong path * **Update**: Updated mcp-use to v1.20.3 ## Connection & Widget Display Improvements Patch release with useAutoConnect, MCPAppsRenderer, and chat agent fixes. * **Fix**: useAutoConnect now retains tile visibility on connection failure * **Enhancement**: MCPAppsRenderer and OpenAIComponentRenderer - improved border handling and status display; `prefersBorder` default set to false; status labels above widget in inline mode * **Enhancement**: ToolResultDisplay z-index for proper sticky layering * **Enhancement**: `exposeResourcesAsTools` and `exposePromptsAsTools` options in MCPAgentOptions; inspector chat tab sets both to `false` so agent only exposes actual MCP tools * **Update**: Updated mcp-use to v1.20.2 ## Widget Status Texts & CSP Fixes Patch release with invoking/invoked status display and CSP handling improvements. * **New**: Display of `invoking` and `invoked` status texts in MCPAppsRenderer, OpenAIComponentRenderer, ToolResultDisplay, ToolResultRenderer * **Enhancement**: MCPAppsDebugControls adjusts violation indicators based on CSP mode * **Fix**: sandbox-proxy strips existing CSP meta tags before injecting permissive CSP * **Update**: Updated mcp-use to v1.20.1 Release 0.22.0 ## Iframe Console & CSP Panel Minor release with Iframe Console enhancements and CSP violation handling. * **New**: Iframe Console with expandable logs, level filter, search, resizable height * **New**: Widget debug context for chat * **Enhancement**: MCP Apps debug controls (tool props JSON view, required props hint, SEP-1865 semantics) * **New**: CDN build * **Fix**: useSyncExternalStore first-render handling; reconnect logic; Tools tab sends only explicitly set fields; resource annotations include `_meta` * **New**: CSP violations panel with clear action; widget re-execution on CSP mode change; CSP mode for Apps SDK * **Update**: Updated mcp-use to v1.20.0 ## Dependency Update Patch release with dependency update. * **Update**: Updated mcp-use to v1.19.3 Release 0.21.0 ## Bulk Paste & Tool Definition Enhancements Minor release adding bulk paste functionality and enhanced tool definition handling. * **New**: Bulk paste functionality in ToolsTab - paste JSON or JavaScript object syntax directly * **New**: Auto-fill dialog to confirm updates when pasted data would overwrite existing values * **Enhancement**: ToolExecutionPanel now copies full tool definition * **Enhancement**: Added utility functions for parsing and converting JavaScript object syntax to JSON * **Enhancement**: Visual feedback for auto-filled fields in ToolInputForm * **Update**: Updated mcp-use to v1.19.2 ## MCPApps & Widget Improvements Patch release improving widget loading and iframe handling. * **Enhancement**: Improved MCPAppsRenderer loading logic and widget handling * **Enhancement**: Enhanced useWidget for better iframe lifecycle management * **Update**: Updated mcp-use to v1.19.1 Release 0.20.0 ## Chat Quick Questions & Enhanced UX Minor release with chat quick questions and followups, improved loading states, and developer experience enhancements. ### Chat Enhancements * **New**: Support for `chatQuickQuestions` and `chatFollowups` in ChatTab components ### Loading & Error Handling * **Enhancement**: MCPAppsRenderer shows loading spinner with `isReady` state management * **Enhancement**: Replaced shimmer with Spinner component for better initial widget load UX * **Enhancement**: Added skeleton loading state for widgets * **Enhancement**: Global error listeners and improved error logging in widget components ### Developer Experience * **New**: Copy all logs to clipboard feature * **Enhancement**: Enhanced theme handling in OpenAIComponentRenderer * **Enhancement**: ToolsList displays metadata and icons differentiating MCP/OpenAI tool types * **Fix**: Allow permissive CSP frame ancestors by default * **Fix**: Correct MIME type for mcp\_apps resource counting ### Dependencies * **Update**: Updated mcp-use to v1.19.0 Release 0.19.0 ## Tool Arguments, Streaming Input & Elicitation Enum Support Minor release with tool argument handling, streaming input support, and elicitation enum variants. * **New**: Tool argument type coercion and schema resolution (boolean, array, object); ToolsTab and ToolInputForm use new schema utilities; validation server tool and E2E tests for typed arguments * **New**: Partial tool input handling for streaming arguments in MCPAppsRenderer; MessageList and ToolResultRenderer support streaming states; useChatMessagesClientSide handles streaming tool call arguments; useWidget types for partial/streaming state * **New**: Elicitation support for SEP-1330 enum schema variants (single-select, multi-select); client and server handling; Elicitation tab docs and tests * **Fix**: Readiness state reset when widget URL changes in OpenAIComponentRenderer; improved tool output and response metadata handling for pending-to-ready transitions * **Update**: Updated mcp-use to v1.18.0 ## Log Noise Reduction Patch release reducing dev server log noise and aligning dependencies. * **Fix**: Reduced noisy logs in the dev server * **Update**: Updated mcp-use to v1.17.4 ## Widget Readiness & Iframe Global Sync Fixes Patch release focused on widget iframe lifecycle reliability and state update safety. * **Fix**: Reset widget readiness state when widget URL changes so new iframes re-initialize correctly * **Enhancement**: Improved tool output and response metadata transitions from pending to ready states * **Enhancement**: Queued iframe global updates until OpenAI globals are available for more reliable widget synchronization * **Fix**: Added animation frame cleanup logic to prevent memory leaks during component unmount * **Update**: Updated mcp-use to v1.17.3 ## Chat Conversion & Error Copy Fixes Patch release improving chat message conversion and copy behavior. * **Fix**: Copy button now copies actual error text instead of `null` * **Fix**: Chat message conversion now falls back to `parts` when `content` is empty, with improved attachment handling * **Enhancement**: Chat request streaming now uses external history for better context handling and to avoid duplicated messages * **Update**: Updated mcp-use to v1.17.2 ## Dependency Update Patch release aligned with mcp-use dependency updates. * **Update**: Updated mcp-use to v1.17.1 ## Iframe Embedding & Reverse Proxy Support Patch release with iframe embedding configuration, reverse proxy improvements, and widget rendering fixes. * **New**: `MCP_INSPECTOR_FRAME_ANCESTORS` environment variable to control which origins can embed the inspector in iframes via CSP `frame-ancestors` * **New**: `mountInspector` accepts `devMode` and `sandboxOrigin` options for deployment flexibility * **New**: Runtime config injection (`__MCP_DEV_MODE__`, `__MCP_SANDBOX_ORIGIN__` window globals) without rebuild * **Enhancement**: Server-side widget fetches convert external proxy URLs to localhost for correct content retrieval * **Enhancement**: Simplified widget asset URL rewriting for improved reverse proxy reliability * **Fix**: Infinite re-render loop in `MCPAppsRenderer` caused by excessive `useEffect` dependencies * **Update**: Updated mcp-use to v1.17.0 Release 0.18.4 ## E2E Testing & Refresh Features Patch release with comprehensive E2E testing infrastructure and enhanced UI functionality. ### E2E Testing Infrastructure * **New**: Comprehensive Playwright-based E2E test suite with full coverage for chat, connections, HMR, widgets, and command palette * **New**: GitHub Actions workflow (`.github/workflows/inspector-e2e.yml`) for automated E2E testing across multiple modes * **New**: Test fixtures for authentication servers (OAuth mock, API key, custom headers) * **New**: Test helpers for connection, authentication, and debugger tools * **New**: Test matrix for parameterized test scenarios across multiple inspector modes (mix, prod, builtin) * **New**: Widget examples for conformance testing (weather-display, status-card, display-info, apps-sdk-only-card) * **Enhancement**: Comprehensive E2E testing documentation in `tests/e2e/README.md` ### Testability Improvements * **Enhancement**: Added `data-testid` attributes across 40+ UI components for reliable element selection * **Enhancement**: Enhanced component accessibility for automated testing including connection forms, server list, command palette, chat interface, tool execution panels, resources/prompts/tools tabs, and elicitation/sampling displays ### UI Enhancements * **New**: Refresh buttons with loading states for Tools, Resources, and Prompts tabs * **New**: `ListTabHeader` component with refresh functionality and spinning icon animation * **Enhancement**: Manual refresh capability for primitives without reconnecting to server * **Fix**: Inspector now detects when `server=` query parameter contains a URL that's not already connected and automatically redirects to use `autoConnect=` instead * **Enhancement**: Added comprehensive URL parameters documentation page to inspector reference ### Widget Improvements * **Fix**: Widget pending state now correctly emulated to reflect ChatGPT behavior * **Enhancement**: MCPAppsRenderer and OpenAIComponentRenderer handle tool output and metadata more effectively * **Enhancement**: Immediate rendering of widgets even when results are pending * **Enhancement**: MessageList and ToolResultRenderer support immediate rendering of widget tools * **Enhancement**: Widget props support in ToolResultDisplay ### Server Improvements * **Enhancement**: Changed default port from 3001 to 3000 for production builds (dev still uses 3001) * **Enhancement**: Skip telemetry (PostHog/Scarf) when `NODE_ENV=test` or `MCP_USE_ANONYMIZED_TELEMETRY=false` * **New**: `start-auth-servers.ts` utility for running authentication test servers ### Dependencies * **Update**: Updated mcp-use to v1.16.4 ## Dependency Update Patch release with dependency updates. * **Update**: Updated mcp-use to v1.16.3 ## Inspector Fixes Patch release with widget behavior fix and improved URL handling. * **Fix**: Widget pending state now correctly emulated to reflect ChatGPT behavior * **Fix**: Inspector now detects when `server=` query parameter contains a URL that's not already connected and automatically redirects to use `autoConnect=` instead * **Update**: Updated mcp-use dependency to v1.16.2 ## Dependency Update Patch release aligned with mcp-use v1.16.1. * **Update**: Updated mcp-use dependency to v1.16.1 Release 0.18.0 ## Chat Prompts & Multimodal Support Minor release introducing prompts in chat and multimodal image support for vision-capable LLMs. ### Chat Prompts * **New**: Prompts in Chat - type / to open a prompt, run it, and include its result in the thread before sending * **Note**: Prompts with arguments are not yet supported in this release ### Multimodal Support * **New**: Image attachment support in Inspector chat * **New**: Upload and send images to vision-capable LLMs (GPT-4o, Claude, Gemini) using the paperclip button * **Enhancement**: MCP prompts that return images are now properly displayed instead of showing raw JSON * **Enhancement**: Full multimodal support for image content in chat interface ### Dependencies * **Update**: Updated mcp-use to v1.16.0 ## Theme URL Parameter Fix Patch release enabling dark mode through URL parameter. * **Fix**: Enable dark mode through theme URL parameter * **Update**: Aligned with mcp-use v1.15.3 ## HMR File Watcher Fix Patch release fixing file watcher resource exhaustion in containerized environments. * **Fix**: HMR file watcher exhausting inotify limits by properly ignoring node\_modules * **Fix**: Prevented ENOSPC errors in containerized environments caused by watching files inside `node_modules/` * **Update**: Aligned with mcp-use v1.15.2 ## Dependency Update Patch release with dependency updates. * **Update**: Updated mcp-use to v1.15.1 Release 0.17.0 ## MCP Apps Support & Landing Pages Major release introducing MCP Apps support with dual-protocol widget rendering and enhanced inspector capabilities. ### MCP Apps Support * **New**: Dual-protocol support enabling widgets to work with both MCP Apps and ChatGPT Apps SDK * **New**: `MCPAppsRenderer` component for advanced debugging and visualization * **New**: `MCPAppsDebugControls` component for widget debugging * **New**: Sandboxed iframe support with console logging and safe area insets for isolated widget rendering * **New**: Widget adapters (MCP Apps, Apps SDK) with protocol helpers for seamless cross-protocol compatibility ### Landing Pages * **New**: HTML landing page support for MCP server endpoints * **New**: Connection instructions for Claude Code, Cursor, VS Code, VS Code Insiders, and ChatGPT * **Enhancement**: Browser host normalization for server connections ### Bug Fixes & Security * **Fix**: MCP server landing now shows the external URL instead of the internal URL * **Fix**: Zod JIT compilation to prevent CSP violations in sandboxed environments * **Security**: Fixed vulnerabilities in dependencies ### Dependencies * **Update**: Updated mcp-use to v1.15.0 ## UI Enhancements & Connection Handling Patch release with improved UI components, widget security enhancements, and better connection management. ### UI Enhancements * **Enhancement**: CustomHeadersEditor with improved focus management and title prop support * **Enhancement**: Standardized proxy configuration - renamed `customHeaders` to `headers` in InspectorDashboard and ServerConnectionModal for consistency ### Widget Security * **Enhancement**: Widget security headers with frame domain support * **Enhancement**: Added `frame_domains` to widgetCSP interface for iframe embed control * **Enhancement**: Updated getWidgetSecurityHeaders to include frame\_domains in CSP for OpenAI compatibility * **Enhancement**: CSP handling in OpenAIComponentRenderer prioritizes metadata from tool results and resources ### Connection Handling * **Enhancement**: Improved server connection handling with new handleReconnect function * **Enhancement**: UI elements reflect connection states more accurately with better hover effects and error displays * **Enhancement**: Enhanced error handling for unauthorized connections with clearer user feedback * **Enhancement**: State management for connecting servers in InspectorDashboard ### Dependencies * **Update**: Aligned with mcp-use v1.14.2 improvements ## Tool Output Display Fix Patch release with tool output display improvement. * **Fix**: Inspector tool output now displays at full height for better content visibility * **Update**: Aligned with mcp-use v1.14.1 Release 0.16.0 ## RPC Message Management & LangChain Fixes Release with enhanced RPC message handling and critical bug fixes for Anthropic integration. ### RPC Message Management * **New**: Copy functionality for RPC messages in Prompts, Resources, and Tools tabs * **New**: Reusable `RpcPanel` component for consistent RPC message handling across tabs * **New**: Export functionality for RPC messages * **Enhancement**: Improved panel management with refactored ResizablePanel components ### Resource Properties Management * **New**: Custom properties support for resources - dynamically configure resource properties * **New**: `PropsSelect` component for intuitive property selection and management * **New**: `PropsConfigDialog` with AI-powered property suggestions using Claude * **New**: `SchemaFormField` component for rendering JSON schema-based forms * **New**: `usePropsLLM` hook leveraging Claude for intelligent property suggestions * **New**: `useResourceProps` hook for managing resource props state ### Inspector Improvements * **Enhancement**: Extracted MCP prompts logic into reusable `useMCPPrompts` hook * **Enhancement**: Server metadata display with website URLs and icons * **Enhancement**: Better tool management - cleared selected tools when removed from list * **Enhancement**: Enhanced `JSONDisplay` with improved line wrapping and font size for better readability * **Enhancement**: `ToolExecutionPanel` now includes collapsible description section * **Enhancement**: Integrated JSON metadata visualization in tool execution panel * **Enhancement**: `McpUIRenderer` and `OpenAIComponentRenderer` support `customProps` parameter * **Enhancement**: `ResourceResultDisplay` with dynamic property configuration UI * **Enhancement**: Enhanced Prism theme support for better code highlighting * **Enhancement**: Updated `useMcp` hook to expose `mcpServerUrl` for resource operations ### Bug Fixes * **Fix**: Resolved Anthropic `tool_use.id` required error with LangChain 1.3.10 update * **Fix**: Proper tool\_call ID generation ensuring unique IDs for all tool\_use blocks * **Fix**: Improved backward compatibility by checking both 'headers' and 'customHeaders' ### Dependencies * **Update**: `@langchain/anthropic` to 1.3.10 * **Update**: `@langchain/core` to 1.1.15 * **Update**: `langchain` to 1.2.10 * **Update**: `react-resizable-panels` to 4.4.1 ## Dependency Update Patch release with dependency updates. * **Enhancement**: Updated mcp-use dependency to latest version ## OAuth Proxy URL Handling Improvements Patch release with improved OAuth proxy URL handling and connection logic. * **Enhancement**: Improved OAuth proxy URL derivation from callback URLs * **Enhancement**: Better handling of root path callbacks in OAuth flow * **Enhancement**: Clearer separation between OAuth proxy URLs and connection URLs * **Fix**: Maintains valid OAuth tokens across sessions by not clearing OAuth storage before connecting ## URL Validation & LocalStorage Enhancements Patch release with URL validation improvements and localStorage functionality. * **Enhancement**: Automatically prepends "https\://" to URLs without protocol for better user experience * **Enhancement**: Improved URL validation logic in InspectorDashboard and ServerConnectionModal * **Enhancement**: Added localStorage clearing functionality for MCP-related items to help with troubleshooting * **Fix**: Enhanced localStorage checks to verify both existence and functional methods before usage * **Fix**: Clear stale OAuth storage before connecting to ensure fresh authentication flow Release 0.15.0 ## Chat Stop Functionality Minor release adding the ability to stop ongoing chat responses in the inspector. ### Chat Functionality * **New**: Stop functionality for chat responses - users can now abort streaming responses * **New**: Export stop function from `useChatMessagesClientSide` hook connected to `abortControllerRef` * **New**: `abortControllerRef` added to `useChatMessages` hook for proper abort control * **Enhancement**: Stop button connected to abort streaming responses for better user control ### UI & Authentication * **Enhancement**: Simplified authentication button logic in InspectorDashboard * **Enhancement**: Updated multi-server example to link directly to authentication URL * **Fix**: Updated dependency `hono` to 4.11.4 ## Dependency Update Patch release with dependency updates. * **Enhancement**: Updated mcp-use dependency to latest version ## OAuth & Metadata Enhancements Minor release with OAuth proxy support, metadata caching, and favicon improvements. ### OAuth & Client Info * **Enhancement**: Enhanced OAuth proxy to support gateway/proxy scenarios (e.g., Supabase MCP servers) * **Enhancement**: Client info support with branding displayed on OAuth consent pages * **Enhancement**: Server metadata caching for immediate display on reconnect - improves UX by showing server info instantly * **Enhancement**: Improved logging middleware for API routes with better debugging visibility * **Enhancement**: Enabled OAuth proxy logging for better flow visibility ### Favicon Detection * **Enhancement**: Enhanced favicon detector to try all subdomain levels (e.g., mcp.supabase.com → supabase.com → com) * **Enhancement**: Detection of default vs custom favicons using JSON API response * **Enhancement**: Prefer non-default favicons when available ### Bug Fixes * **Fix**: Remove import from "mcp-use" which causes langchain import in server * **Enhancement**: Enhanced synchronization for tools, prompts, and resources during HMR ## Connection Fix Patch release fixing autoconnect configuration parsing. * **Fix**: Autoconnect now correctly parses config objects in addition to string URLs ## Security Fixes & OAuth Improvements Patch release addressing multiple security vulnerabilities and fixing OAuth flow issues. ### Security Fixes * **Security**: Fixed 13 vulnerabilities (3 moderate, 10 high) * **Security**: Updated `langchain` to 1.2.3 (fixes serialization injection vulnerability) * **Security**: Updated `@langchain/core` to 1.1.8 (fixes serialization injection vulnerability) * **Security**: Updated `react-router` to 7.12.0 (fixes XSS and CSRF vulnerabilities) * **Security**: Added overrides for `qs` and `preact` vulnerabilities ### OAuth & Connection Improvements * **Fix**: Resolved OAuth flow looping issue by removing duplicate fallback logic * **Enhancement**: Simplified connection handling with consolidated state management * **Enhancement**: Enhanced OAuth authentication flow with improved connection settings * **Enhancement**: Improved auto-connect functionality with better proxy handling and error management * **Enhancement**: Enhanced theme toggling with dropdown menu for better UX and accessibility * **Enhancement**: Updated OAuth flow management in browser provider and callback handling Release 0.14.2 ## Automatic Proxy Fallback & Reconnect Minor release with automatic proxy fallback, OAuth proxy support, and reconnect functionality. ### Breaking Changes (with Deprecation Warnings) * **Breaking**: Renamed `customHeaders` to `headers` across all APIs. Old name still works but shows deprecation warnings. * **Breaking**: Renamed `samplingCallback` to `onSampling` for consistency. Old name still works but shows deprecation warnings. ### New Features * **New**: Reconnect functionality for failed connections - reconnect button in InspectorDashboard UI * **New**: Reconnect option in dropdown menu for failed connections * **New**: Configurable clientInfo support for MCP connection initialization with full metadata * **New**: Automatic Proxy Fallback - automatically retries failed connections through proxy * **New**: OAuth Proxy Support with oauthProxyUrl configuration ### Improvements * **Enhancement**: Better detection of OAuth discovery failures, CORS errors, and connection issues * **Enhancement**: OAuth provider uses original target URL for discovery, not proxy URL * **Enhancement**: HttpConnector automatic reconnection disabled, shifting responsibility to higher-level logic for better control ### Bug Fixes * **Fix**: Custom headers now correctly included when copying connection configuration from saved tiles * **Fix**: Headers correctly read from localStorage where stored in proxyConfig.customHeaders ## Security Update Patch release with security fixes and build improvements. * **Security**: Updated `@modelcontextprotocol/sdk` to 1.25.2 (fixes ReDoS vulnerability in UriTemplate regex patterns) * **Fix**: Updated building script to correctly export types for inspector/client components ## Multi-Server Support & Browser Compatibility Release with multi-server management, improved UI responsiveness, and enhanced browser compatibility. ### Breaking Changes * **Breaking**: Removed `winston` dependency. The logging system now uses a simple console logger that works in both browser and Node.js environments. ### Multi-Server Support * **New**: Multi-server management with `McpClientProvider` to manage multiple MCP server connections * **New**: Dynamic addition and removal of servers in React applications * **New**: Pluggable storage system with `LocalStorageProvider` and `MemoryStorageProvider` for flexible server configuration persistence * **Enhancement**: Refactored `useMcp` hook for better multi-server support * **Enhancement**: Removed obsolete `McpContext` (replaced with `McpClientProvider`) ### UI & UX Improvements * **Enhancement**: Improved UI responsiveness with enhanced mobile and tablet layouts and adaptive component visibility * **Enhancement**: Better server management with refactored server connection handling, improved icon display, and status tracking * **Enhancement**: Enhanced debugging with detailed logging in Layout and useAutoConnect components for better monitoring of server connection states * **Enhancement**: Simplified connection settings by removing deprecated transport types * **Enhancement**: Improved server icon support and component interactions * **Enhancement**: Added embedded mode support * **New**: Support for passing tab as query parameter for direct navigation * **New**: Prompt rendering support with enhanced display * **New**: Add to Client dropdown for quickly adding MCP servers to Cursor, VS Code, Claude Desktop, and CLI tools ### Browser Compatibility * **Enhancement**: Enhanced inspector components for better browser compatibility * **Enhancement**: Better configuration handling and MCP proxy integration * **Enhancement**: Improved browser-based MCP client with better connection handling ### Bug Fixes * **Fix**: Query URL handling in built mode now preserves arguments correctly * **Fix**: Server connection retrieval in `OpenAIComponentRenderer` to directly access connections array * **Fix**: Add client SDKs to add to client dropdown * **Fix**: Respect query tab parameter when existing server is already connected ## Documentation Updates - **Enhancement**: Updated examples and documentation to use preferred methods and APIs ## Bug Fixes - **Fix**: Widget props not picked up when using Zod schemas ## Session Management & Architecture Improvements Release aligned with mcp-use v1.11.0, featuring session management architecture and improved inspector capabilities. ### Breaking Changes * **Breaking**: WebSocket transport support removed. Use streamable HTTP or SSE transports instead. * **Breaking**: LangChain adapter moved from main entry point to `mcp-use/adapters` subpath. ### Session Management * **Enhancement**: Support for pluggable session management architecture with Redis support * **Enhancement**: Improved session persistence and connection handling * **Enhancement**: Better support for distributed deployments with cross-server notifications ### Inspector Features * **Enhancement**: Enhanced connection handling with automatic 404 handling and re-initialization * **Enhancement**: Improved tool, resource, and prompt management * **Enhancement**: Better integration with session management architecture * **Enhancement**: Enhanced debugging capabilities with better error handling ### Widget Support * **Enhancement**: Improved widget rendering and debugging for ChatGPT Apps * **Enhancement**: Better widget data handling and state management * **Enhancement**: Enhanced OpenAI component renderer with improved functionality ### UI Improvements * **Enhancement**: Better connection settings UI * **Enhancement**: Improved server management interface * **Enhancement**: Enhanced tool result display and formatting ## Dependency Updates - **Enhancement**: Updated dependencies ## Dependency Updates - **Enhancement**: Updated dependencies ## Dependency Updates - **Enhancement**: Updated dependencies ## Bug Fixes - **Fix**: Deno 3 compatibility fixes ## Bug Fixes - **Fix**: Updated Zod error handling ## Bug Fixes - **Fix**: Zod import in official SDK - **Enhancement**: Added repository metadata in package.json ## Elicitation Support & API Improvements Release aligned with mcp-use v1.10.0, featuring elicitation support and enhanced inspector capabilities. ### Breaking Changes * **Breaking**: Server API renamed `createMCPServer()` factory function to `MCPServer` class constructor * **Breaking**: Session API replaced `session.connector.tools`, `session.connector.callTool()`, etc. with direct methods: `session.tools`, `session.callTool()`, etc. * **Breaking**: OAuth environment variables standardized to `MCP_USE_OAUTH_*` prefix ### New Features * **New**: Elicitation support in inspector - servers can request user input through clients * **New**: Client Capabilities API with `ctx.client.can()` and `ctx.client.capabilities()` * **New**: Session Notifications API with `ctx.sendNotification()` and `ctx.sendNotificationToSession()` * **New**: Session Info API with `ctx.session.sessionId` to access current session ID * **New**: Resource Template Flat Structure support with `uriTemplate` directly on definition * **New**: Resource Template Callback Signatures supporting multiple signatures ### Improvements * **Enhancement**: Enhanced type inference for resource template callbacks * **Enhancement**: Client capabilities tracking during initialization * **Enhancement**: Major documentation refactoring and restructuring * **Enhancement**: Edge runtime support improvements * **Enhancement**: Transport bug fixes ## Elicitation Support - **New**: Added support for elicitation in inspector, enabling servers to request user input through clients - **Fix**: Transport bug fixes ## Dependency Updates - **Enhancement**: Updated dependencies ## Sampling Support - **New**: Added sampling support in inspector with LLM sampling capabilities - **Fix**: Long running sampling requests no longer timeout after 60 seconds - **Enhancement**: Better handling of extended sampling operations ## Dependency Updates - **Enhancement**: Updated dependencies ## Bug Fixes - **Fix**: Fixed bin entry issue for pnpm installation - **Enhancement**: Standardized import statement formatting across multiple files ## OAuth Authentication System Release with complete OAuth 2.0 support and enhanced inspector capabilities. ### New Features * **New**: Complete OAuth 2.0 authentication framework with built-in providers (Auth0, WorkOS, Supabase, Keycloak) * **New**: OAuth middleware and routes for server-side OAuth flow handling * **New**: OAuth callback component in inspector for authentication flows * **New**: Context storage with async local storage for request-scoped context * **New**: Response helpers for standardized HTTP responses and error handling * **New**: Runtime detection utilities for Node.js, Bun, and Deno environments ### Inspector Enhancements * **Enhancement**: Enhanced useMcp hook with improved connection management and OAuth support * **Enhancement**: Enhanced inspector dashboard with OAuth configuration UI * **Enhancement**: Better authentication flow handling with OAuth integration * **Enhancement**: Improved auto-connect with enhanced connection recovery * **Enhancement**: Enhanced HTTP connectors with OAuth token handling ### UI Improvements * **Fix**: Fixed scrolls in tools, resources, and prompts tab * **Fix**: Fixed models and API keys box in inspector chat * **Fix**: Fixed rendering of table, inline-code, code and images in inspector chat * **Fix**: Fixed padding of RPC panels * **New**: Added enum input display for tools * **Enhancement**: Bundle minification (9.7mb → 4.2 mb) ### Bug Fixes * **Fix**: Switched to fork SDK to fix Zod errors on Deno runtime * **Fix**: Optimized dependencies ## Dependency Updates - **Enhancement**: Updated dependencies ## Dependency Updates - **Enhancement**: Updated dependencies ## Bug Fixes - **Fix**: Fixed auto-connect proxy fallback behavior - **Fix**: Fixed connection config updates not applying when connection already exists - **Enhancement**: Auto-switch (proxy fallback) now automatically enabled during auto-connect flow - **Enhancement**: Improved error messages for connection failures ## Notifications, Sampling & OpenAI Apps SDK Integration Release with bidirectional notifications, LLM sampling, and comprehensive OpenAI Apps SDK support. ### New Features * **New**: Bidirectional notification support between clients and servers * **New**: LLM sampling capabilities allowing MCP tools to request completions from connected clients * **New**: Widget build ID support for cache busting in widget UI resources * **New**: Inspector notifications tab with real-time display * **New**: Server capabilities modal showing supported MCP features * **New**: RPC message logging support in inspector ### OpenAI Apps SDK Integration * **New**: McpUseProvider component combining React setup (StrictMode, ThemeProvider, BrowserRouter, ErrorBoundary) * **New**: WidgetControls component with debug overlay and view controls (fullscreen, PIP) * **New**: useWidget hook for type-safe React adapter to OpenAI Apps SDK API * **New**: ErrorBoundary component for graceful error handling * **New**: Image component handling data URLs and public file paths * **New**: ThemeProvider for consistent theme management * **New**: WidgetInspectorControls for inspector-specific debugging * **New**: Console proxy toggle for iframe console logs * **New**: Product search result widget template with carousel and accordion components * **New**: Folder-based widget support with automatic detection * **New**: Public folder support for static assets ### Inspector Enhancements * **Enhancement**: Enhanced OpenAIComponentRenderer with better height calculation and theme support * **Enhancement**: Enhanced ToolResultDisplay with multiple content types (text, image, audio, resource links) * **Enhancement**: Resizable panels with collapse support * **Enhancement**: Better widget security headers and CSP configuration * **Enhancement**: Enhanced widget data handling and state management ### Improvements * **Enhancement**: Refactored HTTP transport to reuse sessions across requests * **Enhancement**: Session management with tracking and automatic cleanup * **Enhancement**: Roots support in connectors and session API * **Enhancement**: Enhanced search\_tools with metadata * **Enhancement**: Improved SSR configuration with proper Vite settings ### Bug Fixes * **Fix**: Fixed iframe height calculation issues * **Fix**: Fixed theme flashing on widget load * **Fix**: Fixed CSP header generation for dev mode * **Fix**: Fixed asset loading in dev widget proxy * **Fix**: Fixed console logging in iframe * **Fix**: Fixed widget state inspection * **Fix**: Fixed resizable panel collapse behavior ## Bug Fixes & Improvements - **Fix**: Fixed auto-connect proxy fallback behavior - **Fix**: Fixed connection config updates not applying when connection already exists - **Enhancement**: Auto-switch (proxy fallback) now automatically enabled during auto-connect flow - **Enhancement**: Improved error messages for connection failures ## Code Mode Support - **New**: Code Mode feature allowing agents to execute code using MCP tools - **Enhancement**: Enhanced MCPClient with code execution configuration - **Enhancement**: Comprehensive tests for code execution functionality ## Bug Fixes - **Fix**: Various bug fixes and improvements ## Edge Runtime Support - **Major**: Migrated to Hono framework for edge runtime support - **New**: Runtime detection for Deno and Node.js environments * **New**: Enhanced inspector dashboard with improved connection handling - **Enhancement**: Better auto-connection logic with error handling and retry mechanisms ## Bug Fixes & Improvements - **Fix**: Various bug fixes and stability improvements - **Enhancement**: Dependency updates ## Bug Fixes & Improvements - **Fix**: Various bug fixes and stability improvements - **Enhancement**: Dependency updates ## Bug Fixes - **Fix**: Various bug fixes and improvements ## LangChain 1.0.0 Support - **Major**: Support for LangChain 1.0.0 - **Fix**: Model type compatibility for LangChain 1.0.0 - **Enhancement**: Set CLI and inspector as dependencies ## Dependency Updates - **Enhancement**: Updated dependencies ## Dependency Updates - **Enhancement**: Updated dependencies ## Dependency Updates - **Enhancement**: Updated dependencies ## Dependency Updates - **Enhancement**: Updated dependencies ## Dependency Updates - **Enhancement**: Updated dependencies ## Dependency Updates - **Enhancement**: Updated dependencies ## Dependency Updates - **Enhancement**: Updated dependencies ## Dependency Updates - **Enhancement**: Updated dependencies ## Bug Fixes - **Fix**: Fixed inspector chat formatting ## Bug Fixes - **Fix**: Fixed inspector chat - **Fix**: Fixed inspector shadow ## Major Refactoring & Apps SDK Support Major refactoring with improved architecture and enhanced Apps SDK support. ### Major Refactoring * **Refactor**: Server architecture refactored with major improvements to routing and middleware * **Refactor**: Removed legacy `mcp-inspector.ts` file in favor of modular architecture * **Refactor**: Added new `cli.ts` for improved command-line interface handling * **Refactor**: Added `utils.ts` and `shared-utils-browser.ts` for better code organization * **Refactor**: Enhanced `shared-routes.ts` with improved route handling and error management ### Apps SDK Support * **Enhancement**: Enhanced widget data handling and state management * **New**: Added `readResource` method in MCPInspector for fetching resources based on server ID * **Enhancement**: Enhanced OpenAI component renderer to utilize serverId and readResource * **Enhancement**: Improved safe data serialization for widget state management ### UI/UX Improvements * **Enhancement**: Enhanced ConnectionSettingsForm with copy configuration feature * **Enhancement**: Updated OpenAIComponentRenderer to dynamically adjust iframe height * **Enhancement**: Improved resource display with duration metrics and enhanced badge styling * **Enhancement**: Enhanced LayoutHeader with dynamic badge styling * **Fix**: Fixed scrollable tool parameters for better user experience * **Enhancement**: Added mobile-responsive hiding features ### Bug Fixes * **Fix**: Fixed inspector mounting logic by simplifying server URL handling * **Fix**: Fixed linting issues across multiple components * **Fix**: Fixed server configuration for improved stability ## Auto-Connection & Multi-Server Support - **New**: Auto-connection functionality - inspector now automatically connects to MCP servers on startup * **New**: Multi-server support - enhanced support for connecting to multiple MCP servers simultaneously - **New**: Client-side chat functionality with improved message handling - **New**: Resource handling with enhanced chat components - **Enhancement**: Streamlined routing with refactored server and client routing - **Enhancement**: Enhanced connection handling with improved auto-connection logic - **Enhancement**: Better UI components with updated Layout, ChatTab, and ToolsTab components - **Fix**: Fixed connection handling in InspectorDashboard - **Fix**: Improved error messages in useMcp hook ## Bug Fixes - **Fix**: Minor fixes and improvements ## Major Refactor & Apps SDK Initial Integration Major refactor aligning inspector with mcp-use TypeScript package and initial Apps SDK integration. ### Major Refactoring * **Refactor**: Migrated from CommonJS to ESM format * **Refactor**: Added input validation for port and URL * **Refactor**: Improved error handling and logging * **Refactor**: Added `open` package for cross-platform browser launching * **Refactor**: Reorganized component structure (moved to `src/client/components/`) * **Refactor**: Refactored ChatTab to use streaming API and custom hooks * **Refactor**: Enhanced InspectorDashboard with auto-connect functionality * **Refactor**: Improved CommandPalette with better item selection * **Refactor**: Updated routing to use query parameters ### New Components * **New**: Chat components: `AssistantMessage`, `UserMessage`, `ToolCallDisplay`, `MCPUIResource`, `MessageList` * **New**: UI components: `aurora-background`, `text-shimmer`, `sheet`, `switch`, `kbd`, `shimmer-button`, `status-dot` * **New**: Form components: `ConnectionSettingsForm`, `ServerDropdown` * **New**: Tool components: `ToolExecutionPanel`, `ToolResultDisplay`, `SaveRequestDialog` * **New**: Resource components: `ResourceResultDisplay`, `ResourcesList` ### Apps SDK Integration * **New**: OpenAI Apps SDK integration with UI resource type * **New**: Enhanced MCP-UI adapter for Apps SDK metadata * **New**: Resource URI format supporting `ui://widget/` scheme ### Bug Fixes * **Fix**: Fixed CLI binary format and package configuration * **Fix**: Changed CLI build format from CommonJS to ESM * **Fix**: Added input validation for port and URL arguments * **Fix**: Improved error logging in API routes * **Fix**: Fixed async/await bugs in static file serving # CLI Usage Source: https://docs.mcp-use.com/inspector/cli Run the MCP Inspector from the command line The MCP Inspector can be run directly from the command line using `npx`, making it easy to quickly inspect and debug MCP servers without installing anything globally. ## Quick Start Run the inspector with a single command: ```bash theme={null} npx @mcp-use/inspector ``` This will: * Start the inspector server on an available port (default: 8080) * Automatically open your browser to the inspector interface * Display the URL in the terminal ## Command Options ### `--url ` Auto-connect to an MCP server when the inspector starts. ```bash theme={null} npx @mcp-use/inspector --url http://localhost:3000/mcp ``` ### `--port ` Specify the starting port number. The inspector will find the next available port if the specified port is already in use. ```bash theme={null} npx @mcp-use/inspector --port 9000 ``` **Default:** `8080` **Port Range:** Must be between 1 and 65535 ### `--no-open` Prevent the inspector from automatically opening a browser tab when it starts. Useful in CI/CD pipelines, headless environments, or when you prefer to open the URL manually. ```bash theme={null} npx @mcp-use/inspector --no-open ``` You can combine it with other flags: ```bash theme={null} npx @mcp-use/inspector --url http://localhost:3000/mcp --port 9000 --no-open ``` ### `--help, -h` Display help information and available options. ```bash theme={null} npx @mcp-use/inspector --help ``` ## Environment Variables ### `MCP_INSPECTOR_FRAME_ANCESTORS` Configure which origins can embed the inspector widget in iframes. This is useful when embedding the inspector into your own application or when testing widgets from different domains. **Default behavior:** * **Development mode**: `*` (allows all origins for easier development) * **Production mode**: `'self'` (same-origin only for security) **Format:** Space-separated list of origins or `*` for all origins **Examples:** ```bash theme={null} # Allow embedding from specific domains MCP_INSPECTOR_FRAME_ANCESTORS="https://app.example.com https://dev.example.com" npx @mcp-use/inspector # Allow embedding from any domain (useful for development) MCP_INSPECTOR_FRAME_ANCESTORS="*" npx @mcp-use/inspector # Multiple origins with wildcards MCP_INSPECTOR_FRAME_ANCESTORS="https://*.example.com http://localhost:*" npx @mcp-use/inspector ``` In production deployments, it's recommended to explicitly list allowed origins rather than using `*` to prevent unauthorized embedding. When running in development mode (`npm run dev`), the inspector automatically allows all origins by default, so you don't need to set this variable unless you want to test production CSP policies. ### `MCP_URL` Set the external base URL for your MCP server. This is useful when running behind a reverse proxy (ngrok, E2B sandboxes, Cloudflare tunnels) where the public URL differs from `localhost`. When set, the CLI will use this URL for widget asset URLs and Vite HMR WebSocket connections, ensuring everything works correctly through the proxy. **Default behavior:** * If not set, the CLI generates a `localhost` URL automatically * If set, the CLI preserves your value and does not overwrite it **Examples:** ```bash theme={null} # ngrok tunnel MCP_URL=https://abc123.ngrok.io npx @mcp-use/cli dev # E2B sandbox MCP_URL=https://3000-abc123.e2b.app npx @mcp-use/cli dev # Cloudflare tunnel MCP_URL=https://my-tunnel.trycloudflare.com npx @mcp-use/cli dev ``` When using a reverse proxy, set `MCP_URL` to the public-facing URL. This ensures widget hot-reload (HMR) and asset loading work correctly through the proxy. ## Related Documentation * [Getting Started](/inspector/index) - Overview of the inspector * [Connection Settings](/inspector/connection-settings) - Advanced connection configuration * [Mount the Inspector](/inspector/integration) - Serve the Inspector from an app # Command Palette Source: https://docs.mcp-use.com/inspector/command-palette Search Inspector servers, tools, prompts, resources, saved requests, and client setup actions. Press `Cmd/Ctrl + K` to open the command palette from anywhere in the Inspector. It searches the current Inspector state and lets you jump directly to the item you choose. ## What you can open The command palette searches: * connected servers by display name or URL * tools by name, description, and server * prompts by name, description, and server * resources by name, URI, and server * saved tool requests * global navigation actions * Add to Client actions for supported clients Search is fuzzy, so partial words usually work. For example, `lin iss` can match a Linear issue tool if that tool is connected. ## Run a tool from search Use the command palette when you know the tool name and want to skip tab navigation. 1. Press `Cmd/Ctrl + K`. 2. Type the tool name or part of its description. 3. Select the tool. 4. Fill the generated input form. 5. Run the tool. The Inspector opens the Tools tab with that tool selected. ## Load a saved request Saved requests appear in their own results category. Select one to open the matching tool with its saved arguments already loaded. Use saved requests for repeatable calls such as regression checks, widget test cases, or long input payloads. ## Switch servers When more than one server is connected, search by server display name or URL. Selecting a server opens that server's Inspector view. Display names are useful here. Rename saved servers from [Connection settings](/inspector/connection-settings) when several URLs are hard to scan. ## Add a server to a client Add to Client commands appear when a connected server can be installed or copied into a supported client. Search for the client name, then choose the matching action. Depending on the client, the action may open a deep link, download a configuration file, or copy a command to the clipboard. ## Keyboard controls | Key | Action | | - | - | | `Cmd/Ctrl + K` | Open the command palette. | | `Up` / `Down` | Move through results. | | `Enter` | Open the selected result. | | `Esc` | Close the palette. | For the full shortcut reference, see [Keyboard shortcuts](/inspector/keyboard-shortcuts). # Connection settings Source: https://docs.mcp-use.com/inspector/connection-settings Choose how the Inspector connects to an MCP server. Most servers work with only a transport and URL. Change connection settings when the browser cannot reach the server directly, when you want clearer names for saved servers, when OAuth needs pre-registered credentials, or when long-running tools need more time. ## Choose Auto, Direct, or Via Proxy The Inspector uses **Auto** mode by default: it tries a direct browser connection first, then falls back to the configured Inspector proxy if direct access fails because of CORS or network policy. | Connection mode | Use it when | Avoid it when | | - | - | - | | **Auto** | You want the Inspector to try Direct first and fall back to the proxy when needed. | You need to test one specific connection path. | | **Direct** | The server is local, public, or reachable from your browser. | The browser blocks the request because of CORS or network policy. | | **Via Proxy** | The browser is blocked by CORS, or you need to test proxy behavior. | The server works directly; proxying adds another moving part. | ## Name saved servers Set a display name when several saved servers have similar URLs. Changing only the display name updates labels in the dashboard, server list, header, command palette, and server picker. It does not reconnect the server or clear auth tokens. ## Add headers only when the server requires them Use custom headers for server-specific requirements such as bearer tokens, API keys, or version headers. Header values are used for the live connection only. They are intentionally not saved or restored after a reload, so supply them again at runtime. Prefer OAuth when the server supports it. Copy Config includes current form values. Remove OAuth tokens, API keys, and other secrets before sharing exported configuration. ## Configure OAuth By default the inspector relies on Dynamic Client Registration (DCR), so no credentials are needed. Use the Authentication dialog when the upstream auth server doesn't expose `registration_endpoint` (common for proxy-mode servers fronting Slack, WorkOS, or GitHub). OAuth client secrets are runtime-only and are not restored after a reload. | Field | When to set it | | - | - | | Client ID | Use a pre-registered OAuth client instead of DCR. | | Client Secret | Use a confidential client; the SDK switches token endpoint auth away from `none`. | | Scope | Request a provider-specific space-separated scope list. | When a server protects the whole connection, it enters `pending_auth`. Click **Authenticate**, complete the provider flow, and return to the Inspector. If a popup is blocked, use the open-auth-page fallback link. Mixed-auth servers behave differently: the anonymous connection remains `ready`, and the Inspector shows **This server is using mixed auth** with an **Authenticate** action. Public operations remain available. You can authenticate up front, or wait for a protected tool, resource, or prompt to return a wire-level OAuth challenge and then authenticate. The classification comes from RFC 9728 protected-resource metadata discovered by the official MCP SDK after a successful anonymous connection. The Inspector does not use host-specific rules or interpret tool-level `isError` text as an OAuth challenge. Browser OAuth session values are encrypted at rest with AES-256-GCM. The non-extractable origin key is kept in IndexedDB, while versioned ciphertext envelopes remain in localStorage so popup storage events and reload persistence continue to work. ## Configuration Import/Export Use **Copy Config** to export the current connection form as JSON. Paste JSON into the URL field to populate the form in another Inspector instance. Example configuration: ```json theme={null} { "url": "https://mcp.example.com/mcp", "transportType": "http", "connectionMode": "auto", "headers": { "Authorization": "Bearer token123" }, "requestTimeout": 10000, "resetTimeoutOnProgress": true, "maxTotalTimeout": 60000, "oauth": { "clientId": "your-client-id", "clientSecret": "your-client-secret", "scope": "read write" } } ``` The paste detection only works in the URL field. Remove OAuth tokens, API keys, and other secrets before sharing a copied config. ## URL and tabs The Inspector keeps the active tab in the page URL (`?tab=...`). Switching tabs updates the query string so a refresh or shared link restores the same view. ## Tune timeouts for long work Use timeout settings only when a valid tool call or resource read needs more time. | Setting | Default | What it controls | | - | - | - | | Request timeout | `10000` ms | Time allowed for one request. | | Maximum total timeout | `60000` ms | Total time allowed across retries and progress updates. | If a request times out, first confirm the server eventually responds. Then raise the timeout to match the expected tool runtime. # Debug widgets in the Inspector Source: https://docs.mcp-use.com/inspector/debugging-chatgpt-apps Test MCP Apps widgets, ChatGPT compatibility, layout, CSP, and widget data in the Inspector. Use the Inspector to debug a widget before you try it in a production host. The fastest loop is: connect your server, run the tool that returns the widget, inspect the widget data, then test layout, display modes, and CSP. For building widgets, start with [Build widgets](/typescript/mcp-apps/widgets). For hook fields and host actions, use the [`useWidget()` API reference](/typescript/api-reference/react/usewidget). ## Connect the widget server Run your mcp-use app locally: ```bash theme={null} npm run dev ``` Open `http://localhost:3000/mcp/inspector` and connect to `http://localhost:3000/mcp`. If the server is remote, connect to its MCP endpoint instead. Use **Direct** first, then try **Via Proxy** only when the browser cannot reach the server directly. ## Run the widget-returning tool Open the **Tools** tab, select the tool that returns the widget, and run it with a small input. The widget should render below the tool result. The raw result should include the widget metadata and the structured data passed to the widget. If the tool succeeds but no widget renders, check these values first: * `widget.name` in the server tool definition * the matching folder under `resources/` * the tool result metadata that points to the widget resource * browser console errors from the widget iframe ## Switch protocols when compatibility matters The Inspector can test MCP Apps behavior and ChatGPT Apps SDK compatibility for widgets that support both runtimes. Use the protocol toggle when it appears: | Protocol | What it tests | | - | - | | **MCP Apps** | The standard MCP Apps bridge over `postMessage`. | | **ChatGPT Apps** | ChatGPT compatibility behavior, including Apps SDK-style host globals. | Prefer `useWidget()` and other `mcp-use/react` hooks in widget code. They abstract over the runtime differences that the Inspector is testing. See [Apps SDK compatibility](/typescript/mcp-apps/apps-sdk-compatibility) when you need ChatGPT-specific behavior. ## Inspect props, output, metadata, and state Use the widget debug panels to confirm what the widget receives. | Data | What to verify | | - | - | | `props` | The structured data the widget renders. | | `output` | The raw structured tool output, when exposed separately. | | `metadata` | Widget-only metadata such as timestamps, cache info, or host hints. | | `state` | Persisted widget state after user interactions. | | tool input | Arguments passed to the tool that produced the widget. | When `props` are missing, compare the server's `outputSchema` with the widget's expected prop shape. They should describe the same fields. ## Test layout and display modes Use the debug controls to test the widget in the contexts a host may provide. Check: * inline, picture-in-picture, and fullscreen display modes * desktop, tablet, and mobile sizing * touch and hover behavior * light and dark themes * locale and timezone-dependent formatting * safe-area insets for mobile layouts The host may grant a different display mode than the widget requests. Read `displayMode` from `useWidget()` when the current mode matters. ## Test Content Security Policy Use the widget-declared CSP mode before shipping a widget that loads external APIs, images, scripts, styles, or embeds. If the widget works in permissive mode but fails with widget-declared CSP, update the widget CSP configuration. See [Content Security Policy](/typescript/mcp-apps/content-security-policy) for the server and widget settings. ## Use console output Open browser DevTools while the widget is rendered. Console messages from the widget iframe help identify runtime errors, blocked requests, CSP violations, missing props, and failed tool calls. Keep console output intentional. Log the minimum state needed to debug the widget, then remove noisy logs before release. ## Test the widget in chat After the tool works directly, open the **Chat** tab and ask the model to use the tool. Use chat to verify end-to-end behavior: * the model chooses the right tool * the tool receives valid arguments * the model-visible text output is useful * the widget renders with the same structured data * widget actions such as tool calls, state updates, follow-up messages, and display-mode requests behave as expected Use the Tools tab again when you need to isolate whether a failure is in the tool, widget, or model behavior. ## Troubleshoot missing widgets If no widget appears, start with the smallest failing case. | Symptom | Check | | - | - | | Tool result appears, but no widget appears. | Confirm `widget.name` matches a folder under `resources/`. | | Widget frame appears blank. | Check iframe console errors and missing required props. | | Widget loads in permissive CSP only. | Add the required domains to widget CSP. | | ChatGPT protocol fails, but MCP Apps works. | Check [Apps SDK compatibility](/typescript/mcp-apps/apps-sdk-compatibility). | | A widget action fails. | Verify the tool name, arguments, auth state, and iframe console logs. | ## Next steps * Use [Build widgets](/typescript/mcp-apps/widgets) to review the server and widget structure. * Use [Interactivity](/typescript/mcp-apps/interactivity) to add tool calls, state, follow-up messages, and display controls. * Use [`useWidget()`](/typescript/api-reference/react/usewidget) for the full hook reference. # Inspector Source: https://docs.mcp-use.com/inspector/index Connect to an MCP server, run tools, inspect resources and prompts, and debug widgets. Use the Inspector when you need to test an MCP server from the browser. It lets you connect to a server, call tools with typed inputs, inspect resources and prompts, try chat, preview widgets, and copy client setup commands. [Try this live](https://inspector.mcp-use.com) MCP Inspector dashboard If your server was created with `mcp-use`, run the dev server and open the local Inspector: ```bash theme={null} npm run dev ``` The default local URLs are: | URL | Purpose | | - | - | | `http://localhost:3000/mcp` | MCP endpoint | | `http://localhost:3000/mcp/inspector` | Inspector UI | You can also open the hosted Inspector at [inspector.mcp-use.com](https://inspector.mcp-use.com) or run it with [`npx @mcp-use/inspector`](/inspector/cli). ## Connect to a server Add a server from the dashboard. Choose the transport, enter the MCP endpoint URL, and click **Connect**. Inspector connection form For most local and public HTTP servers, use **Direct**. Use **Via Proxy** only when the browser cannot reach the server directly because of CORS or network policy. See [Connection settings](/inspector/connection-settings) for the short decision guide. When a server protects the whole MCP endpoint with OAuth, the connection waits for authentication. Click **Authenticate**, complete the provider approval, and return to the Inspector. A mixed-auth server connects anonymously because its public tools are already usable. If it publishes OAuth protected-resource metadata, the server card and header show **This server is using mixed auth** with an **Authenticate** button. You can authenticate immediately or wait until a protected operation returns a wire-level OAuth challenge. The connection stays available for public operations while authentication is optional. ## Run a tool Open a connected server and select the **Tools** tab. Choose a tool, fill the generated form, and run it. Inspector server detail view with tools The Inspector shows the tool result, structured content, errors, and any widget returned by the tool. Use this view to verify schema validation, result shape, and widget data before testing the same server from a client. For mixed-auth servers, a protected tool can surface the authentication action only when it is needed. Authenticate, then retry the protected call. A normal MCP tool result with `isError: true` is still shown as a tool error; the Inspector does not infer OAuth from its text. ## Inspect resources and prompts Use **Resources** to read server-provided content by URI. Use **Prompts** to test reusable prompt templates with arguments. These tabs are useful when a client reports missing context. They show what the server actually exposes after connection and auth. ## Inspect Skills over MCP **Skills** is always present in the Inspector navigation. When a server does not advertise the experimental `io.modelcontextprotocol/skills` extension, the tab is disabled, like Sampling, with an explanation that Skills over MCP is not available from that server. When the extension is available, each skill appears as a folder containing its `SKILL.md` and supporting resources. When the extension is advertised but its catalog is empty, the tab is shown as a red error state and disabled, with a tooltip explaining that the server returned no skills. Select a file to read it on demand. Before previewing it, the Inspector verifies the raw SHA-256 digest advertised by the skill manifest. For `SKILL.md`, it also checks that the parsed YAML frontmatter matches the catalog entry. A digest mismatch blocks the preview instead of passing changed content to the user or model. Markdown, safe text, raster images, audio, and video have inline previews. Scripts, HTML, SVG, and other binary files are never executed; you can explicitly download verified files when needed. ## Try chat Use **Chat** to test how an LLM calls your server's tools in a conversation. The chat view can use hosted chat where available or a provider key stored in your browser. Keep chat testing focused on end-to-end behavior. Use the Tools tab first when you need to isolate input schemas, tool errors, or widget rendering. For servers that advertise Skills over MCP, chat receives a compact catalog of each skill's name, description, origin, and URI. When a skill is relevant, the chat host loads its `SKILL.md` and supporting resources lazily through the server's Skills over MCP and resource methods. It verifies each resource against the manifest's raw SHA-256 digest before making it available to the model. The Inspector never executes skill scripts or lets `allowed-tools` widen the selected MCP tool permissions. Skills over MCP remains experimental. Treat remote skill content as untrusted and review it before relying on its instructions. See the [working group](https://modelcontextprotocol.io/community/working-groups/skills-over-mcp), [SEP-2640](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2640), and [Agent Skills specification](https://agentskills.io/specification). ## Debug widgets When a tool returns an MCP App widget, the Inspector renders it below the tool result and exposes widget debug controls. Use the widget view to check: * the `props`, `output`, and metadata passed to the widget * inline, picture-in-picture, and fullscreen display modes * desktop, tablet, and mobile layout behavior * theme, locale, timezone, hover, touch, and safe-area settings * Content Security Policy behavior before trying the widget in a host See [Debug widgets in the Inspector](/inspector/debugging-chatgpt-apps) for the full workflow. ## Add the server to a client After a server connects, use **Add to Client** to install or copy setup for supported clients such as Cursor, VS Code, Claude Desktop, Claude Code, Gemini CLI, and Codex CLI. Add to Client dropdown in the Inspector The Inspector uses the active connection settings when it prepares the client setup. Confirm the server URL and connection name before copying commands or opening client deep links. ## Command Palette Press `Cmd/Ctrl + K` to open the [Command Palette](/inspector/command-palette). Use it to jump to tools, prompts, resources, saved requests, connected servers, and client setup actions. For the full shortcut list, see [Keyboard shortcuts](/inspector/keyboard-shortcuts). For shareable links that open a server or tab directly, see [URL parameters](/inspector/url-parameters). ## Next steps Run the Inspector from the command line and auto-connect to a server. Choose Direct or Via Proxy and tune connection details only when needed. Test MCP Apps widgets, layout behavior, CSP, and display modes. Serve the Inspector from an Express, Hono, or mcp-use server. Inspect the WebMCP tools a web page registers, from a Chrome side panel. # Integration Source: https://docs.mcp-use.com/inspector/integration Mount the Inspector in a mcp-use or Hono application. The Inspector is built-in local development tooling. `mcp-use` installs its prebuilt package, and `mcp-use dev` mounts it on the development listener at `/mcp/inspector`. ## Auto-Mounting with mcp-use When using a generated `mcp-use` project, run `npm run dev`. The CLI loads the Inspector supplied by `mcp-use`, serves its bundled UI locally, and opens `/mcp/inspector`. No extra dependency or CDN is involved. Production stays Inspector-free by default; use `mcp-use start --with-inspector` to mount it on the built server's existing listener. ### Example Generated and existing projects receive the Inspector through `mcp-use`. Add `@mcp-use/inspector` directly only when overriding the framework-supplied version or mounting it without `mcp-use`. ```typescript theme={null} import { MCPServer } from "mcp-use/server"; const server = new MCPServer({ name: "my-server", version: "1.0.0", }); // Add your tools, resources, prompts... server.tool(/* ... */); export default server; ``` Then run `mcp-use dev`; the Inspector is available at `http://localhost:3000/mcp/inspector`. Use `--no-inspector` for a headless development run. To inspect the production build locally, build once and opt in when starting it: ```bash theme={null} mcp-use build mcp-use start --with-inspector ``` This changes neither the build output nor its manifest. Treat a production Inspector as an internal tool: it can invoke MCP tools and proxy OAuth flows. ## Manual Integration For custom development servers, `mountInspector()` from `@mcp-use/inspector` provides the complete local Inspector: packaged UI, proxy, OAuth BFF, and callbacks. It can register on Hono/Express or return a framework-neutral Fetch handler. ```typescript theme={null} import { mountInspector } from "@mcp-use/inspector"; const inspect = mountInspector({ basePath: "/mcp", autoConnectUrl: "http://localhost:3000/mcp", }); const response = await inspect(request); ``` ### Hono Integration Mount the Inspector on a Hono application: ```typescript theme={null} import { Hono } from "hono"; import { mountInspector } from "@mcp-use/inspector"; const app = new Hono(); // Your Hono routes app.get("/api/health", (c) => { return c.json({ status: "ok" }); }); // Mount inspector at /mcp/inspector mountInspector(app, { basePath: "/mcp" }); // Start server with your Hono adapter export default app; ``` ## Path Customization `basePath` defaults to `/mcp`, so the Inspector lives at `/mcp/inspector`. Set `basePath: ''` for `/inspector`, or use another MCP prefix. ### Hono with Custom Path ```typescript theme={null} import { Hono } from "hono"; import { mountInspector } from "@mcp-use/inspector"; const app = new Hono(); mountInspector(app, { basePath: "/debug" }); // Inspector now available at http://localhost:3000/debug/inspector ``` ## Configuration Options ### `mountInspector` Options Pass options only when the default mount behavior is not enough. ```typescript theme={null} import { mountInspector } from "@mcp-use/inspector"; mountInspector(app, { basePath: "/mcp", autoConnectUrl: "http://localhost:3000/mcp", sandboxOrigin: "https://sandbox.example.com", }); ``` | Option | Type | Default | Description | | - | - | - | - | | `basePath` | `string` | `'/mcp'` | MCP prefix; Inspector mounts at `${basePath}/inspector` | | `autoConnectUrl` | `string \| null` | Current request origin + `basePath` | MCP server URL to auto-connect on load; `null` disables | | `devMode` | `boolean` | `true` | Enables same-origin sandbox for MCP Apps widgets | | `sandboxOrigin` | `string \| null` | `undefined` | Override the sandbox origin for MCP Apps widgets | | `oauthProxyAllowLoopback` | `boolean` | `true` | Permit local proxy/OAuth access to loopback targets | ## Protect mounted Inspector routes The Inspector can call tools, read resources, and inspect prompts on any connected server. Keep it in local development. If a custom integration exposes it on a network, disable loopback proxying and put it behind the same access controls as other internal tools. Each mounted Inspector also applies process-local limits of 120 proxy/OAuth requests and 600 asset requests per minute. Exhausted routes return `429 Too Many Requests` with `Retry-After`; these limits complement, rather than replace, network-edge authentication and rate limiting. ## Related Documentation * [Getting Started](/inspector/index) - Basic inspector usage * [CLI Usage](/inspector/cli) - Standalone inspector usage * [Inspector chat components](/typescript/api-reference/client/inspector-chat-components) - API reference for exported chat UI * [Debug widgets in the Inspector](/inspector/debugging-chatgpt-apps) - Test widget rendering and host behavior # Keyboard shortcuts Source: https://docs.mcp-use.com/inspector/keyboard-shortcuts Reference for Inspector keyboard shortcuts. Use keyboard shortcuts to move between Inspector views without leaving the current server context. ## Shortcuts | Shortcut | Action | Works while typing? | | - | - | - | | `Cmd/Ctrl + K` | Open the command palette. | Yes | | `Cmd/Ctrl + O` | Start a new chat. | No | | `Esc` | Close overlays, close dialogs, or blur the focused element. | Yes | | `t` | Open the Tools tab. | No | | `p` | Open the Prompts tab. | No | | `r` | Open the Resources tab. | No | | `c` | Open the Chat tab. | No | | `h` | Return to the dashboard. | No | | `f` | Focus search in the current tab when the tab has search. | No | `Cmd/Ctrl + K` is the only shortcut that intentionally works while an input field is focused. Single-letter shortcuts are disabled while you type in inputs, textareas, and content-editable elements. ## Command palette keys After opening the command palette: | Key | Action | | - | - | | `Up` / `Down` | Move through results. | | `Enter` | Open the selected result or run the selected command. | | `Esc` | Close the command palette. | See [Command Palette](/inspector/command-palette) for what you can search and open. # Self-Hosting Source: https://docs.mcp-use.com/inspector/self-hosting Deploy your own MCP Inspector instance with Docker. Run the Inspector on your own infrastructure when you need full control over your debugging environment. The official Docker image is published at [`mcpuse/inspector`](https://hub.docker.com/r/mcpuse/inspector) on Docker Hub. ## Quick start ```bash theme={null} docker run -d -p 127.0.0.1:8080:8080 --name mcp-inspector mcpuse/inspector:latest ``` Then open `http://localhost:8080` to access your self-hosted Inspector. Anyone who can reach the Inspector can use it to connect to and call your MCP servers. The examples bind to `127.0.0.1` so the Inspector is only reachable from the host itself. If you need remote access, put it behind a reverse proxy with authentication and TLS, or restrict access with firewall rules — don't publish port 8080 on all interfaces. ## Deployment options ```bash theme={null} docker run -d \ --name mcp-inspector \ -p 127.0.0.1:8080:8080 \ mcpuse/inspector:latest ``` ```yaml theme={null} services: mcp-inspector: image: mcpuse/inspector:latest ports: - "127.0.0.1:8080:8080" restart: unless-stopped healthcheck: test: ["CMD", "wget", "-q", "--spider", "http://localhost:8080/inspector"] interval: 30s timeout: 10s retries: 3 ``` The image is based on `node:20-alpine`, which ships `wget` (BusyBox) but not `curl` — use `wget` in healthchecks. ## Ports The container always listens on port `8080` — the image's start command pins it with `--port 8080`, so a `PORT` environment variable has no effect. To serve on a different host port, remap it with Docker instead: ```bash theme={null} docker run -d -p 127.0.0.1:3001:8080 mcpuse/inspector:latest ``` `NODE_ENV=production` is already set in the image; no environment variables are required. ## Air-gapped installation For hosts without registry access, transfer the image as a tarball: ```bash theme={null} # On a connected host docker pull mcpuse/inspector:latest docker save mcpuse/inspector:latest -o mcp-inspector.tar # On the air-gapped host docker load -i mcp-inspector.tar ``` When connecting from a self-hosted Inspector to an MCP server on another host, the browser must be able to reach the server directly, or you can use the proxy connection mode. See [Connection settings](/inspector/connection-settings) for when to use each. ## Alternatives Self-hosting is one of three ways to run the Inspector: | Option | Command | Best for | | - | - | - | | Hosted | [inspector.mcp-use.com](https://inspector.mcp-use.com) | Quick testing, no install | | Local CLI | `npx @mcp-use/inspector` | Local development | | Self-hosted | `docker run mcpuse/inspector:latest` | Production, enterprise, air-gapped | Servers built with `mcp-use` also auto-mount the Inspector at `/inspector` — see the [Inspector overview](/inspector/index). # URL parameters Source: https://docs.mcp-use.com/inspector/url-parameters Open the Inspector with a selected server, tab, or embedded layout. Use URL parameters when you need a link that opens the Inspector on a specific server, starts a connection automatically, or restores a tab. ## Parameters | Parameter | Purpose | Values | | - | - | - | | `server` | Select an existing connection by server ID or URL. If no saved connection matches and the value is an HTTP(S) URL, connect to it. | Connection ID or URL string | | `autoConnect` | Connect to a server when the Inspector loads. | URL string or URL-encoded JSON config | | `tab` | Open a specific server tab. | `tools`, `prompts`, `resources`, `chat`, `sampling`, `elicitation`, `notifications`, `playground` | | `tunnelUrl` | Preserve a tunnel URL while navigating. Usually set by the CLI. | URL string | | `embedded` | Use embedded mode with reduced page chrome. | `true` | | `embeddedConfig` | Configure embedded styling. | URL-encoded JSON config | ## Select or connect to a server Use `server` when the Inspector should select a saved server by URL: ```text theme={null} /?server=https://mcp.example.com/mcp ``` If the server is not saved yet, the Inspector treats the HTTP(S) value like `autoConnect` and connects to it. ## Auto-connect on load Use `autoConnect` when a link should create the connection immediately: ```text theme={null} /?autoConnect=https://mcp.example.com/mcp ``` For advanced connection options, pass a URL-encoded JSON object. The `url` field is required. ```json theme={null} { "url": "https://mcp.example.com/mcp", "name": "Example server", "transportType": "http", "connectionMode": "auto", "connectionType": "Direct" } ``` Supported JSON fields are `url` (required), `name`, `transportType` (`"http"` or `"sse"`), `connectionMode` (`"auto"`, `"direct"`, or `"proxy"`), `autoProxyFallback`, `connectionType` (`"Direct"` or `"Via Proxy"` for older links), `customHeaders`, `auth`, `requestTimeout`, `resetTimeoutOnProgress`, and `maxTotalTimeout`. When passing a JSON object for **autoConnect**, URL-encode the value so special characters are valid in the query string. ## Open a tab Use `tab` by itself to restore a view, or combine it with `server` or `autoConnect`. ```text theme={null} /?server=https://mcp.example.com/mcp&tab=tools ``` The Inspector also updates `tab` as you move between server tabs, so refreshes keep the current view. ## Embedded mode Use `embedded=true` when the Inspector is hosted inside another UI, such as an iframe. ```text theme={null} /?embedded=true ``` Use `embeddedConfig` with a URL-encoded JSON object when the embedded host needs styling overrides. ```json theme={null} { "backgroundColor": "#f5f5f5", "padding": "16px" } ``` ## Example links Open the hosted Inspector and connect to a server: ```text theme={null} https://inspector.mcp-use.com/inspect?autoConnect=https://your-server.com/mcp ``` Open the hosted Inspector, connect to a server, and show Tools: ```text theme={null} https://inspector.mcp-use.com/inspect?server=https://your-server.com/mcp&tab=tools ``` # WebMCP Inspector Source: https://docs.mcp-use.com/inspector/webmcp-inspector Inspect and call the WebMCP tools a web page registers, from a Chrome side panel. The WebMCP Inspector is a Chrome extension that inspects the WebMCP server a web page exposes. It opens as a side panel next to the page, lists the tools that page registers, and lets you call them with typed inputs and read the results without leaving the tab. Reach for it when you are building WebMCP into a website and need to answer questions like: * Are my tools actually registered, and with the schemas I expect? * Does a tool run correctly with a given set of parameters? * Do tools appear and disappear as they should when the page state or route changes? It is built with [WXT](https://wxt.dev), React, and TypeScript, and reuses components from the [mcp-use Inspector](/inspector/index). Unlike the Inspector, it does not connect to remote MCP servers — it only talks to the WebMCP API of the page in the active tab. The source lives at [mcp-use/webmcp-inspector](https://github.com/mcp-use/webmcp-inspector). WebMCP is experimental. If the API is unavailable on a page, enable **WebMCP for testing** in `chrome://flags` and relaunch a compatible Chromium build. ## Install from the Chrome Web Store Open the [WebMCP Inspector listing](https://chromewebstore.google.com/detail/webmcp-inspector/dgdidjgjofcenipdfaoebdeeppideadh) and click **Add to Chrome**. Open a WebMCP-enabled page and click the extension's toolbar icon to open the side panel. Clicking the toolbar icon is what grants the extension access to the current site, so click it again after you switch to another site. Chrome internal pages and the Chrome Web Store cannot be inspected. ## Inspect and call tools With the panel open, the tool list shows each tool the page registered with its description and parameter count, and a search box to filter them. Select a tool to get a form generated from its schema, fill it in, and run it with **Execute** (or `Cmd/Ctrl + Enter`). The panel validates input against the tool's JSON Schema before execution, and offers a raw JSON mode when a form is awkward for nested inputs. Results are shown with timing and errors, in a split you can drag or expand to fullscreen. Requests you want to keep can be saved by name; saved requests are stored locally and scoped to the site's origin. The list refreshes automatically when the page registers or removes tools, when you change tabs, and on page loads. ## Build from source (contributors) You only need this if you are working on the extension itself. To use the Inspector, install it from the Chrome Web Store above. Use Node 22.12+ and pnpm. ```bash theme={null} git clone https://github.com/mcp-use/webmcp-inspector cd webmcp-inspector pnpm install pnpm build ``` Then open `chrome://extensions`, turn on **Developer mode**, click **Load unpacked**, and select `.output/chrome-mv3`. For iterating on the extension itself, `pnpm dev` runs a WXT development build with hot reload; load `.output/chrome-mv3-dev` instead. `pnpm zip` produces a release zip in `.output`. ## Next steps Debug a remote or local MCP server from the browser: tools, resources, prompts, chat, and widgets. The imperative WebMCP API a page uses to register the tools this extension inspects. # MCP Server Tunneling Source: https://docs.mcp-use.com/tunneling/index Expose a local MCP server through a public /mcp URL for testing in ChatGPT, Claude, and other remote MCP clients. Use a tunnel when ChatGPT, Claude, or another remote MCP client needs to reach a server running on your machine. The tunnel gives you a public HTTPS URL that forwards to your local MCP endpoint. With `mcp-use`, start the server with `--tunnel`, then copy the printed `Tunnel` URL. The URL you give to clients must include `/mcp`. ```text theme={null} https://-.tunnel.mcp-use.run/mcp ``` Keep the terminal process running while you test. The public URL stops working when the process exits. With `mcp-use dev --tunnel` or `mcp-use start --tunnel`, the framework connects directly to the relay over WebSocket. It does not install or execute a native tunnel binary or a separate tunnel package. If the relay connection drops while the command is still running, the tunnel reconnects automatically and reuses the same identifier when possible. The relay forwards both HTTP requests and WebSocket upgrades. In development, MCP App views loaded from the public tunnel keep Vite HMR: editing a local view updates the remote Inspector or client without restarting the tunnel. ## Start a tunnel with mcp-use Use `mcp-use dev --tunnel` while you are developing: ```bash theme={null} mcp-use dev --tunnel ``` Use `mcp-use start --tunnel` when you want to test the built server: ```bash theme={null} mcp-use build mcp-use start --port 3000 --tunnel ``` After the production server binds, successful output includes the local and public MCP endpoints: ```text theme={null} [mcp-use] starting tunnel for port 3000… mcp-use server running at http://localhost:3000/mcp mcp-use public MCP URL: https://proper-black.tunnel.mcp-use.run/mcp ``` Copy the value after `mcp-use public MCP URL:` into your remote MCP client. Do not copy only the tunnel origin; the client URL must end with `/mcp`. ## Verify the tunnel Verify the public URL with the `mcp-use client` CLI: ```bash theme={null} npx mcp-use client connect tunnel-test https://proper-black.tunnel.mcp-use.run/mcp npx mcp-use client tunnel-test tools list ``` The `connect` command performs the MCP handshake and saves the tunnel under the name `tunnel-test`. The `tools list` command should print the tools exposed by your local server. If the server uses OAuth or bearer authentication, complete the client authentication flow or pass the required auth option before testing tools. ## Stop the tunnel Press `Ctrl+C` in the terminal running the tunnel. When you started the tunnel with `mcp-use dev --tunnel` or `mcp-use start --tunnel`, stopping the command stops both the local server process and the tunnel. ## Lifetime and limits Tunnels are for local testing before deployment: * The tunnel is active only while the command is running. * With `mcp-use dev --tunnel` or `mcp-use start --tunnel`, a dropped tunnel registration is re-established automatically while the command runs. * Reservations that never connect expire after 5 minutes. * Connected tunnels expire after 24 hours. * Inactive tunnels are cleaned up after 1 hour without activity. * Each source IP can create up to 10 tunnels per hour. * Each source IP can have up to 5 active tunnels at a time. For a stable public URL, deploy the server instead of relying on a local tunnel. ## Next steps * Use the [TypeScript quickstart](/typescript/getting-started/quickstart) to create a local MCP server. * Use [Build your first MCP App](/typescript/mcp-apps/quickstart) to test widgets in a remote client. * Use [Deploy to Manufact Cloud](/typescript/server/deployment/mcp-use) when you are ready for a hosted MCP endpoint. # Updates Source: https://docs.mcp-use.com/typescript/changelog/changelog New updates and improvements Release 2.10.0 ## OAuth Proxy for non-DCR providers Canary release (`mcp-use@2.10.0-canary.4`) adding an OAuth authorization server in front of identity providers without dynamic client registration, secret-free production builds, and `.gitignore`-aware deployments. Stable v2.10.0 has not shipped. * **New** (server): `oauthProxy()` in `mcp-use/oauth` makes the MCP server its own authorization server in front of GitHub (`github()`), Google (`google()`), or any OAuth 2.0 provider (`upstream()`). Clients present a client ID metadata document or register (DCR), approve a server-owned consent page that names the server by its host, and receive the proxy's own opaque tokens (`#2822`) * **New** (server): the `clients` option limits which clients may connect, by metadata document URL, origin, or a client defined on the server (`#2822`) * **New** (server): the upstream client secret and user tokens stay on the server, encrypted in a shared store from `mcp-use/oauth/storage`: Upstash, Redis, Postgres, Firestore, Cloudflare D1 or Durable Object, or in-memory for local development. `redisStorage` takes a connected client or a lazy connect function (`#2822`) * **New** (server): tools read the upstream token with `upstreamToken(ctx.auth)` or `ctx.auth.upstream` (`#2822`) * **Enhancement** (server): failed sign-ins and refreshes log the cause without token or code values (provider error code and description, HTTP status and content type, mismatched `iss`, or network error); refused client metadata documents and records encrypted with a retired secret are also logged (`#2822`) * **Enhancement** (server): clients that signed in through the 1.x `oauthProxy` keep working while registration is on; users approve the consent page once and sign in again without removing the server (`#2822`) * **New** (server): OAuth providers can register public HTTP routes from `setup()` with `host.route()`, read `host.mode` and `host.listenHost`, and compute `oauthMetadata` from the resolved resource URL (`#2822`) * **Fix** (server): OAuth endpoints under the MCP path are never written to trace logs, and `oauthEnvironmentValue` no longer throws on runtimes without `process` (`#2822`) * **Fix** (server): trailing-slash trimming in `upstashStorage` and the GitHub and Google upstream providers no longer uses a backtracking regex * **New** (server, @mcp-use/cli): `mcp-use build` evaluates the entry with `MCP_USE_PHASE=build` and no longer needs runtime secrets; the new `isBuilding()` export lets module-scope code skip reading secrets or connecting to a database. `oauthProxy` and `upstashStorage` require no secrets or credentials while building (`#2830`) * **Fix** (@mcp-use/cli): `mcp-use build` exits when the build finishes, even if the entry opened a connection at module scope such as a Redis client (`#2830`) * **Fix** (@mcp-use/cli): `mcp-use build` builds for production when `NODE_ENV` is unset. Views no longer ship React's development build, and server-side JSX no longer compiles to `jsxDEV`, which failed under `mcp-use start` (`#2830`) * **Fix** (@mcp-use/cli): a failed build or dev start prints the cause of a refused connection instead of an empty line (`#2830`) * **New** (@mcp-use/cli): `mcp-use deploy --no-github` applies `.gitignore` rules when packaging, including wildcards, directory rules, and negation, while keeping the baseline cloud exclusions (`#2485`) * **Fix** (server): `MCPServer.fromOpenAPI` converts OpenAPI 3.0 boolean `exclusiveMinimum` and `exclusiveMaximum` into JSON Schema numeric bounds instead of throwing while registering tools (`#2717`) * **Fix** (@mcp-use/agent): the Anthropic provider sends `"[no content]"` for empty tool result content, avoiding HTTP 400 errors from the Messages API (`#2693`) * **Documentation**: add the [OAuth Proxy](/v2/typescript/server/authentication/providers/oauth-proxy) guide, [OAuth Proxy storage](/v2/typescript/server/authentication/providers/oauth-proxy-storage), v1 migration notes, and API reference; add GitHub and Google `oauthProxy` examples with Firestore (`#2841`, `#2831`) * **Documentation**: correct API reference comments: stdio `env` does not inherit the parent environment, `defaultRequestOptions` applies only to the initial tool listing, `VMExecutorOptions.memoryLimitMb` is not enforced, legacy stateless GET, DELETE, and HEAD return `204`, and `mcp-use/vite`, `mcp-use/tanstack-start`, and `mcp-use/tanstack-start/vite` appear in the generated reference (`#2838`) * **Update**: patch vulnerable transitive dependencies (`proxy-addr`, `shell-quote`, `source-map-js`) and update Next.js examples to `next` ^16.3.8 (`#2842`) * **Update**: Updated @mcp-use/cli to v4.4.0 (canary.2) * **Update**: Updated @mcp-use/agent to v2.0.23 (canary.1) and @mcp-use/client to v2.4.3 (canary.0) * **Update**: Updated @mcp-use/inspector to v20.3.20 (canary.3); see the [Inspector changelog](/inspector/changelog) Release 2.9.0 ## Typed composer mention search Minor release adding typed search for app-owned items in supporting ChatGPT desktop composers. * **New** (server): `server.mentions({ name, search })` registers a normal typed `ToolRef` for searching people, files, channels, and other app-owned items without a View or iframe handshake (`#2792`) * **New** (server): generate a required string `query` input schema and an `{ items: ResourceLink[] }` output schema using the official SDK resource-link schema; export `ResourceLink`, `MentionSearchParams`, `MentionSearchResult`, and `MentionsRegistration` from `mcp-use` (`#2792`) * **Enhancement** (server): mention tools advertise `mentions/search` extension metadata and always include app visibility, preserving unrelated descriptor metadata; search is annotated read-only by default (`#2792`) * **Enhancement** (server): search callbacks receive ordinary request context, OAuth sign-in defaults, and `ctx.signal`; empty and whitespace queries pass through unchanged. Applications control authorization, ranking, and result limits (`#2792`) * **Documentation**: add composer mention registration, result contracts, visibility behavior, and authorization guidance to [ChatGPT Plugin Extensions](/v2/typescript/mcp-apps/chatgpt-extensions#composer-mention-search) (`#2792`) * **Update** (@mcp-use/cli): rebuild bundled workspace code and synchronize published internal package metadata * **Update**: Updated @mcp-use/cli to v4.3.3 * **Update**: Updated @mcp-use/inspector to v20.3.19; see the [Inspector changelog](/inspector/changelog) ## Tunnel cancellation & API reference navigation Patch release keeping development tunnels connected when a cancellation arrives after its request has finished, with clearer API reference navigation. * **Fix** (@mcp-use/tunnel, @mcp-use/cli): ignore valid late or duplicate request cancellations so they no longer close the tunnel or interrupt unrelated requests; active requests still cancel normally (`#2664`) * **Documentation**: improve generated API reference navigation and clarify client and React hook documentation (`#2791`) * **Update**: Updated @mcp-use/tunnel to v0.2.2 and @mcp-use/cli to v4.3.2 * **Update**: Updated @mcp-use/inspector to v20.3.18; see the [Inspector changelog](/inspector/changelog) ## Streaming, code mode & deployment fixes Patch release fixing streamed tool notifications, code-mode discovery, CLI deployment links and remote validation, Windows scaffolding, and Inspector tool timeouts. * **Fix** (server): request logging no longer buffers SSE response bodies, so tool progress and log notifications reach clients before tool completion. This applies at every logging level, including trace; finite JSON response logging is preserved (`#2789`) * **Fix** (@mcp-use/client): `CodeModeConnector.listTools()` returns `execute_code` and `search_tools`, exposes tool capabilities and protocol metadata, and returns empty resource, resource-template, and prompt lists (`#2488`) * **Fix** (@mcp-use/client): `CodeModeConnector` honors request abort signals for listing and tool calls, including cancellation while waiting for code execution or tool search (`#2488`) * **Fix** (@mcp-use/cli): deployment dashboard links use the selected organization slug and server ID for managed uploads and GitHub deployments; organizations without a slug no longer receive an invalid link (`#2744`) * **Fix** (@mcp-use/cli): `mcp-use deploy` validates that Git remotes are hosted on `github.com`, rejecting other hosts that merely contain `github.com` in their hostname or path (`#2687`) * **Fix** (create-mcp-use-app): `--install` and the install prompt run npm and pnpm through a shell on Windows so their `.cmd` shims work instead of failing with `spawn npm ENOENT` (`#2696`) * **Fix** (@mcp-use/inspector): tool calls honor saved timeout settings and cleared timeouts stay cleared; see the [Inspector changelog](/inspector/changelog) (`#2656`) * **Update**: Updated @mcp-use/agent to v2.0.22 and @mcp-use/client to v2.4.2 * **Update**: Updated @mcp-use/inspector to v20.3.17; see the [Inspector changelog](/inspector/changelog) * **Update**: Updated @mcp-use/cli to v4.3.1 * **Update**: Updated create-mcp-use-app to v2.0.10 Release 2.8.0 ## ChatGPT Plugin Extensions Minor release adding typed ChatGPT Plugin Extensions across server and React APIs, with updated MCP SDKs and richer examples. * **New** (server): register typed global, thread, and file entrypoints on `tool.view`; launch contracts are validated and OpenAI tool metadata is preserved (`#2737`) * **New** (server): register native ChatGPT plugin settings with typed fields, optional layout, validated read/update tools, request context callbacks, and per-request capability advertisement. Applications keep control of persistence and authorization (`#2739`) * **New** (server): advertise top-level tool icons in `tools/list`, including proxied tools, and support public-relative icon assets (`#2779`) * **New** (@mcp-use/react): `useDeepLink` reads the initial and subsequent ChatGPT deep-link URLs through the existing MCP App connection (`#2738`) * **New** (@mcp-use/react): `useModelContext` manages keyed native text, image, resource-link, and embedded-resource attachments. It activates only for committed hook consumers and handles replacement, removal, cancellation, and delivery failures without restoring stale content (`#2776`) * **Enhancement** (server): define supported MCP App display modes and an optional initial ChatGPT display preference in the named `viewConfig` export; validate preferences while preserving broader host capabilities (`#2740`) * **Enhancement** (@mcp-use/cli): include display-mode configuration in development and production view manifests and pre-bundle the model-context schema for cold iframe startup (`#2740`, `#2776`) * **New** (examples): add a Bookshop Plugin Extensions example with entrypoint icons, plugin settings, and model-context attachments (`#2773`) * **Fix** (create-mcp-use-app): failed template selection or GitHub template cloning no longer leaves an empty project directory that blocks a retry (`#2765`) * **Update** (@mcp-use/client): update the official MCP client, core, and server SDKs to 2.3.1 and MCP Apps to 2.0.3. Node follows only same-origin redirects that preserve the request method; browsers reject redirects by default, so configure the final endpoint URL (`#2784`) * **Documentation**: add the ChatGPT Plugin Extensions guide for MCP Apps and clarify browser redirect restrictions (`#2772`, #2784) * **Update**: Updated @mcp-use/agent to v2.0.21 and @mcp-use/client to v2.4.1 * **Update**: Updated @mcp-use/inspector to v20.3.16; see the [Inspector changelog](/inspector/changelog) * **Update**: Updated @mcp-use/cli to v4.3.0 * **Update**: Updated create-mcp-use-app to v2.0.9 ## CLI argument & Windows screenshot fixes Patch release fixing CLI argument parsing, Windows browser discovery, scaffold deploy guidance, and Inspector chat input spacing, with dependency security updates. * **Fix** (@mcp-use/cli): plain `key=value` tool and prompt arguments preserve `:=` inside the value, so `code="x := 1"` is sent as a string; `key:=` still parses a typed JSON value (`#2665`) * **Fix** (@mcp-use/cli): on Windows, `mcp-use screenshot` also finds Chrome under `Program Files (x86)`, Microsoft Edge, and Brave instead of failing with `chrome_not_found` when neither original Chrome location exists (`#2725`) * **Fix** (create-mcp-use-app): scaffold completion prints `pnpm run deploy` so pnpm runs the project's deploy script instead of its built-in `deploy` command (`#2701`) * **Fix** (@mcp-use/inspector): multiline chat input stays clear of the bottom toolbar; see the [Inspector changelog](/inspector/changelog) (`#2735`) * **Update** (server): update Hono to `^4.13.7` and raise workspace dependency security floors (`#2746`) * **Documentation** (@mcp-use/client): the AI SDK OpenAI example installs from a fresh checkout with a frozen lockfile and runs TypeScript directly on Node.js 22.22.2 or newer (`#2672`) * **Documentation** (create-mcp-use-app): the Connect to AI example configures its MCP server through `MCPClient`'s `mcpServers` map (`#2727`) * **Update**: Updated @mcp-use/inspector to v20.3.15; see the [Inspector changelog](/inspector/changelog) * **Update**: Updated @mcp-use/cli to v4.2.1 * **Update**: Updated create-mcp-use-app to v2.0.8 ## OAuth UserInfo & stricter CLI flags Patch release exposing optional OAuth UserInfo, plus a CLI minor that rejects inline values on boolean flags. * **New** (@mcp-use/client): `useMcp` and `useMcpServer` expose reactive OAuth UserInfo. Set `oauth.fetchUserInfo: true` to load the account after the connection is ready, or call `getUserInfo()`. `userInfo` is `idle`, `loading`, `available`, `unavailable`, or `error`; a UserInfo failure does not change `state`. See [OAuth UserInfo](/v2/typescript/client/usemcp#oauth-userinfo) (`#2688`) * **Fix** (@mcp-use/client): base64 MCP App HTML resources decode as UTF-8, so non-ASCII text renders correctly in React views (`#2632`) * **Fix** (@mcp-use/agent): array-valued Gemini tool results are wrapped in an object so function responses match the provider schema in streaming and non-streaming calls (`#2675`) * **Fix** (@mcp-use/agent): `runToolLoopNonStreaming` stops dispatching the rest of a turn's tool calls when `signal` is aborted, matching `runToolLoop` (`#2667`) * **Fix** (server): proxied prompt requests receive the downstream cancellation signal (`#2568`) * **Fix** (@mcp-use/cli): an inline value on a boolean flag is rejected instead of ignored. `mcp-use dev --tunnel=false` used to open a public tunnel; it now fails with `--tunnel does not take a value`. The same applies to `--no-open`, `--no-inspector`, `--with-inspector`, `--source-maps`, `--inline`, `--help`, and `--version`. Flags that take a value still accept `--flag value` and `--flag=value` (`#2521`) * **Fix** (@mcp-use/cli): `mcp-use servers env --help` prints `servers env` help instead of the root `servers` help (`#2690`) * **Fix** (@mcp-use/inspector): the Express adapter aborts the upstream stream when the client disconnects during a response (`#2394`) * **Enhancement** (@mcp-use/inspector): the OAuth proxy allows GET to UserInfo endpoints advertised in authorization-server metadata (`#2688`) * **Update**: Updated @mcp-use/inspector to v20.3.14; see the [Inspector changelog](/inspector/changelog) * **Update**: Updated @mcp-use/cli to v4.2.0 * **Update**: Updated @mcp-use/client to v2.4.0 ## View cancellation & client fixes Patch release surfacing host tool cancellation in views, plus browser client and OAuth token expiry fixes. * **Fix** (server): views no longer stay pending when the host cancels the tool call that rendered them. `useToolContext()` switches to `status: "error"` with a new `ToolCancelledError` (exported from `mcp-use/react`) carrying the host's `reason`; a cancellation after a result is still ignored. `ToolContextError` is now `ToolError | ToolCancelledError`, so narrow with `instanceof ToolError` before reading `error.result` (`#2646`) * **Fix** (@mcp-use/client): `ViewRenderer` no longer sends `tool-cancelled` when a tool call made by the view fails; that failure already rejects the view's call (`#2646`) * **Fix** (@mcp-use/client): `BrowserMCPClient` expands the `capabilities.views` shorthand into the `io.modelcontextprotocol/ui` extension and forwards `roots` and `defaultRequestOptions` to the connector, matching the Node client (`#2476`) * **Fix** (@mcp-use/client): `getOAuthTokenExpiry` reads the JWT `exp` claim from Base64URL payloads containing `-` or `_`, which previously fell back to `expires_in`; the `authTokens.expires_at` docs now say milliseconds (`#2660`) * **Documentation** (@mcp-use/agent): `RunOptions.messages` is documented as native-agent only; the LangChain agent ignores it, so pass prior messages through `externalHistory` (`#2658`) * **Documentation**: the v2 migration guide shows a temporary middleware rewrite so ChatGPT apps that cached v1 widget URIs (`ui://widget/…`) can still read Views served at `ui://views/…` until the app is resubmitted (`#2668`) * **Update**: Updated @mcp-use/inspector to v20.3.13; see the [Inspector changelog](/inspector/changelog) * **Update**: Updated @mcp-use/cli to v4.1.17 Release 2.7.0 ## Mixed authentication Minor release serving public, optional, and sign-in tools from one OAuth-enabled endpoint in Claude and ChatGPT, plus an OAuth provider setup hook. * **New** (server): `mixedAuth: true` lets clients connect and list tools, resources, and prompts without a token; it requires an `oauth` provider and makes nothing public on its own. See [Mixed authentication](/v2/typescript/server/authentication/mixed-auth) (`#2630`) * **New** (server): tools accept a `securitySchemes` field in the shape ChatGPT reads on `tools/list`: `[{ type: "noauth" }]` (public), `[{ type: "noauth" }, { type: "oauth2", scopes }]` (optional), or `[{ type: "oauth2", scopes }]` (sign-in with extra scopes); omitting it means sign-in with the provider's `requiredScopes`. The new `ToolSecurityScheme` type describes the entries (`#2630`) * **New** (server): a tool's `ctx.auth` is typed from its literal `securitySchemes`: required when the tool needs sign-in, possibly `undefined` when it accepts `noauth` (`#2630`) * **New** (server): refused calls are answered before the callback runs, as HTTP `401`/`403` with `WWW-Authenticate` for Claude and spec clients, or as an `isError` result with `_meta["mcp/www_authenticate"]` for ChatGPT; invalid or expired tokens always get `401`, even on public tools (`#2630`) * **Enhancement** (server): on a `mixedAuth` server, resources, resource templates, and prompts always require sign-in, while every tool's view loads signed out so ChatGPT can read views during app creation; tool results stay gated (`#2630`) * **Enhancement** (server): tools advertise their resolved `securitySchemes` on `tools/list`, top level and in `_meta.securitySchemes`; a hand-written `_meta.securitySchemes` passes through unenforced, with a warning on `mixedAuth` servers or when it differs from the declared field. `oauth2` scopes also work without `mixedAuth`, adding to the endpoint-wide requirement (`#2630`) * **New** (server): `oauthCustomProvider` accepts an optional synchronous `setup(host)` hook that runs once at mount to install `mcp:` middleware, register provider-owned tools, resources, resource templates, and prompts, validate app tools with `listTools()`, and rewrite instructions; `host.mixedAuth` reports signed-out access. A failed or async hook fails the mount. `OAuthProviderHost` is exported from `mcp-use/oauth` (`#2405`) * **Fix** (server): `ThemeProvider` no longer remounts the view when the display mode switches between inline and fullscreen or pip, so local state and `useCallTool` results survive (`#2641`) * **Fix** (@mcp-use/cli): `screenshot` rejects `--width` and `--height` values Chrome cannot use (`#2617`) * **Documentation**: new Mixed authentication guide and `setup` hook docs for custom providers; the `mixed-oauth` example now uses `mixedAuth` and `securitySchemes`, covers every scheme shape, and runs behind `mcp-use dev --tunnel` for testing in Claude and ChatGPT (`#2630`, `#2405`) * **Update**: Updated @mcp-use/inspector to v20.3.12; see the [Inspector changelog](/inspector/changelog) * **Update**: Updated @mcp-use/cli to v4.1.16 Release 2.6.0 ## TanStack Start integration Minor release adding Vite-powered MCP servers in TanStack Start, along with client, CLI, scaffold, and documentation updates. * **New** (server): `mcp-use/vite`, `mcp-use/tanstack-start`, and `mcp-use/tanstack-start/vite` mount an MCP server in a TanStack Start route; a dedicated Vite environment reloads server code, skills, and views during development and builds deployable assets for production (`#2517`) * **Fix** (server): the landing page hides the public chat button until public chat is available (`#2612`) * **Fix** (server): Vite integration base-path validation handles long paths with repeated slashes without slow regex matching * **Fix** (@mcp-use/client): sibling inline widgets preserve each other's fullscreen and picture-in-picture document state, and MCP App iframes remain transparent in dark hosts (`#2454`, `#2610`) * **Fix** (@mcp-use/cli): `whoami` uses the account's default organization when none is selected locally, and whitespace around `skills.directory` no longer breaks skill discovery (`#2570`, `#2597`) * **Fix** (create-mcp-use-app): template tsconfigs load Node types explicitly so new projects typecheck with TypeScript 7 (`#2595`) * **Documentation**: new cookbook recipes cover Daytona code execution, Next.js, Upstash rate limiting, Sentry error tracking, and TanStack Start; examples also show A2UI generative views (`#2513`, `#2515`, `#2564`, `#2566`, `#2572`, `#2518`) * **Update**: release CI checks SDK changesets and changelog entries (`#2579`) * **Update**: Updated @mcp-use/inspector to v20.3.11; see the [Inspector changelog](/inspector/changelog) * **Update**: Updated @mcp-use/cli to v4.1.15 * **Update**: Updated create-mcp-use-app to v2.0.7 ## Scrollable Inspector app results Patch release keeping tall MCP App tool results accessible in Inspector. * **Fix** (@mcp-use/inspector): tall MCP App results scroll within the tool result panel; see the [Inspector changelog](/inspector/changelog) (`#2598`) * **Update**: Updated @mcp-use/inspector to v20.3.10 * **Update**: Updated @mcp-use/cli to v4.1.14 ## Agent step limits & client progress routing Patch release fixing per-call agent budgets and SDK notification handling, with Inspector cloud model selection improvements. * **Fix** (@mcp-use/agent): `maxSteps` passed to `run`, `stream`, or `streamEvents` limits model calls for that invocation while preserving the constructor default for later calls (`#2437`) * **Fix** (@mcp-use/client): progress and cancellation notifications reach the SDK handlers with all required arguments; progress stays associated with the correct call across concurrent requests and multi-round retries (`#2548`) * **Update** (@mcp-use/agent): `MCPServerConfig.auth_token` is deprecated but retained for type compatibility; use `authToken` to send an authentication token (`#2486`) * **Fix** (@mcp-use/inspector): managed chat uses the selected model's branding and a curated cloud provider picker; see the [Inspector changelog](/inspector/changelog) (`#2575`, `#2576`) * **Update** (server): update Hono to `^4.13.5` and Next.js to `^16.3.3` (`#2492`, `#2495`) * **Update**: the TypeScript workspace no longer installs Husky Git hooks; contributors must run formatting and lint checks manually (`#2582`) * **Update**: Updated @mcp-use/inspector to v20.3.9 * **Update**: Updated @mcp-use/cli to v4.1.13 Release 2.5.0 ## Public chat CTA Minor release adding a landing-page chat button plus client, CLI, and agent lifecycle fixes. * **New** (server): the HTML landing page shows a “Go to chat” button when public chat is ready (`#2496`) * **Fix** (server): proxied `resources/list` keeps upstream `annotations` and `_meta` (`#2469`) * **Fix** (server): a malformed `createJwtVerifier` `resource` option throws `TypeError` at startup instead of reporting `invalid_token` (`#2412`) * **Fix** (@mcp-use/client): concurrent connect and disconnect calls are coalesced; a later disconnect cancels in-flight reconnects (`#2458`) * **Fix** (@mcp-use/client): `useMcp` stabilizes `clientInfo` and `proxyConfig` dependencies so parent re-renders do not reconnect (`#2403`) * **Fix** (@mcp-use/client): `ViewRenderer` removes the sandbox listener and cancels the readiness wait on unmount (`#2421`) * **Fix** (@mcp-use/cli): `servers list` validates `--limit` and `--skip` before authenticating so bad pagination is a usage error instead of “Not logged in.” (`#2448`) * **Fix** (@mcp-use/cli): a malformed JSON argument to `client` or `screenshot` is a usage error (exit 2) (`#2444`) * **Fix** (@mcp-use/cli): `--secret` must be passed on every `servers env set` write; omitting it stores the value as non-sensitive (`#2423`) * **Fix** (@mcp-use/tunnel): standalone `mcp-tunnel` defaults `localHostHeader` to `localhost` (`#2456`) * **Fix** (@mcp-use/agent): OpenRouter BYOK requests to OpenAI models use the Responses API (`#2501`) * **Update**: replace the `@mcp-use/ext-apps` package alias with official `@modelcontextprotocol/ext-apps` 2.0.0 (`#2498`) * **Fix** (@mcp-use/inspector): standalone Inspector rebuilds with the agent OpenRouter fix and repaired peer metadata; see the Inspector changelog (`#2504`) * **Documentation** (@mcp-use/cli): CLI reference states that `--secret` must be passed on every `servers env set` write (`#2423`) * **Update**: Updated @mcp-use/inspector to v20.3.8 * **Update**: Updated @mcp-use/cli to v4.1.12 ## AI SDK adapter & stricter CLI deletes Patch release adding a dependency-free Vercel AI SDK adapter and failing CLI deletes when the target does not exist. * **New** (@mcp-use/client): `createAiSdkTools` exposes MCP tools as AI SDK dynamic tools (v5–v7) without adding an AI SDK dependency; example at `packages/client/examples/node/ai-sdk-openai` (`#2441`) * **Fix** (@mcp-use/cli): `servers env unset` and `client remove` fail when the target does not exist instead of printing a success line (`#2411`) * **Documentation**: elicitation samples no longer teach the removed `ctx.elicit` API (`#2409`); custom JWT docs distinguish `aud` from the RFC 8707 `resource` request parameter (`#2443`) * **Update**: Updated @mcp-use/inspector to v20.3.7 * **Update**: Updated @mcp-use/cli to v4.1.11 ## Publish artifact preservation Patch release keeping package builds intact while npm pack runs. * **Fix**: concurrent publishing no longer drops the Client build while its tarball is created, and packed artifacts are checked for declared files and entry points (`#2428`) * **Update**: Updated @mcp-use/inspector to v20.3.6 ## OAuth loopback recovery & scaffold help Patch release recovering Node OAuth after a failed loopback bind, dropping a dead scaffold flag, and fixing Inspector chat widget connections. * **Fix** (@mcp-use/client): Node OAuth rebinds the loopback listener after a failed bind instead of hanging until `authTimeoutMs` (`#2393`) * **Fix** (create-mcp-use-app): help no longer lists `--no-git`; scaffolding has not initialized a git repository since #820 (`#2392`) * **Fix** (@mcp-use/inspector): chat MCP Apps use the registered connection id while keeping the logical server id for chat state and storage; see the Inspector changelog (`#2404`) * **Update**: Updated @mcp-use/inspector to v20.3.5 * **Update**: Updated @mcp-use/cli to v4.1.10 * **Update**: Updated create-mcp-use-app to v2.0.6 Release 2.4.0 ## Convex OAuth provider Minor release adding a built-in Convex verifier, failing screenshots on MCP App init errors, and stopping client OAuth retries after disconnect. * **New** (server/oauth): `oauthConvexProvider` verifies Convex OAuth Provider JWTs and exports from `mcp-use/oauth/convex` (`#2372`) * **Fix** (@mcp-use/client): OAuth authorization retries stop after the client disconnects (`#2367`) * **Fix** (@mcp-use/client): `listAllResources` holds one client reference across pagination so a mid-list disconnect surfaces the transport error instead of `TypeError` (`#2387`) * **Fix** (@mcp-use/cli): `mcp-use screenshot` fails with `view_load_failed` instead of writing a PNG when the MCP App fails to initialize (`#2355`) * **Enhancement** (@mcp-use/inspector): RPC traffic shows request duration instead of wall-clock time; see the Inspector changelog (`#2364`) * **Enhancement** (@mcp-use/inspector): embedded client-side chats can configure up to 100 agent steps; see the Inspector changelog (`#2401`) * **Documentation**: Convex provider guide under v2 TypeScript authentication (`#2372`) * **Documentation** (@mcp-use/cli): CLI reference corrections for org use, `logout --yes`, `deployments`, `client remove --json`, and removal of non-existent deploy flags (`#2376`, `#2379`, `#2380`, `#2382`) * **Update**: Updated @mcp-use/inspector to v20.3.4 * **Update**: Updated @mcp-use/cli to v4.1.9 ## Compact request logs & OAuth-ready tokens Patch release collapsing MCP request logs to one line, projecting React OAuth tokens before ready, and using native Windows file watching in `mcp-use dev`. * **Enhancement** (server): request logs collapse to one compact line per HTTP request (`tools/call greet /mcp 200 client=… 12ms`); default `info` omits payloads, `debug`/`trace` add detail, and colocated `mcp-use dev` prefixes server lines with `[server]` (`#2351`) * **Fix** (@mcp-use/client): `useMcp` exposes OAuth `authTokens` in the same render that marks an authenticated connection as ready (`#2358`) * **Fix** (@mcp-use/cli): `mcp-use dev` uses Vite's native file watching on Windows instead of 100ms polling, so an edit during startup is not swallowed as the watch baseline (`#2338`) * **Enhancement** (@mcp-use/inspector): JSON-RPC traffic rows show response latency in the timing column; see the Inspector changelog (`#2349`) * **Documentation** (@mcp-use/cli): published package README so the npm page is no longer blank (`#2350`) * **Update**: Updated @mcp-use/inspector to v20.3.3 * **Update**: Updated @mcp-use/cli to v4.1.8 ## Safer session replacement & scaffolds Patch release cleaning up replaced client sessions, fresh-project validation, and scaffold guidance. * **Fix** (@mcp-use/client): `MCPClient.createSession()` disconnects an existing session before replacing it, preventing unreachable stdio children and HTTP sessions from remaining open (`#1964`) * **Fix** (@mcp-use/cli): binding validation no longer loads the React Vite plugin for projects without views, eliminating first-build dependency-resolution warnings in fresh `mcp-server`, `blank`, and `starter` projects (`#2307`) * **Fix** (create-mcp-use-app): scaffold output sends its “Learn more” link to `docs.mcp-use.com` instead of Manufact dashboard documentation (`#2328`) * **Enhancement** (@mcp-use/inspector): chat warns when a server exceeds the documented 128-tool limit for OpenAI or Gemini models; see the Inspector changelog (`#2333`) * **Update**: Updated @mcp-use/inspector to v20.3.2 * **Update**: Updated @mcp-use/cli to v4.1.7 * **Update**: Updated create-mcp-use-app to v2.0.5 ## Claude view compatibility & request diagnostics Patch release restoring Claude's resource-domain contract, exposing prompt request controls, and making Inspector RPC responses easier to diagnose. * **Fix** (server/views): `resources/read` rewrites authored view domains to the stable SHA-256-based `*.claudemcpcontent.com` domain expected by Claude clients, using per-request client identity with a legacy `User-Agent` fallback while leaving other clients and `resources/list` unchanged (`#2326`) * **Enhancement** (@mcp-use/client): prompt reads accept MCP `RequestOptions` through both `MCPClientSession.getPrompt` and the underlying connector (`#2302`) * **Enhancement** (@mcp-use/inspector): JSON-RPC response rows show the correlated request method and elapsed time and flag error responses; see the Inspector changelog (`#2303`) * **Update**: Updated @mcp-use/inspector to v20.3.1 * **Update**: Updated @mcp-use/cli to v4.1.6 ## Responsive server URLs & reusable connection settings Patch release keeping long landing-page URLs contained and exposing Inspector connection controls for embedded consumers. * **Fix** (server): long MCP server URLs truncate inside the landing-page hero on narrow viewports while remaining available through the copy button (`#2313`) * **Enhancement** (@mcp-use/inspector): export `ConnectionSettingsForm`, `useConnectionFormState`, connection configuration types, and optional consumer URL validation from `@mcp-use/inspector/client`; see the Inspector changelog (`#2319`) * **Update**: Updated @mcp-use/inspector to v20.3.0 Release 2.3.0 ## Scalekit OAuth provider Minor release adding a built-in Scalekit verifier and improving Inspector chat usage and session isolation. * **New** (server/oauth): `oauthScalekitProvider` validates environment-root and resource-scoped issuers, binds the JWT audience to the Scalekit `res_…` resource identifier, and advertises Dynamic Client Registration and Client ID Metadata Document support (`#2272`) * **Fix** (@mcp-use/inspector): Anthropic cache-creation tokens survive usage aggregation and Inspector traces without double-counting OpenAI cache reads; see the Inspector changelog (`#2127`) * **Fix** (@mcp-use/inspector): chat state, persistence, streaming, and OAuth retry are isolated by session so **New Chat** can start while another session is streaming; see the Inspector changelog (`#2232`) * **Update**: Updated @mcp-use/inspector to v20.2.5 ## Workspace package alignment Patch release aligning the published workspace dependency versions. * **Update**: Updated @mcp-use/inspector to v20.2.4 * **Update**: Updated @mcp-use/cli to v4.1.5 ## Inspector protocol selection Patch release exposing protocol version controls in Inspector connections. * **Enhancement** (@mcp-use/inspector): connection setup and settings expose MCP protocol version selection and make configuration options easier to find; see the Inspector changelog * **Update**: Updated @mcp-use/inspector to v20.2.3 ## Workspace package alignment Patch release aligning the published workspace dependency versions. * **Update**: Updated @mcp-use/inspector to v20.2.2 * **Update**: Updated @mcp-use/cli to v4.1.4 ## OAuth protected-resource compatibility Patch release accepting secure parent-path resource metadata in OAuth discovery. * **Fix** (auth): protected-resource metadata may identify a same-origin, segment-aware parent of the MCP endpoint, matching the official MCP TypeScript SDK while still rejecting unsafe resource values * **Update**: Updated @mcp-use/inspector to v20.2.1 * **Update**: Updated @mcp-use/cli to v4.1.3 Release 2.2.0 ## Custom OAuth verification & remote development Minor release exporting JWT verification primitives and making remote MCP App development more reliable. * **New** (server/oauth): export `createJwtVerifier`, `JwtVerifierOptions`, and `VerifiedPayload` from `mcp-use/oauth` for custom OAuth providers * **Fix** (server): restore zero-config OAuth provider setup through `MCP_USE_OAUTH_*` environment variables while preserving explicit overrides * **Fix** (@mcp-use/cli): route Vite assets and HMR through the configured public MCP origin, pre-bundle view runtime dependencies and Zod, and ignore managed dev-server logs so remote views mount and update reliably * **Enhancement** (@mcp-use/inspector): embedded Chat exposes CSP mode and audit commands and ships the canonical Inspector style contract; see the Inspector changelog * **Fix** (create-mcp-use-app): canary scaffolds install canary SDK and skill sources instead of falling back to stable branches * **Update**: Updated @mcp-use/inspector to v20.2.0 * **Update**: Updated @mcp-use/cli to v4.1.2 * **Update**: Updated create-mcp-use-app to v2.0.4 ## Mixed-auth recovery & scaffold names Patch release supporting optional OAuth without blocking anonymous MCP connections and fixing generated npm package names. * **Enhancement** (auth): detect mixed-auth servers without blocking anonymous connections, resume protected operations through the official SDK OAuth flow, and preserve multiple `Set-Cookie` headers through the Node bridge * **Fix** (auth): recover optional OAuth discovery and CLI login after transient failures, keep ready React connections stable, and avoid reporting user-cancelled Inspector tool calls as failures * **Fix** (server): disable reverse-proxy buffering for open-ended MCP SSE responses so subscription acknowledgements are delivered immediately * **Fix** (create-mcp-use-app): sanitize named projects into valid npm package names, including quoted names and names beginning with underscores * **Enhancement** (@mcp-use/inspector): mixed-auth tool calls pause for authentication and resume the same chat turn; see the Inspector changelog * **Update**: Updated @mcp-use/inspector to v20.1.1 * **Update**: Updated @mcp-use/cli to v4.1.1 * **Update**: Updated create-mcp-use-app to v2.0.3 Release 2.1.0 ## Skills over MCP & v2 server tooling Minor release adding experimental Skills over MCP authoring to the v2 server and completing the package split around the standalone CLI and Inspector. * **Fix**: MCP v2 server responses preserve tool JSON Schema dialects and accept input-required prompt results (`#2147`) * **Fix**: Modern connections remain ready when optional upstream identity metadata is absent, while anonymous direct-proxy upstreams report a clear namespace error * **New**: Experimental Skills over MCP authoring discovers `skills/`, supports explicit disable and directory configuration, SEP-2640 resource methods, development reloads, and build-time embedding * **New**: Authenticated WebSocket tunneling is published as a standalone package and bundled into `mcp-use dev/start --tunnel`, with bounded HTTP, streaming, MCP JSON-RPC, and public WebSocket forwarding * **Enhancement**: `mcp-use dev` reconciles server and v2 view changes as coherent project generations, so stale reload candidates cannot replace the active handler or publish outdated catalogs * **Update** (@mcp-use/cli): CLI implementation and tests now live in `@mcp-use/cli` while preserving the `mcp-use` command and server API; Windows path handling and bundled SDK/license packaging are covered * **Enhancement** (@mcp-use/cli): Skills over MCP discovery in Inspector filters invalid skills from fresh development snapshots * **Fix**: Next.js Turbopack builds resolve the Skills over MCP loader correctly (`#2197`) * **Enhancement** (@mcp-use/inspector): typed Skills operations, a capability-gated file explorer with integrity verification, the `window.openai` compatibility bridge, and related runtime fixes; see the Inspector changelog * **Fix** (create-mcp-use-app): clear unused TypeScript export surface flagged by Knip without changing published package entry APIs * **Update**: Updated @mcp-use/inspector to v20.1.0 * **Update**: Updated @mcp-use/cli to v4.1.0 * **Update**: Updated create-mcp-use-app to v2.0.2 ## Stable npm README links Patch release fixing absolute links in the published package documentation. * **Fix**: README images and repository links use stable absolute URLs so npm renders the published package documentation correctly * **Update**: Updated @mcp-use/inspector to v20.0.4 ## Stable package README metadata Patch release making the published package README reliable on npm. * **Fix**: Publish a package-root README and verify that it stays synchronized with the repository README before packing * **Update**: Updated @mcp-use/inspector to v20.0.3 ## Safer Inspector proxy & clearer CLI feedback Patch release hardening hosted Inspector proxy defaults and making successful CLI commands visible. * **Fix** (@mcp-use/inspector): embedded and hosted Inspector mounts block loopback OAuth proxy targets by default; standalone local development keeps loopback access unless running in production * **Enhancement** (@mcp-use/cli): `mcp-use start --with-inspector` prints the mounted Inspector URL, and successful `mcp-use typecheck` runs print a completion message with elapsed time * **Update**: runtime and bundled dependencies use patched stable releases with tightened transitive resolutions * **Update**: Updated @mcp-use/inspector to v20.0.1 * **Update**: Updated @mcp-use/cli to v4.0.1 Release 2.0.0 ## MCP SDK v2 & server tooling Major release migrating the TypeScript stack to the official MCP SDK v2 and introducing the v2 server, views, CLI, and scaffold architecture. * **Update**: The client and agent stack moves to the official MCP SDK v2, with automatic protocol negotiation, redesigned OAuth handling, ESM-only packages, a Node.js 22.22.2+ floor, and removal of v1 API aliases * **New**: The v2 server exposes a fetch-native Hono surface with typed MCP middleware, observers, CORS, OpenAPI generation, a Next.js adapter, request-scoped helpers, and production `build`/`start` tooling * **New**: The v2 views runtime adds typed `ToolRef`/`useCallTool` registration, file-based views, external or inline assets, shared React runtime handling, and managed Inspector integration * **Enhancement** (@mcp-use/cli): the CLI becomes ESM, adds `client connect --negotiate`, automatic client SDK installation, `mcp-use typecheck`, device-code login, and production tunneling * **Enhancement** (create-mcp-use-app): v2 templates use `mcp-server`, `views/`, `mcp-env.d.ts`, Bun-aware installs, and opt-in source maps while retaining the `starter` template as a deprecated alias * **Enhancement** (@mcp-use/inspector): the v2 Inspector adds project-pinned relay/OAuth tooling, hosted and local chat, immutable CDN assets, and MCP Apps/fullscreen improvements; see the Inspector changelog * **Update**: Updated @mcp-use/inspector to v20.0.0 * **Update**: Updated @mcp-use/cli to v4.0.0 * **Update**: Updated create-mcp-use-app to v2.0.0 ## Proxied OAuth fallback & token refresh Last v1 patch before 2.0.0. Ships the unpublished 1.34.4/1.34.5 canary fixes on the `mcp-use@1.34.6` tag. * **Fix**: default `useMcp` auto-proxy fallback uses `https://inspector.manufact.com/inspector/api/proxy` instead of the retired `inspector.mcp-use.com` host, whose 301 broke CORS preflight * **Fix**: refresh expiring OAuth access tokens with the discovered protected-resource URL, retain rotated refresh tokens, and do not reuse an expired token after refresh fails * **Fix**: proxied browser OAuth resource validation succeeds, and discovery failures surface immediately instead of waiting for a popup timeout * **Documentation**: CLI client example and Inspector README drop dead documentation links * **Update**: Updated @mcp-use/inspector to v12.0.6 * **Update**: Updated @mcp-use/cli to v3.6.7 ## Tunneling docs link Patch release fixing the tunnel popover documentation link. * **Documentation** (@mcp-use/inspector): the tunnel popover now links to `https://mcp-use.com/docs/tunneling` instead of the removed Manufact URL * **Update**: Updated @mcp-use/inspector to v12.0.3 * **Update**: Updated @mcp-use/cli to v3.6.4 ## Backend-less Inspector CDN shell Patch release improving the Inspector bundle used by the SDK v2 backend-less shell. * **Fix** (@mcp-use/inspector): CDN auto-connect reads the URL injected by the SDK v2 shell, while the version badge and MCP `clientInfo` fall back to the compile-time bundle version when runtime injection is absent * **Update**: Updated @mcp-use/inspector to v12.0.2 * **Update**: Updated @mcp-use/cli to v3.6.3 ## Hosted OAuth discovery through the proxy Patch release fixing the Authenticate button on gateway-hosted OAuth servers when MCP traffic is proxied for CORS. * **Fix** (auth): `BrowserOAuthClientProvider` re-anchors proxy-origin `.well-known` OAuth discovery onto the actual MCP server. When MCP is tunneled through the inspector/gateway proxy, the SDK derived discovery URLs from the proxy origin whenever no `WWW-Authenticate` hint was available (SSE transport, token refresh) — discovery failed on the proxy origin and the server was misclassified as "does not support OAuth". Lookups are now rewritten to the server origin (including the RFC 8414 §3.1 / RFC 9728 §3.1 path-insertion form), so MCP traffic can stay behind the proxy while OAuth still resolves (`#1843`) * **Update**: Updated @mcp-use/inspector to v12.0.1 * **Update**: Updated @mcp-use/cli to v3.6.2 Release 1.34.0 ## OAuth proxy URL & hosted auth reliability Minor release wiring `oauthProxyUrl` for transparent OAuth-only proxying and fixing false "Server does not support OAuth" failures on gateway-hosted servers. * **New** (react): `UseMcpOptions.oauthProxyUrl` routes OAuth discovery, DCR, and token exchange through a transparent server-side proxy while MCP traffic stays direct — takes precedence over the URL derived from `proxyConfig.proxyAddress`, preserves RFC 8414 issuer validation, and fixes gateway-fronted servers where proxying MCP anchored OAuth discovery on the wrong origin (`#1840`) * **Fix** (react): when OAuth discovery already succeeded and `preventAutoAuth` is set, a later failure (token refresh, SSE fallback, metadata probe on transport origin) surfaces `pending_auth` with the Authenticate button instead of `failed` / "Server does not support OAuth" (`#1840`) * **Enhancement** (@mcp-use/inspector): picks up mcp-use v1.34.0 OAuth fixes — see inspector changelog * **Update**: Updated @mcp-use/cli to v3.6.1 * **Update**: Updated @mcp-use/inspector to v12.0.0 Release 1.33.0 ## MCP Apps runtime, Auto connections & monorepo deploy triggers Minor release making MCP Apps the primary widget runtime (with an Apps SDK compatibility fallback), enforcing `outputSchema` at the tool return position, adding monorepo auto-deploy controls to the CLI, and improving Inspector connection fallback behavior. Inspector ships major v11.0.0 (see inspector changelog). * **New** (react): MCP Apps is now the primary widget runtime — `useWidget` connects the MCP Apps bridge in any hosted iframe (including ChatGPT) and applies host context style variables, while `window.openai` is kept for extension APIs such as file upload/download (`#1739`) * **Fix** (react): widgets on Apps SDK-only hosts no longer hang on the loading spinner — `useWidget` falls back to `window.openai` data and actions when the MCP Apps bridge does not connect, and a connected bridge still takes priority (`#1794`) * **Fix** (react/auth): OAuth proxy fetch is scoped to the selected server's provider instead of mutating global `fetch`, so Via Proxy connections no longer affect Direct connections or unrelated requests (`#1770`) * **Fix** (react): automatic proxy fallback applies the runtime proxy config before deriving gateway URLs and headers, so fallback retries route through the configured Inspector proxy (`#1795`) * **New** (server): a tool's `outputSchema` is now type-checked at the return position — returning a shape that does not match is a compile-time error, while content-only helpers (`text()`, `markdown()`, `image()`, …) stay allowed; the Apps SDK adapter auto-derives `openai/widgetDescription` from the widget description (`#1772`) * **Enhancement** (connectors): the `stdio` connector exposes a `cwd` argument for the spawned server process (`#1785`) * **New** (@mcp-use/cli): monorepo auto-deploy trigger config — `mcp-use deploy` gains `--watch-paths` and `--wait-for-ci`, and `servers update` gains `--watch-paths`, `--deploy-branches`, `--wait-for-ci` / `--no-wait-for-ci`, and `--root-dir`; `servers get` / `update` print the effective trigger config (`#1793`) * **Enhancement** (@mcp-use/cli): `deploy` surfaces the GitHub App installation URL up front when the app is not connected or lacks repo access, and exits cleanly in non-interactive contexts instead of hanging on a prompt (`#1761`) * **Fix** (@mcp-use/cli): `deployments list` preserves the API's ordering instead of re-sorting by creation date client-side (`#1752`) * **Fix** (@mcp-use/cli): Codex skills install to `.agents/skills` instead of the unsupported `.agent/skills` path (`#1756`) * **New** (create-mcp-use-app): the `starter` and `mcp-apps` templates score 100% on the publishing checklist — tools declare a `title` and `outputSchema` and return matching `structuredContent` (`#1772`) * **Enhancement** (@mcp-use/inspector): new connections default to Auto mode, trying Direct first and falling back to the configured proxy when browser connection errors can be resolved through the proxy; see inspector changelog (`#1795`) * **Documentation** (@mcp-use/cli): the new monorepo deploy flags are documented in the CLI reference, deployment guide, and package README (`#1793`) * **Update**: Bumped `hono` to 4.12.25 (`#1755`) and `vite` to 8.0.16 (`#1742`) * **Update**: Updated @mcp-use/cli to v3.6.0 * **Update**: Updated create-mcp-use-app to v0.14.17 * **Update**: Updated @mcp-use/inspector to v11.0.0 ## OAuth proxy callbacks, deploy fixes & hosted localhost chat Patch release for OAuth proxy callback routing, server notification logs, dev-widget noise reduction, and CLI deploy/env fixes. Inspector ships v10.0.1 with hosted-localhost chat fallback and a chat scroll helper (see inspector changelog). * **Fix** (server/oauth): OAuth proxy mode brokers the upstream provider callback through the server's own `/oauth/callback`, so providers only need one registered redirect URI per server while MCP clients keep their own redirect URI and state (`#1728`) * **Fix** (server/oauth): OAuth metadata discovery now mounts the RFC 8414 canonical `/.well-known/oauth-authorization-server{issuer-path}` route for authorization servers with path-suffix issuers (`#1684`) * **New** (server): outgoing notifications log sent and failed deliveries with session identifiers and error details (`#1674`) * **Fix** (server/widgets): dev mode no longer prints widget mounting, serving, or watcher logs when a project has no widgets; the watcher still detects widgets created later (`#1730`) * **Enhancement** (@mcp-use/cli): `mcp-use deploy --dockerfile ` selects a non-default Dockerfile relative to `--root-dir` or the repo root while keeping root `Dockerfile` auto-detection (`#1746`) * **Enhancement** (@mcp-use/cli): REPL/interactive tool calls support `--screenshot`, and resource subscription mode unsubscribes cleanly on Ctrl+C (`#1592`, `#1687`) * **Fix** (@mcp-use/cli): sensitive env vars returned without values render as `` and `EnvVariable.value` accepts `null`; remote API calls use the `manufact.com` base URL (`#1717`, `#1745`) * **Fix** (@mcp-use/cli): deploy repo-access checks use the backend's authoritative per-installation repo endpoint, avoiding false "GitHub App cannot access repository" failures on large or multi-installation orgs (`#1737`) * **Update**: Bumped `esbuild` to v0.28.1 (`#1734`) * **Update**: Updated @mcp-use/cli to v3.5.2 * **Update**: Updated @mcp-use/inspector to v10.0.1 Release 1.32.0 ## OAuth token endpoint discovery Minor release exposing the resolved OAuth `token_endpoint` and client credentials on `useMcp().authTokens` so backends can persist everything needed for proactive server-side token refresh. * **New** (auth): `getTokenEndpoint()` on `BrowserOAuthClientProvider` and `OAuthSessionStore` — resolves and caches the OAuth token endpoint via PRM → authorization-server metadata discovery; persisted in storage for consumers (`#1714`) * **New** (auth): `getClientCredentials()` returns stored `client_id` / `client_secret` from Dynamic Client Registration or a static client — most token endpoints require `client_id` on refresh (`#1714`) * **Enhancement** (react): `useMcp().authTokens` includes optional `token_endpoint`, `client_id`, and `client_secret` after auth — best-effort resolution that never blocks the auth flow (`#1714`) * **Update**: Updated @mcp-use/inspector to v10.0.0 ## Servers update & branch-scoped deploy env Patch release for workspace dependency alignment; `@mcp-use/cli` minor adds `servers update` and branch-scoped environment and deploy management. * **New** (@mcp-use/cli): `mcp-use servers update ` mutates server config in place (production branch, name, description, build/start commands) without delete/recreate — preserving the URL slug and env vars; `--branch` maps to `productionBranch`; pass an empty string to `--build-command`/`--start-command` to clear overrides (`#1711`) * **New** (@mcp-use/cli): `deploy --branch ` defaults to the current git branch and scopes `--env`/`--env-file` sync to that branch's preview environment (`#1711`) * **Enhancement** (@mcp-use/cli): `servers env list/add/update/rm` gain `--branch` for branch-scoped variables; `update`/`rm` accept a variable KEY (resolved within the branch scope) in addition to a UUID (`#1711`) * **Enhancement** (@mcp-use/cli): `deployments restart` gains `--branch ` (defaults to the deployment's branch) (`#1711`) * **Documentation** (@mcp-use/cli): `servers update` and branch-scoped deploy/env flags in the package README and mcp-apps-builder deploy skill reference (`#1711`) * **Update**: Updated @mcp-use/cli to v3.5.0 * **Update**: Updated @mcp-use/inspector to v9.0.1 Release 1.31.0 ## OAuth popup reliability & credential lifecycle Minor release fixing browser OAuth popup flows that stranded connections in "Authenticating…", preserving credentials across routine React lifecycle churn, and clarifying platform-managed deploy feedback in the CLI. Inspector ships major v9.0.0 tracking the new peer dependency (see inspector changelog). * **New**: `runAuthPopup()` exported from `mcp-use/auth` — opener-owned popup runner that settles on a `state`-matched postMessage or BroadcastChannel result, popup close, a `storage` event for persisted tokens, or a timeout; close and timeout paths check storage before declaring cancelled so a missed message with landed tokens still succeeds (`#1703`) * **Enhancement**: `runAuthPopup()` keeps message and storage listeners alive for a grace window (default 20s) after `popup.closed` reports true without tokens — tolerates COOP browsing-context-group swaps that sever `window.opener` while the consent window is still open (`#1703`) * **Fix** (react): `useMcp().authenticate()` awaits `runAuthPopup()` and owns every terminal transition — success reconnects, cancelled/timeout return to `pending_auth` (re-enabling Authenticate), error fails the connection instead of hanging indefinitely (`#1703`) * **Fix** (auth): OAuth callback detects popup flow from stored `flowType` (not only `window.name`) and always broadcasts the result; result payloads carry the originating `state` and `serverUrlHash` so listeners scope to the right server and late failures do not clobber an already-`ready` connection (`#1703`) * **Enhancement** (auth): `renderCloseWindowMessage()` accepts an optional `returnUrl` link for tab-mode fallbacks when the popup cannot auto-close (`#1703`) * **Fix** (react): `McpClientProvider.removeServer()` no longer clears OAuth storage by default — pass `{ clearCredentials: true }` for explicit logout; `updateServer()` and `useMcp` unmount no longer wipe credentials on routine lifecycle churn (`#1703`) * **Fix**: move `chalk` from optionalDependencies to dependencies — statically imported by server logging/lifecycle code, so `pnpm install --no-optional` no longer fails at module load (`#1702`) * **Enhancement** (@mcp-use/cli): after `deploy --no-github`, print a note that source lives in a private platform-managed repository and link to the dashboard to view or migrate to GitHub (`#1703`) * **Enhancement** (@mcp-use/cli): `servers get` shows `mcp-use-managed (private)` when the connected repo has no exposed GitHub full name (`#1703`) * **Fix** (@mcp-use/inspector): delete-server passes `{ clearCredentials: true }` on explicit removal — see inspector changelog (`#1703`) * **Update**: Updated @mcp-use/inspector to v9.0.0 * **Update**: Updated @mcp-use/cli to v3.4.2 ## Chalk CJS compatibility Patch release restoring CommonJS startup compatibility for server bundles on Node 22 and newer; Inspector ships v8.0.2 with the same `mcp-use` peer update. * **Fix**: downgrade chalk to v4 — chalk 5 is ESM-only and kept external by tsup, so the CJS bundle's `require("chalk")` on Node 22 and newer returned the module namespace instead of the chalk instance, crashing CJS-built backends (e.g. the Next.js template) on startup with `TypeError: import_chalk.default.gray is not a function` (`#1701`) * **Update**: Updated @mcp-use/inspector to v8.0.2 * **Update**: Updated @mcp-use/cli to v3.4.1 ## Deploy without GitHub, device-code login & widget iframe fixes Patch release for `McpUseProvider` zero-height collapse, `useMcp` disconnect/reconnect race fixes, and clearer not-ready errors; `@mcp-use/cli` minor adds tarball deploy without a user GitHub repo and non-interactive device-code login for web onboarding. * **Enhancement** (@mcp-use/cli): `mcp-use deploy --no-github` packs the local project into a tarball and uploads it to the platform-managed org so first deploy works without connecting GitHub; redeploys of a linked platform-managed server auto-detect from `connectedRepository.isManaged` (`#1691`) * **New** (@mcp-use/cli): `mcp-use login --device-code ` authenticates with a pre-approved OAuth device code for non-interactive flows (web onboarding), skipping the browser step (`#1691`) * **Fix**: `McpUseProvider` with `autoSize` now notifies zero height when a widget renders `null`, so host iframes collapse instead of keeping the last non-zero height (`#1693`) * **Fix** (react): `useMcp` stale `disconnect()` after a URL change or a manual disconnect racing a reconnect no longer nulls `clientRef` or resets hook state to `discovering` when superseded by a newer `connect()` (`connectEpochRef`) — fixes "MCP client is not ready (current state: ready)" and similar races in the inspector and other embeds (`#1528`) * **Fix** (client): `BaseMCPClient.closeSession()` only deletes a session slot when it still references the closing session, so a parallel `createSession()` from a reconnect is not wiped — fixes "No active session found" on the next tool call after reconnect (`#1528`) * **Enhancement** (react): clearer "MCP client is not ready" errors via `formatMcpNotReadyReason`, distinguishing a missing client (`client disconnected`) from a non-ready state (`#1528`) * **Fix** (@mcp-use/inspector): MCP Apps / Apps SDK status labels no longer intercept iframe pointer events - see inspector changelog (`#1694`, `#1678`) * **Documentation**: tip on `` for widgets that conditionally return `null` with `autoSize` * **Documentation**: `deploy --no-github`, `login --device-code`, and dual deploy paths in the CLI reference and Manufact Cloud deployment guide * **Update**: Updated @mcp-use/inspector to v8.0.1 * **Update**: Updated @mcp-use/cli to v3.4.0 Release 1.30.0 ## OpenAPI server generation & MCP instructions Minor release adding `MCPServer.fromOpenAPI()` for generating MCP tools from OpenAPI documents, server-wide `instructions` returned during MCP initialization, idle session ref cleanup, and CLI fixes for paginated cloud lists and multi-installation GitHub repo access. Inspector ships major v8.0.0 tracking the new `mcp-use` peer dependency (see inspector changelog). * **New**: `MCPServer.fromOpenAPI()` - create an MCP server from a parsed OpenAPI document; each included operation registers as a tool with generated input schemas and HTTP request handling (`baseUrl`, bearer token, and static header auth supported); ships with an `openapi` server example against live `api.weather.gov` (`#1583`) * **New**: `instructions` option on `MCPServer` - server-wide model instructions returned during MCP initialization for cross-tool workflows and constraints that do not belong in individual tool descriptions (`#1601`) * **New** (create-mcp-use-app): `starter` and `mcp-apps` templates scaffold with an `instructions` placeholder (`#1601`) * **Fix**: idle session cleanup releases registered refs for expired sessions instead of leaving stale registrations behind (`#1624`) * **Fix**: escape backslashes before double quotes when converting Zod string literals and enums to TypeScript in `zod-to-ts`, so generated `.d.ts` output stays valid when literal values contain `\` or `"` (`#1661`) * **Update**: bump `hono` to `4.12.23` for [CVE-2026-47674](https://github.com/advisories/GHSA-xrhx-7g5j-rcj5) - non-canonical IPv6 forms could bypass static deny rules in the `ip-restriction` middleware (`#1663`) * **Enhancement** (@mcp-use/cli): `servers list` and `deployments list` handle paginated Cloud API responses with a default page size of 30 and next-page guidance (`#1619`) * **Fix** (@mcp-use/cli): deploy repo access check aggregates repos across all GitHub App installations linked to the organization instead of only the first one, so deploys no longer fail with "GitHub App doesn't have access" when the repo belongs to a different installation (`#1629`, MCP-2358) * **Documentation**: OpenAPI server generation guide and `examples/server/features/openapi` (`#1583`) * **Documentation**: MCP server `instructions` in configuration, quickstart, and installation docs (`#1601`) * **Update**: Updated @mcp-use/inspector to v8.0.0 * **Update**: Updated @mcp-use/cli to v3.3.2 * **Update**: Updated create-mcp-use-app to v0.14.15 ## OAuth transport auth hardening & security dependency bumps Patch release hardening OAuth-protected MCP transport routes and resolving open Dependabot security advisories across the TypeScript workspace. * **Fix**: Harden authentication coverage for OAuth-protected MCP transport endpoints and advertise path-scoped protected-resource metadata where required by OAuth clients (`#1628`) * **Update**: Bump `hono` to `^4.12.18` and raise `pnpm.overrides` floors for `axios`, `protobufjs`, `ws`, `uuid`, `fast-uri`, `postcss`, `langsmith`, `dompurify`, `qs`, `react-router`, `better-auth`, and other flagged transitive deps so the lockfile resolves to patched versions within current majors (`#1615`, `#1626`) * **Update**: Updated @mcp-use/inspector to v7.0.1 * **Update**: Updated @mcp-use/cli to v3.3.1 Release 1.29.0 ## Public landing pages and Ollama chat support Minor release adding a public browser landing page for OAuth-protected servers, a Supabase URL override for local/self-hosted instances, Claude UI-resource domain hashing, and a round of OAuth callback and React-provider hardening. Inspector ships a major v7.0.0 with local LLM (Ollama) chat and image tool results (see inspector changelog). * **New**: `publicLandingPage` option on `MCPServer` - keep the browser landing page (`GET` + `Accept: text/html`) reachable without authentication while the MCP endpoint stays OAuth-protected; ships with a `public-landing-page` server example (`#1550`) * **New**: `supabaseUrl` override on `oauthSupabaseProvider` - point the provider at a local or self-hosted Supabase (e.g. `http://localhost:54321`) instead of the hosted `https://${projectId}.supabase.co`; set via the `supabaseUrl` config option or `MCP_USE_OAUTH_SUPABASE_URL`, and `projectId` becomes optional when it is set (`#1517`) * **New**: Claude UI-resource domain hashing - when a Claude client requests a widget/UI resource that declares a `ui.domain`, the server rewrites it to a stable `.claudemcpcontent.com` content domain (`#1599`) * **Breaking**: `mcp-use/browser` no longer exports the LangChain agents (`MCPAgent`, `RemoteAgent`, adapters, observability, AI SDK utils) - they moved to `mcp-use/browser/agent`, so client bundles that only need `MCPClient` no longer pull in `@langchain/*` (`#1580`) * **Fix**: browser OAuth popup callback edge cases in `onMcpAuthorization()` - popups whose `window.opener` was severed by COOP / cross-origin redirects now render an in-place close-window message and broadcast over a same-origin `BroadcastChannel("mcp_auth_callback")` so `useMcp` no longer hangs in `authenticating`; repeat invocations in one page load (HMR, strict-mode double render) reuse a cached promise instead of re-exchanging the code (`#1580`) * **Fix**: redact OAuth token-verification errors from client responses while logging the details server-side (`#1573`) * **Fix**: normalize the issuer trailing slash before appending `/.well-known/oauth-authorization-server` in the DCR-direct metadata proxy, fixing the double-slash 404 against providers like Auth0 (`#1483`) * **Fix**: normalize `0.0.0.0` and `::` to `localhost` in the inspector autoConnect URL so OAuth-protected `mcp-use dev` flows match the published resource metadata and pass the SDK's strict origin check (`#1552`) * **Fix** (react): `McpClientProvider.removeServer` / `updateServer` no longer trigger React's "cannot update a component while rendering a different component" warning - teardown side effects (`disconnect()`, `clearStorage()`) now run after the state updaters instead of inside them (`#1561`) * **Fix** (react): treat `name` as a meaningful change in `McpServerWrapper` so alias-only edits propagate through `onUpdate` and the inspector tile heading updates immediately (`#1539`) * **Fix**: pin published dependency versions in `mcp-use`'s `package.json` (`#1610`) * **New** (@mcp-use/cli): `mcp-use client screenshot` auto-sizes captures to the widget's natural rendered dimensions when `--width`/`--height` are omitted, and now handles external MCP server URIs like `ui://excalidraw/mcp-app.html` (flattened to `-`) that previously broke the preview route (`#1579`) * **Fix** (@mcp-use/cli): widget assets resolve correctly when `MCP_URL` is set at build time - Vite `base` and `window.__getFile` now point at `${MCP_URL}/mcp-use/widgets/{widget}/`, matching the production static route (`#1560`) * **Fix** (create-mcp-use-app): move the `mcp-apps` template's pnpm settings into `pnpm-workspace.yaml` so scaffolded apps install cleanly under pnpm 10 (`#1602`) * **Enhancement** (@mcp-use/inspector): local LLM provider (Ollama) chat, MCP image tool results forwarded as real image content, an MCP-server reconnect banner, and widget fullscreen / display-mode fixes (see inspector changelog) * **Documentation**: clarify the "Inspector: Skipped in production" log and the `start` CLI reference so users rebuild with `mcp-use build --with-inspector` instead of passing the flag to `mcp-use start` (`#1505`) * **Chore**: prune 187 unused exports and delete unused source files flagged by Knip across the workspace, and enforce Knip in CI (`#1511`, `#1476`, `#1510`, `#1512`) * **Update**: Updated @mcp-use/inspector to v7.0.0 * **Update**: Updated @mcp-use/cli to v3.3.0 * **Update**: Updated create-mcp-use-app to v0.14.13 Release 1.28.0 ## Node OAuth & widget screenshot Minor release adding a Node OAuth client provider and widget screenshot improvements. * **New**: `mcp-use/auth/node` entrypoint — `NodeOAuthClientProvider`, `FileKVStore`, the `KVStore` type, and re-exports of the SDK's `auth` and `UnauthorizedError`; the provider owns a localhost OAuth loopback (preferred port 33418, walks up to 33427 on conflict) and persists tokens, client info, and code verifiers to `~/.mcp-use/oauth//` with `0o600` perms and atomic-rename writes (`#1452`) * **Refactor**: `OAuthSessionStore` extracted from `BrowserOAuthClientProvider` — platform-neutral helper parameterised over a `KVStore` that owns token storage, JWT-expiry-driven refresh (with deduplication), client-info validation, code-verifier handling, and authorization-state persistence; the browser provider now delegates the SDK `OAuthClientProvider` methods to it, no behavior change (`#1451`) * **Fix**: `forceRefresh()` now actually exchanges the refresh token via `OAuthSessionStore.forceRefresh()` instead of zeroing `access_token` and re-reading via `tokens()` (which gated the refresh path on a truthy `access_token` and silently returned stale tokens); the loopback failure page also HTML-escapes `error` and `error_description` (`#1452`) * **Documentation**: `MCPServer.tool()` JSDoc `@example` blocks now include the matching `import { ... } from "mcp-use/server"` line and name the response helpers (`text`, `object`, `image`, `markdown`, `html`, `error`, `widget`, …); the `create-mcp-use-app` blank template's commented tool/resource/prompt blocks gain the same import breadcrumbs (`#1474`) * **Fix** (@mcp-use/cli): tests no longer touch the developer's real `~/.mcp-use` directory — `session-storage.test.ts` mocks `node:os.homedir` and `cli-integration.test.ts` spawns the CLI with `HOME`/`USERPROFILE` set to per-test temp dirs (`#1494`) * **Update** (@mcp-use/cli): rename "mcp-use cloud" to "Manufact cloud" in `mcp-use login --help` and the body banner, matching the existing wording in `logout` and `deploy` (`#1488`) * **Enhancement** (@mcp-use/inspector): new `ViewPreview` component and `/preview/:view` route, dark-mode aware scrollbars (see inspector changelog) * **Fix**: resolved duplicate exports flagged by Knip — annotated the `Tel` alias for `Telemetry` with `@alias`, unified the canonical source path for telemetry exports in `src/telemetry/index.ts` (Node default, tsup substitutes the browser implementation in browser bundles), and removed the redundant default export of `JsonRpcLoggerView` in `@mcp-use/inspector`; named exports unchanged (`#1453`) * **Chore**: drop unused dependencies and devDependencies flagged by `knip` across the workspace; declare `jsdom` and `@vitest/coverage-v8` as explicit devDependencies on `mcp-use` (`@vitest/coverage-v8` pinned to `~4.0.18` to match `vitest`) (`#1458`, `#1454`) * **Documentation**: refreshed CLI references in the docs site (`#1488`) * **Update**: Updated @mcp-use/inspector to v6.0.0 * **Update**: Updated @mcp-use/cli to v3.2.0 * **Update**: Updated create-mcp-use-app to v0.14.12 ## ChatGPT App metadata & inspector MCP App width fix Patch release surfacing tool `outputSchema` in `tools/list`, adding tool annotations and `outputSchema` to the `create-mcp-use-app` mcp-apps template, and fixing MCP App width in inspector chat. * **Fix**: Forward `outputSchema` from tool definitions into the MCP SDK so `tools/list` exposes output JSON Schema for clients - required for ChatGPT App Store metadata validation (`#1466`) * **New** (create-mcp-use-app): MCP tool `annotations` (`readOnlyHint`, `openWorldHint`, `destructiveHint`) and widget `outputSchema` in the `mcp-apps` template; tool annotations in the `starter` template; MCP Apps docs aligned with ChatGPT App Store metadata expectations (`#1466`) * **Fix** (@mcp-use/inspector): MCP App width is pinned in chat - only height responds to widget-reported sizes, so the chat panel no longer collapses when a widget reports narrower content (`#1462`) (see inspector changelog) * **Documentation**: Clerk and WorkOS OAuth example READMEs now link to live pages - Clerk Dashboard `/sign-in` (200 instead of 404) and WorkOS `/docs/authkit` (`#1470`) * **Update**: Updated @mcp-use/inspector to v5.0.1 * **Update**: Updated @mcp-use/cli to v3.1.4 * **Update**: Updated create-mcp-use-app to v0.14.11 Release 1.27.0 ## Clerk OAuth, pre-registered client IDs & inspector providers Minor release adding a Clerk OAuth provider, pre-registered OAuth client credentials for proxy-mode flows, OpenRouter and OpenAI-compatible providers in the Inspector chat, browser-side telemetry env-var honoring, and a CLI fix for env propagation on redeploys. * **New**: `oauthClerkProvider` for using Clerk as an OAuth authorization server in MCP servers - DCR-direct mode where MCP clients register and authenticate directly with Clerk and the server verifies Clerk-issued JWTs via JWKS; default scopes are `["profile", "email", "offline_access"]` and `openid` is excluded by default because it requires OIDC to be explicitly enabled in the Clerk Dashboard (`#1429`) * **New**: Pre-registered OAuth client credentials in proxy mode - `UseMcpOptions` / `McpServerOptions` accept `oauth: { clientId?, clientSecret?, scope? }`; with `clientId` set, `BrowserOAuthClientProvider` returns it from `clientInformation()` so the SDK skips Dynamic Client Registration (required for providers like Slack or WorkOS that strip `registration_endpoint` from metadata); with `clientSecret` set, the SDK auto-switches token-endpoint auth from `none` to `client_secret_basic`/`client_secret_post` (`#1400`) * **Fix**: `MCP_USE_ANONYMIZED_TELEMETRY=false` now disables the in-browser `useMcp` `posthog-js` init - the inspector server mirrors the env var into a per-page runtime flag (`window.__MCP_USE_ANONYMIZED_TELEMETRY__`) before the client bundle runs, so a single env var disables every telemetry path (Node-side, server-side proxy, and browser); the flag is page-scoped so unsetting the env var fully restores defaults on the next page load (`#1443`) * **Fix** (@mcp-use/cli): `mcp-use deploy --env`/`--env-file` propagates env vars on redeploys - previously only forwarded on initial server creation, now upserts each entry against the env-variables API (`PATCH` for existing keys, `POST` for new keys) before triggering the deployment (`#1433`) * **Enhancement** (@mcp-use/inspector): OpenRouter and OpenAI-compatible providers in chat configuration; `Client ID` / `Client Secret` / `Scope` fields in the Authentication dialog (see inspector changelog) * **Update**: Updated @mcp-use/inspector to v5.0.0 * **Update**: Updated @mcp-use/cli to v3.1.3 ## Debug log tiers & widget dev first render Patch release adding tiered `MCP_DEBUG_LEVEL` logging for MCP servers, pre-warming Vite widget entries in dev to avoid first-render 504s, and Inspector 3.0.2 (see inspector changelog). * **New**: `MCP_DEBUG_LEVEL` environment variable on MCP servers - `info` (default), `debug`, or `trace` - tiered framework logging with clearer precedence than legacy truthy `DEBUG` (`#1430`) * **Fix**: Widget dev server pre-warms Vite entries before tool registration so the first widget render does not time out with HTTP 504 (`#1425`) * **Fix** (@mcp-use/inspector): Command palette e2e tests updated for the Settings dropdown trigger (`#1428`) (see inspector changelog) * **Update**: Updated @mcp-use/inspector to v3.0.2 * **Update**: Updated @mcp-use/cli to v3.1.2 * **Update**: Updated create-mcp-use-app to v0.14.10 ## OAuth error handling, Supabase endpoints & CLI bundling Patch release fixing OAuth error redirects, Supabase OAuth 2.1 endpoints, CLI bundling for Node ESM, bun build compatibility, `create-mcp-use-app` dot-directory init, and Inspector 3.0.1 (see inspector changelog). * **Fix**: OAuth callback redirects back to the inspector with error parameters when authorization fails (user denies, server error) instead of surfacing a raw error page with stack traces; the inspector surfaces these as a persistent toast (`#1381`) * **Fix**: `SupabaseOAuthProvider` endpoint getters now return OAuth 2.1 paths (`/auth/v1/oauth/authorize`, `/auth/v1/oauth/token`) instead of the legacy `/auth/v1/authorize` and `/auth/v1/token` (`#1422`) * **Fix** (@mcp-use/cli): `mcp-use build` is non-fatal under the bun runtime - detects bun, skips `tsx/esm/api` type-generation with a warning, wraps the build in try/catch, and runs `tsc` via `process.execPath` instead of hardcoded `node` (`#1382`) * **Fix** (@mcp-use/cli): bundle each server entry with esbuild (`bundle: true`, `packages: "external"`) so extensionless relative TypeScript imports resolve under plain Node ESM without `ERR_MODULE_NOT_FOUND` (`#1357`) * **Fix** (create-mcp-use-app): allow `.` as project name to initialize in the current directory; errors if the directory is not empty (`#1413`) * **Enhancement** (@mcp-use/inspector): OAuth single-tab redirect, session-storage reconnect, Hono duck-type detection, widget z-index, free-tier embed UI, managed LLM embed chrome (see inspector changelog) * **Update**: Updated @mcp-use/inspector to v3.0.1 * **Update**: Updated @mcp-use/cli to v3.1.1 * **Update**: Updated create-mcp-use-app to v0.14.10 Release 1.25.0 ## OAuth DCR-direct, Next.js drop-in & CLI 3.1 Minor release refactoring built-in OAuth providers to DCR-direct by default, adding a Next.js MCP drop-in via `--mcp-dir`, CLI 3.1 with better org and session handling, and Inspector 3.0 (see inspector changelog). * **New**: `oauthProxy` helper for building proxy-mode providers (Google, GitHub, or any upstream authorization server that does not support Dynamic Client Registration) - complements the new DCR-direct default (`#1321`) * **New**: `jwksVerifier` helper for JWKS-based token verification inside custom providers (`#1321`) * **New**: Auth0 OAuth proxy example under `examples/server/oauth/auth0-proxy` demonstrating the new proxy pattern * **Update**: Built-in providers (Auth0, WorkOS, Supabase, Keycloak, Better Auth) now only support DCR-direct - clients talk to upstream authorization servers directly, and provider configurations no longer accept `clientId` / `clientSecret` (`#1321`) * **Update**: `verifyToken` is now a required function on custom providers (`#1321`) * **Fix**: OAuth `authenticate()` preserves the pathname component (for example `/api/auth`) when the authorization server uses a `basePath`, instead of collapsing the URL to its origin (`#1360`) * **New**: Next.js drop-in - `mcp-use dev/build/start --mcp-dir ` lets a Next.js app colocate an MCP server (default `src/mcp/`), share `@/*` aliases, Tailwind, and the app's component library; the CLI auto-shims Next.js server-runtime modules (`server-only`, `client-only`, `next/cache`, `next/headers`, `next/navigation`, `next/server`) when `next` is detected, loads the Next.js env cascade in the MCP server process, and widget builds fail fast when a widget transitively imports a server-only module (`#1332`) * **New** (@mcp-use/cli): `mcp-use login --org ` for non-interactive org selection; login fails fast without a TTY and no `--org` instead of hanging on stdin (`#1379`) * **New** (@mcp-use/cli): ORG column in `mcp-use deployments list` output (`#1378`) * **Fix** (@mcp-use/cli): `mcp-use deploy --org ` now respects the flag when `.mcp-use/project.json` links to a server in a different org - CLI warns and creates a new server in the requested org instead of silently redeploying to the linked one (`#1380`) * **Fix** (@mcp-use/cli): `mcp-use login` validates the stored API key against the backend before short-circuiting with "already logged in"; expired or revoked keys drop into device-auth automatically, and authenticated commands (`whoami`, `org`, `servers`, `deployments`, `env`) funnel 401s through a shared handler with a "session expired - run `npx mcp-use login`" hint (`#1383`) * **Fix** (@mcp-use/cli): `mcp-use start` auto-discovers an available port when the default port is in use (`#1377`) * **Enhancement** (@mcp-use/inspector): Inline elicitation in the chat thread, Open Graph and Twitter Card meta tags on the hosted inspector (see inspector changelog) * **Enhancement** (create-mcp-use-app): Only copy the `mcp-apps-builder` skill into new projects; skip the deprecated `mcp-builder` and `chatgpt-app-builder` skills (`#1375`) * **Documentation**: New `oauth-proxy` provider guide and refactored provider pages (Auth0, WorkOS, Supabase, Keycloak, Better Auth, custom); new Next.js drop-in guide; updated CLI reference * **Update**: Updated @mcp-use/inspector to v3.0.0 * **Update**: Updated @mcp-use/cli to v3.1.0 * **Update**: Updated create-mcp-use-app to v0.14.9 ## Landing deeplinks, `colorScheme` & Inspector 2.2 Patch release adding optional `colorScheme` on `McpUseProvider`, a server landing deeplink to the hosted inspector, stronger deploy behavior in `@mcp-use/cli`, cloud server environment-variable commands, and Inspector 2.2 (see inspector changelog). * **New**: `colorScheme` on `McpUseProvider` (default `false`) - when `false`, `ThemeProvider` does not set `color-scheme` on the document root so transparent iframe backgrounds stay transparent; opt in with `true` for native scrollbars / `light-dark()` in widgets * **Fix**: Server landing routes include a deeplink to open the MCP server in the hosted manufact inspector * **New** (@mcp-use/cli): `mcp-use servers env` subcommands to list, create, update, and delete environment variables on cloud servers (`#1372`) * **Fix** (@mcp-use/cli): `mcp-use deploy` surfaces failures from mutating git commands (init, commit, push), normalizes the default branch to `main` before push, verifies a commit exists, and shell-quotes commit messages (`#1354`) * **Update** (@mcp-use/cli): Deploy treats HTTP 401 as an invalid or expired API session and prompts re-authentication instead of misreporting GitHub App connection state (`#1356`) * **Enhancement** (@mcp-use/inspector): Hosted chat configuration, copy/export chat, inspector LLM stack without LangChain, OAuth popup close page, and related UX (see inspector changelog) * **Update**: Updated @mcp-use/inspector to v2.2.0 * **Update**: Updated @mcp-use/cli to v3.0.2 ## OAuth fetch cleanup when switching transports Patch release fixing OAuth in the embedded inspector when switching from Via Proxy to Direct - `BrowserOAuthClientProvider` restores `window.fetch` when `useMcp` unmounts so a stale proxy interceptor cannot break direct flows. * **Fix**: Restore the `window.fetch` interceptor installed by `BrowserOAuthClientProvider` when `useMcp` unmounts - resolves "Protected resource does not match" after switching from Via Proxy to Direct * **Fix** (@mcp-use/inspector): Same fetch lifecycle in the inspector client (see inspector changelog) * **Update**: Updated @mcp-use/inspector to v2.1.0 * **Update**: Updated @mcp-use/cli to v3.0.1 Release 1.24.0 ## OAuth scopes, telemetry & CLI 3 Minor release for `mcp-use` with OAuth scope customization, telemetry, sub-path OAuth routing, and a Generative-AI JSON Schema fix; major `@mcp-use/cli` release with device-flow auth and manufact API alignment; Inspector 2.0 (see inspector changelog). * **New**: Configurable OAuth scopes - `scopesSupported` on shared OAuth config and built-in providers * **Fix**: `CustomProviderConfig` matches documented fields (`jwksUrl`, `scopesSupported`, `userInfoEndpoint`, `clientId`, `clientSecret`, `mode`, `audience`); optional `getClientId()`, `getUserInfoEndpoint()`, and `getAudience()` on `OAuthProvider`; OAuth routes use those accessors instead of unsafe casts * **New**: Telemetry support with browser and Node implementations and related dependency updates * **New**: `defaultCallbackUrl` on `McpClientProvider` so OAuth redirect URLs stay correct when the UI is mounted under a path basename (for example embedded inspector at `/inspector`) * **Fix**: Google provider tool schemas - use `z.object({}).catchall()` instead of `z.record()` so emitted JSON Schema omits `propertyNames`, which Google's API rejects * **Fix**: Windows path handling in server and tooling code paths * **Enhancement**: Several internal log lines moved from info to debug to reduce noise in normal operation * **Fix** (@mcp-use/inspector): OAuth callback URL when the inspector basename is `/inspector`; thinking indicator after streamed assistant messages; tab persistence across refresh (see inspector changelog) * **New** (@mcp-use/cli): Device-flow authentication for login and session refresh against the cloud * **Update** (@mcp-use/cli): CLI refactored to new manufact cloud APIs across deploy, auth, organization, and server commands * **Fix** (@mcp-use/cli): Deployment flow when linking GitHub repositories (`#1331`) * **Update**: Updated @mcp-use/inspector to v2.0.0 * **Update**: Updated @mcp-use/cli to v3.0.0 ## Embedded inspector without LangChain Patch release fixing embedded inspector when the agent graph is not installed, and clearer diagnostics when mounting the inspector UI fails. * **Fix**: Export `telFetch` from `mcp-use/telemetry/tel-fetch` (tsup build) so inspector server code does not import the root `mcp-use` entry, which eagerly loads the agent stack - fixes embedded inspector when `langchain` is not installed * **Fix**: Log inspector UI mount failures in development or when `MCP_USE_DEBUG` is set (production remains quiet) * **Fix** (@mcp-use/inspector): `telFetch` import uses the telemetry subpath (see inspector changelog) * **Update**: Updated @mcp-use/inspector to v1.0.1 * **Update**: Updated @mcp-use/cli to v2.21.4 Release 1.23.0 ## Better Auth, server metadata & Inspector 1.0 Minor release adding a Better Auth OAuth provider, metadata-only client updates, dependency hardening, and a major Inspector release. * **New**: Better Auth OAuth provider for MCP servers - see authentication docs and `examples/server/oauth/better-auth` * **New**: `updateServerMetadata()` on `McpClientProvider` updates display metadata without reconnecting; connection-affecting changes still use `updateServer()` * **Fix**: Windows-compatible ESM import paths for dev and tooling * **Enhancement** (@mcp-use/inspector): Stream protocol in chat, `disabledTools`, editable server aliases with shared display-name resolution, tab persistence and URL sync, tool-invocation serialization and screenshots (see inspector changelog) * **Update**: Vite 8.0.5, Hono 4.12.12, `@hono/node-server` 1.19.13 across the TypeScript workspace * **Fix**: Tighter `pnpm` overrides and lockfile refresh for `pnpm audit`; `lodash` override in the mcp-apps scaffold template for standalone installs * **Documentation**: `updateServerMetadata` in the `useMcpClient` API reference; authentication overview links to the Better Auth guide * **Update**: Updated @mcp-use/inspector to v1.0.0 * **Update**: Updated @mcp-use/cli to v2.21.3 * **Update**: Updated create-mcp-use-app to v0.14.8 ## Inspector dependency & bundling alignment Patch release adjusting how `@mcp-use/inspector` depends on `mcp-use` so bundling and shared types both work. * **Fix** (@mcp-use/inspector): Restore `mcp-use` as both a `dependency` and `peerDependency` - needed to bundle non-React subpaths (`mcp-use/auth`, `mcp-use/browser`) with transitive deps (e.g. LangChain), while `peerDependency` keeps `mcp-use`/`react` types aligned with the host app * **Update**: Updated @mcp-use/inspector to v0.26.1 * **Update**: Updated @mcp-use/cli to v2.21.2 * **Update**: Updated create-mcp-use-app to v0.14.7 ## Type Compatibility & Peer Dependency Alignment Patch release focused on pnpm peer-variant type compatibility, inspector dependency alignment, and template dependency cleanup. * **Fix**: Resolved TypeScript nominal type conflicts when `mcp-use` is installed as multiple pnpm peer-variant copies - moved internal client-init tracking off class surface to avoid `.d.ts` incompatibilities * **Fix**: Reverted `stripInternal`/`@internal` approach that degraded downstream tool handler type inference; keeps type safety while preserving consumer inference behavior * **Fix** (@mcp-use/inspector): Moved `mcp-use` from `dependencies` to `peerDependencies` so consumers share a single `mcp-use` type instance (addresses TS2322 duplicate-type scenarios) * **Update** (@mcp-use/inspector): Upgraded `@mcp-ui/client` to v7; replaced removed legacy renderer path with sandboxed iframe handling for `ui://` resources and removed remote-dom usage * **Update**: Updated @mcp-use/inspector to v0.26.0 * **Update**: Updated @mcp-use/cli to v2.21.1 * **Update**: Updated create-mcp-use-app to v0.14.7 ## CLI Organizations, Non-Interactive Deploy & Typed Middleware Patch release with CLI org management, non-interactive deployments, improved middleware/tool context propagation, typed middleware ergonomics, and ErrorBoundary customization. * **New** (@mcp-use/cli): Organization commands - `mcp-use org list`, `mcp-use org switch`, `mcp-use org current`; login prompts for org selection when multiple; `whoami` shows active organization; org preference persisted in `~/.mcp-use/config.json` * **Enhancement** (@mcp-use/cli): Deploy to a specific org with `mcp-use deploy --org `; all org-scoped API requests include `x-profile-id` * **New** (@mcp-use/cli): Non-interactive deploy with `-y` / `--yes` - skips confirmations; replaces “Press Enter” with polling; errors if not logged in (requires `mcp-use login`) * **Fix**: Context propagation into tool handlers - singleton AsyncLocalStorage via `globalThis`, safe Hono context extraction, and forwarding middleware `ctx.auth` / `ctx.state` into enhanced tool context * **Fix**: `ctx.auth` typing is now `AuthInfo | undefined` when OAuth isn’t configured (enables `if (!ctx.auth) ...` guards) * **Enhancement**: Typed MCP middleware context - `server.use("mcp:tools/call" | "mcp:resources/read" | "mcp:prompts/get", ...)` now narrows `ctx.params` to method-specific shapes; `mcp:*` remains generic * **Enhancement**: `outputSchema` tools can return response helpers (`text()`, `markdown()`, `mix()`, etc.) without type errors * **Enhancement**: `server.resourceTemplate()` supports an optional Zod `schema` to type `params` as `z.infer` * **Enhancement**: `ErrorBoundary` now supports `fallback` (node or `(error) => node`) and `onError` for reporting (default UI unchanged) * **Update**: Updated @mcp-use/inspector to v0.25.1 * **Update**: Updated @mcp-use/cli to v2.21.0 Release 1.22.0 ## Vite 8, MCP Middleware & Model Context Minor release with Vite 8 across tooling, MCP operation middleware, files and model context APIs, elicit and adapter fixes, and Inspector tunnel controls. * **New**: MCP operation-level middleware - `server.use("mcp:*", ...)` and specific patterns (`mcp:tools/call`, `mcp:tools/list`, `mcp:resources/read`, `mcp:resources/list`, `mcp:prompts/get`, `mcp:prompts/list`) with typed `MiddlewareContext` (`method`, `params`, `session`, `auth`, `state`) * **New**: `useFiles` React hook with `isSupported` and `modelVisible` for file attachments; `ModelContext` component and `modelContext` imperative API for server-side model context injection * **Enhancement**: Vite 8.0 with Rolldown bundler and `@vitejs/plugin-react` 6 across packages, examples, and CLI/inspector tooling * **Enhancement**: Conformance client - pass `reconnectionOptions` so SDK-level SSE reconnection behaves correctly when `autoReconnect` is disabled * **Fix**: Elicit - map `result.content` to `result.data` for Zod validation; spec-compliant clients use `content`; backward-compatible fallback to `data` * **Fix**: LangChainAdapter - tool name collisions when exposing resources/prompts as tools; `reserveName` resolves prefixed names with a numeric suffix when needed; prompt names sanitized like resource names * **Enhancement** (@mcp-use/inspector): Start/stop the `mcp-use dev` tunnel from the Inspector (see inspector changelog) * **Update**: Updated @mcp-use/inspector to v0.25.0 * **Update**: Updated @mcp-use/cli to v2.20.0 ## Zod Peer Dep, Esbuild Build & Windows Fix Patch release with Zod peer dependency, esbuild transpilation, TypeGen Zod v4 fixes, and Windows path handling. * **Fix**: Move zod from dependencies to peerDependencies - prevents duplicate type trees when users have a different Zod v4 version; avoids type errors or OOM during `mcp-use build` * **Fix**: TypeGen crash with Zod v4 enum schemas - `zod-to-ts` now handles Zod v4 `ZodEnum` (`_def.entries`), `ZodDiscriminatedUnion`; CLI reports success/failure of type generation instead of silently failing * **Fix** (@mcp-use/cli): Windows crash in `mcp-use dev` and `mcp-use generate-types` - use `file://` URL in tsImport instead of raw OS paths (fixes `ERR_UNSUPPORTED_ESM_URL_SCHEME`) * **Fix**: Dependabot security alerts - updated flatted, tar, hono, express-rate-limit, dompurify, minimatch, rollup, form-data, lodash, and other transitive deps * **Enhancement** (@mcp-use/cli): `mcp-use build` uses esbuild for transpilation instead of tsc - avoids OOM on complex type graphs (Zod v4, Prisma); type checking runs separately via `tsc --noEmit`; add `--no-typecheck` to skip type checking for faster builds * **Update**: Updated @mcp-use/inspector to v0.24.5 * **Update**: Updated @mcp-use/cli to v2.19.0 * **Update**: Updated create-mcp-use-app to v0.14.6 ## Request Context, CLI Build & README Fixes Patch release fixing request context propagation, CLI build hang, and stale monorepo references. * **Fix**: `ctx.auth` and other request context properties were `undefined` in tool callbacks; `mountMcp()` now wraps `transport.handleRequest()` with `runWithContext()` so `getRequestContext()` is populated * **Fix** (@mcp-use/cli): `mcp-use build` no longer hangs - add `process.exit(0)` on success (tsImport creates active handles) * **Fix**: Update stale mcp-use-ts references in README badges, image URLs, eslint config to mcp-use monorepo * **Update**: Updated @mcp-use/inspector to v0.24.4 * **Update**: Updated @mcp-use/cli to v2.18.3 ## Inspector Sandbox Host Fix Patch release fixing sandbox host derivation for cloud-embedded inspector pages. * **Fix** (@mcp-use/inspector): Sandbox host derivation for cloud-embedded pages - apex hosts (e.g. manufact.com) now resolve to `sandbox-inspector.{domain}` instead of `sandbox-{domain}` * **Update**: Updated @mcp-use/inspector to v0.24.3 * **Update**: Updated @mcp-use/cli to v2.18.2 ## Inspector Proxy Fix for Embedded Servers Patch release fixing inspector auto-connect when served from MCP server (Python, etc.). * **Fix** (@mcp-use/inspector): Skip proxy when inspector is served from the MCP server itself - auto-connect no longer routes through missing `/inspector/api/proxy` on embedded servers * **Fix** (@mcp-use/inspector): Detect proxy availability via runtime config injection; disable autoProxyFallback when no proxy is available * **Update**: Updated @mcp-use/inspector to v0.24.2 * **Update**: Updated @mcp-use/cli to v2.18.1 ## Session Persistence & CLI Improvements Patch release with session recovery fix, CLI enhancements, and create-mcp-use-app install improvements. * **Fix**: Session recovery after restart returns 400 fix; distributed SSE stream routing via Redis Pub/Sub * **Enhancement** (@mcp-use/cli): `mcp-use build` runs tool registry type generation before TypeScript compilation when server file exists * **Enhancement** (@mcp-use/cli): `--root-dir` option for deploy command for monorepo support * **Fix** (create-mcp-use-app): Remove flickering behaviour from `npm i` * **Update**: Updated @mcp-use/inspector to v0.24.1 * **Update**: Updated @mcp-use/cli to v2.18.0 * **Update**: Updated create-mcp-use-app to v0.14.4 Release 1.21.0 ## Proxy Servers & Client Completion Minor release with server composition, client-side completion, user context, and Express middleware types. * **New**: `MCPServer.proxy()` for composing multiple MCP servers into a single aggregator - automatic orchestration, schema translation, namespacing, list-changed multiplexing * **New**: Client-side completion support - `complete()` on BaseConnector, MCPSession, and `useMcp`; `refreshResourceTemplates()`; prompt argument and resource template URI autocomplete * **New**: `ctx.client.user()` for per-invocation end-user metadata (`subject`, `conversationId`) from tools/call params * **Enhancement**: `ctx.client.supportsApps()` now correctly returns true for MCP Apps clients (fixed ClientCapabilitiesSchema `extensions` stripping) * **Enhancement**: `autoReconnect` options - configurable health check interval, reconnection delay, timeout via `reconnectionOptions` * **Enhancement**: `sendFollowUpMessage` accepts `MessageContentBlock` arrays (text, image, resource blocks) per SEP-1865 * **Enhancement**: Host info and capabilities - `hostInfo`, `hostCapabilities` in `useWidget`; `getHostInfo`, `getHostCapabilities` on `McpAppsBridge` * **Fix**: Express middleware types - proper TypeScript types for `server.use()` with Express middleware (auto-detected and adapted) * **Fix**: Session isolation - `findSessionContext` no longer falls back to arbitrary session, preventing metadata leakage * **Fix**: Remove deprecated `@types/tar`; update tar to latest (cli, create-mcp-use-app) * **Update**: Updated @mcp-use/inspector to v0.24.0 * **Update**: Updated @mcp-use/cli to v2.17.0 * **Update**: Updated create-mcp-use-app to v0.14.3 * **Documentation**: Per-server elicitation and sampling callbacks examples; proxy servers section ## CLI Tunnel Support Patch release adding tunnel flag for ChatGPT HMR. * **New** (@mcp-use/cli): Support for `--tunnel` flag with full ChatGPT HMR * **Update**: Updated @mcp-use/inspector to v0.23.1 * **Update**: Updated @mcp-use/cli to v2.16.0 ## Inspector Embedded Chat Patch release with inspector embedded chat improvements. * **Enhancement** (@mcp-use/inspector): Improved embedded chat * **Update**: Updated @mcp-use/inspector to v0.23.0 * **Update**: Updated @mcp-use/cli to v2.15.4 ## Inspector Standalone Deployment Fix Patch release fixing inspector standalone deployment version import. * **Fix** (@mcp-use/inspector): Standalone deployment was importing the version from the wrong path * **Update**: Updated @mcp-use/inspector to v0.22.3 * **Update**: Updated @mcp-use/cli to v2.15.3 ## Health Monitoring & MCPAgentOptions Patch release with dynamic auth headers for health checks and MCPAgentOptions for chat agent. * **Enhancement**: `getAuthHeaders` parameter to `startConnectionHealthMonitoring` for customizable authentication headers during health checks; HEAD requests allowed without authentication * **Enhancement**: `exposeResourcesAsTools` and `exposePromptsAsTools` options in MCPAgentOptions (both default to `true`); inspector chat tab sets both to `false` so agent only exposes actual MCP tools * **Update**: Updated @mcp-use/inspector to v0.22.2 * **Update**: Updated @mcp-use/cli to v2.15.2 ## Widget Status Texts & CSP Handling Patch release with widget metadata enhancements and CSP improvements. * **New**: `invoking` and `invoked` properties in widget metadata for customizable status messages during tool execution * **Breaking**: McpUseProvider no longer includes BrowserRouter; add it explicitly if your widget uses react-router * **Enhancement**: MCPAppsDebugControls CSP mode violation indicators; sandbox-proxy strips existing CSP meta tags before injecting permissive CSP * **Fix** (create-mcp-use-app): Unify logo display across all CLI entry paths * **Update**: Updated @mcp-use/inspector to v0.22.1 * **Update**: Updated @mcp-use/cli to v2.15.1 Release 1.20.0 ## Widget Debug & CSP Improvements Minor release with Iframe Console enhancements, MCP Apps debug controls, and CSP handling. * **New**: CLI update check notifies when a newer mcp-use release is available * **Fix**: CLI TSC build uses node with increased heap; avoid npx installing wrong package * **Fix**: CLI fallback MCP\_URL when tunnel is unavailable * **New** (create-mcp-use-app): @types/react and @types/react-dom in template devDependencies * **Enhancement**: Slim down generated READMEs; improve mcp-apps template (Carousel, product-search-result widget); include .mcp-use in tsconfig; fix postinstall script * **Fix**: create-mcp-use-app product-search-result template styling and CSP metadata * **Enhancement**: Iframe Console with expandable logs, level filter, search, resizable height * **New**: Widget debug context for chat; MCP Apps debug controls (tool props JSON view, required props hint, SEP-1865 semantics) * **New**: CDN build for inspector; CSP violations panel with clear action; widget re-execution on CSP mode change; CSP mode for Apps SDK * **Fix**: useSyncExternalStore first-render handling; reconnect logic; Tools tab only sends explicitly set fields; resource annotations include `_meta` * **Fix**: mcp-use widget CSP fallback from tool metadata; protocol and mount-widgets-dev improvements * **Enhancement**: useWidget merges props from toolInput and structuredContent per SEP-1865 * **New**: updateModelContext and useMcp clientOptions * **Fix**: WorkOS subdomain config to accept full AuthKit domain (e.g., `name.authkit.app`) * **Update**: Updated @mcp-use/inspector to v0.22.0 * **Update**: Updated @mcp-use/cli to v2.15.0 ## CLI Skills & Template Updates Patch release with CLI skills commands and create-mcp-use-app template improvements. * **New** (@mcp-use/cli): `mcp-use skills add` and `mcp-use skills install` commands to install AI agent skills (Cursor, Claude Code, Codex) from the mcp-use repository * **Enhancement** (create-mcp-use-app): Add @types/react and @types/react-dom to template devDependencies * **Update**: Updated @mcp-use/inspector to v0.21.1 * **Update**: Updated @mcp-use/cli to v2.14.0 ## Tool Schema & Type Testing Improvements Patch release with nested input schema fixes and compile-time type regression testing. * **Fix**: Correctly convert nested input schema args for tools * **New**: Added everything-server example for compile-time type regression testing * **Update**: Updated @mcp-use/inspector to v0.21.0 * **Update**: Updated @mcp-use/cli to v2.13.10 ## MCPApps & Widget Loading Enhancements Patch release improving widget loading logic and iframe handling. * **Enhancement**: Improved MCPAppsRenderer loading logic with better state management * **Enhancement**: Enhanced useWidget for iframe handling * **Update**: Updated @mcp-use/inspector to v0.20.1 * **Update**: Updated @mcp-use/cli to v2.13.9 Release 1.19.0 ## Client Conformance & Type Safety Improvements Minor release with full MCP client conformance, direct stdio connector support, and type inference fixes. * **New**: Client implementation is now 100% conformant with the MCP spec * **Enhancement**: Node.js client handles stdio connector directly with command/argument configuration * **Fix**: `error()` return type now compatible with tool callbacks using `outputSchema` * **Fix**: Fixed `TypedCallToolResult` type inference with explicit properties instead of Omit * **Fix**: Enhanced `prompt()` method generic type inference to match `tool()` pattern * **Enhancement**: Console output routes through Logger class with improved consistency; added tests for logLevel * **Enhancement**: Added support for additional Vitest file extensions in config * **Fix**: Correct MIME type for mcp\_apps resource counting; disabled telemetry in local tests * **Update**: Updated @mcp-use/inspector to v0.20.0 * **Update**: Updated @mcp-use/cli to v2.13.8 ### @mcp-use/cli v2.13.8 * **Enhancement**: Improved loading states with spinner component * **Fix**: Correct MIME type for mcp\_apps resource counting ### create-mcp-use-app v0.13.0 * **New**: Interactive prompts for optional skills installation (claude-code, cursor, codex) * **New**: `--install` and `--no-install` CLI flags for non-interactive mode * **Fix**: Corrected template reference in test-cli.sh Release 1.18.0 ## DNS Rebinding Protection & Deferred Client Callbacks Minor release adding DNS rebinding protection and deferred React client callbacks. * **New**: `allowedOrigins` configuration on `MCPServer` for DNS rebinding protection and host validation; docs and example (curl tests) added * **Enhancement**: `McpClientProvider` defers `onServerAdded` and `onServerStateChange` callbacks via `queueMicrotask` to avoid render-phase updates and improve stability * **Update**: Updated @mcp-use/inspector to v0.19.0 * **Update**: Updated @mcp-use/cli to v2.13.7 ## Widget Resource Propagation & Log Noise Reduction Patch release improving HMR reliability for widget resources and reducing dev server log noise. * **Fix**: Reduced noisy logs in the dev server * **Fix**: Propagated widget resources and resource templates to already-connected MCP sessions during HMR to avoid `Resource ui://widget/... not found` errors without reconnecting * **Update**: Updated @mcp-use/inspector to v0.18.9 * **Update**: Updated @mcp-use/cli to v2.13.6 ## Inspector Reliability Alignment Patch release aligning TypeScript packages with the latest inspector reliability fixes. * **Enhancement**: Pulled in inspector fixes for widget readiness resets and safer iframe global update handling * **Update**: Updated @mcp-use/inspector to v0.18.8 * **Update**: Updated @mcp-use/cli to v2.13.5 ## UI Resource Metadata & CSP Injection Fixes Patch release improving server-origin metadata enrichment for UI resources. * **Fix**: UI resource metadata enrichment now guarantees metadata initialization before applying origin-based updates * **Enhancement**: Server origin is now consistently injected into widget CSP fields (`resourceDomains`, `connectDomains`, `baseUriDomains`) * **Update**: Updated @mcp-use/inspector to v0.18.7 * **Update**: Updated @mcp-use/cli to v2.13.4 ## useWidget Type Inference Improvements Patch release improving `useWidget` typing precision for pending vs ready states. * **Enhancement**: `UseWidgetResult` now uses a discriminated union on `isPending` for more accurate TypeScript inference * **Enhancement**: Added `UseWidgetResultBase` to separate shared fields from pending-state-specific props * **Update**: Updated @mcp-use/inspector to v0.18.6 * **Update**: Updated @mcp-use/cli to v2.13.3 Release 1.17.0 ## Resource Template Completion & Reverse Proxy Support Minor release adding resource template variable completion, custom route HMR, and comprehensive reverse proxy support. ### Resource Template Completion * **New**: Resource template variable completion - templates can define `callbacks.complete` per variable (string array or callback) for client-side autocomplete of URI template variables * **New**: `toResourceTemplateCompleteCallbacks` utility for normalizing completion definitions * **New**: MCP servers now publish completion capabilities ### HMR & Reverse Proxy Improvements * **New**: Custom HTTP route HMR - routes registered via `server.get()`, `server.post()`, etc. now hot-swap without restart * **New**: Widget tool protection during HMR - tools tagged with `_meta["mcp-use/widget"]` preserved during sync * **New**: Dynamic widget creation - `resources/` directory auto-created, dev server watches for new widgets even if none exist at startup * **New**: Vite HMR WebSocket proxy for hot-reload through reverse proxies (ngrok, E2B, Cloudflare tunnels) * **New**: `MCP_URL` environment variable can be pre-set by users for external proxy URLs; CLI will not overwrite it * **New**: `window.__mcpServerUrl` global injected into widget HTML for dynamic API URL construction * **Enhancement**: List-changed notifications now fire on removal, not just add/update * **Enhancement**: Pre-initialized request handlers prevent `-32601 Method not found` errors on dynamic tool registration * **Enhancement**: Widget type default changed to `mcpApps` (dual-protocol) instead of `appsSdk` ### Dependencies * **Update**: Updated @mcp-use/inspector to v0.18.5 * **Update**: Updated @mcp-use/cli to v2.13.2 Release 1.16.4 ## HMR Improvements & Widget Enhancements Patch release with Hot Module Reload improvements, widget lifecycle enhancements, and CLI build system improvements. ### HMR & Server Improvements * **Fix**: Tool schema preservation during HMR now uses Zod schemas directly instead of converting to params * **Fix**: Empty schema changed from `{}` to `z.object({})` to ensure `safeParseAsync` works correctly * **Enhancement**: Prompts now support tool response helpers (`text()`, `object()`, `image()`, etc.) via automatic conversion to `GetPromptResult` * **Enhancement**: Resources now support tool response helpers via automatic conversion to `ReadResourceResult` * **Enhancement**: Widget resources (`ui://widget/*`) and resource templates preserved during HMR * **Enhancement**: Enhanced prompt conversion to handle edge cases (single content objects, bare content items, mixed content arrays) ### CLI Build Improvements * **New**: Build manifest with `entryPoint` tracking written to `dist/mcp-use.json` for reliable server location * **Enhancement**: Support for multiple TypeScript output paths (dist/index.js, dist/src/index.js, custom paths) * **Enhancement**: Start command reads `entryPoint` from manifest for accurate server location * **Enhancement**: Clear error messages when no built server file is found, listing all attempted locations ### Widget Improvements * **Fix**: Widget pending state now correctly emulated to reflect ChatGPT behavior * **Enhancement**: Immediate widget rendering during pending states * **Enhancement**: Enhanced widget lifecycle management with better tool output handling * **New**: Delayed weather tool example (`get-weather-delayed`) in conformance server for testing widget lifecycle ### Dependencies * **Update**: Updated @modelcontextprotocol/sdk to v1.26.0 (with Zod 4 compatibility patch) * **Update**: Updated @mcp-use/inspector to v0.18.4 * **Update**: Updated @mcp-use/cli to v2.13.1 * **Update**: Updated create-mcp-use-app to v0.12.3 Release 1.16.3 ## CLI Manufact Rebrand Minor release with CLI branding updates and authentication improvements. ### CLI Rebrand * **Enhancement**: Updated CLI branding from "mcp-use" to "Manufact" * **Enhancement**: Changed default web URL from `mcp-use.com` to `manufact.com` for login flow * **Fix**: Fixed 431 "Request Header Fields Too Large" error by increasing callback server header limit to 16KB * **Enhancement**: Updated dashboard, inspector, and settings URLs to use `manufact.com` domain * **Enhancement**: Gateway domain remains `run.mcp-use.com` for backward compatibility with existing deployments ### Dependencies * **Update**: Updated @mcp-use/cli to v2.13.0 * **Update**: Updated @mcp-use/inspector to v0.18.3 ## Widget Behavior Fix Patch release fixing widget pending state emulation. * **Fix**: Widget pending state now correctly emulated to reflect ChatGPT behavior * **Update**: Updated @mcp-use/inspector to v0.18.2 * **Update**: Updated @mcp-use/cli to v2.12.6 ## Widget CSP Enhancement Patch release fixing widget Content Security Policy configuration. * **Fix**: Auto-inject server origin into `connectDomains` CSP * **Enhancement**: Widgets can now make fetch/XHR/WebSocket calls back to the MCP server without explicitly declaring the domain * **Fix**: Corrected oversight where CHANGELOG mentioned connectDomains injection but it was not implemented Release 1.16.0 ## Prompt Autocomplete & Dynamic CSP Minor release introducing prompt argument autocomplete and dynamic CSP domain injection for widgets. ### New Features * **New**: `completable()` helper for prompt argument autocomplete * **New**: Dynamic CSP domain injection for widgets at tools/list time ### Enhancements * **Enhancement**: Request origin (from X-Forwarded-Host or Host header) now automatically added to `connectDomains` and `resourceDomains` in tool metadata * **Enhancement**: Widgets now work correctly when accessed through proxies like ngrok, Cloudflare tunnels, or other reverse proxies * **Enhancement**: Server origin automatically enriched in widget CSP metadata ### Dependencies * **Update**: Updated @mcp-use/inspector to v0.18.0 * **Update**: Updated @mcp-use/cli to v2.12.4 ## HMR & Theme Fixes Patch release fixing Hot Module Reloading edge cases and theme functionality. * **Fix**: HMR not working when server starts with 0 tools initially * **Fix**: Dark mode can now be enabled through theme URL parameter * **Update**: Updated @mcp-use/inspector to v0.17.3 * **Update**: Updated @mcp-use/cli to v2.12.3 ## HMR File Watcher Fix Patch release fixing file watcher resource exhaustion in containerized environments. * **Fix**: HMR file watcher exhausting inotify limits by properly ignoring node\_modules * **Fix**: Prevented ENOSPC errors in containerized environments caused by watching files inside `node_modules/` despite ignore patterns * **Update**: Updated @mcp-use/inspector to v0.17.2 * **Update**: Updated @mcp-use/cli to v2.12.2 ## CLI Deployment Enhancement Patch release with CLI deployment improvements. * **Enhancement**: CLI `getMcpServerUrl()` function for improved deployment URL handling * **Update**: Updated @mcp-use/cli to v2.12.1 * **Update**: Updated @mcp-use/inspector to v0.17.1 Release 1.15.0 ## MCP Apps Support & Landing Pages Major release introducing MCP Apps support with dual-protocol widget rendering and HTML landing pages for MCP server endpoints. ### MCP Apps Support * **New**: Dual-protocol support enabling widgets to work with both MCP Apps and ChatGPT Apps SDK * **New**: `MCPAppsRenderer` component for advanced debugging and visualization * **New**: `MCPAppsDebugControls` component for widget debugging * **New**: Sandboxed iframe support with console logging and safe area insets for isolated widget rendering * **New**: Widget adapters (MCP Apps, Apps SDK) with protocol helpers for seamless cross-protocol compatibility * **New**: MCP Apps documentation and example server ### Landing Pages * **New**: `generateLandingPage()` function that generates styled HTML landing pages for browser GET requests * **New**: Connection instructions for Claude Code, Cursor, VS Code, VS Code Insiders, and ChatGPT on landing pages * **Enhancement**: Browser host normalization for server connections in CLI ### Bug Fixes & Security * **Fix**: MCP server landing now shows the external URL instead of the internal URL * **Fix**: Zod JIT compilation to prevent CSP violations in sandboxed environments * **Security**: Fixed vulnerabilities in dependencies ### Dependencies * **Update**: Updated @mcp-use/inspector to v0.17.0 * **Update**: Updated @mcp-use/cli to v2.12.0 ## Widget Rendering & Session Management Improvements Patch release with widget rendering fixes, session timeout adjustments, and CLI deployment enhancements. ### Widget Rendering & Session Management * **Fix**: Widget iframe reload by adding timestamp query parameter to force refresh when widget data changes * **Fix**: Retry logic with exponential backoff for dev widget fetching to handle Vite dev server cold starts * **Fix**: Default session idle timeout changed from 5 minutes to 1 day (86400000ms) to prevent premature session expiration * **Fix**: Session lastAccessedAt tracking now updates both persistent store and in-memory map * **Fix**: \_meta merging now preserves existing fields (e.g., openai/outputTemplate) when updating tools and widgets * **Enhancement**: Support for frame\_domains and redirect\_domains in widget CSP metadata ### CLI Improvements * **Fix**: Environment variables, build command, start command, and port configuration now properly passed during redeployment ### Documentation * **Fix**: Updated sessionIdleTimeoutMs default value documentation from 5 minutes to 1 day across multiple files ## Dependency Updates Patch release with dependency updates. * **Update**: Updated dependencies to @mcp-use/inspector v0.16.1 and @mcp-use/cli v2.11.1 Release 1.14.0 ## Server Metadata & Widget Enhancements Release introducing server metadata configuration and enhanced widget development experience. ### Server Metadata & Configuration * **New**: Server metadata support with `title`, `websiteUrl`, and `icons` fields in MCP server configuration * **New**: Inspector UI displays server website URLs and icons for better branding * **Deprecated**: `autoCreateSessionOnInvalidId` config option - use `sessionStore` for persistent sessions * **Enhancement**: Dynamic project name support in server configurations ### Widget & Development Experience * **Enhancement**: HMR support for widget tool management - widgets update immediately without server restart * **Enhancement**: Parallel widget building for improved development performance * **Enhancement**: ReDoS attack prevention in widget name slugification with input length validation * **Enhancement**: Improved widget lifecycle documentation with loading state guidance ### CLI Improvements * **New**: `MCP_URL` environment variable automatically set in server process for easy access to server URL * **Enhancement**: Server process environment now includes `MCP_URL` in both development and production modes * **Enhancement**: CLI now displays all 4 package versions (`@mcp-use/cli`, `mcp-use`, `@mcp-use/inspector`, `create-mcp-use-app`) in `dev` and `build` commands with `mcp-use` highlighted for clarity ### API & Protocol * **New**: HEAD request support in `mountMcp` function * **Enhancement**: Improved input schema handling in tool registration with better defaults ### MCP Proxy Middleware * **Enhancement**: Improved error logging with better context for debugging * **Enhancement**: Connection refused errors now logged as warnings instead of errors * **Enhancement**: Error responses include target URL to help identify failing proxy requests * **Enhancement**: More detailed error messages for proxy request failures ### Bug Fixes * **Fix**: Anthropic `tool_use.id` error resolved with LangChain package updates * **Fix**: Telemetry shutdown method compatibility with posthog-node v5.22.0 * **Fix**: Input schema initialization now defaults to empty object when not provided ### Dependencies * **Update**: `@langchain/anthropic` to 1.3.10 (fixes tool\_call ID generation) * **Update**: `@langchain/core` to 1.1.15 * **Update**: `langchain` to 1.2.10 * **Update**: `react-resizable-panels` to 4.4.1 ## CLI Documentation Enhancement Patch release adding comprehensive CLI documentation. * **Enhancement**: Added `.gitignore` file to CLI package to exclude `.mcp-use` directory from version control * **Enhancement**: Added `CLAUDE.md` to CLI package with comprehensive guidance on usage, development commands, architecture details, and deployment instructions * **Enhancement**: Improved CSRF protection in authentication flow * **Enhancement**: Enhanced error handling for GitHub integration in deploy command ## OAuth Proxy URL Handling Improvements Patch release improving OAuth proxy URL handling and connection logic. * **Refactor**: Changed `connectionUrl` from `let` to `const` to enforce immutability * **Enhancement**: Enhanced logic for deriving `oauthProxyUrl` from callback URL, including handling cases where callback is at root path * **Enhancement**: Updated comments to clarify distinction between `oauthProxyUrl` and `connectionUrl` * **Fix**: Removed clearing of OAuth storage before connecting to maintain valid tokens across sessions ## Telemetry & Inspector Enhancements Patch release with telemetry improvements and inspector URL validation enhancements. * **Fix**: Enhanced localStorage checks in Telemetry class to verify both existence and functional methods (getItem, setItem, removeItem) * **Enhancement**: Added error handling to throw exception if localStorage is not available or functional * **Enhancement**: Inspector now automatically prepends "https\://" to URLs without protocol for better user experience * **Enhancement**: Improved error handling for invalid URLs in Inspector dashboard and server connection modal * **Enhancement**: Added localStorage clearing functionality in Inspector for troubleshooting ## Dependency Updates & CLI Enhancements Minor release with dependency updates and CLI improvements for deployment workflows. * **Fix**: Updated dependency `hono` to 4.11.4 * **Enhancement**: CLI login command with improved error handling and user feedback * **Enhancement**: CLI deployment command now prompts for login if not authenticated * **Enhancement**: Added git uncommitted changes check before deployment * **Fix**: Removed `fromSource` option from CLI deployment command * **Enhancement**: Simplified authentication UI in Inspector ## Edge Runtime Fix Patch release improving edge runtime compatibility. * **Fix**: Enable JSON response in stateless mode for edge runtimes (Deno, Cloudflare Workers) * **Enhancement**: Improved reliability of API in various deployment scenarios Release 1.13.0 ## Hot Module Reloading & OAuth Enhancements Release introducing Hot Module Reloading for development and enhanced OAuth capabilities. ### Hot Module Reloading (HMR) * **New**: HMR support for `mcp-use dev` command - tools, prompts, and resources update instantly without server restart * **New**: Connected clients receive `list_changed` notifications and auto-refresh * **New**: Syntax errors during reload caught gracefully without crashing server * **New**: Comprehensive test suite for HMR functionality with integration tests * **Enhancement**: CLI uses `chokidar` to watch file changes with automatic module re-import * **Enhancement**: Session persistence during HMR - no client disconnections ### OAuth & Client Info * **New**: Enhanced OAuth proxy to support gateway/proxy scenarios (e.g., Supabase MCP servers) * **New**: `clientInfo` configuration prop for OAuth registration with client metadata (name, version, icons, website) * **New**: Server metadata caching with `CachedServerMetadata` interface for instant display on reconnect * **Enhancement**: OAuth metadata URL rewriting from gateway URLs to actual server URLs * **Enhancement**: Client info displayed on OAuth consent pages * **Enhancement**: Extended `StorageProvider` interface with metadata methods ### Inspector & Favicon * **Enhancement**: Enhanced favicon detector to try all subdomain levels (e.g., mcp.supabase.com → supabase.com) * **Enhancement**: Detection of default vs custom favicons using JSON API response * **Enhancement**: Improved logging middleware for API routes * **Enhancement**: X-Forwarded-Host support for proxy URL construction in dev ### Bug Fixes * **Fix**: Remove import from "mcp-use" which causes langchain import in server * **Fix**: Enhanced synchronization for tools, prompts, and resources during HMR ## Connection Fix Patch release fixing autoconnect configuration parsing. * **Fix**: Autoconnect now correctly parses config objects in addition to string URLs ## Security Fixes & OAuth Improvements Patch release addressing multiple security vulnerabilities and fixing OAuth flow issues. ### Security Fixes * **Security**: Fixed 13 vulnerabilities (3 moderate, 10 high) * **Security**: Updated `langchain` to 1.2.3 (fixes serialization injection vulnerability) * **Security**: Updated `@langchain/core` to 1.1.8 (fixes serialization injection vulnerability) * **Security**: Updated `react-router` to 7.12.0 (fixes XSS and CSRF vulnerabilities) * **Security**: Added override for `qs` to >=6.14.1 (fixes DoS vulnerability) * **Security**: Added override for `preact` to >=10.28.2 (fixes JSON VNode injection) ### OAuth & Connection Improvements * **Fix**: Resolved OAuth flow looping issue by removing duplicate fallback logic * **Enhancement**: Simplified connection handling with consolidated state management * **Enhancement**: Enhanced OAuth authentication flow with improved connection settings * **Enhancement**: Improved auto-connect functionality with better proxy handling and error management * **Enhancement**: Enhanced theme toggling with dropdown menu for better UX and accessibility Release 1.12.2 ## Automatic Proxy Fallback & API Improvements Release with automatic proxy fallback, OAuth proxy support, and API naming improvements. ### Breaking Changes (with Deprecation Warnings) * **Breaking**: Renamed `customHeaders` to `headers` across all APIs for consistency. Old name still works but shows deprecation warnings. * **Breaking**: Renamed `samplingCallback` to `onSampling` for consistency with event handler patterns. Old name still works but shows deprecation warnings. * **Deprecated**: `clientConfig` option in favor of deriving configuration from `clientInfo` ### New Features * **New**: Automatic Proxy Fallback - `autoProxyFallback` option automatically retries failed connections through proxy on CORS/4xx errors * **New**: Provider-level proxy defaults with `defaultProxyConfig` and `defaultAutoProxyFallback` props in `McpClientProvider` * **New**: OAuth Proxy Support - `oauthProxyUrl` configuration to route OAuth discovery and token requests through backend proxy * **New**: Configurable `clientInfo` for MCP connection initialization with full metadata (name, title, version, description, icons, website URL) * **New**: Reconnect functionality for failed connections with reconnect button in Inspector UI ### Improvements * **Enhancement**: Better detection of OAuth discovery failures, CORS errors, and connection issues * **Enhancement**: OAuth provider uses original target URL for discovery, not proxy URL * **Enhancement**: Improved session cleanup to avoid noisy warning logs * **Enhancement**: Type safety with deprecation notices in TypeScript types * **Enhancement**: Proxy header support - `proxyConfig` now accepts a `headers` field for custom headers ### Bug Fixes * **Fix**: Custom headers now correctly included when copying connection configuration from saved tiles * **Fix**: HttpConnector automatic reconnection disabled, shifting responsibility to higher-level logic ### Refactoring * **Refactor**: Removed `oauth-helper.ts` (521 lines), consolidated into `browser-provider.ts` * **Refactor**: Major `useMcp` hook refactor with automatic retry, better error handling, and proxy fallback support ## Security Update Patch release with security fixes and build improvements. * **Security**: Updated `@modelcontextprotocol/sdk` to 1.25.2 (fixes ReDoS vulnerability in UriTemplate regex patterns) * **Fix**: Updated building script to correctly export types for inspector/client components Release 1.12.0 ## Browser Compatibility & Multi-Server Support Release focusing on browser compatibility, multi-server management, and improved React architecture. ### Breaking Changes * **Breaking**: Removed `winston` dependency. The logging system now uses a simple console logger that works in both browser and Node.js environments. ### Browser Runtime Support * **New**: Full browser compatibility - removed Node.js-specific dependencies from browser builds * **New**: Enhanced `browser.ts` entry point with improved browser-specific utilities * **New**: Browser utilities: * `utils/favicon-detector.ts` - Detect and extract favicons from URLs * `utils/proxy-config.ts` - Proxy configuration utilities for browser environments * `utils/mcpClientUtils.ts` - MCP client utilities moved from client package * **New**: `MCPAgent` exported for browser usage with `BrowserMCPClient` instance or through `RemoteAgent` * **Enhancement**: Comprehensive test suite to ensure `mcp-use/react` and `mcp-use/browser` do not import Node.js dependencies ### Multi-Server Support * **New**: `McpClientProvider` component to manage multiple MCP server connections in React applications * **New**: Pluggable storage system with `LocalStorageProvider` and `MemoryStorageProvider` for flexible server configuration persistence * **New**: Dynamic addition and removal of servers in React applications * **New**: Multi-server React example demonstrating new capabilities * **Enhancement**: Refactored `useMcp` hook for better multi-server support * **Enhancement**: Removed obsolete `McpContext` (replaced with `McpClientProvider`) ### Server Middleware * **New**: MCP Proxy Middleware (`server/middleware/mcp-proxy.ts`) - Hono middleware for proxying MCP server requests with optional authentication and request validation ### Inspector Enhancements * **Enhancement**: Improved UI responsiveness with enhanced mobile and tablet layouts and adaptive component visibility * **Enhancement**: Better server management with refactored server connection handling, improved icon display, and status tracking * **Enhancement**: Enhanced debugging with detailed logging in Layout and useAutoConnect components for better monitoring of server connection states * **Enhancement**: Simplified connection settings by removing deprecated transport types * **Enhancement**: Enhanced inspector components for better browser compatibility * **Enhancement**: Improved server icon support and component interactions * **Enhancement**: Added embedded mode support * **Enhancement**: Better configuration handling and MCP proxy integration ### RPC Logging * **New**: Enhanced RPC logging with new `rpc-logger` module and filtering capabilities to reduce noisy endpoint logging (telemetry, RPC streams). ### Architecture Improvements * **Refactor**: Separated telemetry into `telemetry-browser.ts` (browser) and `telemetry-node.ts` (Node.js) for better environment-specific implementations * **Refactor**: Replaced Winston with `SimpleConsoleLogger` that works across all environments. See the [ServerConfig API reference](/typescript/api-reference/server/server-config) for server environment settings. * **Refactor**: Updated `tsup.config.ts` to exclude Node.js-specific dependencies (`winston`, `posthog-node`) from browser builds * **Refactor**: Updated components across inspector for cleaner architecture and imports ### Bug Fixes * **Fix**: Prevent rendering loop when autoretry is true in React hooks * **Fix**: Respect options timeout in HTTP connector (reduced default timeout from 30 seconds to 10 seconds) * **Fix**: Add client SDKs to add to client dropdown in inspector * **Fix**: Server connection retrieval in `OpenAIComponentRenderer` to directly access connections array * **Fix**: Linux patch for watch mode * **Fix**: Query URL handling in built mode to preserve arguments * **Fix**: Enhanced Zod version mapping in TypeScript PR preview workflow * **Fix**: Pinned Zod version to 3.24.4 for compatibility with modelcontextprotocol/sdk * **Fix**: Updated modelcontextprotocol-sdk references to new package name ### Documentation * **New**: Added troubleshooting section for Zod version conflicts in Supabase deployment * **Enhancement**: Updated Supabase deployment documentation with improved compatibility information ## Documentation Updates - **Enhancement**: Updated examples and documentation to use preferred methods and APIs ## Bug Fixes - **Fix**: Widget props not picked up when using Zod schemas Release 1.11.0 ## Session Management Architecture Release introducing distributed session management with Redis support. ### Breaking Changes * **Breaking**: WebSocket transport support removed. Use streamable HTTP or SSE transports instead. * **Breaking**: LangChain adapter moved from main entry point to `mcp-use/adapters` subpath. `@langchain/core` and `langchain` are now optional peer dependencies. * **Deprecated**: `autoCreateSessionOnInvalidId` server config option. Now follows MCP spec strictly (returns 404 for invalid sessions). ### Session Management Features * **New**: Pluggable session management architecture separating metadata storage (`SessionStore`) from active connections (`StreamManager`) * **New**: `RedisSessionStore` for persistent, distributed session metadata storage * **New**: `RedisStreamManager` for cross-server notifications via Redis Pub/Sub * **New**: `FileSystemSessionStore` (dev mode default) persists sessions to `.mcp-use/sessions.json` for hot reload support * **New**: `InMemorySessionStore` and `InMemoryStreamManager` (production defaults) * **New**: Automatic 404 handling and re-initialization in clients per MCP spec * **New**: Convenience methods: `sendToolsListChanged()`, `sendResourcesListChanged()`, `sendPromptsListChanged()` * **Enhancement**: Auto-detection of stateless/stateful mode based on client `Accept` header * **Enhancement**: Sessions survive server restarts in dev mode with filesystem storage * **Enhancement**: Auto-cleanup of expired sessions (>24 hours) ### Client Improvements * **New**: Auto-refresh tools/resources/prompts when receiving list change notifications * **New**: Manual refresh methods: `refreshTools()`, `refreshResources()`, `refreshPrompts()`, `refreshAll()` * **New**: Automatic 404 handling and re-initialization per MCP spec * **Enhancement**: Deprecated `sse` transport type in React (use `http` or `auto`) ### Additional Features * **New**: CommonJS module support - full compatibility with `require()` syntax * **New**: Favicon support for widget pages with automatic serving and long-term caching * **New**: Enhanced session methods: `callTool()` defaults args to empty object, new `requireSession()` method * **New**: Session architecture documentation with ARCHITECTURE.md * **New**: Comparison guide with other MCP implementations (tmcp, FastMCP, xmcp, official SDK) * **New**: Comprehensive environments guide (Node.js, Browser, React) ### Documentation * **New**: Session Management guide with storage provider documentation (Memory, FileSystem, Redis) * **New**: Environments guide explaining usage across different JavaScript runtimes * **New**: Comparison documentation analyzing mcp-use vs other implementations * **Enhancement**: Major documentation restructuring for better organization * **Enhancement**: Removed/consolidated outdated guides (direct-tool-calls, sandbox, connection-types) * **Enhancement**: Updated agent documentation with improved examples ### Widget Improvements * **Enhancement**: Automatic cleanup of stale widget directories in `.mcp-use` folder * **Enhancement**: Dev mode watches for widget file/directory deletions and cleans up build artifacts * **Fix**: Fixed widget styling isolation - widgets no longer pick up mcp-use styles * **Fix**: Fixed favicon URL generator for proper asset resolution * **Fix**: Fixed transport cleanup when session becomes idle ### Testing & Quality * **New**: Comprehensive test suite for session stores (498 lines) * **New**: Stream managers test suite (478 lines) * **New**: Widget data flow tests (496 lines) * **New**: CLI integration tests (242 lines) * **New**: CommonJS compatibility tests (256 lines) * **New**: Documentation example tests (agent, prompts, tools) * **New**: Client 404 re-initialization tests * **Enhancement**: Improved test coverage across all major features ### Dependencies & Compatibility * **Enhancement**: Added support for Node.js >= 18 * **Enhancement**: CommonJS builds for all entry points * **Enhancement**: Migrated from `react-router-dom` to `react-router` for better compatibility * **Enhancement**: Repository metadata added to package.json * **Enhancement**: Dependency updates and optimizations ### Fixes * **Fix**: Agent access to resources and prompts * **Fix**: Import paths in CLI to avoid mixing dependencies * **Fix**: UUID generation and URL handling improvements * **Fix**: Various formatting and linting improvements ## Deno stateless mode Patch release fixing stateless server mode when running on Deno. * **Fix**: stateless mode works correctly on Deno * **Update**: Updated @mcp-use/inspector to v0.12.6 * **Update**: Updated @mcp-use/cli to v2.5.6 Release 1.10.0 ## API Improvements & Session Management Enhanced APIs with better type safety and improved session management capabilities. ### Breaking Changes * **Breaking**: Renamed `createMCPServer()` factory function to `MCPServer` class constructor. Factory function still available for backward compatibility but new code should use `new MCPServer({ name, ... })`. * **Breaking**: Replaced `session.connector.tools`, `session.connector.callTool()`, etc. with direct session methods: `session.tools`, `session.callTool()`, `session.listResources()`, `session.readResource()`, etc. * **Breaking**: Standardized OAuth environment variables to `MCP_USE_OAUTH_*` prefix (e.g., `AUTH0_DOMAIN` → `MCP_USE_OAUTH_AUTH0_DOMAIN`). ### New Features * **New**: Client Capabilities API with `ctx.client.can()` and `ctx.client.capabilities()` to check client capabilities in tool callbacks * **New**: Session Notifications API with `ctx.sendNotification()` and `ctx.sendNotificationToSession()` for sending notifications from tool callbacks * **New**: Session Info API with `ctx.session.sessionId` to access current session ID in tool callbacks * **New**: Resource Template Flat Structure support with `uriTemplate` directly on definition (in addition to nested structure) * **New**: Resource Template Callback Signatures now support multiple signatures: `()`, `(uri)`, `(uri, params)`, `(uri, params, ctx)` * **New**: Type Exports for `CallToolResult`, `Tool`, `ToolAnnotations`, `PromptResult`, `GetPromptResult` types ### Improvements * **Enhancement**: Enhanced type inference for resource template callbacks with better overload support * **Enhancement**: Server now captures and stores client capabilities during initialization * **Enhancement**: Added convenience methods to `MCPSession` for all MCP operations (listResources, readResource, subscribeToResource, listPrompts, getPrompt, etc.) * **Enhancement**: Major documentation refactoring and restructuring for better organization ### Fixes (v1.10.1 - v1.10.6) * **Fix**: Stateless mode for Deno runtime * **Fix**: Added CORS support to `getHandler()` method * **Fix**: Deno 5 compatibility improvements * **Fix**: Deno 3 compatibility fixes * **Fix**: Zod error handling improvements * **Fix**: Zod import in official SDK * **Fix**: Clear transport when session becomes idle * **Fix**: Allow agent to access resources and prompts * **Enhancement**: Added repository metadata in package.json Release 1.9.0 ## Elicitation Support Added comprehensive elicitation support following MCP specification, enabling servers to request user input through clients. * **New**: Simplified API with `ctx.elicit(message, zodSchema)` and `ctx.elicit(message, url)` with automatic mode detection * **New**: Form Mode for structured data collection with Zod schema validation and full TypeScript type inference * **New**: URL Mode to direct users to external URLs for sensitive operations (OAuth, credentials) * **New**: Server-side validation with automatic Zod validation and clear error messages * **New**: Client support via `elicitationCallback` to MCPClient and `onElicitation` to React `useMcp` hook * **Enhancement**: Type-safe return types automatically inferred from Zod schemas * **Enhancement**: Configurable timeout with 5-minute default for user interactions * **Fix**: Transport bug fixes Release 1.8.0 ## Sampling Support Added sampling support in inspector with improved timeout handling for long-running requests. * **New**: LLM sampling capabilities in inspector * **Fix**: Long running sampling requests no longer timeout after 60 seconds * **Enhancement**: Better handling of extended sampling operations Release 1.7.0 ## OAuth Authentication System Complete OAuth 2.0 support with built-in providers and enhanced server capabilities. * **New**: Complete OAuth 2.0 authentication framework with built-in providers (Auth0, WorkOS, Supabase, Keycloak) * **New**: OAuth middleware and routes for server-side OAuth flow handling with automatic token management * **New**: OAuth callback component in inspector for authentication flows * **New**: Context storage with async local storage for request-scoped context in servers * **New**: Response helpers for standardized HTTP responses and error handling * **New**: Runtime detection utilities for Node.js, Bun, and Deno environments * **New**: Server authentication examples for Auth0, WorkOS, and Supabase * **Enhancement**: Enhanced useMcp hook with improved connection management and OAuth support * **Enhancement**: Enhanced inspector dashboard with OAuth configuration UI * **Enhancement**: Better authentication flow handling with OAuth integration * **Enhancement**: Enhanced HTTP connectors with OAuth token handling * **Fix**: Dependency optimizations and AI SDK updates Release 1.6.0 ## Notifications & Sampling Bidirectional notification support and LLM sampling capabilities. * **New**: Bidirectional notification support between clients and servers with handler registration * **New**: LLM sampling allowing MCP tools to request completions from connected clients * **New**: Widget build ID support for cache busting in widget UI resources * **New**: Inspector notifications tab with real-time display * **New**: Server capabilities modal showing supported MCP features * **Enhancement**: Refactored HTTP transport to reuse sessions across requests with configurable idle timeout * **Enhancement**: Session management with tracking and automatic cleanup * **Enhancement**: Roots support in connectors and session API * **Enhancement**: Session event handling API for notification registration * **Enhancement**: Server methods for session management and targeted notifications * **Enhancement**: Enhanced search\_tools with metadata (total\_tools, namespaces, result\_count) * **Enhancement**: RPC message logging support in inspector Release 1.5.0 ## OpenAI Apps SDK Integration Release with comprehensive OpenAI Apps SDK support and widget system. * **New**: McpUseProvider component combining React setup (StrictMode, ThemeProvider, BrowserRouter, ErrorBoundary) * **New**: WidgetControls component with debug overlay and view controls (fullscreen, PIP) * **New**: useWidget hook for type-safe React adapter to OpenAI Apps SDK API * **New**: ErrorBoundary component for graceful error handling * **New**: Image component handling data URLs and public file paths * **New**: ThemeProvider for consistent theme management * **New**: WidgetInspectorControls for inspector-specific debugging * **New**: Console proxy toggle for iframe console logs * **New**: Product search result widget template with carousel and accordion components * **New**: Folder-based widget support with automatic detection * **New**: Public folder support for static assets * **Enhancement**: Enhanced SSR configuration with proper Vite settings * **Enhancement**: Improved OpenAI component renderer with better height calculation * **Enhancement**: Enhanced tool result display with multiple content types * **Enhancement**: Resizable panels with collapse support * **Enhancement**: Better widget security headers and CSP configuration Release 1.4.0 ## Code Mode Introduced code execution capabilities for agents. * **New**: Code Mode feature allowing agents to execute code using MCP tools * **New**: VMCodeExecutor for local execution environments * **New**: E2BCodeExecutor for remote execution in cloud sandboxes * **New**: CodeModeConnector for tool discovery and execution * **Enhancement**: Enhanced MCPClient with code execution configuration * **Enhancement**: Comprehensive tests for code execution functionality Release 1.3.0 ## Edge Runtime Support Migrated to Hono framework for edge runtime compatibility. * **Major**: Migrated from Express to Hono framework for edge runtime support (Cloudflare Workers, Deno Deploy, Supabase) * **New**: Runtime detection for Deno and Node.js environments * **New**: Connect middleware adapter for compatibility * **New**: `getHandler()` method for edge deployment * **New**: Supabase deployment documentation and templates * **Enhancement**: Improved MCPAgent message detection with robust helpers for different LangChain formats * **Enhancement**: Fixed server base URL handling for proper connection and routing * **Enhancement**: Better auto-connection logic with error handling and retry mechanisms * **Enhancement**: Enhanced useMcp hook with improved connection state management Release 1.2.0 ## LangChain 1.0.0 Support Updated to support LangChain 1.0.0 with improved compatibility. * **Major**: Support for LangChain 1.0.0 * **Fix**: Model type compatibility for LangChain 1.0.0 * **Fix**: Apps SDK metadata setup from widget build * **Enhancement**: Set CLI and inspector as dependencies Release 1.1.0 ## Apps SDK Initial Integration First integration of OpenAI Apps SDK support. * **New**: OpenAI Apps SDK integration with UI resource type * **New**: Enhanced MCP-UI adapter for Apps SDK metadata * **New**: Resource URI format supporting `ui://widget/` scheme * **New**: Tool definitions with Apps SDK-specific metadata * **Enhancement**: Comprehensive test suite for Apps SDK resources * **Refactor**: Renamed `fn` to `cb` in tool and prompt definitions for consistency * **Refactor**: Updated resource definitions to use `readCallback` # Inspector Updates Source: https://docs.mcp-use.com/inspector/changelog New updates and improvements to the MCP Inspector ## OAuth Proxy release alignment Canary patch release (`@mcp-use/inspector@20.3.20-canary.3`) paired with `mcp-use@2.10.0-canary.4`, rebuilding bundled workspace code with the framework's OAuth Proxy and build changes. Stable v20.3.20 has not shipped; this wave has no Inspector-specific source changes. * **Update**: rebuild bundled workspace code and synchronize published internal package metadata * **Update**: Updated mcp-use to v2.10.0 (canary.4) ## Composer mention search release alignment Patch release paired with `mcp-use` v2.9.0, rebuilding bundled workspace code with the framework's composer mention search helper. This release has no Inspector-specific source changes. * **Update**: rebuild bundled workspace code and synchronize published internal package metadata * **Update**: Updated mcp-use to v2.9.0 ## Framework release alignment Patch release paired with `mcp-use` v2.8.2, rebuilding the bundled Inspector and synchronizing internal package metadata. * **Update**: rebuild bundled workspace code and synchronize published internal package metadata * **Update**: Updated mcp-use to v2.8.2 ## Saved tool timeout settings Patch release paired with `mcp-use` v2.8.1, applying connection timeout settings to tool calls and preserving cleared values. * **Fix**: tool calls use the saved request timeout, maximum total timeout, and reset-on-progress setting instead of hard-coded defaults (`#2656`) * **Fix**: cleared timeout fields stay cleared when reopening or renaming a connection (`#2656`) * **Fix**: changing a connection URL rejects duplicates before removing the existing connection (`#2656`) * **Enhancement**: connection settings explain that a blank request timeout uses the 10-minute default and a blank maximum total timeout removes the overall time limit while retaining the request timeout (`#2656`) * **Update**: Updated mcp-use to v2.8.1 ## Framework release alignment Patch release paired with `mcp-use` v2.8.0, rebuilding the bundled Inspector with the ChatGPT Plugin Extensions framework updates. * **Update**: rebuild bundled workspace code and synchronize published internal package metadata * **Update**: Updated mcp-use to v2.8.0 ## Chat input toolbar spacing Patch release paired with `mcp-use` v2.7.3, keeping multiline messages clear of the chat toolbar and updating dependencies. * **Fix**: chat input reserves space above the bottom toolbar so multiline text no longer overlaps its controls (`#2735`) * **Update**: update Hono to `^4.13.7` and refresh workspace dependency security floors (`#2746`) * **Update**: Updated mcp-use to v2.7.3 ## Disconnect abort & UserInfo proxy Patch release paired with `mcp-use` v2.7.2. The Express adapter stops holding upstream streams after the client leaves, and the OAuth proxy can fetch UserInfo. * **Fix**: disconnecting an Express client aborts the outbound fetch and the proxy read loop, so a long-lived SSE response no longer writes to a dead socket or leaves the upstream connection open (`#2394`) * **Enhancement**: the OAuth proxy allows GET to UserInfo endpoints listed on the authorization server's metadata, and rejects other methods and URLs that are not in that set (`#2688`) * **Update**: Updated mcp-use to v2.7.2 ## View cancellation release alignment Patch release paired with `mcp-use` v2.7.1; rebuilds the bundled Inspector with no Inspector-specific source changes. * **Update**: rebuild bundled workspace code and synchronize published internal package metadata * **Update**: Updated mcp-use to v2.7.1 ## Mixed authentication release alignment Patch release paired with `mcp-use` v2.7.0; rebuilds the bundled Inspector with no Inspector-specific source changes. * **Update**: rebuild bundled workspace code and synchronize published internal package metadata * **Update**: Updated mcp-use to v2.7.0 ## TanStack Start release alignment Patch release paired with `mcp-use` v2.6.0; there are no Inspector-specific source changes. * **Update**: Updated mcp-use to v2.6.0 ## Scrollable MCP App results Patch release paired with `mcp-use` v2.5.2, keeping tall tool results accessible. * **Fix**: tall MCP App tool results scroll within the result panel instead of extending beyond it (`#2598`) * **Update**: Updated mcp-use to v2.5.2 ## Managed chat model branding & provider selection Patch release paired with `mcp-use` v2.5.1, showing the selected cloud model accurately and simplifying provider selection. * **Fix**: managed chat badges use the selected cloud model's name and provider logo instead of the default transport model's branding (`#2575`) * **Enhancement**: the Manufact cloud provider picker offers OpenAI, Anthropic, and Google; existing selections from other providers remain visible with accurate labels, while evals retain the full catalog and BYOK OpenRouter remains available (`#2576`) * **Update**: `MCPServerConfig.auth_token` is deprecated but retained for type compatibility; use `authToken` to send an authentication token (`#2486`) * **Update**: update Hono to `^4.13.5` (`#2492`) * **Update**: Updated mcp-use to v2.5.1 ## Bundled Inspector rebuild Patch release paired with `mcp-use` v2.5.0, rebuilding the standalone Inspector with the agent OpenRouter fix. * **Fix**: rebuild the standalone Inspector with the OpenRouter Responses API agent fix and repair published framework peer metadata (`#2504`) * **Update**: Updated mcp-use to v2.5.0 ## Workspace package alignment Patch release paired with `mcp-use` v2.4.3; there are no Inspector-specific source changes. * **Update**: Updated mcp-use to v2.4.3 ## Publish artifact preservation Patch release paired with `mcp-use` v2.4.2, keeping package builds intact while npm pack runs. * **Fix**: concurrent publishing no longer drops the Client build while its tarball is created, and packed artifacts are checked for declared files and entry points (`#2428`) * **Update**: Updated mcp-use to v2.4.2 ## Chat widgets use the connection id Patch release paired with `mcp-use` v2.4.1, rendering chat MCP Apps against the registered connection. * **Fix**: chat MCP Apps render with the registered MCP connection id while preserving the logical server id for chat state and storage (`#2404`) * **Update**: Updated mcp-use to v2.4.1 ## Request duration & screenshot init failures Patch release paired with `mcp-use` v2.4.0, showing RPC duration, failing screenshots when an MCP App fails to initialize, and raising the embedded chat step cap. * **Enhancement**: RPC traffic rows show request duration in milliseconds instead of wall-clock time; unmatched rows omit the timing column (`#2364`) * **Fix**: `mcp-use screenshot` fails with `view_load_failed` when the MCP App fails to initialize (`#2355`) * **Enhancement**: embedded client-side chats can configure up to 100 agent steps (`#2401`) * **Update**: Updated mcp-use to v2.4.0 ## RPC latency in the timing column Patch release paired with `mcp-use` v2.3.4, moving response latency into the traffic timing column and labeling colocated Inspector logs. * **Enhancement**: response rows show latency in the traffic timing column instead of repeating it in the method label; unmatched rows still show the wall-clock time (`#2349`) * **Enhancement**: when Inspector shares the `mcp-use dev` process, proxy and OAuth BFF logs are prefixed `[inspector]` (`#2351`) * **Update**: Updated mcp-use to v2.3.4 ## Model tool-limit warnings Patch release paired with `mcp-use` v2.3.3, making model tool limits visible before a chat request is sent. * **Enhancement**: chat warns when a connected MCP server exposes more than the documented 128 tools supported by OpenAI or Gemini models (`#2333`) * **Update**: Updated mcp-use to v2.3.3 ## Correlated JSON-RPC responses Patch release paired with `mcp-use` v2.3.2, adding request context and timing to JSON-RPC response rows. * **Enhancement**: response rows show the matched request method and elapsed time and flag errors while keeping simultaneous bidirectional requests isolated by source, server, widget, direction, and ID type (`#2303`) * **Update**: Updated mcp-use to v2.3.2 Release 20.3.0 ## Reusable connection settings Minor release paired with `mcp-use` v2.3.1, exposing the Inspector connection form and configuration state for embedded consumers. * **New**: `@mcp-use/inspector/client` exports `ConnectionSettingsForm`, `useConnectionFormState`, custom-header controls, connection configuration types, and normalization helpers, with optional consumer URL validation (`#2319`) * **Update**: Updated mcp-use to v2.3.1 ## Isolated chat sessions & accurate cache usage Patch release paired with `mcp-use` v2.3.0, keeping concurrent chat sessions independent and preserving provider cache-token accounting. * **Fix**: each chat session owns one identifier and state record, so **New Chat** starts a fresh session while another is streaming; persistence and OAuth retry use the same identifier, and `ChatStorageProvider.createChat` accepts an optional caller-supplied `id` (`#2232`) * **Fix**: Anthropic `cacheCreationInputTokens` survives aggregation, LLM spans, and raw-chat `tokenUsage`, while totals avoid double-counting OpenAI cached input tokens (`#2127`) * **Update**: Updated mcp-use to v2.3.0 ## Workspace package alignment Patch release paired with `mcp-use` v2.2.4; there are no Inspector-specific source changes. * **Update**: Updated mcp-use to v2.2.4 ## Protocol version controls Patch release making MCP protocol selection visible in connection setup. * **Enhancement**: the connect form and connection settings expose protocol version selection and make configuration options easier to find * **Update**: Updated mcp-use to v2.2.3 ## Workspace package alignment Patch release paired with `mcp-use` v2.2.2; there are no Inspector-specific source changes. * **Update**: Updated mcp-use to v2.2.2 ## OAuth protected-resource compatibility Patch release accepting secure parent-path resource metadata during OAuth discovery. * **Fix**: protected-resource metadata may identify a same-origin, segment-aware parent of the MCP endpoint, matching the official MCP TypeScript SDK while rejecting cross-origin, sibling-path, credential-bearing, fragmented, and insecure non-loopback values * **Update**: Updated mcp-use to v2.2.1 Release 20.2.0 ## CSP auditing & embedded Inspector styles Minor release paired with `mcp-use` v2.2.0, adding host-visible CSP verification and a consistent embedded surface contract. * **New**: the embedded Chat bridge exposes CSP mode and audit commands so hosts and coding agents can verify MCP Apps in Widget-Declared mode * **Enhancement**: a canonical client stylesheet provides the Inspector surface, shadow, hover, and active theme contract for embedded dialogs, dropdowns, and selects * **Fix**: embedded MCP Apps render in Vibe and preserve React state during remote HMR updates * **Fix**: remove unreachable exports and declare the Inspector tool-execution test's `jsdom` development dependency explicitly * **Update**: Updated mcp-use to v2.2.0 ## Mixed-auth chat recovery Patch release paired with `mcp-use` v2.1.1, allowing anonymous sessions to authenticate only when a protected operation requires it. * **Enhancement**: mixed-auth tool calls stay on the browser MCP connection, pause with an Authenticate action, and resume the same client-side turn after popup or redirect authorization * **Enhancement**: the Skills tab becomes available when a development HMR reload adds Skills after the initial connection negotiated without the extension * **Fix**: optional OAuth discovery and token projection no longer block connection readiness, transient metadata failures recover, and authenticated state remains accurate after a challenge * **Fix**: reverse-proxy buffering is disabled for open-ended MCP SSE responses so subscription acknowledgements arrive immediately * **Update**: Updated mcp-use to v2.1.1 Release 20.1.0 ## Skills over MCP & Inspector runtime Minor release paired with `mcp-use` v2.1.0 — typed Skills operations, an integrity-checked file explorer, and development/runtime fixes for the v2 Inspector. * **New**: typed Skills over MCP client operations, a capability-gated Inspector file explorer with integrity verification, and removable progressive skill context in Inspector chat * **Enhancement**: Skills discovery omits invalid skills from fresh development snapshots * **Enhancement**: the `window.openai` compatibility bridge exposes tool lifecycle globals and host actions while preserving the native MCP Apps handshake for v2 views; iframe console records are not parsed as MCP Apps JSON-RPC messages * **Fix**: provider assets load from the development server, widget-declared sandbox CSPs can use dynamic compilation within their declared domains, and embedded layouts fill their iframe height without the empty desktop header gap or standalone sidebar footer controls * **Fix**: avoid the Inspector tunnel flash while connection state transitions complete * **Update**: Updated mcp-use to v2.1.0 ## Stable npm README links Patch release fixing absolute links in the published Inspector documentation. * **Fix**: README images and repository links use stable absolute URLs so npm renders the published Inspector documentation correctly * **Update**: Updated mcp-use to v2.0.4 ## Stable package README metadata Patch release making the published Inspector README reliable on npm. * **Fix**: Publish a package-root README and verify that it stays synchronized with the repository README before packing * **Update**: Updated mcp-use to v2.0.3 ## Safer loopback proxy defaults Patch release paired with `mcp-use` v2.0.1, preventing publicly reachable Inspector mounts from proxying requests to host loopback services by default. * **Fix**: `mountInspector` defaults `oauthProxyAllowLoopback` to `false`; the standalone CLI permits loopback for local development but blocks it in production unless `INSPECTOR_ALLOW_LOOPBACK=true` * **Update**: runtime and bundled dependencies use patched stable releases with tightened transitive resolutions * **Update**: Updated mcp-use to v2.0.1 Release 20.0.0 ## MCP SDK v2 & hosted Inspector Major release paired with `mcp-use` v2.0.0 — the Inspector moves to the official MCP SDK v2 and a project-pinned, secure relay/runtime architecture. * **Update**: The Inspector and client move to the official MCP SDK v2 with automatic protocol negotiation, ESM-only packages, Node.js 22.22.2+, redesigned OAuth, and v1 API cleanup * **New**: Project-pinned Inspector development owns the MCP/OAuth relay and serves local assets without a remote application fallback; the standalone package adds the full proxy and OAuth BFF * **New**: Hosted and localhost chat, MCP Apps tool lifecycle delivery, fullscreen chat controls, and streamed tool-call input improve interactive Inspector sessions * **Fix**: OAuth session values are encrypted at rest, secret connection fields are not persisted, browser launches and Inspector routes are hardened, and proxy/OAuth APIs are rate-limited * **Enhancement**: Immutable CDN asset resolution and zero-dependency packaging prevent mixed-version assets and keep standalone installs clean * **Update**: Updated mcp-use to v2.0.0 ## CLI version heading Patch release paired with `mcp-use` v1.34.6; includes the unpublished 12.0.4 docs-link fix. * **Enhancement**: the CLI help heading shows the installed Inspector version * **Documentation**: Inspector README drops dead documentation links * **Update**: Updated mcp-use to v1.34.6 ## Tunneling docs link Patch release fixing the tunnel popover documentation link. * **Documentation**: The tunnel popover now links to `https://mcp-use.com/docs/tunneling` instead of the removed Manufact URL * **Update**: Updated mcp-use to v1.34.3 ## Backend-less CDN shell support Patch release improving the Inspector bundle used by the SDK v2 backend-less shell. * **Fix**: CDN auto-connect reads `window.__MCP_USE_INSPECTOR__.autoConnectUrl`, and the version badge and MCP `clientInfo` fall back to the compile-time bundle version when runtime injection is absent * **Update**: Updated mcp-use to v1.34.2 ## mcp-use v1.34.1 Patch release paired with `mcp-use` v1.34.1; there are no Inspector-specific source changes. * **Update**: Updated mcp-use to v1.34.1 ## Hosted OAuth reliability (mcp-use v1.34.0) Major release paired with `mcp-use` v1.34.0 — peer dependency bump; runtime OAuth fixes come from the updated `mcp-use` dependency (no inspector-specific source changes in this wave). * **Fix**: gateway-fronted and hosted OAuth servers no longer drop to `failed` with "Server does not support OAuth" when discovery succeeded on an earlier pass — inherits `oauthProxyUrl` wiring and `pending_auth` handling from mcp-use v1.34.0 (`#1840`) * **Update**: Peer dependency on `mcp-use` moves to `>=1.34.0-canary.0` * **Update**: Updated mcp-use to v1.34.0 Release 11.0.0 ## MCP Apps runtime, Auto connections & host context styles Major release paired with `mcp-use` v1.33.0 — widgets now render with MCP Apps as the primary runtime, new connections default to Auto mode with proxy fallback, and host context style variables are applied while the Apps SDK preview tab remains for `window.openai`-only widgets. * **New**: widgets render with the MCP Apps bridge as the primary runtime and apply host context style variables; the Apps SDK ("Component (Apps SDK)") preview tab remains for widgets that only speak `window.openai` (`#1739`) * **Enhancement**: new connections default to Auto mode, trying a direct browser connection first and falling back to the configured Inspector proxy when CORS or other proxy-resolvable connection errors occur; Direct and Proxy remain available as advanced overrides (`#1795`) * **Fix**: OAuth proxy fetch is scoped per server configuration, so connecting one server Via Proxy no longer mutates global `fetch`, changes unrelated requests, or affects other servers configured for Direct mode (`#1770`) * **Fix**: stale saved auto-connect entries are replaced when the advertised transport changes, so embedded Inspector instances stop retrying deprecated SSE connections after switching to streamable HTTP (`#1792`) * **Fix**: signed-in users on the hosted free tier are no longer shown the "sign in to increase your limits" prompt — the free-tier upgrade chrome only renders for anonymous visitors (`#1767`) * **Fix**: the inspector CLI handles `--version` and unknown options and reads its version from `package.json`, so canary builds and CLI version output stay in sync (`#1722`) * **Update**: Bumped `vite` to 8.0.16 (`#1742`) * **Update**: Peer dependency on `mcp-use` moves to `>=1.33.0-canary.0` * **Update**: Updated mcp-use to v1.33.0 ## Hosted localhost chat & chat scroll helper Patch release paired with `mcp-use` v1.32.1 — hosted inspector chat falls back to browser-side streaming for loopback MCP servers and adds a scroll-to-bottom affordance in long chats. * **Fix**: Hosted inspector chat detects localhost and loopback MCP server URLs and uses client-side streaming because the managed cloud backend cannot reach a user's local server; the configure-key empty state explains why a personal API key is needed (`#1736`) * **New**: Centered animated scroll-to-bottom button appears when viewing older chat messages (`#1538`) * **Update**: Peer dependency on `mcp-use` moves to `>=1.32.1-canary.0` * **Update**: Updated mcp-use to v1.32.1 ## mcp-use v1.32.0 Major release paired with `mcp-use` v1.32.0 — peer dependency moves to `>=1.32.0-canary.0`; no inspector-specific runtime changes. * **Update**: Peer dependency on `mcp-use` moves to `>=1.32.0-canary.0` * **Update**: Updated mcp-use to v1.32.0 ## mcp-use v1.31.1 Patch release paired with `mcp-use` v1.31.1 — picks up workspace dependency alignment; no inspector-specific runtime changes. * **Update**: Updated mcp-use to v1.31.1 Release 9.0.0 ## OAuth credential lifecycle & mcp-use v1.31.0 Major release paired with `mcp-use` v1.31.0 — peer dependency moves to `>=1.31.0-canary.1`; explicit OAuth credential cleanup when removing a saved server. * **Fix**: delete-server passes `{ clearCredentials: true }` to `removeConnection` so an explicit user removal forgets persisted OAuth credentials instead of leaving tokens behind (`#1703`) * **Update**: Peer dependency on `mcp-use` moves to `>=1.31.0-canary.1` * **Update**: Updated mcp-use to v1.31.0 ## mcp-use v1.30.2 Patch release paired with `mcp-use` v1.30.2 — picks up the chalk CJS compatibility fix; no inspector-specific runtime changes. * **Update**: Updated mcp-use to v1.30.2 ## Widget status label pointer-events fix Patch release paired with `mcp-use` v1.30.1 - invoking/invoked labels in the MCP Apps preview pane no longer block iframe interactions. * **Fix**: MCP Apps preview status label used an absolutely positioned `h-full` wrapper that intercepted hover, click, and form controls along the left edge of the widget iframe; apply `pointer-events-none`, remove the full-height wrapper, and align the Apps SDK label in `OpenAIComponentRenderer` (`#1694`, `#1678`) * **Update**: Updated mcp-use to v1.30.1 ## mcp-use v1.30.0 Major release paired with `mcp-use` v1.30.0 - peer dependency moves to `>=1.30.0-canary.0`; no inspector-specific runtime changes. * **Update**: Peer dependency on `mcp-use` moves to `>=1.30.0-canary.0` * **Update**: Updated mcp-use to v1.30.0 ## mcp-use v1.29.1 Patch release paired with `mcp-use` v1.29.1 - picks up OAuth transport auth hardening and workspace security dependency bumps; no inspector-specific runtime changes. * **Update**: Updated mcp-use to v1.29.1 Release 7.0.0 ## Local LLM provider, image tool results & widget display modes Major release paired with `mcp-use` v1.29.0: chat against a local Ollama daemon, MCP image tool results forwarded to vision models as real images, an MCP-server reconnect banner, and a reworked widget fullscreen / picture-in-picture path - plus a large dead-code cleanup. * **New**: Ollama as a local LLM chat provider - local model discovery and streaming chat, talking to the daemon directly over CORS (no server-side proxy) with an `OLLAMA_ORIGINS` hint surfaced when the browser fetch is blocked (`#1395`) * **New**: MCP-server reconnect banner - chat recognises the cloud's `mcp_auth_required` 401 (e.g. an expired upstream OAuth token) and renders an inline reconnect banner for the affected server that refreshes the token in place, instead of pointing users at the Manufact account login (`#1485`) * **New**: copy button on user messages, matching the assistant-message UX (`#1556`) * **Enhancement**: `mcp-use client screenshot` auto-sizes to the widget's natural dimensions when `--width`/`--height` are omitted and handles external MCP server URIs (`ui:///.html`) (`#1579`) * **Enhancement**: snappier tab-switch animation timing (`#1544`) * **Fix**: MCP image tool results are forwarded to the model as real image content instead of base64-encoded JSON - image bytes route through each provider's vision channel (Anthropic `tool_result` image blocks; OpenAI / Google follow-up user turns), and text-only results now reach the model unwrapped (`#1487`) * **Fix**: widget fullscreen renders above embedded host chrome - native `requestFullscreen()` on the widget shell with an exit navbar, picture-in-picture portaled to `document.body` at `z-[100]`, and AppBridge reconnect after the sandbox iframe remounts (`#1605`) * **Fix**: stop `ToolInputForm` from writing an invalid per-property `required: boolean` onto the live tool `inputSchema` during render, which made Anthropic reject the chat request with `tools.0.custom.input_schema invalid` after a tool was opened in the Tools tab (`#1545`) * **Fix**: keep per-tab count badges visible and right-aligned in collapsed header tabs (`#1490`) * **Fix**: propagate server alias updates through the MCP server wrapper so the tile heading reflects a renamed alias immediately (`#1539`) * **Fix**: replace the trailing-slash regex in `normalizeOllamaBaseUrl` with a linear scan, resolving a CodeQL polynomial-regex alert (`#1534`) * **Chore**: add an OAuth redirect e2e against an emulated Google issuer, exercising both Direct and Via Proxy connection types (`#1481`, `#1609`) * **Chore**: remove 18 unused source files, stop generating the unused client-side `version.ts`, and drop dead barrel re-exports flagged by Knip (`#1510`, `#1533`, `#1607`) * **Update**: Updated mcp-use to v1.29.0 Release 6.0.0 ## Widget preview route & dark-mode scrollbars Major release paired with `mcp-use` v1.28.0: new `ViewPreview` component and `/preview/:view` client-side route that back the `mcp-use client screenshot` CLI pipeline, dark-mode aware scrollbars across the UI, and a cleanup of duplicate Knip-flagged exports. * **New**: `` internal component and `/preview/:view` client-side route — a chromeless surface the CLI screenshot pipeline drives via CDP. `MCPAppsRenderer` gains an optional `onReady` callback that the preview route uses to signal `body[data-view-ready="true"]`, which the CLI waits for before capturing. The preview route detects `globalThis.__mcpUsePreviewBundle` (injected by the CLI via CDP `Page.addScriptToEvaluateOnNewDocument`) and renders the widget inline, skipping the browser-side MCP connection entirely (`#1432`) * **Enhancement**: dark-mode aware scrollbars styled to match the inspector theme, with improved hover visibility (`#1484`) * **Fix**: removed the redundant default export of `JsonRpcLoggerView`; the named export is unchanged (`#1453`) * **Update**: Updated mcp-use to v1.28.0 ## MCP App width fix in chat Patch release paired with `mcp-use` v1.27.1: MCP App width is pinned in chat so only height responds to widget-reported sizes. * **Fix**: Pin MCP App width in chat - `onSizeChange` only updates height, and the inline transition no longer animates `width`; prevents the chat panel from collapsing when widgets report narrower content (`#1462`) * **Update**: Updated mcp-use to v1.27.1 Release 5.0.0 ## OpenRouter, pre-registered OAuth & telemetry env Major release paired with `mcp-use` v1.27.0: OpenRouter and OpenAI-compatible providers in chat configuration, pre-registered OAuth client credentials in the connection dialog, and `MCP_USE_ANONYMIZED_TELEMETRY` honored in browser telemetry. * **New**: OpenRouter as a first-class chat provider - a single OpenRouter API key fronts upstream OpenAI / Anthropic / Google models; internally reuses the OpenAI provider with an override base URL and the required `HTTP-Referer` / `X-Title` headers (`#1403`) * **New**: "OpenAI Compatible" entry in the chat provider dropdown - point inspector chat at any OpenAI-compatible API (LM Studio, Ollama, OpenRouter, etc.) with a required Base URL field and an optional API key; the standard OpenAI provider is unchanged (`#1437`) * **New**: `Client ID`, `Client Secret`, and `Scope` fields in the Authentication dialog wired through `addServer` / `updateServer` for pre-registered OAuth flows against providers that strip `registration_endpoint` from metadata (`#1400`) * **Fix**: Browser telemetry honors `MCP_USE_ANONYMIZED_TELEMETRY=false` - the inspector server mirrors the env var into `window.__MCP_USE_ANONYMIZED_TELEMETRY__` before the client bundle loads, so a single env var disables both `mcp-use`'s in-browser `posthog-js` and the inspector's own client telemetry (`#1443`) * **Update**: Updated mcp-use to v1.27.0 ## E2E alignment for Settings dropdown Patch release updating Playwright coverage for the command palette Settings entry after the navbar refactor; paired with `mcp-use` v1.25.2. * **Fix**: Command palette e2e test targets the Settings option via the dropdown trigger introduced in the inspector settings UX (`#1428`) * **Update**: Updated mcp-use to v1.25.2 ## OAuth single-tab flow, embed fixes & Hono detection Patch release fixing OAuth redirect flows, embedded `ChatTab` UI leaks, and Hono duck-type detection in `mountInspector`; paired with `mcp-use` v1.25.1. * **Fix**: OAuth authorization now opens in the current tab (`useRedirectFlow: true`, `preventAutoAuth: true`) and the callback navigates the same tab back - users no longer end up with two inspector tabs (`#1391`) * **Fix**: Store connection config in `sessionStorage` before OAuth redirect so auto-reconnect works after the callback without a `?autoConnect` param (`#1404`) * **Fix**: OAuth callback redirects back to the inspector with error parameters on failure (user denies, server error) instead of showing a raw error page; surfaced as a persistent app-level toast (`#1381`) * **Fix**: `mountInspector(app)` detects Hono via duck-typing (`.fetch(Request) => Response`) instead of `instanceof`, resolving crashes when the host and inspector resolve different Hono module records (`#1417`) * **Fix**: MCP App widget z-index - removed explicit `z-20`/`z-10` from sandboxed iframe wrappers so widgets scroll beneath the chat header instead of painting over it (`#1407`) * **Fix**: Free-tier upgrade UI (`Model & usage` dialog, model badge) is now opt-in via `enableFreeTierUpgrade` on `ChatTab` (default `false`) and is hidden for host-app embeds that manage their own session (`#1399`) * **Fix**: Suppress duplicate model chrome (landing pill, `ChatHeader` badge) when host passes `managedLlmConfig` + `hideModelBadge`; chat no longer auto-switches to client-side streaming when `localLlmConfig` exists in localStorage and the host owns the chat stream (`#1418`) * **Documentation**: `--no-open` CLI flag added to the inspector CLI reference (`#1397`) * **Update**: Updated mcp-use to v1.25.1 Release 3.0.0 ## Inline elicitation & social meta tags Major release paired with `mcp-use` v1.25.0: chat-initiated elicitation requests render inline in the chat thread, hosted inspector links get rich previews, and the peer dependency on `mcp-use` tracks the 1.25 OAuth refactor. * **New**: Elicitation requests triggered from the Chat tab render inline in the chat thread instead of routing users through a toast to the Elicitation tab; Tools-tab triggers keep the existing toast flow, and the Elicitation tab remains available as an audit view (`#1336`) * **New**: Links to the hosted inspector now render rich previews on Slack, X/Twitter, LinkedIn, Discord, and other platforms (`#1376`) * **Update**: Peer dependency on `mcp-use` moves to `>=1.25.0-canary.9` to pick up the OAuth DCR-direct refactor * **Update**: Updated mcp-use to v1.25.0 Release 2.2.0 ## Hosted chat runtime, LLM providers & chat export Minor release paired with `mcp-use` v1.24.2: first-party inspector LLM streaming (no LangChain on the chat path), copy/export chat, runtime hosted-chat URL, hosted free-tier chat, and cloud env tooling via the CLI (`#1372`). * **New**: First-party LLM providers for inspector chat (Anthropic, OpenAI, Google) with shared message formatting, SSE streaming, and tool loops - the inspector no longer depends on LangChain for chat (`#1372`) * **New**: "Copy Chat" and "Export Chat" in the chat header - markdown to clipboard; download as JSON or Markdown with tool calls in order (`#1324`) * **New**: Free tier chat on the hosted inspector (`#1368`) * **New**: Hosted chat URL from runtime config - inspector server reads `MANUFACT_CHAT_URL` and injects `window.__MANUFACT_CHAT_URL__`; `InspectorProvider` prefers that value and falls back to `VITE_MANUFACT_CHAT_URL` for local dev (`#1370`) * **Fix**: OAuth login popup - drop `noopener` and redirect `callbackURL` to `/inspector/oauth-popup-closed.html` so the popup self-closes instead of loading the full inspector (`#1370`) * **Update**: Updated mcp-use to v1.24.2 ## Navbar, theme & debug controls Minor release with MCP Apps debug theme toggle and navbar/settings UX improvements; dependency bump to `mcp-use` v1.24.1. * **New**: Theme toggle button in MCP Apps debug controls toolbar * **Enhancement**: Navbar - chat tab first with label and separator; `alwaysExpanded` on tab triggers so the active label stays visible when collapsed; Deploy links to manufact.com/signup with inspector referrer; tunnel control between Add to Client and Deploy with updated styling and mobile visibility; theme toggle, command palette, and GitHub under a settings dropdown; "Report a Bug" prefills a GitHub issue with the inspector label * **Update**: Updated mcp-use to v1.24.1 Release 2.0.0 ## Subpath OAuth, chat UX & tab persistence Major release paired with `mcp-use` v1.24.0: correct OAuth redirects when the inspector is served under `/inspector`, clearer chat streaming UI, and restored tab state after reload. * **Fix**: `McpClientProvider` receives `defaultCallbackUrl` so OAuth redirects target `/inspector/oauth/callback` (matches React Router `basename`); removes the authentication dialog "Redirect URL" field that was not wired to the live connection * **Fix**: Hide the thinking indicator when the assistant message already has rendered parts so the spinner does not linger after streaming completes * **Enhancement**: Persist the active inspector tab across page refresh * **Update**: Updated mcp-use to v1.24.0 ## Embedded inspector without LangChain Patch release fixing server routes that imported `telFetch` from the root `mcp-use` package. * **Fix**: Import `telFetch` from `mcp-use/telemetry/tel-fetch` so shared routes do not load the root entry (which eagerly pulls the agent graph); resolves embedded inspector failures when `langchain` is not installed * **Update**: Updated mcp-use to v1.23.1 Release 1.0.0 ## Stream protocol, aliases & chat tooling Major release with MCP stream support in chat, connection UX improvements, and dependency hardening. * **New**: MCP data stream protocol support in `ChatTab` and `useChatMessages` * **Enhancement**: `disabledTools` prop on `ChatTab` and `useChatMessages` for finer tool control * **New**: Editable MCP server aliases in connection settings; `updateServerMetadata()` from `McpClientProvider` updates display names without a full reconnect; shared `getServerDisplayName` across dashboard tiles, server dropdown, header actions, command palette, server info modal, and server icon * **Fix**: Alias-only edits no longer trigger a full reconnect; IME composition no longer submits the connection form when pressing Enter mid-composition * **Enhancement**: Persist tabs on refresh; sync URL `tab` query param when switching tabs so state survives reload * **Enhancement**: Tool-invocation serialization, screenshots, and message list refs for integrations such as manufact.build * **Update**: Removed unused `transportType` / `setTransportType` props from `ConnectionSettingsForm` * **Fix**: Tighter `pnpm` overrides and lockfile refresh for `pnpm audit`; `lodash` override in the mcp-apps scaffold template for standalone installs * **Update**: Vite 8.0.5, Hono 4.12.12, `@hono/node-server` 1.19.13 * **Update**: Updated mcp-use to v1.23.0 ## Dependency & bundling alignment Patch release aligning how `@mcp-use/inspector` packages `mcp-use` for bundling and shared types. * **Fix**: Restore `mcp-use` as both a `dependency` and `peerDependency` - tsup bundles non-React subpaths with transitive deps; `peerDependency` preserves shared `mcp-use`/`react` types with the host app * **Update**: Updated mcp-use to v1.22.3 ## Peer Dependency Alignment & MCP UI v7 Minor release aligning inspector dependency strategy for shared type safety and upgrading MCP UI client rendering internals. * **Fix**: Moved `mcp-use` from `dependencies` to `peerDependencies` in `@mcp-use/inspector` so consumers reuse a single `mcp-use` type instance (prevents pnpm duplicate-type TS2322 conflicts) * **Enhancement**: Upgraded `@mcp-ui/client` from v6 to v7 * **Enhancement**: Replaced removed legacy `UIResourceRenderer` path with sandboxed iframe rendering for legacy `ui://` resources * **Enhancement**: Removed remote-dom usage to align with upstream `@mcp-ui/client` v7 changes * **Update**: Updated mcp-use to v1.22.2 ## Chat History Tool Results & ErrorBoundary Customization Patch release improving chat history reconstruction so tool calls/results (including `structuredContent`) persist across turns, plus ErrorBoundary fallback/reporting hooks. * **Fix**: Preserve tool invocation context across chat turns - reconstruct assistant messages as `AIMessage` tool calls plus `ToolMessage` results; keep `structuredContent` and strip `_meta` before sending to the model * **Enhancement**: Chat message conversion supports tool results and multimodal content more reliably * **Enhancement**: `ErrorBoundary` now supports `fallback` (node or `(error) => node`) and `onError` for reporting (default UI unchanged) * **Update**: Updated mcp-use to v1.22.1 ## Tunnel Controls & Vite 8 Minor release with tunnel management for `mcp-use dev`, Vite 8 build stack, and elicit payload alignment with the MCP spec. * **New**: Start/stop the `mcp-use dev` tunnel from the Inspector * **Enhancement**: Vite 8.0 with Rolldown bundler and `@vitejs/plugin-react` 6 in the inspector build * **Fix**: Elicit - send `content` instead of `data` per the MCP spec; aligns with `createElicitMethod` validation on the client * **Update**: Updated mcp-use to v1.22.0 ## Dependency Updates Patch release with dependency updates. * **Fix**: Dependabot security alerts - updated vulnerable dependencies (hono, dompurify, etc.) * **Update**: Updated mcp-use to v1.21.5 ## Dependency Update Patch release with dependency update. * **Update**: Updated mcp-use to v1.21.4 ## Sandbox Host Fix Patch release fixing sandbox host derivation for cloud-embedded inspector pages. * **Fix**: Sandbox host derivation for cloud-embedded pages - apex hosts (e.g. manufact.com) now resolve to `sandbox-inspector.{domain}` instead of `sandbox-{domain}` * **Update**: Updated mcp-use to v1.21.3 ## Embedded Inspector Proxy Fix Patch release fixing auto-connect when inspector is served from MCP server (Python, custom servers). * **Fix**: Skip proxy when inspector origin matches MCP server origin - no longer routes through missing `/inspector/api/proxy` on embedded servers * **Fix**: Detect proxy availability via runtime config injection (`__MCP_PROXY_URL__`); disable autoProxyFallback when no proxy is available * **Update**: Updated mcp-use to v1.21.2 ## Chat Components & Dark Mode Fixes Patch release with exported chat component enhancements and proxy header handling. * **Fix**: Tools selection and attachment button icons invisible in dark mode * **Enhancement**: Strip infra headers from proxied requests * **New**: Initial messages support for exported chat components (`ChatTab`, `useChatMessages`) * **Update**: Updated mcp-use to v1.21.1 ## Inspector Embedding & MCP Apps Minor release with embedding support and logger improvements. * **New**: Inspector embedding support - build fix and `InspectorProvider` for embedded usage * **New**: MCP Apps support in `clientInfo.capabilities` - inspector advertises `io.modelcontextprotocol/ui` * **Enhancement**: Logger middleware filters noisy API endpoints (telemetry, RPC stream/log) * **Fix**: `--no-open` flag respected in standalone dev mode (was always opening browser) * **Update**: Updated mcp-use to v1.21.0 ## Dependency Update Patch release with dependency update. * **Update**: Updated mcp-use to v1.20.5 ## Embedded Chat Improvements Minor release improving embedded chat experience. * **Enhancement**: Improved embedded chat * **Update**: Updated mcp-use to v1.20.4 ## Standalone Deployment Fix Patch release fixing version import in standalone deployment. * **Fix**: Standalone deployment was importing the version from the wrong path * **Update**: Updated mcp-use to v1.20.3 ## Connection & Widget Display Improvements Patch release with useAutoConnect, MCPAppsRenderer, and chat agent fixes. * **Fix**: useAutoConnect now retains tile visibility on connection failure * **Enhancement**: MCPAppsRenderer and OpenAIComponentRenderer - improved border handling and status display; `prefersBorder` default set to false; status labels above widget in inline mode * **Enhancement**: ToolResultDisplay z-index for proper sticky layering * **Enhancement**: `exposeResourcesAsTools` and `exposePromptsAsTools` options in MCPAgentOptions; inspector chat tab sets both to `false` so agent only exposes actual MCP tools * **Update**: Updated mcp-use to v1.20.2 ## Widget Status Texts & CSP Fixes Patch release with invoking/invoked status display and CSP handling improvements. * **New**: Display of `invoking` and `invoked` status texts in MCPAppsRenderer, OpenAIComponentRenderer, ToolResultDisplay, ToolResultRenderer * **Enhancement**: MCPAppsDebugControls adjusts violation indicators based on CSP mode * **Fix**: sandbox-proxy strips existing CSP meta tags before injecting permissive CSP * **Update**: Updated mcp-use to v1.20.1 Release 0.22.0 ## Iframe Console & CSP Panel Minor release with Iframe Console enhancements and CSP violation handling. * **New**: Iframe Console with expandable logs, level filter, search, resizable height * **New**: Widget debug context for chat * **Enhancement**: MCP Apps debug controls (tool props JSON view, required props hint, SEP-1865 semantics) * **New**: CDN build * **Fix**: useSyncExternalStore first-render handling; reconnect logic; Tools tab sends only explicitly set fields; resource annotations include `_meta` * **New**: CSP violations panel with clear action; widget re-execution on CSP mode change; CSP mode for Apps SDK * **Update**: Updated mcp-use to v1.20.0 ## Dependency Update Patch release with dependency update. * **Update**: Updated mcp-use to v1.19.3 Release 0.21.0 ## Bulk Paste & Tool Definition Enhancements Minor release adding bulk paste functionality and enhanced tool definition handling. * **New**: Bulk paste functionality in ToolsTab - paste JSON or JavaScript object syntax directly * **New**: Auto-fill dialog to confirm updates when pasted data would overwrite existing values * **Enhancement**: ToolExecutionPanel now copies full tool definition * **Enhancement**: Added utility functions for parsing and converting JavaScript object syntax to JSON * **Enhancement**: Visual feedback for auto-filled fields in ToolInputForm * **Update**: Updated mcp-use to v1.19.2 ## MCPApps & Widget Improvements Patch release improving widget loading and iframe handling. * **Enhancement**: Improved MCPAppsRenderer loading logic and widget handling * **Enhancement**: Enhanced useWidget for better iframe lifecycle management * **Update**: Updated mcp-use to v1.19.1 Release 0.20.0 ## Chat Quick Questions & Enhanced UX Minor release with chat quick questions and followups, improved loading states, and developer experience enhancements. ### Chat Enhancements * **New**: Support for `chatQuickQuestions` and `chatFollowups` in ChatTab components ### Loading & Error Handling * **Enhancement**: MCPAppsRenderer shows loading spinner with `isReady` state management * **Enhancement**: Replaced shimmer with Spinner component for better initial widget load UX * **Enhancement**: Added skeleton loading state for widgets * **Enhancement**: Global error listeners and improved error logging in widget components ### Developer Experience * **New**: Copy all logs to clipboard feature * **Enhancement**: Enhanced theme handling in OpenAIComponentRenderer * **Enhancement**: ToolsList displays metadata and icons differentiating MCP/OpenAI tool types * **Fix**: Allow permissive CSP frame ancestors by default * **Fix**: Correct MIME type for mcp\_apps resource counting ### Dependencies * **Update**: Updated mcp-use to v1.19.0 Release 0.19.0 ## Tool Arguments, Streaming Input & Elicitation Enum Support Minor release with tool argument handling, streaming input support, and elicitation enum variants. * **New**: Tool argument type coercion and schema resolution (boolean, array, object); ToolsTab and ToolInputForm use new schema utilities; validation server tool and E2E tests for typed arguments * **New**: Partial tool input handling for streaming arguments in MCPAppsRenderer; MessageList and ToolResultRenderer support streaming states; useChatMessagesClientSide handles streaming tool call arguments; useWidget types for partial/streaming state * **New**: Elicitation support for SEP-1330 enum schema variants (single-select, multi-select); client and server handling; Elicitation tab docs and tests * **Fix**: Readiness state reset when widget URL changes in OpenAIComponentRenderer; improved tool output and response metadata handling for pending-to-ready transitions * **Update**: Updated mcp-use to v1.18.0 ## Log Noise Reduction Patch release reducing dev server log noise and aligning dependencies. * **Fix**: Reduced noisy logs in the dev server * **Update**: Updated mcp-use to v1.17.4 ## Widget Readiness & Iframe Global Sync Fixes Patch release focused on widget iframe lifecycle reliability and state update safety. * **Fix**: Reset widget readiness state when widget URL changes so new iframes re-initialize correctly * **Enhancement**: Improved tool output and response metadata transitions from pending to ready states * **Enhancement**: Queued iframe global updates until OpenAI globals are available for more reliable widget synchronization * **Fix**: Added animation frame cleanup logic to prevent memory leaks during component unmount * **Update**: Updated mcp-use to v1.17.3 ## Chat Conversion & Error Copy Fixes Patch release improving chat message conversion and copy behavior. * **Fix**: Copy button now copies actual error text instead of `null` * **Fix**: Chat message conversion now falls back to `parts` when `content` is empty, with improved attachment handling * **Enhancement**: Chat request streaming now uses external history for better context handling and to avoid duplicated messages * **Update**: Updated mcp-use to v1.17.2 ## Dependency Update Patch release aligned with mcp-use dependency updates. * **Update**: Updated mcp-use to v1.17.1 ## Iframe Embedding & Reverse Proxy Support Patch release with iframe embedding configuration, reverse proxy improvements, and widget rendering fixes. * **New**: `MCP_INSPECTOR_FRAME_ANCESTORS` environment variable to control which origins can embed the inspector in iframes via CSP `frame-ancestors` * **New**: `mountInspector` accepts `devMode` and `sandboxOrigin` options for deployment flexibility * **New**: Runtime config injection (`__MCP_DEV_MODE__`, `__MCP_SANDBOX_ORIGIN__` window globals) without rebuild * **Enhancement**: Server-side widget fetches convert external proxy URLs to localhost for correct content retrieval * **Enhancement**: Simplified widget asset URL rewriting for improved reverse proxy reliability * **Fix**: Infinite re-render loop in `MCPAppsRenderer` caused by excessive `useEffect` dependencies * **Update**: Updated mcp-use to v1.17.0 Release 0.18.4 ## E2E Testing & Refresh Features Patch release with comprehensive E2E testing infrastructure and enhanced UI functionality. ### E2E Testing Infrastructure * **New**: Comprehensive Playwright-based E2E test suite with full coverage for chat, connections, HMR, widgets, and command palette * **New**: GitHub Actions workflow (`.github/workflows/inspector-e2e.yml`) for automated E2E testing across multiple modes * **New**: Test fixtures for authentication servers (OAuth mock, API key, custom headers) * **New**: Test helpers for connection, authentication, and debugger tools * **New**: Test matrix for parameterized test scenarios across multiple inspector modes (mix, prod, builtin) * **New**: Widget examples for conformance testing (weather-display, status-card, display-info, apps-sdk-only-card) * **Enhancement**: Comprehensive E2E testing documentation in `tests/e2e/README.md` ### Testability Improvements * **Enhancement**: Added `data-testid` attributes across 40+ UI components for reliable element selection * **Enhancement**: Enhanced component accessibility for automated testing including connection forms, server list, command palette, chat interface, tool execution panels, resources/prompts/tools tabs, and elicitation/sampling displays ### UI Enhancements * **New**: Refresh buttons with loading states for Tools, Resources, and Prompts tabs * **New**: `ListTabHeader` component with refresh functionality and spinning icon animation * **Enhancement**: Manual refresh capability for primitives without reconnecting to server * **Fix**: Inspector now detects when `server=` query parameter contains a URL that's not already connected and automatically redirects to use `autoConnect=` instead * **Enhancement**: Added comprehensive URL parameters documentation page to inspector reference ### Widget Improvements * **Fix**: Widget pending state now correctly emulated to reflect ChatGPT behavior * **Enhancement**: MCPAppsRenderer and OpenAIComponentRenderer handle tool output and metadata more effectively * **Enhancement**: Immediate rendering of widgets even when results are pending * **Enhancement**: MessageList and ToolResultRenderer support immediate rendering of widget tools * **Enhancement**: Widget props support in ToolResultDisplay ### Server Improvements * **Enhancement**: Changed default port from 3001 to 3000 for production builds (dev still uses 3001) * **Enhancement**: Skip telemetry (PostHog/Scarf) when `NODE_ENV=test` or `MCP_USE_ANONYMIZED_TELEMETRY=false` * **New**: `start-auth-servers.ts` utility for running authentication test servers ### Dependencies * **Update**: Updated mcp-use to v1.16.4 ## Dependency Update Patch release with dependency updates. * **Update**: Updated mcp-use to v1.16.3 ## Inspector Fixes Patch release with widget behavior fix and improved URL handling. * **Fix**: Widget pending state now correctly emulated to reflect ChatGPT behavior * **Fix**: Inspector now detects when `server=` query parameter contains a URL that's not already connected and automatically redirects to use `autoConnect=` instead * **Update**: Updated mcp-use dependency to v1.16.2 ## Dependency Update Patch release aligned with mcp-use v1.16.1. * **Update**: Updated mcp-use dependency to v1.16.1 Release 0.18.0 ## Chat Prompts & Multimodal Support Minor release introducing prompts in chat and multimodal image support for vision-capable LLMs. ### Chat Prompts * **New**: Prompts in Chat - type / to open a prompt, run it, and include its result in the thread before sending * **Note**: Prompts with arguments are not yet supported in this release ### Multimodal Support * **New**: Image attachment support in Inspector chat * **New**: Upload and send images to vision-capable LLMs (GPT-4o, Claude, Gemini) using the paperclip button * **Enhancement**: MCP prompts that return images are now properly displayed instead of showing raw JSON * **Enhancement**: Full multimodal support for image content in chat interface ### Dependencies * **Update**: Updated mcp-use to v1.16.0 ## Theme URL Parameter Fix Patch release enabling dark mode through URL parameter. * **Fix**: Enable dark mode through theme URL parameter * **Update**: Aligned with mcp-use v1.15.3 ## HMR File Watcher Fix Patch release fixing file watcher resource exhaustion in containerized environments. * **Fix**: HMR file watcher exhausting inotify limits by properly ignoring node\_modules * **Fix**: Prevented ENOSPC errors in containerized environments caused by watching files inside `node_modules/` * **Update**: Aligned with mcp-use v1.15.2 ## Dependency Update Patch release with dependency updates. * **Update**: Updated mcp-use to v1.15.1 Release 0.17.0 ## MCP Apps Support & Landing Pages Major release introducing MCP Apps support with dual-protocol widget rendering and enhanced inspector capabilities. ### MCP Apps Support * **New**: Dual-protocol support enabling widgets to work with both MCP Apps and ChatGPT Apps SDK * **New**: `MCPAppsRenderer` component for advanced debugging and visualization * **New**: `MCPAppsDebugControls` component for widget debugging * **New**: Sandboxed iframe support with console logging and safe area insets for isolated widget rendering * **New**: Widget adapters (MCP Apps, Apps SDK) with protocol helpers for seamless cross-protocol compatibility ### Landing Pages * **New**: HTML landing page support for MCP server endpoints * **New**: Connection instructions for Claude Code, Cursor, VS Code, VS Code Insiders, and ChatGPT * **Enhancement**: Browser host normalization for server connections ### Bug Fixes & Security * **Fix**: MCP server landing now shows the external URL instead of the internal URL * **Fix**: Zod JIT compilation to prevent CSP violations in sandboxed environments * **Security**: Fixed vulnerabilities in dependencies ### Dependencies * **Update**: Updated mcp-use to v1.15.0 ## UI Enhancements & Connection Handling Patch release with improved UI components, widget security enhancements, and better connection management. ### UI Enhancements * **Enhancement**: CustomHeadersEditor with improved focus management and title prop support * **Enhancement**: Standardized proxy configuration - renamed `customHeaders` to `headers` in InspectorDashboard and ServerConnectionModal for consistency ### Widget Security * **Enhancement**: Widget security headers with frame domain support * **Enhancement**: Added `frame_domains` to widgetCSP interface for iframe embed control * **Enhancement**: Updated getWidgetSecurityHeaders to include frame\_domains in CSP for OpenAI compatibility * **Enhancement**: CSP handling in OpenAIComponentRenderer prioritizes metadata from tool results and resources ### Connection Handling * **Enhancement**: Improved server connection handling with new handleReconnect function * **Enhancement**: UI elements reflect connection states more accurately with better hover effects and error displays * **Enhancement**: Enhanced error handling for unauthorized connections with clearer user feedback * **Enhancement**: State management for connecting servers in InspectorDashboard ### Dependencies * **Update**: Aligned with mcp-use v1.14.2 improvements ## Tool Output Display Fix Patch release with tool output display improvement. * **Fix**: Inspector tool output now displays at full height for better content visibility * **Update**: Aligned with mcp-use v1.14.1 Release 0.16.0 ## RPC Message Management & LangChain Fixes Release with enhanced RPC message handling and critical bug fixes for Anthropic integration. ### RPC Message Management * **New**: Copy functionality for RPC messages in Prompts, Resources, and Tools tabs * **New**: Reusable `RpcPanel` component for consistent RPC message handling across tabs * **New**: Export functionality for RPC messages * **Enhancement**: Improved panel management with refactored ResizablePanel components ### Resource Properties Management * **New**: Custom properties support for resources - dynamically configure resource properties * **New**: `PropsSelect` component for intuitive property selection and management * **New**: `PropsConfigDialog` with AI-powered property suggestions using Claude * **New**: `SchemaFormField` component for rendering JSON schema-based forms * **New**: `usePropsLLM` hook leveraging Claude for intelligent property suggestions * **New**: `useResourceProps` hook for managing resource props state ### Inspector Improvements * **Enhancement**: Extracted MCP prompts logic into reusable `useMCPPrompts` hook * **Enhancement**: Server metadata display with website URLs and icons * **Enhancement**: Better tool management - cleared selected tools when removed from list * **Enhancement**: Enhanced `JSONDisplay` with improved line wrapping and font size for better readability * **Enhancement**: `ToolExecutionPanel` now includes collapsible description section * **Enhancement**: Integrated JSON metadata visualization in tool execution panel * **Enhancement**: `McpUIRenderer` and `OpenAIComponentRenderer` support `customProps` parameter * **Enhancement**: `ResourceResultDisplay` with dynamic property configuration UI * **Enhancement**: Enhanced Prism theme support for better code highlighting * **Enhancement**: Updated `useMcp` hook to expose `mcpServerUrl` for resource operations ### Bug Fixes * **Fix**: Resolved Anthropic `tool_use.id` required error with LangChain 1.3.10 update * **Fix**: Proper tool\_call ID generation ensuring unique IDs for all tool\_use blocks * **Fix**: Improved backward compatibility by checking both 'headers' and 'customHeaders' ### Dependencies * **Update**: `@langchain/anthropic` to 1.3.10 * **Update**: `@langchain/core` to 1.1.15 * **Update**: `langchain` to 1.2.10 * **Update**: `react-resizable-panels` to 4.4.1 ## Dependency Update Patch release with dependency updates. * **Enhancement**: Updated mcp-use dependency to latest version ## OAuth Proxy URL Handling Improvements Patch release with improved OAuth proxy URL handling and connection logic. * **Enhancement**: Improved OAuth proxy URL derivation from callback URLs * **Enhancement**: Better handling of root path callbacks in OAuth flow * **Enhancement**: Clearer separation between OAuth proxy URLs and connection URLs * **Fix**: Maintains valid OAuth tokens across sessions by not clearing OAuth storage before connecting ## URL Validation & LocalStorage Enhancements Patch release with URL validation improvements and localStorage functionality. * **Enhancement**: Automatically prepends "https\://" to URLs without protocol for better user experience * **Enhancement**: Improved URL validation logic in InspectorDashboard and ServerConnectionModal * **Enhancement**: Added localStorage clearing functionality for MCP-related items to help with troubleshooting * **Fix**: Enhanced localStorage checks to verify both existence and functional methods before usage * **Fix**: Clear stale OAuth storage before connecting to ensure fresh authentication flow Release 0.15.0 ## Chat Stop Functionality Minor release adding the ability to stop ongoing chat responses in the inspector. ### Chat Functionality * **New**: Stop functionality for chat responses - users can now abort streaming responses * **New**: Export stop function from `useChatMessagesClientSide` hook connected to `abortControllerRef` * **New**: `abortControllerRef` added to `useChatMessages` hook for proper abort control * **Enhancement**: Stop button connected to abort streaming responses for better user control ### UI & Authentication * **Enhancement**: Simplified authentication button logic in InspectorDashboard * **Enhancement**: Updated multi-server example to link directly to authentication URL * **Fix**: Updated dependency `hono` to 4.11.4 ## Dependency Update Patch release with dependency updates. * **Enhancement**: Updated mcp-use dependency to latest version ## OAuth & Metadata Enhancements Minor release with OAuth proxy support, metadata caching, and favicon improvements. ### OAuth & Client Info * **Enhancement**: Enhanced OAuth proxy to support gateway/proxy scenarios (e.g., Supabase MCP servers) * **Enhancement**: Client info support with branding displayed on OAuth consent pages * **Enhancement**: Server metadata caching for immediate display on reconnect - improves UX by showing server info instantly * **Enhancement**: Improved logging middleware for API routes with better debugging visibility * **Enhancement**: Enabled OAuth proxy logging for better flow visibility ### Favicon Detection * **Enhancement**: Enhanced favicon detector to try all subdomain levels (e.g., mcp.supabase.com → supabase.com → com) * **Enhancement**: Detection of default vs custom favicons using JSON API response * **Enhancement**: Prefer non-default favicons when available ### Bug Fixes * **Fix**: Remove import from "mcp-use" which causes langchain import in server * **Enhancement**: Enhanced synchronization for tools, prompts, and resources during HMR ## Connection Fix Patch release fixing autoconnect configuration parsing. * **Fix**: Autoconnect now correctly parses config objects in addition to string URLs ## Security Fixes & OAuth Improvements Patch release addressing multiple security vulnerabilities and fixing OAuth flow issues. ### Security Fixes * **Security**: Fixed 13 vulnerabilities (3 moderate, 10 high) * **Security**: Updated `langchain` to 1.2.3 (fixes serialization injection vulnerability) * **Security**: Updated `@langchain/core` to 1.1.8 (fixes serialization injection vulnerability) * **Security**: Updated `react-router` to 7.12.0 (fixes XSS and CSRF vulnerabilities) * **Security**: Added overrides for `qs` and `preact` vulnerabilities ### OAuth & Connection Improvements * **Fix**: Resolved OAuth flow looping issue by removing duplicate fallback logic * **Enhancement**: Simplified connection handling with consolidated state management * **Enhancement**: Enhanced OAuth authentication flow with improved connection settings * **Enhancement**: Improved auto-connect functionality with better proxy handling and error management * **Enhancement**: Enhanced theme toggling with dropdown menu for better UX and accessibility * **Enhancement**: Updated OAuth flow management in browser provider and callback handling Release 0.14.2 ## Automatic Proxy Fallback & Reconnect Minor release with automatic proxy fallback, OAuth proxy support, and reconnect functionality. ### Breaking Changes (with Deprecation Warnings) * **Breaking**: Renamed `customHeaders` to `headers` across all APIs. Old name still works but shows deprecation warnings. * **Breaking**: Renamed `samplingCallback` to `onSampling` for consistency. Old name still works but shows deprecation warnings. ### New Features * **New**: Reconnect functionality for failed connections - reconnect button in InspectorDashboard UI * **New**: Reconnect option in dropdown menu for failed connections * **New**: Configurable clientInfo support for MCP connection initialization with full metadata * **New**: Automatic Proxy Fallback - automatically retries failed connections through proxy * **New**: OAuth Proxy Support with oauthProxyUrl configuration ### Improvements * **Enhancement**: Better detection of OAuth discovery failures, CORS errors, and connection issues * **Enhancement**: OAuth provider uses original target URL for discovery, not proxy URL * **Enhancement**: HttpConnector automatic reconnection disabled, shifting responsibility to higher-level logic for better control ### Bug Fixes * **Fix**: Custom headers now correctly included when copying connection configuration from saved tiles * **Fix**: Headers correctly read from localStorage where stored in proxyConfig.customHeaders ## Security Update Patch release with security fixes and build improvements. * **Security**: Updated `@modelcontextprotocol/sdk` to 1.25.2 (fixes ReDoS vulnerability in UriTemplate regex patterns) * **Fix**: Updated building script to correctly export types for inspector/client components ## Multi-Server Support & Browser Compatibility Release with multi-server management, improved UI responsiveness, and enhanced browser compatibility. ### Breaking Changes * **Breaking**: Removed `winston` dependency. The logging system now uses a simple console logger that works in both browser and Node.js environments. ### Multi-Server Support * **New**: Multi-server management with `McpClientProvider` to manage multiple MCP server connections * **New**: Dynamic addition and removal of servers in React applications * **New**: Pluggable storage system with `LocalStorageProvider` and `MemoryStorageProvider` for flexible server configuration persistence * **Enhancement**: Refactored `useMcp` hook for better multi-server support * **Enhancement**: Removed obsolete `McpContext` (replaced with `McpClientProvider`) ### UI & UX Improvements * **Enhancement**: Improved UI responsiveness with enhanced mobile and tablet layouts and adaptive component visibility * **Enhancement**: Better server management with refactored server connection handling, improved icon display, and status tracking * **Enhancement**: Enhanced debugging with detailed logging in Layout and useAutoConnect components for better monitoring of server connection states * **Enhancement**: Simplified connection settings by removing deprecated transport types * **Enhancement**: Improved server icon support and component interactions * **Enhancement**: Added embedded mode support * **New**: Support for passing tab as query parameter for direct navigation * **New**: Prompt rendering support with enhanced display * **New**: Add to Client dropdown for quickly adding MCP servers to Cursor, VS Code, Claude Desktop, and CLI tools ### Browser Compatibility * **Enhancement**: Enhanced inspector components for better browser compatibility * **Enhancement**: Better configuration handling and MCP proxy integration * **Enhancement**: Improved browser-based MCP client with better connection handling ### Bug Fixes * **Fix**: Query URL handling in built mode now preserves arguments correctly * **Fix**: Server connection retrieval in `OpenAIComponentRenderer` to directly access connections array * **Fix**: Add client SDKs to add to client dropdown * **Fix**: Respect query tab parameter when existing server is already connected ## Documentation Updates - **Enhancement**: Updated examples and documentation to use preferred methods and APIs ## Bug Fixes - **Fix**: Widget props not picked up when using Zod schemas ## Session Management & Architecture Improvements Release aligned with mcp-use v1.11.0, featuring session management architecture and improved inspector capabilities. ### Breaking Changes * **Breaking**: WebSocket transport support removed. Use streamable HTTP or SSE transports instead. * **Breaking**: LangChain adapter moved from main entry point to `mcp-use/adapters` subpath. ### Session Management * **Enhancement**: Support for pluggable session management architecture with Redis support * **Enhancement**: Improved session persistence and connection handling * **Enhancement**: Better support for distributed deployments with cross-server notifications ### Inspector Features * **Enhancement**: Enhanced connection handling with automatic 404 handling and re-initialization * **Enhancement**: Improved tool, resource, and prompt management * **Enhancement**: Better integration with session management architecture * **Enhancement**: Enhanced debugging capabilities with better error handling ### Widget Support * **Enhancement**: Improved widget rendering and debugging for ChatGPT Apps * **Enhancement**: Better widget data handling and state management * **Enhancement**: Enhanced OpenAI component renderer with improved functionality ### UI Improvements * **Enhancement**: Better connection settings UI * **Enhancement**: Improved server management interface * **Enhancement**: Enhanced tool result display and formatting ## Dependency Updates - **Enhancement**: Updated dependencies ## Dependency Updates - **Enhancement**: Updated dependencies ## Dependency Updates - **Enhancement**: Updated dependencies ## Bug Fixes - **Fix**: Deno 3 compatibility fixes ## Bug Fixes - **Fix**: Updated Zod error handling ## Bug Fixes - **Fix**: Zod import in official SDK - **Enhancement**: Added repository metadata in package.json ## Elicitation Support & API Improvements Release aligned with mcp-use v1.10.0, featuring elicitation support and enhanced inspector capabilities. ### Breaking Changes * **Breaking**: Server API renamed `createMCPServer()` factory function to `MCPServer` class constructor * **Breaking**: Session API replaced `session.connector.tools`, `session.connector.callTool()`, etc. with direct methods: `session.tools`, `session.callTool()`, etc. * **Breaking**: OAuth environment variables standardized to `MCP_USE_OAUTH_*` prefix ### New Features * **New**: Elicitation support in inspector - servers can request user input through clients * **New**: Client Capabilities API with `ctx.client.can()` and `ctx.client.capabilities()` * **New**: Session Notifications API with `ctx.sendNotification()` and `ctx.sendNotificationToSession()` * **New**: Session Info API with `ctx.session.sessionId` to access current session ID * **New**: Resource Template Flat Structure support with `uriTemplate` directly on definition * **New**: Resource Template Callback Signatures supporting multiple signatures ### Improvements * **Enhancement**: Enhanced type inference for resource template callbacks * **Enhancement**: Client capabilities tracking during initialization * **Enhancement**: Major documentation refactoring and restructuring * **Enhancement**: Edge runtime support improvements * **Enhancement**: Transport bug fixes ## Elicitation Support - **New**: Added support for elicitation in inspector, enabling servers to request user input through clients - **Fix**: Transport bug fixes ## Dependency Updates - **Enhancement**: Updated dependencies ## Sampling Support - **New**: Added sampling support in inspector with LLM sampling capabilities - **Fix**: Long running sampling requests no longer timeout after 60 seconds - **Enhancement**: Better handling of extended sampling operations ## Dependency Updates - **Enhancement**: Updated dependencies ## Bug Fixes - **Fix**: Fixed bin entry issue for pnpm installation - **Enhancement**: Standardized import statement formatting across multiple files ## OAuth Authentication System Release with complete OAuth 2.0 support and enhanced inspector capabilities. ### New Features * **New**: Complete OAuth 2.0 authentication framework with built-in providers (Auth0, WorkOS, Supabase, Keycloak) * **New**: OAuth middleware and routes for server-side OAuth flow handling * **New**: OAuth callback component in inspector for authentication flows * **New**: Context storage with async local storage for request-scoped context * **New**: Response helpers for standardized HTTP responses and error handling * **New**: Runtime detection utilities for Node.js, Bun, and Deno environments ### Inspector Enhancements * **Enhancement**: Enhanced useMcp hook with improved connection management and OAuth support * **Enhancement**: Enhanced inspector dashboard with OAuth configuration UI * **Enhancement**: Better authentication flow handling with OAuth integration * **Enhancement**: Improved auto-connect with enhanced connection recovery * **Enhancement**: Enhanced HTTP connectors with OAuth token handling ### UI Improvements * **Fix**: Fixed scrolls in tools, resources, and prompts tab * **Fix**: Fixed models and API keys box in inspector chat * **Fix**: Fixed rendering of table, inline-code, code and images in inspector chat * **Fix**: Fixed padding of RPC panels * **New**: Added enum input display for tools * **Enhancement**: Bundle minification (9.7mb → 4.2 mb) ### Bug Fixes * **Fix**: Switched to fork SDK to fix Zod errors on Deno runtime * **Fix**: Optimized dependencies ## Dependency Updates - **Enhancement**: Updated dependencies ## Dependency Updates - **Enhancement**: Updated dependencies ## Bug Fixes - **Fix**: Fixed auto-connect proxy fallback behavior - **Fix**: Fixed connection config updates not applying when connection already exists - **Enhancement**: Auto-switch (proxy fallback) now automatically enabled during auto-connect flow - **Enhancement**: Improved error messages for connection failures ## Notifications, Sampling & OpenAI Apps SDK Integration Release with bidirectional notifications, LLM sampling, and comprehensive OpenAI Apps SDK support. ### New Features * **New**: Bidirectional notification support between clients and servers * **New**: LLM sampling capabilities allowing MCP tools to request completions from connected clients * **New**: Widget build ID support for cache busting in widget UI resources * **New**: Inspector notifications tab with real-time display * **New**: Server capabilities modal showing supported MCP features * **New**: RPC message logging support in inspector ### OpenAI Apps SDK Integration * **New**: McpUseProvider component combining React setup (StrictMode, ThemeProvider, BrowserRouter, ErrorBoundary) * **New**: WidgetControls component with debug overlay and view controls (fullscreen, PIP) * **New**: useWidget hook for type-safe React adapter to OpenAI Apps SDK API * **New**: ErrorBoundary component for graceful error handling * **New**: Image component handling data URLs and public file paths * **New**: ThemeProvider for consistent theme management * **New**: WidgetInspectorControls for inspector-specific debugging * **New**: Console proxy toggle for iframe console logs * **New**: Product search result widget template with carousel and accordion components * **New**: Folder-based widget support with automatic detection * **New**: Public folder support for static assets ### Inspector Enhancements * **Enhancement**: Enhanced OpenAIComponentRenderer with better height calculation and theme support * **Enhancement**: Enhanced ToolResultDisplay with multiple content types (text, image, audio, resource links) * **Enhancement**: Resizable panels with collapse support * **Enhancement**: Better widget security headers and CSP configuration * **Enhancement**: Enhanced widget data handling and state management ### Improvements * **Enhancement**: Refactored HTTP transport to reuse sessions across requests * **Enhancement**: Session management with tracking and automatic cleanup * **Enhancement**: Roots support in connectors and session API * **Enhancement**: Enhanced search\_tools with metadata * **Enhancement**: Improved SSR configuration with proper Vite settings ### Bug Fixes * **Fix**: Fixed iframe height calculation issues * **Fix**: Fixed theme flashing on widget load * **Fix**: Fixed CSP header generation for dev mode * **Fix**: Fixed asset loading in dev widget proxy * **Fix**: Fixed console logging in iframe * **Fix**: Fixed widget state inspection * **Fix**: Fixed resizable panel collapse behavior ## Bug Fixes & Improvements - **Fix**: Fixed auto-connect proxy fallback behavior - **Fix**: Fixed connection config updates not applying when connection already exists - **Enhancement**: Auto-switch (proxy fallback) now automatically enabled during auto-connect flow - **Enhancement**: Improved error messages for connection failures ## Code Mode Support - **New**: Code Mode feature allowing agents to execute code using MCP tools - **Enhancement**: Enhanced MCPClient with code execution configuration - **Enhancement**: Comprehensive tests for code execution functionality ## Bug Fixes - **Fix**: Various bug fixes and improvements ## Edge Runtime Support - **Major**: Migrated to Hono framework for edge runtime support - **New**: Runtime detection for Deno and Node.js environments * **New**: Enhanced inspector dashboard with improved connection handling - **Enhancement**: Better auto-connection logic with error handling and retry mechanisms ## Bug Fixes & Improvements - **Fix**: Various bug fixes and stability improvements - **Enhancement**: Dependency updates ## Bug Fixes & Improvements - **Fix**: Various bug fixes and stability improvements - **Enhancement**: Dependency updates ## Bug Fixes - **Fix**: Various bug fixes and improvements ## LangChain 1.0.0 Support - **Major**: Support for LangChain 1.0.0 - **Fix**: Model type compatibility for LangChain 1.0.0 - **Enhancement**: Set CLI and inspector as dependencies ## Dependency Updates - **Enhancement**: Updated dependencies ## Dependency Updates - **Enhancement**: Updated dependencies ## Dependency Updates - **Enhancement**: Updated dependencies ## Dependency Updates - **Enhancement**: Updated dependencies ## Dependency Updates - **Enhancement**: Updated dependencies ## Dependency Updates - **Enhancement**: Updated dependencies ## Dependency Updates - **Enhancement**: Updated dependencies ## Dependency Updates - **Enhancement**: Updated dependencies ## Bug Fixes - **Fix**: Fixed inspector chat formatting ## Bug Fixes - **Fix**: Fixed inspector chat - **Fix**: Fixed inspector shadow ## Major Refactoring & Apps SDK Support Major refactoring with improved architecture and enhanced Apps SDK support. ### Major Refactoring * **Refactor**: Server architecture refactored with major improvements to routing and middleware * **Refactor**: Removed legacy `mcp-inspector.ts` file in favor of modular architecture * **Refactor**: Added new `cli.ts` for improved command-line interface handling * **Refactor**: Added `utils.ts` and `shared-utils-browser.ts` for better code organization * **Refactor**: Enhanced `shared-routes.ts` with improved route handling and error management ### Apps SDK Support * **Enhancement**: Enhanced widget data handling and state management * **New**: Added `readResource` method in MCPInspector for fetching resources based on server ID * **Enhancement**: Enhanced OpenAI component renderer to utilize serverId and readResource * **Enhancement**: Improved safe data serialization for widget state management ### UI/UX Improvements * **Enhancement**: Enhanced ConnectionSettingsForm with copy configuration feature * **Enhancement**: Updated OpenAIComponentRenderer to dynamically adjust iframe height * **Enhancement**: Improved resource display with duration metrics and enhanced badge styling * **Enhancement**: Enhanced LayoutHeader with dynamic badge styling * **Fix**: Fixed scrollable tool parameters for better user experience * **Enhancement**: Added mobile-responsive hiding features ### Bug Fixes * **Fix**: Fixed inspector mounting logic by simplifying server URL handling * **Fix**: Fixed linting issues across multiple components * **Fix**: Fixed server configuration for improved stability ## Auto-Connection & Multi-Server Support - **New**: Auto-connection functionality - inspector now automatically connects to MCP servers on startup * **New**: Multi-server support - enhanced support for connecting to multiple MCP servers simultaneously - **New**: Client-side chat functionality with improved message handling - **New**: Resource handling with enhanced chat components - **Enhancement**: Streamlined routing with refactored server and client routing - **Enhancement**: Enhanced connection handling with improved auto-connection logic - **Enhancement**: Better UI components with updated Layout, ChatTab, and ToolsTab components - **Fix**: Fixed connection handling in InspectorDashboard - **Fix**: Improved error messages in useMcp hook ## Bug Fixes - **Fix**: Minor fixes and improvements ## Major Refactor & Apps SDK Initial Integration Major refactor aligning inspector with mcp-use TypeScript package and initial Apps SDK integration. ### Major Refactoring * **Refactor**: Migrated from CommonJS to ESM format * **Refactor**: Added input validation for port and URL * **Refactor**: Improved error handling and logging * **Refactor**: Added `open` package for cross-platform browser launching * **Refactor**: Reorganized component structure (moved to `src/client/components/`) * **Refactor**: Refactored ChatTab to use streaming API and custom hooks * **Refactor**: Enhanced InspectorDashboard with auto-connect functionality * **Refactor**: Improved CommandPalette with better item selection * **Refactor**: Updated routing to use query parameters ### New Components * **New**: Chat components: `AssistantMessage`, `UserMessage`, `ToolCallDisplay`, `MCPUIResource`, `MessageList` * **New**: UI components: `aurora-background`, `text-shimmer`, `sheet`, `switch`, `kbd`, `shimmer-button`, `status-dot` * **New**: Form components: `ConnectionSettingsForm`, `ServerDropdown` * **New**: Tool components: `ToolExecutionPanel`, `ToolResultDisplay`, `SaveRequestDialog` * **New**: Resource components: `ResourceResultDisplay`, `ResourcesList` ### Apps SDK Integration * **New**: OpenAI Apps SDK integration with UI resource type * **New**: Enhanced MCP-UI adapter for Apps SDK metadata * **New**: Resource URI format supporting `ui://widget/` scheme ### Bug Fixes * **Fix**: Fixed CLI binary format and package configuration * **Fix**: Changed CLI build format from CommonJS to ESM * **Fix**: Added input validation for port and URL arguments * **Fix**: Improved error logging in API routes * **Fix**: Fixed async/await bugs in static file serving # CLI Usage Source: https://docs.mcp-use.com/inspector/cli Run the MCP Inspector from the command line The MCP Inspector can be run directly from the command line using `npx`, making it easy to quickly inspect and debug MCP servers without installing anything globally. ## Quick Start Run the inspector with a single command: ```bash theme={null} npx @mcp-use/inspector ``` This will: * Start the inspector server on an available port (default: 8080) * Automatically open your browser to the inspector interface * Display the URL in the terminal ## Command Options ### `--url ` Auto-connect to an MCP server when the inspector starts. ```bash theme={null} npx @mcp-use/inspector --url http://localhost:3000/mcp ``` ### `--port ` Specify the starting port number. The inspector will find the next available port if the specified port is already in use. ```bash theme={null} npx @mcp-use/inspector --port 9000 ``` **Default:** `8080` **Port Range:** Must be between 1 and 65535 ### `--no-open` Prevent the inspector from automatically opening a browser tab when it starts. Useful in CI/CD pipelines, headless environments, or when you prefer to open the URL manually. ```bash theme={null} npx @mcp-use/inspector --no-open ``` You can combine it with other flags: ```bash theme={null} npx @mcp-use/inspector --url http://localhost:3000/mcp --port 9000 --no-open ``` ### `--help, -h` Display help information and available options. ```bash theme={null} npx @mcp-use/inspector --help ``` ## Environment Variables ### `MCP_INSPECTOR_FRAME_ANCESTORS` Configure which origins can embed the inspector widget in iframes. This is useful when embedding the inspector into your own application or when testing widgets from different domains. **Default behavior:** * **Development mode**: `*` (allows all origins for easier development) * **Production mode**: `'self'` (same-origin only for security) **Format:** Space-separated list of origins or `*` for all origins **Examples:** ```bash theme={null} # Allow embedding from specific domains MCP_INSPECTOR_FRAME_ANCESTORS="https://app.example.com https://dev.example.com" npx @mcp-use/inspector # Allow embedding from any domain (useful for development) MCP_INSPECTOR_FRAME_ANCESTORS="*" npx @mcp-use/inspector # Multiple origins with wildcards MCP_INSPECTOR_FRAME_ANCESTORS="https://*.example.com http://localhost:*" npx @mcp-use/inspector ``` In production deployments, it's recommended to explicitly list allowed origins rather than using `*` to prevent unauthorized embedding. When running in development mode (`npm run dev`), the inspector automatically allows all origins by default, so you don't need to set this variable unless you want to test production CSP policies. ### `MCP_URL` Set the external base URL for your MCP server. This is useful when running behind a reverse proxy (ngrok, E2B sandboxes, Cloudflare tunnels) where the public URL differs from `localhost`. When set, the CLI will use this URL for widget asset URLs and Vite HMR WebSocket connections, ensuring everything works correctly through the proxy. **Default behavior:** * If not set, the CLI generates a `localhost` URL automatically * If set, the CLI preserves your value and does not overwrite it **Examples:** ```bash theme={null} # ngrok tunnel MCP_URL=https://abc123.ngrok.io npx @mcp-use/cli dev # E2B sandbox MCP_URL=https://3000-abc123.e2b.app npx @mcp-use/cli dev # Cloudflare tunnel MCP_URL=https://my-tunnel.trycloudflare.com npx @mcp-use/cli dev ``` When using a reverse proxy, set `MCP_URL` to the public-facing URL. This ensures widget hot-reload (HMR) and asset loading work correctly through the proxy. ## Related Documentation * [Getting Started](/inspector/index) - Overview of the inspector * [Connection Settings](/inspector/connection-settings) - Advanced connection configuration * [Mount the Inspector](/inspector/integration) - Serve the Inspector from an app # Command Palette Source: https://docs.mcp-use.com/inspector/command-palette Search Inspector servers, tools, prompts, resources, saved requests, and client setup actions. Press `Cmd/Ctrl + K` to open the command palette from anywhere in the Inspector. It searches the current Inspector state and lets you jump directly to the item you choose. ## What you can open The command palette searches: * connected servers by display name or URL * tools by name, description, and server * prompts by name, description, and server * resources by name, URI, and server * saved tool requests * global navigation actions * Add to Client actions for supported clients Search is fuzzy, so partial words usually work. For example, `lin iss` can match a Linear issue tool if that tool is connected. ## Run a tool from search Use the command palette when you know the tool name and want to skip tab navigation. 1. Press `Cmd/Ctrl + K`. 2. Type the tool name or part of its description. 3. Select the tool. 4. Fill the generated input form. 5. Run the tool. The Inspector opens the Tools tab with that tool selected. ## Load a saved request Saved requests appear in their own results category. Select one to open the matching tool with its saved arguments already loaded. Use saved requests for repeatable calls such as regression checks, widget test cases, or long input payloads. ## Switch servers When more than one server is connected, search by server display name or URL. Selecting a server opens that server's Inspector view. Display names are useful here. Rename saved servers from [Connection settings](/inspector/connection-settings) when several URLs are hard to scan. ## Add a server to a client Add to Client commands appear when a connected server can be installed or copied into a supported client. Search for the client name, then choose the matching action. Depending on the client, the action may open a deep link, download a configuration file, or copy a command to the clipboard. ## Keyboard controls | Key | Action | | - | - | | `Cmd/Ctrl + K` | Open the command palette. | | `Up` / `Down` | Move through results. | | `Enter` | Open the selected result. | | `Esc` | Close the palette. | For the full shortcut reference, see [Keyboard shortcuts](/inspector/keyboard-shortcuts). # Connection settings Source: https://docs.mcp-use.com/inspector/connection-settings Choose how the Inspector connects to an MCP server. Most servers work with only a transport and URL. Change connection settings when the browser cannot reach the server directly, when you want clearer names for saved servers, when OAuth needs pre-registered credentials, or when long-running tools need more time. ## Choose Auto, Direct, or Via Proxy The Inspector uses **Auto** mode by default: it tries a direct browser connection first, then falls back to the configured Inspector proxy if direct access fails because of CORS or network policy. | Connection mode | Use it when | Avoid it when | | - | - | - | | **Auto** | You want the Inspector to try Direct first and fall back to the proxy when needed. | You need to test one specific connection path. | | **Direct** | The server is local, public, or reachable from your browser. | The browser blocks the request because of CORS or network policy. | | **Via Proxy** | The browser is blocked by CORS, or you need to test proxy behavior. | The server works directly; proxying adds another moving part. | ## Name saved servers Set a display name when several saved servers have similar URLs. Changing only the display name updates labels in the dashboard, server list, header, command palette, and server picker. It does not reconnect the server or clear auth tokens. ## Add headers only when the server requires them Use custom headers for server-specific requirements such as bearer tokens, API keys, or version headers. Header values are used for the live connection only. They are intentionally not saved or restored after a reload, so supply them again at runtime. Prefer OAuth when the server supports it. Copy Config includes current form values. Remove OAuth tokens, API keys, and other secrets before sharing exported configuration. ## Configure OAuth By default the inspector relies on Dynamic Client Registration (DCR), so no credentials are needed. Use the Authentication dialog when the upstream auth server doesn't expose `registration_endpoint` (common for proxy-mode servers fronting Slack, WorkOS, or GitHub). OAuth client secrets are runtime-only and are not restored after a reload. | Field | When to set it | | - | - | | Client ID | Use a pre-registered OAuth client instead of DCR. | | Client Secret | Use a confidential client; the SDK switches token endpoint auth away from `none`. | | Scope | Request a provider-specific space-separated scope list. | When a server protects the whole connection, it enters `pending_auth`. Click **Authenticate**, complete the provider flow, and return to the Inspector. If a popup is blocked, use the open-auth-page fallback link. Mixed-auth servers behave differently: the anonymous connection remains `ready`, and the Inspector shows **This server is using mixed auth** with an **Authenticate** action. Public operations remain available. You can authenticate up front, or wait for a protected tool, resource, or prompt to return a wire-level OAuth challenge and then authenticate. The classification comes from RFC 9728 protected-resource metadata discovered by the official MCP SDK after a successful anonymous connection. The Inspector does not use host-specific rules or interpret tool-level `isError` text as an OAuth challenge. Browser OAuth session values are encrypted at rest with AES-256-GCM. The non-extractable origin key is kept in IndexedDB, while versioned ciphertext envelopes remain in localStorage so popup storage events and reload persistence continue to work. ## Configuration Import/Export Use **Copy Config** to export the current connection form as JSON. Paste JSON into the URL field to populate the form in another Inspector instance. Example configuration: ```json theme={null} { "url": "https://mcp.example.com/mcp", "transportType": "http", "connectionMode": "auto", "headers": { "Authorization": "Bearer token123" }, "requestTimeout": 10000, "resetTimeoutOnProgress": true, "maxTotalTimeout": 60000, "oauth": { "clientId": "your-client-id", "clientSecret": "your-client-secret", "scope": "read write" } } ``` The paste detection only works in the URL field. Remove OAuth tokens, API keys, and other secrets before sharing a copied config. ## URL and tabs The Inspector keeps the active tab in the page URL (`?tab=...`). Switching tabs updates the query string so a refresh or shared link restores the same view. ## Tune timeouts for long work Use timeout settings only when a valid tool call or resource read needs more time. | Setting | Default | What it controls | | - | - | - | | Request timeout | `10000` ms | Time allowed for one request. | | Maximum total timeout | `60000` ms | Total time allowed across retries and progress updates. | If a request times out, first confirm the server eventually responds. Then raise the timeout to match the expected tool runtime. # Debug widgets in the Inspector Source: https://docs.mcp-use.com/inspector/debugging-chatgpt-apps Test MCP Apps widgets, ChatGPT compatibility, layout, CSP, and widget data in the Inspector. Use the Inspector to debug a widget before you try it in a production host. The fastest loop is: connect your server, run the tool that returns the widget, inspect the widget data, then test layout, display modes, and CSP. For building widgets, start with [Build widgets](/typescript/mcp-apps/widgets). For hook fields and host actions, use the [`useWidget()` API reference](/typescript/api-reference/react/usewidget). ## Connect the widget server Run your mcp-use app locally: ```bash theme={null} npm run dev ``` Open `http://localhost:3000/mcp/inspector` and connect to `http://localhost:3000/mcp`. If the server is remote, connect to its MCP endpoint instead. Use **Direct** first, then try **Via Proxy** only when the browser cannot reach the server directly. ## Run the widget-returning tool Open the **Tools** tab, select the tool that returns the widget, and run it with a small input. The widget should render below the tool result. The raw result should include the widget metadata and the structured data passed to the widget. If the tool succeeds but no widget renders, check these values first: * `widget.name` in the server tool definition * the matching folder under `resources/` * the tool result metadata that points to the widget resource * browser console errors from the widget iframe ## Switch protocols when compatibility matters The Inspector can test MCP Apps behavior and ChatGPT Apps SDK compatibility for widgets that support both runtimes. Use the protocol toggle when it appears: | Protocol | What it tests | | - | - | | **MCP Apps** | The standard MCP Apps bridge over `postMessage`. | | **ChatGPT Apps** | ChatGPT compatibility behavior, including Apps SDK-style host globals. | Prefer `useWidget()` and other `mcp-use/react` hooks in widget code. They abstract over the runtime differences that the Inspector is testing. See [Apps SDK compatibility](/typescript/mcp-apps/apps-sdk-compatibility) when you need ChatGPT-specific behavior. ## Inspect props, output, metadata, and state Use the widget debug panels to confirm what the widget receives. | Data | What to verify | | - | - | | `props` | The structured data the widget renders. | | `output` | The raw structured tool output, when exposed separately. | | `metadata` | Widget-only metadata such as timestamps, cache info, or host hints. | | `state` | Persisted widget state after user interactions. | | tool input | Arguments passed to the tool that produced the widget. | When `props` are missing, compare the server's `outputSchema` with the widget's expected prop shape. They should describe the same fields. ## Test layout and display modes Use the debug controls to test the widget in the contexts a host may provide. Check: * inline, picture-in-picture, and fullscreen display modes * desktop, tablet, and mobile sizing * touch and hover behavior * light and dark themes * locale and timezone-dependent formatting * safe-area insets for mobile layouts The host may grant a different display mode than the widget requests. Read `displayMode` from `useWidget()` when the current mode matters. ## Test Content Security Policy Use the widget-declared CSP mode before shipping a widget that loads external APIs, images, scripts, styles, or embeds. If the widget works in permissive mode but fails with widget-declared CSP, update the widget CSP configuration. See [Content Security Policy](/typescript/mcp-apps/content-security-policy) for the server and widget settings. ## Use console output Open browser DevTools while the widget is rendered. Console messages from the widget iframe help identify runtime errors, blocked requests, CSP violations, missing props, and failed tool calls. Keep console output intentional. Log the minimum state needed to debug the widget, then remove noisy logs before release. ## Test the widget in chat After the tool works directly, open the **Chat** tab and ask the model to use the tool. Use chat to verify end-to-end behavior: * the model chooses the right tool * the tool receives valid arguments * the model-visible text output is useful * the widget renders with the same structured data * widget actions such as tool calls, state updates, follow-up messages, and display-mode requests behave as expected Use the Tools tab again when you need to isolate whether a failure is in the tool, widget, or model behavior. ## Troubleshoot missing widgets If no widget appears, start with the smallest failing case. | Symptom | Check | | - | - | | Tool result appears, but no widget appears. | Confirm `widget.name` matches a folder under `resources/`. | | Widget frame appears blank. | Check iframe console errors and missing required props. | | Widget loads in permissive CSP only. | Add the required domains to widget CSP. | | ChatGPT protocol fails, but MCP Apps works. | Check [Apps SDK compatibility](/typescript/mcp-apps/apps-sdk-compatibility). | | A widget action fails. | Verify the tool name, arguments, auth state, and iframe console logs. | ## Next steps * Use [Build widgets](/typescript/mcp-apps/widgets) to review the server and widget structure. * Use [Interactivity](/typescript/mcp-apps/interactivity) to add tool calls, state, follow-up messages, and display controls. * Use [`useWidget()`](/typescript/api-reference/react/usewidget) for the full hook reference. # Inspector Source: https://docs.mcp-use.com/inspector/index Connect to an MCP server, run tools, inspect resources and prompts, and debug widgets. Use the Inspector when you need to test an MCP server from the browser. It lets you connect to a server, call tools with typed inputs, inspect resources and prompts, try chat, preview widgets, and copy client setup commands. [Try this live](https://inspector.mcp-use.com) MCP Inspector dashboard If your server was created with `mcp-use`, run the dev server and open the local Inspector: ```bash theme={null} npm run dev ``` The default local URLs are: | URL | Purpose | | - | - | | `http://localhost:3000/mcp` | MCP endpoint | | `http://localhost:3000/mcp/inspector` | Inspector UI | You can also open the hosted Inspector at [inspector.mcp-use.com](https://inspector.mcp-use.com) or run it with [`npx @mcp-use/inspector`](/inspector/cli). ## Connect to a server Add a server from the dashboard. Choose the transport, enter the MCP endpoint URL, and click **Connect**. Inspector connection form For most local and public HTTP servers, use **Direct**. Use **Via Proxy** only when the browser cannot reach the server directly because of CORS or network policy. See [Connection settings](/inspector/connection-settings) for the short decision guide. When a server protects the whole MCP endpoint with OAuth, the connection waits for authentication. Click **Authenticate**, complete the provider approval, and return to the Inspector. A mixed-auth server connects anonymously because its public tools are already usable. If it publishes OAuth protected-resource metadata, the server card and header show **This server is using mixed auth** with an **Authenticate** button. You can authenticate immediately or wait until a protected operation returns a wire-level OAuth challenge. The connection stays available for public operations while authentication is optional. ## Run a tool Open a connected server and select the **Tools** tab. Choose a tool, fill the generated form, and run it. Inspector server detail view with tools The Inspector shows the tool result, structured content, errors, and any widget returned by the tool. Use this view to verify schema validation, result shape, and widget data before testing the same server from a client. For mixed-auth servers, a protected tool can surface the authentication action only when it is needed. Authenticate, then retry the protected call. A normal MCP tool result with `isError: true` is still shown as a tool error; the Inspector does not infer OAuth from its text. ## Inspect resources and prompts Use **Resources** to read server-provided content by URI. Use **Prompts** to test reusable prompt templates with arguments. These tabs are useful when a client reports missing context. They show what the server actually exposes after connection and auth. ## Inspect Skills over MCP **Skills** is always present in the Inspector navigation. When a server does not advertise the experimental `io.modelcontextprotocol/skills` extension, the tab is disabled, like Sampling, with an explanation that Skills over MCP is not available from that server. When the extension is available, each skill appears as a folder containing its `SKILL.md` and supporting resources. When the extension is advertised but its catalog is empty, the tab is shown as a red error state and disabled, with a tooltip explaining that the server returned no skills. Select a file to read it on demand. Before previewing it, the Inspector verifies the raw SHA-256 digest advertised by the skill manifest. For `SKILL.md`, it also checks that the parsed YAML frontmatter matches the catalog entry. A digest mismatch blocks the preview instead of passing changed content to the user or model. Markdown, safe text, raster images, audio, and video have inline previews. Scripts, HTML, SVG, and other binary files are never executed; you can explicitly download verified files when needed. ## Try chat Use **Chat** to test how an LLM calls your server's tools in a conversation. The chat view can use hosted chat where available or a provider key stored in your browser. Keep chat testing focused on end-to-end behavior. Use the Tools tab first when you need to isolate input schemas, tool errors, or widget rendering. For servers that advertise Skills over MCP, chat receives a compact catalog of each skill's name, description, origin, and URI. When a skill is relevant, the chat host loads its `SKILL.md` and supporting resources lazily through the server's Skills over MCP and resource methods. It verifies each resource against the manifest's raw SHA-256 digest before making it available to the model. The Inspector never executes skill scripts or lets `allowed-tools` widen the selected MCP tool permissions. Skills over MCP remains experimental. Treat remote skill content as untrusted and review it before relying on its instructions. See the [working group](https://modelcontextprotocol.io/community/working-groups/skills-over-mcp), [SEP-2640](https://github.com/modelcontextprotocol/modelcontextprotocol/pull/2640), and [Agent Skills specification](https://agentskills.io/specification). ## Debug widgets When a tool returns an MCP App widget, the Inspector renders it below the tool result and exposes widget debug controls. Use the widget view to check: * the `props`, `output`, and metadata passed to the widget * inline, picture-in-picture, and fullscreen display modes * desktop, tablet, and mobile layout behavior * theme, locale, timezone, hover, touch, and safe-area settings * Content Security Policy behavior before trying the widget in a host See [Debug widgets in the Inspector](/inspector/debugging-chatgpt-apps) for the full workflow. ## Add the server to a client After a server connects, use **Add to Client** to install or copy setup for supported clients such as Cursor, VS Code, Claude Desktop, Claude Code, Gemini CLI, and Codex CLI. Add to Client dropdown in the Inspector The Inspector uses the active connection settings when it prepares the client setup. Confirm the server URL and connection name before copying commands or opening client deep links. ## Command Palette Press `Cmd/Ctrl + K` to open the [Command Palette](/inspector/command-palette). Use it to jump to tools, prompts, resources, saved requests, connected servers, and client setup actions. For the full shortcut list, see [Keyboard shortcuts](/inspector/keyboard-shortcuts). For shareable links that open a server or tab directly, see [URL parameters](/inspector/url-parameters). ## Next steps Run the Inspector from the command line and auto-connect to a server. Choose Direct or Via Proxy and tune connection details only when needed. Test MCP Apps widgets, layout behavior, CSP, and display modes. Serve the Inspector from an Express, Hono, or mcp-use server. Inspect the WebMCP tools a web page registers, from a Chrome side panel. # Integration Source: https://docs.mcp-use.com/inspector/integration Mount the Inspector in a mcp-use or Hono application. The Inspector is built-in local development tooling. `mcp-use` installs its prebuilt package, and `mcp-use dev` mounts it on the development listener at `/mcp/inspector`. ## Auto-Mounting with mcp-use When using a generated `mcp-use` project, run `npm run dev`. The CLI loads the Inspector supplied by `mcp-use`, serves its bundled UI locally, and opens `/mcp/inspector`. No extra dependency or CDN is involved. Production stays Inspector-free by default; use `mcp-use start --with-inspector` to mount it on the built server's existing listener. ### Example Generated and existing projects receive the Inspector through `mcp-use`. Add `@mcp-use/inspector` directly only when overriding the framework-supplied version or mounting it without `mcp-use`. ```typescript theme={null} import { MCPServer } from "mcp-use/server"; const server = new MCPServer({ name: "my-server", version: "1.0.0", }); // Add your tools, resources, prompts... server.tool(/* ... */); export default server; ``` Then run `mcp-use dev`; the Inspector is available at `http://localhost:3000/mcp/inspector`. Use `--no-inspector` for a headless development run. To inspect the production build locally, build once and opt in when starting it: ```bash theme={null} mcp-use build mcp-use start --with-inspector ``` This changes neither the build output nor its manifest. Treat a production Inspector as an internal tool: it can invoke MCP tools and proxy OAuth flows. ## Manual Integration For custom development servers, `mountInspector()` from `@mcp-use/inspector` provides the complete local Inspector: packaged UI, proxy, OAuth BFF, and callbacks. It can register on Hono/Express or return a framework-neutral Fetch handler. ```typescript theme={null} import { mountInspector } from "@mcp-use/inspector"; const inspect = mountInspector({ basePath: "/mcp", autoConnectUrl: "http://localhost:3000/mcp", }); const response = await inspect(request); ``` ### Hono Integration Mount the Inspector on a Hono application: ```typescript theme={null} import { Hono } from "hono"; import { mountInspector } from "@mcp-use/inspector"; const app = new Hono(); // Your Hono routes app.get("/api/health", (c) => { return c.json({ status: "ok" }); }); // Mount inspector at /mcp/inspector mountInspector(app, { basePath: "/mcp" }); // Start server with your Hono adapter export default app; ``` ## Path Customization `basePath` defaults to `/mcp`, so the Inspector lives at `/mcp/inspector`. Set `basePath: ''` for `/inspector`, or use another MCP prefix. ### Hono with Custom Path ```typescript theme={null} import { Hono } from "hono"; import { mountInspector } from "@mcp-use/inspector"; const app = new Hono(); mountInspector(app, { basePath: "/debug" }); // Inspector now available at http://localhost:3000/debug/inspector ``` ## Configuration Options ### `mountInspector` Options Pass options only when the default mount behavior is not enough. ```typescript theme={null} import { mountInspector } from "@mcp-use/inspector"; mountInspector(app, { basePath: "/mcp", autoConnectUrl: "http://localhost:3000/mcp", sandboxOrigin: "https://sandbox.example.com", }); ``` | Option | Type | Default | Description | | - | - | - | - | | `basePath` | `string` | `'/mcp'` | MCP prefix; Inspector mounts at `${basePath}/inspector` | | `autoConnectUrl` | `string \| null` | Current request origin + `basePath` | MCP server URL to auto-connect on load; `null` disables | | `devMode` | `boolean` | `true` | Enables same-origin sandbox for MCP Apps widgets | | `sandboxOrigin` | `string \| null` | `undefined` | Override the sandbox origin for MCP Apps widgets | | `oauthProxyAllowLoopback` | `boolean` | `true` | Permit local proxy/OAuth access to loopback targets | ## Protect mounted Inspector routes The Inspector can call tools, read resources, and inspect prompts on any connected server. Keep it in local development. If a custom integration exposes it on a network, disable loopback proxying and put it behind the same access controls as other internal tools. Each mounted Inspector also applies process-local limits of 120 proxy/OAuth requests and 600 asset requests per minute. Exhausted routes return `429 Too Many Requests` with `Retry-After`; these limits complement, rather than replace, network-edge authentication and rate limiting. ## Related Documentation * [Getting Started](/inspector/index) - Basic inspector usage * [CLI Usage](/inspector/cli) - Standalone inspector usage * [Inspector chat components](/typescript/api-reference/client/inspector-chat-components) - API reference for exported chat UI * [Debug widgets in the Inspector](/inspector/debugging-chatgpt-apps) - Test widget rendering and host behavior # Keyboard shortcuts Source: https://docs.mcp-use.com/inspector/keyboard-shortcuts Reference for Inspector keyboard shortcuts. Use keyboard shortcuts to move between Inspector views without leaving the current server context. ## Shortcuts | Shortcut | Action | Works while typing? | | - | - | - | | `Cmd/Ctrl + K` | Open the command palette. | Yes | | `Cmd/Ctrl + O` | Start a new chat. | No | | `Esc` | Close overlays, close dialogs, or blur the focused element. | Yes | | `t` | Open the Tools tab. | No | | `p` | Open the Prompts tab. | No | | `r` | Open the Resources tab. | No | | `c` | Open the Chat tab. | No | | `h` | Return to the dashboard. | No | | `f` | Focus search in the current tab when the tab has search. | No | `Cmd/Ctrl + K` is the only shortcut that intentionally works while an input field is focused. Single-letter shortcuts are disabled while you type in inputs, textareas, and content-editable elements. ## Command palette keys After opening the command palette: | Key | Action | | - | - | | `Up` / `Down` | Move through results. | | `Enter` | Open the selected result or run the selected command. | | `Esc` | Close the command palette. | See [Command Palette](/inspector/command-palette) for what you can search and open. # Self-Hosting Source: https://docs.mcp-use.com/inspector/self-hosting Deploy your own MCP Inspector instance with Docker. Run the Inspector on your own infrastructure when you need full control over your debugging environment. The official Docker image is published at [`mcpuse/inspector`](https://hub.docker.com/r/mcpuse/inspector) on Docker Hub. ## Quick start ```bash theme={null} docker run -d -p 127.0.0.1:8080:8080 --name mcp-inspector mcpuse/inspector:latest ``` Then open `http://localhost:8080` to access your self-hosted Inspector. Anyone who can reach the Inspector can use it to connect to and call your MCP servers. The examples bind to `127.0.0.1` so the Inspector is only reachable from the host itself. If you need remote access, put it behind a reverse proxy with authentication and TLS, or restrict access with firewall rules — don't publish port 8080 on all interfaces. ## Deployment options ```bash theme={null} docker run -d \ --name mcp-inspector \ -p 127.0.0.1:8080:8080 \ mcpuse/inspector:latest ``` ```yaml theme={null} services: mcp-inspector: image: mcpuse/inspector:latest ports: - "127.0.0.1:8080:8080" restart: unless-stopped healthcheck: test: ["CMD", "wget", "-q", "--spider", "http://localhost:8080/inspector"] interval: 30s timeout: 10s retries: 3 ``` The image is based on `node:20-alpine`, which ships `wget` (BusyBox) but not `curl` — use `wget` in healthchecks. ## Ports The container always listens on port `8080` — the image's start command pins it with `--port 8080`, so a `PORT` environment variable has no effect. To serve on a different host port, remap it with Docker instead: ```bash theme={null} docker run -d -p 127.0.0.1:3001:8080 mcpuse/inspector:latest ``` `NODE_ENV=production` is already set in the image; no environment variables are required. ## Air-gapped installation For hosts without registry access, transfer the image as a tarball: ```bash theme={null} # On a connected host docker pull mcpuse/inspector:latest docker save mcpuse/inspector:latest -o mcp-inspector.tar # On the air-gapped host docker load -i mcp-inspector.tar ``` When connecting from a self-hosted Inspector to an MCP server on another host, the browser must be able to reach the server directly, or you can use the proxy connection mode. See [Connection settings](/inspector/connection-settings) for when to use each. ## Alternatives Self-hosting is one of three ways to run the Inspector: | Option | Command | Best for | | - | - | - | | Hosted | [inspector.mcp-use.com](https://inspector.mcp-use.com) | Quick testing, no install | | Local CLI | `npx @mcp-use/inspector` | Local development | | Self-hosted | `docker run mcpuse/inspector:latest` | Production, enterprise, air-gapped | Servers built with `mcp-use` also auto-mount the Inspector at `/inspector` — see the [Inspector overview](/inspector/index). # URL parameters Source: https://docs.mcp-use.com/inspector/url-parameters Open the Inspector with a selected server, tab, or embedded layout. Use URL parameters when you need a link that opens the Inspector on a specific server, starts a connection automatically, or restores a tab. ## Parameters | Parameter | Purpose | Values | | - | - | - | | `server` | Select an existing connection by server ID or URL. If no saved connection matches and the value is an HTTP(S) URL, connect to it. | Connection ID or URL string | | `autoConnect` | Connect to a server when the Inspector loads. | URL string or URL-encoded JSON config | | `tab` | Open a specific server tab. | `tools`, `prompts`, `resources`, `chat`, `sampling`, `elicitation`, `notifications`, `playground` | | `tunnelUrl` | Preserve a tunnel URL while navigating. Usually set by the CLI. | URL string | | `embedded` | Use embedded mode with reduced page chrome. | `true` | | `embeddedConfig` | Configure embedded styling. | URL-encoded JSON config | ## Select or connect to a server Use `server` when the Inspector should select a saved server by URL: ```text theme={null} /?server=https://mcp.example.com/mcp ``` If the server is not saved yet, the Inspector treats the HTTP(S) value like `autoConnect` and connects to it. ## Auto-connect on load Use `autoConnect` when a link should create the connection immediately: ```text theme={null} /?autoConnect=https://mcp.example.com/mcp ``` For advanced connection options, pass a URL-encoded JSON object. The `url` field is required. ```json theme={null} { "url": "https://mcp.example.com/mcp", "name": "Example server", "transportType": "http", "connectionMode": "auto", "connectionType": "Direct" } ``` Supported JSON fields are `url` (required), `name`, `transportType` (`"http"` or `"sse"`), `connectionMode` (`"auto"`, `"direct"`, or `"proxy"`), `autoProxyFallback`, `connectionType` (`"Direct"` or `"Via Proxy"` for older links), `customHeaders`, `auth`, `requestTimeout`, `resetTimeoutOnProgress`, and `maxTotalTimeout`. When passing a JSON object for **autoConnect**, URL-encode the value so special characters are valid in the query string. ## Open a tab Use `tab` by itself to restore a view, or combine it with `server` or `autoConnect`. ```text theme={null} /?server=https://mcp.example.com/mcp&tab=tools ``` The Inspector also updates `tab` as you move between server tabs, so refreshes keep the current view. ## Embedded mode Use `embedded=true` when the Inspector is hosted inside another UI, such as an iframe. ```text theme={null} /?embedded=true ``` Use `embeddedConfig` with a URL-encoded JSON object when the embedded host needs styling overrides. ```json theme={null} { "backgroundColor": "#f5f5f5", "padding": "16px" } ``` ## Example links Open the hosted Inspector and connect to a server: ```text theme={null} https://inspector.mcp-use.com/inspect?autoConnect=https://your-server.com/mcp ``` Open the hosted Inspector, connect to a server, and show Tools: ```text theme={null} https://inspector.mcp-use.com/inspect?server=https://your-server.com/mcp&tab=tools ``` # WebMCP Inspector Source: https://docs.mcp-use.com/inspector/webmcp-inspector Inspect and call the WebMCP tools a web page registers, from a Chrome side panel. The WebMCP Inspector is a Chrome extension that inspects the WebMCP server a web page exposes. It opens as a side panel next to the page, lists the tools that page registers, and lets you call them with typed inputs and read the results without leaving the tab. Reach for it when you are building WebMCP into a website and need to answer questions like: * Are my tools actually registered, and with the schemas I expect? * Does a tool run correctly with a given set of parameters? * Do tools appear and disappear as they should when the page state or route changes? It is built with [WXT](https://wxt.dev), React, and TypeScript, and reuses components from the [mcp-use Inspector](/inspector/index). Unlike the Inspector, it does not connect to remote MCP servers — it only talks to the WebMCP API of the page in the active tab. The source lives at [mcp-use/webmcp-inspector](https://github.com/mcp-use/webmcp-inspector). WebMCP is experimental. If the API is unavailable on a page, enable **WebMCP for testing** in `chrome://flags` and relaunch a compatible Chromium build. ## Install from the Chrome Web Store Open the [WebMCP Inspector listing](https://chromewebstore.google.com/detail/webmcp-inspector/dgdidjgjofcenipdfaoebdeeppideadh) and click **Add to Chrome**. Open a WebMCP-enabled page and click the extension's toolbar icon to open the side panel. Clicking the toolbar icon is what grants the extension access to the current site, so click it again after you switch to another site. Chrome internal pages and the Chrome Web Store cannot be inspected. ## Inspect and call tools With the panel open, the tool list shows each tool the page registered with its description and parameter count, and a search box to filter them. Select a tool to get a form generated from its schema, fill it in, and run it with **Execute** (or `Cmd/Ctrl + Enter`). The panel validates input against the tool's JSON Schema before execution, and offers a raw JSON mode when a form is awkward for nested inputs. Results are shown with timing and errors, in a split you can drag or expand to fullscreen. Requests you want to keep can be saved by name; saved requests are stored locally and scoped to the site's origin. The list refreshes automatically when the page registers or removes tools, when you change tabs, and on page loads. ## Build from source (contributors) You only need this if you are working on the extension itself. To use the Inspector, install it from the Chrome Web Store above. Use Node 22.12+ and pnpm. ```bash theme={null} git clone https://github.com/mcp-use/webmcp-inspector cd webmcp-inspector pnpm install pnpm build ``` Then open `chrome://extensions`, turn on **Developer mode**, click **Load unpacked**, and select `.output/chrome-mv3`. For iterating on the extension itself, `pnpm dev` runs a WXT development build with hot reload; load `.output/chrome-mv3-dev` instead. `pnpm zip` produces a release zip in `.output`. ## Next steps Debug a remote or local MCP server from the browser: tools, resources, prompts, chat, and widgets. The imperative WebMCP API a page uses to register the tools this extension inspects. # Installation Source: https://docs.mcp-use.com/python/getting-started/installation Install mcp-use and get your development environment ready **Prerequisites**: * Install [Python](https://python.org/) (version 3.11 or higher) * pip, uv, or poetry package manager ## Install mcp-use ```bash pip theme={null} pip install mcp-use ``` ```bash uv theme={null} uv add mcp-use ``` ```bash poetry theme={null} poetry add mcp-use ``` This gives you access to everything: **MCPAgent**, **MCPClient**, and **MCPServer**. ## LLM Providers (for Agents) If you're building agents, install your preferred LLM provider: ```bash OpenAI theme={null} pip install langchain-openai ``` ```bash Anthropic theme={null} pip install langchain-anthropic ``` ```bash Google theme={null} pip install langchain-google-genai ``` ```bash Groq theme={null} pip install langchain-groq ``` **Tool Calling Required**: Only models with tool calling capabilities can be used with mcp-use agents. ## Environment Variables Create a `.env` file in your project root: ```bash theme={null} OPENAI_API_KEY=sk-... ANTHROPIC_API_KEY=sk-ant-... GOOGLE_API_KEY=AI... GROQ_API_KEY=gsk_... ``` Load them in your scripts: ```python theme={null} from dotenv import load_dotenv load_dotenv() ``` ## Development Installation Install from source for the latest features or to contribute: ```bash pip theme={null} git clone https://github.com/mcp-use/mcp-use.git cd mcp-use/libraries/python pip install -e . ``` ```bash dev mode theme={null} git clone https://github.com/mcp-use/mcp-use.git cd mcp-use/libraries/python pip install -e ".[dev]" ``` ## Next Steps Build AI Agents with tool calling capabilities through MCP connections A full featured MCP Client implementation for Python The MCP Server framework implementation for Python **Need Help?** Join our [Discord](https://discord.gg/XkNkSkMz3V) or [Github](https://github.com/mcp-use/mcp-use) communities. # Quickstart Source: https://docs.mcp-use.com/python/getting-started/quickstart Get started with mcp-use in minutes For the complete documentation index, see [llms.txt](https://mcp-use.com/docs/llms.txt). **mcp-use** is a unified MCP framework to build **MCP servers**, **MCP clients** and **MCP Agents**. ```mermaid theme={null} %%{init: {'theme':'neutral'}}%% graph LR Agent[MCP Agent] -->|uses| Client[MCP Client] Client -->|connects to| Server[MCP Server] Server -->|provides tools| Client ``` | Section | Description | | | - | - | - | | [Agent](#mcp-agent) | An AI Agent with tool calling capabilities through MCP connections | [Examples](https://github.com/mcp-use/mcp-use/tree/main/libraries/python/examples) | | [Client](#mcp-client) | A full featured MCP Client implementation for Python with async support | [Examples](https://github.com/mcp-use/mcp-use/tree/main/libraries/python/examples) | | [Server](#mcp-server) | The MCP Server framework implementation for Python | [Examples](https://github.com/mcp-use/mcp-use/tree/main/libraries/python/examples) | ## MCP Agent **mcp-use** has a complete MCP Agent implementation for Python. **MCP Agents** are AI-powered agents that can use tools from MCP servers to accomplish complex tasks. They reason across multiple steps, selecting and executing tools as needed. Building such agents is easy with **mcp-use**, all you need is an LLM and the MCP Client. ```bash pip theme={null} pip install mcp-use langchain-openai ``` ```bash uv theme={null} uv add mcp-use langchain-openai ``` ```bash poetry theme={null} poetry add mcp-use langchain-openai ``` The agent requires a LangChain LLM provider package. The examples use `langchain-openai` - swap for `langchain-anthropic`, `langchain-google-genai`, or `langchain-groq` as needed. Here's a simple example to get you started for an agent with **browser tools** support. ```python theme={null} import asyncio from langchain_openai import ChatOpenAI # use your preferred LLM provider from mcp_use import MCPAgent, MCPClient async def main(): # Create MCPClient from configuration object client = MCPClient({ "mcpServers": { "playwright": { "command": "npx", "args": ["@playwright/mcp@latest"], "env": { "DISPLAY": ":1" } } } }) # Create agent with the client agent = MCPAgent( llm=ChatOpenAI(model="gpt-5.5"), # use your preferred LLM provider client=client, max_steps=30 ) # Run the query result = await agent.run( "Find the best restaurant in San Francisco USING GOOGLE SEARCH" ) print(f"\nResult: {result}") # Clean up await client.close_all_sessions() if __name__ == "__main__": asyncio.run(main()) ``` For multi-server setups, tool restrictions, and advanced configuration options, see the [Agent Configuration](/python/agent/agent-configuration) and [Client Configuration](/python/client/client-configuration) guides. For a complete overview of the mcp-use MCP Agent, see the [MCP Agent](/python/agent/building-custom-agents) documentation. ### Available MCP Servers mcp-use supports **any MCP server**. Check out the [Awesome MCP Servers](https://github.com/punkpeye/awesome-mcp-servers) list for available options. Or deploy your own following the instruction [below](#mcp-server). ## MCP Client **mcp-use** has a complete MCP Client implementation for Python with full async support. It supports stdio and HTTP with SSE transports for connecting to any MCP server. ```bash pip theme={null} pip install mcp-use ``` ```bash uv theme={null} uv add mcp-use ``` ```bash poetry theme={null} poetry add mcp-use ``` Then create a new MCP Client: ```python theme={null} import asyncio from mcp_use import MCPClient async def main(): client = MCPClient({ "mcpServers": { "everything": { "command": "npx", "args": ["-y", "@modelcontextprotocol/server-everything"] } } }) # Initialize all configured sessions await client.create_all_sessions() # Get the session for a specific server session = client.get_session("everything") # List available tools tools = await session.list_tools() print(f"Available tools: {[t.name for t in tools]}") # Call a specific tool with arguments result = await session.call_tool("add", {"a": 1, "b": 2}) print(f"Result: {result}") # Clean up await client.close_all_sessions() if __name__ == "__main__": asyncio.run(main()) ``` To learn more about the MCP Client, see the [MCP Client](/python/client/connection-types) documentation. ## MCP Server **mcp-use** has a complete MCP server framework implementation for Python. It supports all official MCP features including tools, resources, prompts, and middleware. ```bash pip theme={null} pip install mcp-use ``` ```bash uv theme={null} uv add mcp-use ``` ```bash poetry theme={null} poetry add mcp-use ``` ### Scaffold a new project ```bash theme={null} # Via uvx (from PyPI) uvx --from mcp-use create-mcp-use my-server # Or if mcp-use is installed locally create-mcp-use my-server # Start the server cd my-server python server.py ``` ### Create an MCP server manually: ```python theme={null} from mcp_use import MCPServer server = MCPServer( name="my-server", version="1.0.0", instructions="A simple example server" ) # Define a tool @server.tool() def get_weather(city: str) -> dict: """Get weather for a city""" return {"temperature": 72, "condition": "sunny", "city": city} # Start the server if __name__ == "__main__": server.run() ``` To learn more about the MCP Server, see the [MCP Server](/python/server) documentation. *** ## Next Steps Configure your Agent and connected MCP servers Explore supported LLM providers and their setup Browse real-world examples and use cases **Need Help?** Join our [Discord](https://discord.gg/XkNkSkMz3V) or [Github](https://github.com/mcp-use/mcp-use) communities. # Welcome Source: https://docs.mcp-use.com/python/getting-started/welcome Full-stack MCP framework for **Python** For the complete documentation index, see [llms.txt](https://mcp-use.com/docs/llms.txt). **mcp-use** is the fullstack MCP framework for Python. Build MCP Servers, MCP Apps, MCP Agents, and MCP Clients with a clean, typed, async-native API. mcp-use }> Looking for the **TypeScript** docs? They're [here](/typescript/getting-started/welcome). Start with MCP 101 - principles of the protocol, its three primitives, and how clients, servers, and agents fit together. ## Next Steps Build your first MCP server in under 5 minutes. Set up your Python environment. Expose tools, resources, and prompts to any AI agent. Connect to any MCP server programmatically. AI agents with tool-calling capabilities. Debug and test MCP servers interactively. **Need help?** Join our [Discord](https://discord.gg/XkNkSkMz3V) or check out [GitHub](https://github.com/mcp-use/mcp-use). # Official SDK Compatibility Source: https://docs.mcp-use.com/python/server/compatibility Full compatibility with the official MCP Python SDK The mcp-use server framework is built on top of the official [MCP Python SDK](https://github.com/modelcontextprotocol/python-sdk). This ensures full compatibility with existing MCP clients and tools that adhere to the Model Context Protocol. mcp-use extends the SDK's core functionality, providing enhanced features without introducing breaking changes. ## Zero Breaking Changes mcp-use extends the official MCP Python SDK rather than replacing it, ensuring: * **All existing MCP clients work out of the box** * **Full protocol compliance** with MCP specifications * **Easy migration** from existing MCP servers * **Enhanced features** without breaking existing functionality ## Compatibility Matrix | Feature | FastMCP | mcp-use | Notes | | - | - | - | - | | MCP Protocol | ✅ | ✅ | Full compliance | | Tools | ✅ | ✅ | Same decorator API | | Resources | ✅ | ✅ | Same decorator API | | Prompts | ✅ | ✅ | Same decorator API | | Documentation | ❌ | ✅ | Built-in docs UI | | Inspector UI | ❌ | ✅ | Real-time monitoring | | Enhanced Logging | ❌ | ✅ | MCP method logging | | Much more to come... | ❌ | ✅ | Continuous enhancements | ## Migration Guide ### From FastMCP If you have an existing MCP server built with FastMCP, migration is as simple as changing the import: #### Migrating It literally cannot be easier to migrate from FastMCP to mcp-use. You just need to add `_use` to your import. ```python theme={null} from mcp.server import FastMCP #[!code --] from mcp_use.server import FastMCP #[!code ++] mcp = FastMCP() @mcp.tool() def add(a: int, b: int) -> int: """Add two numbers""" return a + b if __name__ == "__main__": mcp.run(transport="streamable-http", port=8000) ``` **That's it!** Just change the import and you get all the enhanced features: * Built-in inspector UI at `/inspector` * Enhanced logging with MCP method information * Documentation at `/docs` * OpenMCP configuration at `/openmcp.json` * Configurable paths for all endpoints ### Key Improvements 1. **Drop-in Replacement**: Same FastMCP API with enhanced features 2. **Built-in Documentation**: Automatic OpenAPI/Swagger docs at `/docs` 3. **Inspector UI**: Real-time monitoring and testing at `/inspector` 4. **Enhanced Logging**: MCP method information in structured logs 5. **Configurable Paths**: Customize all endpoint paths 6. **Much More Coming**: Continuous feature additions ## Protocol Compliance mcp-use maintains full compliance with the MCP protocol specifications: * **Tool Discovery**: Implements `tools/list` and `tools/call` endpoints * **Resource Management**: Implements `resources/list` and `resources/read` endpoints * **Prompt Templates**: Implements `prompts/list` and `prompts/get` endpoints * **Error Handling**: Proper error responses with MCP-compliant error codes * **Session Management**: Full support for MCP session lifecycle ## Client Compatibility All MCP clients that work with the official SDK will work with mcp-use servers: * **Claude Desktop**: Full compatibility * **ChatGPT**: Full compatibility * **Custom MCP Clients**: Full compatibility * **mcp-use Client**: Enhanced compatibility with additional features ## Testing Compatibility You can test your mcp-use server with any MCP client: ```bash theme={null} # Test with mcp-use client from mcp_use.client import MCPClient config = { "mcpServers": { "my-server": { "url": "http://localhost:3001/mcp" } } } client = MCPClient(config) session = await client.create_session("my-server") # List tools tools = await session.list_tools() print("Available tools:", [tool.name for tool in tools]) # Call a tool result = await session.call_tool("greet", {"name": "World"}) print("Result:", result) ``` ## Best Practices ### Maintaining Compatibility 1. **Use Type Hints**: Always use proper type hints for automatic schema generation 2. **Follow MCP Conventions**: Use descriptive tool names and clear documentation 3. **Handle Errors Gracefully**: Return proper error responses for invalid inputs 4. **Test with Multiple Clients**: Verify compatibility with different MCP clients ### Leveraging mcp-use Features 1. **Use Decorators**: Take advantage of the simplified decorator-based API 2. **Enable Documentation**: Use the built-in OpenAPI documentation 3. **Monitor with Inspector**: Use the inspector UI for debugging and monitoring 4. **Structured Logging**: Use JSON logging for better observability ## Next Steps * [Installation & Setup](/python/getting-started/installation) - Get started with mcp-use * [Quickstart Guide](/python/getting-started/quickstart) - Build your first server # Fastapi mount Source: https://docs.mcp-use.com/python/server/fastapi_mount # FastAPI Mounting Guide You can mount an `MCPServer` (or `FastMCP`) instance within an existing FastAPI application. This allows you to serve your MCP tools alongside your existing API endpoints. ## Basic Integration When mounting `MCPServer`, we need to ensure its internal task group (used for managing SSE streams) is properly initialized. We do this using FastAPI's lifespan events. ```python theme={null} from contextlib import asynccontextmanager from fastapi import FastAPI from mcp_use.server import MCPServer import uvicorn import anyio # 1. Create your MCP Server mcp = MCPServer("my-agent-server") @mcp.tool() def add(a: int, b: int) -> int: return a + b # 2. Define lifespan to manage MCP server startup/shutdown @asynccontextmanager async def lifespan(app: FastAPI): # Initialize the SSE task group async with anyio.create_task_group() as tg: # Inject the task group into the session manager mcp.session_manager._task_group = tg yield # 3. Create your existing FastAPI app with lifespan app = FastAPI(title="My Existing App", lifespan=lifespan) @app.get("/") def read_root(): return {"message": "Hello from the main app"} # 4. Mount the MCP Server mount_path = "/agent" app.mount(mount_path, mcp.app) if __name__ == "__main__": print(f"Serving MCP at http://localhost:8000{mount_path}/mcp") uvicorn.run(app, port=8000) ``` ## Important Considerations 1. **Lifespan Management:** The critical part is wrapping the application lifespan with an `anyio.create_task_group()` and assigning it to `mcp.session_manager._task_group`. This works around `FastMCP`'s assumption that it controls the main loop. 2. **Transport:** Mounting implies using the **Streamable HTTP** transport pattern. 3. **Paths:** The `MCPServer` has internal routes like `/mcp` (for SSE/POST) and `/docs`. When mounted at `/agent`, these become `/agent/mcp` and `/agent/docs`. ## Example with Shared State If you want your MCP tools to access the main application's state (like a database connection), you can pass that context into the tool or use a closure. ```python theme={null} fake_db = {"items": []} @mcp.tool() def add_item(name: str): fake_db["items"].append(name) return f"Added {name}" ``` # Introduction Source: https://docs.mcp-use.com/python/server/index Build MCP servers with mcp-use's enhanced server framework The mcp-use server framework extends the official MCP Python SDK with enhanced features for building production-ready MCP servers. It provides built-in documentation endpoints, inspector UI, improved logging, and seamless integration with the mcp-use ecosystem. ## Why mcp-use Server Framework? While the [official MCP Python SDK](https://github.com/modelcontextprotocol/python-sdk) provides the core protocol functionality, mcp-use enhances it with production-ready features: Fully compatible with the official MCP Python SDK. Extends existing functionality without breaking changes, ensuring seamless migration. Built-in web interface for real-time server monitoring, tool exploration, and debugging. Accessible at /inspector endpoint. Automatic generation of openmcp.json endpoint for server discovery and metadata. Provides standardized server information for MCP clients and tools. Enhanced logging system designed specifically for MCP servers with structured output, request tracing, and performance metrics. ## Compatibility ### Official MCP SDK mcp-use server framework is **fully compatible** with the official MCP Python SDK. It extends the SDK rather than replacing it, ensuring: * All official MCP features work as expected * Existing MCP servers can be easily migrated * Full compliance with MCP protocol specifications ### fastmcp2 mcp-use complements fastmcp2 by providing: * **Different Focus**: fastmcp2 focuses on rapid prototyping, mcp-use focuses on production features * **Enhanced Observability**: Better logging, metrics, and debugging tools * **Ecosystem Integration**: Native compatibility with mcp-use clients and agents * **Documentation**: Built-in API documentation and inspector UI You can use both frameworks in the same project if needed. ## Quick Start Build your first MCP server in minutes with this step-by-step guide: ```bash theme={null} pip install mcp-use ``` Create a new file called `my_server.py`: ```python theme={null} from mcp_use.server import MCPServer server = MCPServer( name="My Server", version="1.0.0", instructions="A simple example server" ) ``` Define a tool using the `@server.tool()` decorator: ```python theme={null} @server.tool() def echo(message: str) -> str: """Echo back the provided message.""" return f"Echo: {message}" ``` Add additional tools to extend functionality: ```python theme={null} @server.tool() def calculate(a: int, b: int) -> int: """Add two numbers.""" return a + b @server.tool() def get_time() -> str: """Get current time.""" from datetime import datetime return datetime.now().isoformat() ``` Add the run command at the bottom of your file: ```python theme={null} if __name__ == "__main__": server.run(transport="streamable-http", debug=True) ``` Then run it: ```bash theme={null} python my_server.py ``` Your server is now running at `http://localhost:8000`: * **MCP endpoints**: `/mcp` * **OpenMCP metadata**: `/openmcp.json` (debug mode only) * **Documentation**: `/docs` (debug mode only) * **Inspector UI**: `/inspector` (debug mode only) ### Complete Example Here's the full code in one place: ```python theme={null} from mcp_use.server import MCPServer from datetime import datetime server = MCPServer( name="Example Server", version="1.0.0", instructions="This is an example server with a simple echo tool." ) @server.tool() def echo(message: str) -> str: """Echo back the provided message.""" return f"Echo: {message}" @server.tool() def calculate(a: int, b: int) -> int: """Add two numbers.""" return a + b @server.tool() def get_time() -> str: """Get current time.""" return datetime.now().isoformat() if __name__ == "__main__": server.run(transport="streamable-http", debug=True) ``` ### Transport Options Choose the right transport for your use case: ```python theme={null} # Standard input/output (for MCP clients like Claude Desktop) server.run(transport="stdio") # HTTP server (for web clients and testing) server.run(transport="streamable-http", host="0.0.0.0", port=8000) ``` ### Debug Mode Enable debug mode for development features: ```python theme={null} server = MCPServer(name="My Server", debug=True) ``` Debug mode provides: * `/openmcp.json` endpoint for server discovery * `/docs` endpoint with interactive documentation * Enhanced logging with detailed request information ### Server Icons Add icons to your server implementation so MCP clients can display them: ```python theme={null} from mcp.types import Icon from mcp_use.server import MCPServer server = MCPServer( name="My Server", icons=[Icon(src="https://example.com/icon.svg", mime_type="image/svg+xml")], ) ``` Icons are included in the `initialize` response and can be used by clients for display in tool pickers, server lists, etc. You can also set icons on individual tools via the `@server.tool()` decorator: ```python theme={null} @server.tool( icons=[Icon(src="https://example.com/tool-icon.png", mime_type="image/png")], ) def my_tool(param: str) -> str: return param ``` ## Next Steps * [Installation & Setup](/python/getting-started/installation) - Detailed installation instructions * [Running Your Server](/python/server/running) - Production deployment options * [Inspector UI](/python/server/inspector) - Monitor and debug your server # Prompts Source: https://docs.mcp-use.com/python/server/prompts Define and expose prompts from your MCP server Prompts are reusable message templates that help AI agents interact with your server effectively. They provide structured ways to guide conversations and standardize common interactions. ## Example ```python theme={null} @server.prompt( name="code_review", title="Code Review", description="Generate a code review prompt for a given language and focus area", ) def code_review_prompt(language: str, focus: str = "general") -> str: """Generate a code review prompt.""" focus_instructions = { "general": "for overall quality, readability, and best practices.", "security": "focusing on security vulnerabilities and potential exploits.", "performance": "focusing on performance optimizations and efficiency.", } instruction = focus_instructions.get(focus, focus_instructions["general"]) return f"Please review the following {language} code {instruction}" ``` ## Anatomy of a Prompt When a client calls `prompts/list`, the server returns metadata for each prompt including its arguments. Here's the JSON-RPC response that the example above produces when a client calls `prompts/list`: ```json theme={null} { "jsonrpc": "2.0", "id": 1, "result": { "prompts": [ { "name": "code_review", "title": "Code Review", "description": "Generate a code review prompt for a given language and focus area", "arguments": [ { "name": "language", "required": true }, { "name": "focus", "required": false } ] } ] } } ``` Here's what maps to what: | Python | MCP Schema | Notes | | - | - | - | | `name="code_review"` | `"name"` | Falls back to function name if omitted | | `title="Code Review"` | `"title"` | Human-readable display name | | `description="Generate a code review..."` | `"description"` | Falls back to docstring if omitted | | `language: str` (no default) | `{"name": "language", "required": true}` | Parameters without defaults are required | | `focus: str = "general"` | `{"name": "focus", "required": false}` | Parameters with defaults are optional | | `context: Context` | *(not in schema)* | Automatically excluded | ### Argument Descriptions You can add descriptions to prompt arguments the same way as tools, using `Annotated` and `Field`: ```python theme={null} from typing import Annotated from pydantic import Field @server.prompt(name="code_review") def code_review_prompt( language: Annotated[str, Field(description="The programming language of the code")], focus: Annotated[str, Field(description="Review focus area", default="general")], ) -> str: """Generate a code review prompt.""" return f"Please review the following {language} code for {focus}." ``` This adds `description` to each argument in the response: ```json theme={null} { "arguments": [ { "name": "language", "description": "The programming language of the code", "required": true }, { "name": "focus", "description": "Review focus area", "required": false } ] } ``` ## Minimal Definition At minimum, a prompt only needs a function: ```python theme={null} @server.prompt() def greeting() -> str: """A friendly greeting prompt.""" return "Hello! How can I help you today?" ``` The function name becomes the prompt name, and the docstring becomes the description. ## Using Context Access the MCP context for advanced features. Add a `Context` parameter - it's automatically excluded from the prompt's arguments: ```python theme={null} from mcp_use.server import Context @server.prompt(name="contextual") async def contextual_prompt(context: Context) -> str: """A prompt that uses context information.""" return "Based on the current context, please..." ``` ## Multi-Message Prompts Return structured messages for complex prompts: ```python theme={null} from mcp.types import PromptMessage, TextContent @server.prompt(name="interview") def interview_prompt(role: str) -> list[PromptMessage]: """Generate an interview prompt sequence.""" return [ PromptMessage( role="user", content=TextContent( type="text", text=f"I'm interviewing for a {role} position.", ), ), PromptMessage( role="assistant", content=TextContent( type="text", text=f"I'll help you prepare for your {role} interview. Let's start with common questions.", ), ), ] ``` ## Async Prompts Prompts can be async for dynamic content generation: ```python theme={null} @server.prompt(name="daily_brief") async def daily_brief() -> str: """Generate a daily briefing prompt.""" from datetime import datetime today = datetime.now().strftime("%A, %B %d") return f"Good morning! Today is {today}. What would you like to accomplish?" ``` ## Prompts vs Tools vs Resources | Aspect | Prompts | Tools | Resources | | - | - | - | - | | Purpose | Guide interactions | Perform actions | Expose data | | Returns | Message templates | Action results | Content/data | | Use case | Conversation starters, templates | Operations | Files, configs | | Invocation | User selects prompt | Agent calls tool | Agent reads resource | # Resources Source: https://docs.mcp-use.com/python/server/resources Define and expose resources from your MCP server Resources expose data to MCP clients. Unlike tools (which perform actions), resources provide read-only access to content like files, database records, or live data. ## Example ```python theme={null} @server.resource( uri="config://{section}", name="app_config", title="Application Config", description="Get configuration for a specific section", mime_type="application/json", ) def get_config(section: str) -> str: """Get configuration for a specific section.""" configs = { "database": '{"host": "localhost", "port": 5432}', "cache": '{"enabled": true, "ttl": 3600}', } return configs.get(section, '{"error": "Section not found"}') ``` ## Anatomy of a Resource When a client calls `resources/list`, the server returns metadata for each resource. Resources with URI templates (like `{section}`) are returned via `resources/templates/list` instead. Here's the JSON-RPC response that the example above produces when a client calls `resources/templates/list`: ```json theme={null} { "jsonrpc": "2.0", "id": 1, "result": { "resourceTemplates": [ { "uriTemplate": "config://{section}", "name": "app_config", "title": "Application Config", "description": "Get configuration for a specific section", "mimeType": "application/json" } ] } } ``` Here's what maps to what: | Python | MCP Schema | Notes | | - | - | - | | `uri="config://{section}"` | `"uriTemplate"` | `{section}` makes it a template; without it, it would be a static `"uri"` | | `name="app_config"` | `"name"` | Falls back to function name if omitted | | `title="Application Config"` | `"title"` | Human-readable display name | | `description="Get configuration..."` | `"description"` | Falls back to docstring if omitted | | `mime_type="application/json"` | `"mimeType"` | Tells clients how to interpret the content | | `section: str` | *(extracted from URI)* | Parameter matched from the URI template | If your URI contains `{param}` placeholders, the resource is registered as a **template**. Otherwise, it's registered as a **static resource**. ## Static Resources Resources without URI parameters are static - they always return at the same URI: ```python theme={null} from datetime import datetime @server.resource( uri="time://current", name="current_time", title="Current Time", mime_type="text/plain", ) def current_time() -> str: """Returns the current server time.""" return datetime.now().isoformat() ``` ## Resource Templates Use `{param}` placeholders in the URI to create dynamic resources: ```python theme={null} @server.resource( uri="user://{user_id}", name="user_profile", title="User Profile", description="Get a user's profile by ID", mime_type="application/json", ) def get_user(user_id: str) -> str: """Fetch user profile by ID.""" users = {"1": "Alice", "2": "Bob"} name = users.get(user_id, "Unknown") return f'{{"id": "{user_id}", "name": "{name}"}}' ``` Clients request `user://123` and the function receives `user_id="123"`. ### Multiple Parameters Templates support multiple parameters: ```python theme={null} @server.resource( uri="file://{folder}/{filename}", name="file_content", mime_type="text/plain", ) def get_file(folder: str, filename: str) -> str: """Read a file from a folder.""" return f"Content of {folder}/{filename}" ``` ## Async Resources Resources can be async for I/O operations: ```python theme={null} import httpx @server.resource( uri="api://weather", mime_type="application/json", ) async def weather_data() -> str: """Fetch current weather data.""" async with httpx.AsyncClient() as client: response = await client.get("https://api.weather.com/current") return response.text ``` ## Binary Resources Return bytes for binary content: ```python theme={null} @server.resource( uri="image://logo", mime_type="image/png", ) def logo_image() -> bytes: """Return the application logo.""" with open("logo.png", "rb") as f: return f.read() ``` ## Resource Subscriptions Clients can subscribe to resources and receive notifications when they change. This follows the [MCP resource subscriptions spec](https://modelcontextprotocol.io/specification/2025-11-25/server/resources#subscriptions). ### How It Works 1. Client sends `resources/subscribe` with a resource URI 2. Your server updates the resource and calls `notify_resource_updated()` 3. All subscribed clients receive a `notifications/resources/updated` notification 4. Clients re-read the resource to get the new content MCPServer handles subscribe/unsubscribe tracking automatically - you just need to call `notify_resource_updated()` when your resource changes. ### Example ```python theme={null} current_price = 100.0 @server.resource(uri="data://price", name="stock_price", mime_type="text/plain") def get_price() -> str: return str(current_price) @server.tool() async def update_price(new_price: float) -> str: """Update the stock price and notify subscribers.""" global current_price current_price = new_price await server.notify_resource_updated("data://price") return f"Price updated to {new_price}" ``` When a client subscribes to `data://price` and then any client calls `update_price`, all subscribers receive the notification and can re-read the resource. Subscriptions are session-scoped - they're automatically cleaned up when a client disconnects. If the server restarts, clients need to re-subscribe. ## Common MIME Types | MIME Type | Use Case | | - | - | | `text/plain` | Plain text content | | `application/json` | JSON data | | `text/markdown` | Markdown documents | | `text/html` | HTML content | | `image/png` | PNG images | ## Resources vs Tools | Aspect | Resources | Tools | | - | - | - | | Purpose | Expose data | Perform actions | | Side effects | None (read-only) | May modify state | | Caching | Can be cached | Generally not cached | | Use case | Configuration, files, status | Operations, calculations | # Running the Server Source: https://docs.mcp-use.com/python/server/running How to run your mcp-use server with different transport methods Learn how to run your mcp-use server using different transport methods and configurations. ## Basic Usage ```python theme={null} from mcp_use.server import MCPServer server = MCPServer(name="My Server") # Run with stdio transport (for MCP clients) server.run(transport="stdio") # Run with HTTP transport (for web clients) server.run(transport="streamable-http") ``` ## Transport Methods ### stdio Transport Standard input/output transport for MCP clients: ```python theme={null} server.run(transport="stdio") ``` ### streamable-http Transport HTTP-based transport for web clients: ```python theme={null} server.run( transport="streamable-http", host="0.0.0.0", port=8000, reload=False, debug=False ) ``` ## Host and Port Configuration You can configure host and port either at initialization or when calling `run()`. Values passed to `run()` override those set in `__init__()`, and DNS rebinding protection is automatically reconfigured to match: ```python theme={null} # Set defaults at initialization server = MCPServer(name="My Server", host="0.0.0.0", port=3000) server.run() # Uses host="0.0.0.0", port=3000, no DNS protection # Override at runtime - DNS protection is reconfigured automatically server.run(host="127.0.0.1", port=8080) # Switches to localhost with DNS protection ``` ### Default Values | Parameter | Default | Description | | - | - | - | | `host` | `"0.0.0.0"` | Bind address. Use `"127.0.0.1"` for local-only access | | `port` | `8000` | Port number | ## Automatic Port Retry When the requested port is already in use (e.g., another server is running on port 8000), the server automatically tries the next available port instead of crashing: ``` Port 8000 is in use, using port 8001 instead. - Local: http://0.0.0.0:8001 - MCP: http://0.0.0.0:8001/mcp ``` The server tries up to 10 consecutive ports (8000, 8001, ..., 8009). If none are available, it raises an error. This makes it easy to run multiple MCP servers simultaneously during development without manually specifying different ports. The startup output always shows the actual port the server bound to, so you'll know where to connect. ## Cloud and Proxy Deployments When deploying behind reverse proxies (Cloudflare, nginx, Fly.io, etc.), the server automatically configures DNS rebinding protection based on the host: * **`host="0.0.0.0"`** (default): DNS rebinding protection is **disabled**, allowing any Host header. This is safe when your proxy handles host validation. * **`host="127.0.0.1"`**: DNS rebinding protection is **enabled**, only allowing requests with `Host: 127.0.0.1:*` or `Host: localhost:*`. ```python theme={null} # Cloud deployment (behind proxy) - default, no DNS protection server = MCPServer(name="My Server") server.run(transport="streamable-http") # Local development - auto-enables DNS protection server = MCPServer(name="My Server", host="127.0.0.1") server.run(transport="streamable-http") ``` If you get **421 Misdirected Request** errors behind a proxy, ensure you're using `host="0.0.0.0"` (the default). ## Debug Mode Enable debug mode for development features: ```python theme={null} server = MCPServer(name="My Server", debug=True) # Debug mode enables: # - /openmcp.json endpoint # - /docs endpoint # - /inspector endpoint # - Enhanced logging server.run(transport="streamable-http", debug=True) ``` ## Auto-reload Enable auto-reload during development: ```python theme={null} server.run(transport="streamable-http", reload=True) ``` ## Production Configuration ```python theme={null} server = MCPServer( name="My Server", host="0.0.0.0", port=8000, ) server.run( transport="streamable-http", reload=False, debug=False ) ``` ## Command Line Run directly with Python: ```bash theme={null} python my_server.py ``` Or use uvicorn directly: ```bash theme={null} uvicorn my_server:app --host 0.0.0.0 --port 8000 ``` # Sampling Source: https://docs.mcp-use.com/python/server/sampling Request LLM completions from the client Sampling allows your MCP server tools to request LLM completions from the client during execution. This enables tools to leverage the client's LLM capabilities for tasks like sentiment analysis, text generation, or decision-making. ## How It Works When a tool needs an LLM response, it can use the `Context` to send a sampling request to the client. The client's configured LLM processes the request and returns the result to the tool. ## Basic Usage Use the `sample()` method on the context object to request LLM completions: ```python theme={null} from mcp.types import SamplingMessage, TextContent from mcp_use.server import Context, MCPServer server = MCPServer(name="My Server") @server.tool() async def analyze_sentiment(text: str, ctx: Context) -> str: """Analyze the sentiment of text using the client's LLM.""" prompt = f"""Analyze the sentiment of the following text as positive, negative, or neutral. Just output a single word - 'positive', 'negative', or 'neutral'. Text to analyze: {text}""" message = SamplingMessage(role="user", content=TextContent(type="text", text=prompt)) # Request LLM analysis response = await ctx.sample(messages=[message]) if isinstance(response.content, TextContent): return response.content.text.strip() return "" ``` ## Use Case Example A content moderation server that uses the client's LLM to analyze user-generated content: ```python theme={null} @server.tool() async def moderate_content(content: str, ctx: Context) -> dict: """Moderate user content for policy violations.""" prompt = f"Does this content violate community guidelines? Answer yes or no: {content}" message = SamplingMessage(role="user", content=TextContent(type="text", text=prompt)) response = await ctx.sample(messages=[message]) decision = response.content.text.strip().lower() return {"allowed": decision == "no", "reason": "AI review"} ``` This allows the tool to leverage sophisticated LLM reasoning without having to integrate an LLM provider directly. ## Important Notes * The client must provide a `sampling_callback` to support sampling requests * If no callback is configured, sampling requests will fail with an error * Sampling requests are processed by the client's configured LLM, not the server ## Next Steps * See [Context API](/python/api-reference/mcp_use_server_context) for more context methods * Learn about [Elicitation](/python/server/elicitation) for requesting user input # Session Management Source: https://docs.mcp-use.com/python/server/sessions Using session IDs in MCP servers Sessions keep per-client state (caching, auth, limits). Managed by the MCP SDK via `mcp-session-id` HTTP header (spec: [https://modelcontextprotocol.io/specification/2025-11-25/basic/transports#session-management](https://modelcontextprotocol.io/specification/2025-11-25/basic/transports#session-management)). ## How it works * SDK generates a UUID when no session header is present. * Server returns it in `mcp-session-id` on initialize. * Client sends the header on all requests. * Server reuses the session; middleware sees it as `context.session_id`. ## Get session ID ```python theme={null} # Middleware sid = context.session_id or "anonymous" # Tool @server.tool() def session_id() -> dict: sid = server._get_session_id_from_request() return {"session_id": sid, "short": sid[:8] if sid else None} ``` ## Per-session patterns (minimal) **State / rate limit / cache key** by `context.session_id or "anonymous"`: ```python theme={null} class SessionState(Middleware): def __init__(self): self.counts = defaultdict(int) async def on_request(self, ctx, nxt): sid = ctx.session_id or "anonymous" self.counts[sid] += 1 return await nxt(ctx) ``` Per-session cache: ```python theme={null} class SessionCache(Middleware): def __init__(self): self.c = defaultdict(dict) async def on_read_resource(self, ctx, nxt): sid = ctx.session_id or "anonymous" uri = str(ctx.message.uri) cache = self.c[sid] if uri in cache: return cache[uri] res = await nxt(ctx); cache[uri] = res; return res ``` ## Notes * Only available on Streamable HTTP transport; stdio has no sessions. * Use per-session storage to avoid data leakage. * Keep session data lean; expire if needed. # Tools Source: https://docs.mcp-use.com/python/server/tools Define and expose tools from your MCP server Tools are the primary way your MCP server exposes functionality to clients. They represent actions that an AI agent can invoke to perform tasks. ## Example ```python theme={null} @server.tool( name="get_weather", title="Weather Information Provider", description="Get current weather information for a location", annotations=ToolAnnotations( readOnlyHint=True, openWorldHint=True, ), ) async def get_weather( location: Annotated[str, Field(description="City name or zip code")], units: Annotated[str, Field(description="Temperature units", default="celsius")], context: Context, ) -> str: """Get current weather information for a location.""" await context.info(f"Fetching weather for {location}") return f"Weather in {location}: 22 {units}" ``` ## Anatomy of a Tool Here's the JSON-RPC response that the example above produces when a client calls `tools/list`: ```json theme={null} { "jsonrpc": "2.0", "id": 1, "result": { "tools": [ { "name": "get_weather", "title": "Weather Information Provider", "description": "Get current weather information for a location", "annotations": { "readOnlyHint": true, "openWorldHint": true }, "inputSchema": { "type": "object", "properties": { "location": { "type": "string", "description": "City name or zip code" }, "units": { "type": "string", "description": "Temperature units", "default": "celsius" } }, "required": ["location"] } } ] } } ``` Here's what maps to what: | Python | MCP Schema | Notes | | - | - | - | | `name="get_weather"` | `"name"` | Falls back to function name if omitted | | `title="Weather Information Provider"` | `"title"` | Human-readable display name | | `description="Get current weather..."` | `"description"` | Falls back to docstring if omitted | | `annotations=ToolAnnotations(...)` | `"annotations"` | Behavioral hints for clients | | `location: str` | `"type": "string"` | Python type hint → JSON Schema type | | `Field(description="City name...")` | property `"description"` | Argument-level description | | `default="celsius"` | `"default": "celsius"` | Makes the parameter optional | | No default on `location` | `"required": ["location"]` | Parameters without defaults are required | | `context: Context` | *(not in schema)* | Automatically excluded from the schema | Always use `Annotated[type, Field(description="...")]` for your tool parameters. Without it, LLMs calling your tool won't know what each argument means. ## Minimal Definition At minimum, a tool only needs a function with type hints: ```python theme={null} @server.tool() def greet(name: str) -> str: """Greet someone by name.""" return f"Hello, {name}!" ``` The function name becomes the tool name, the docstring becomes the description, and type hints define the input schema. ## Tool Options The `@server.tool()` decorator accepts these options: ```python theme={null} @server.tool( name="custom_name", # Override the function name title="Custom Title", # Human-readable title description="Custom desc", # Override the docstring annotations=ToolAnnotations( # Behavioral hints for clients destructiveHint=True, readOnlyHint=False, ), structured_output=True, # Return structured JSON output ) def my_tool(param: str) -> str: return param ``` ### Tool Annotations Tool annotations provide hints to clients about the tool's behavior: | Annotation | Description | | - | - | | `destructiveHint` | Tool may modify or delete data | | `readOnlyHint` | Tool only reads data, no side effects | | `idempotentHint` | Calling multiple times has same effect as once | | `openWorldHint` | Tool interacts with external systems | ## Async Tools Tools can be async for non-blocking I/O operations: ```python theme={null} import httpx @server.tool() async def fetch_url( url: Annotated[str, Field(description="The URL to fetch content from")], ) -> str: """Fetch content from a URL.""" async with httpx.AsyncClient() as client: response = await client.get(url) return response.text ``` ## Using Context Access the MCP context for logging and progress reporting. Add a `Context` parameter - it's automatically excluded from the tool's input schema: ```python theme={null} from mcp_use.server import Context @server.tool() async def long_task( items: Annotated[list[str], Field(description="Items to process")], context: Context, ) -> str: """Process items with progress reporting.""" results = [] for i, item in enumerate(items): await context.report_progress(i, len(items)) results.append(f"Processed: {item}") return "\n".join(results) ``` ## Parameter Types and JSON Schema Every tool parameter becomes a property in the tool's `inputSchema`. mcp-use uses [Pydantic](https://docs.pydantic.dev/) to generate [JSON Schema 2020-12](https://json-schema.org/draft/2020-12/schema) from your Python type hints. ### Type mapping | Python type | JSON Schema | Notes | | - | - | - | | `str` | `{"type": "string"}` | | | `int` | `{"type": "integer"}` | | | `float` | `{"type": "number"}` | | | `bool` | `{"type": "boolean"}` | | | `list[str]` | `{"type": "array", "items": {"type": "string"}}` | Works with any item type | | `dict[str, Any]` | `{"type": "object"}` | | | `Literal["a", "b"]` | `{"type": "string", "enum": ["a", "b"]}` | Renders as a dropdown in the Inspector | ### Required, optional, and nullable How you declare a parameter determines whether it appears in the `required` array: ```python theme={null} @server.tool() def example( # Required - no default, goes into "required" name: Annotated[str, Field(description="User name")], # Optional with default - NOT in "required", default shown in schema limit: Annotated[int, Field(description="Max results")] = 10, # Nullable - NOT in "required", type stays "string" (not anyOf) company: Annotated[str | None, Field(description="Company filter")] = None, ) -> str: ... ``` This produces: ```json theme={null} { "properties": { "name": { "type": "string", "description": "User name" }, "limit": { "type": "integer", "description": "Max results", "default": 10 }, "company": { "type": "string", "description": "Company filter", "default": null } }, "required": ["name"] } ``` `Optional[str]` and `str | None` are identical at runtime and produce the same schema. ### Enum parameters with Literal Use `Literal` to restrict a parameter to a fixed set of values. MCP clients like the Inspector render these as dropdown selects: ```python theme={null} from typing import Literal @server.tool() def create_event( title: Annotated[str, Field(description="Event title")], visibility: Annotated[ Literal["public", "private", "team"], Field(description="Who can see this event"), ], recurrence: Annotated[ Literal["none", "daily", "weekly", "monthly"], Field(description="Recurrence pattern"), ] = "none", ) -> dict: ... ``` Produces `{"type": "string", "enum": ["public", "private", "team"]}` in the schema. mcp-use automatically simplifies Pydantic's nullable `anyOf` schemas. Without this, `str | None` would produce `{"anyOf": [{"type": "string"}, {"type": "null"}]}` which breaks description rendering in the MCP Inspector and fails validation in some clients like Google's Gemini API. mcp-use collapses this into `{"type": "string", "default": null}`. ## Complex Input Types Use Pydantic models for complex inputs: ```python theme={null} from pydantic import BaseModel class SearchQuery(BaseModel): query: str = Field(description="The search query string") max_results: int = Field(default=10, description="Maximum number of results to return") include_metadata: bool = Field(default=False, description="Whether to include metadata") @server.tool() def search(params: SearchQuery) -> list[str]: """Search with complex parameters.""" return ["result1", "result2"] ``` ## Return Types Tools can return various types: ```python theme={null} # String @server.tool() def text_tool() -> str: return "Hello" # Dict (serialized to JSON) @server.tool() def json_tool() -> dict: return {"key": "value", "count": 42} # List @server.tool() def list_tool() -> list[str]: return ["a", "b", "c"] ``` ## Error Handling Raise exceptions to indicate errors. The error message will be returned to the client: ```python theme={null} @server.tool() def divide( a: Annotated[float, Field(description="Dividend")], b: Annotated[float, Field(description="Divisor")], ) -> float: """Divide two numbers.""" if b == 0: raise ValueError("Cannot divide by zero") return a / b ``` # MCP Server Tunneling Source: https://docs.mcp-use.com/tunneling/index Expose a local MCP server through a public /mcp URL for testing in ChatGPT, Claude, and other remote MCP clients. Use a tunnel when ChatGPT, Claude, or another remote MCP client needs to reach a server running on your machine. The tunnel gives you a public HTTPS URL that forwards to your local MCP endpoint. With `mcp-use`, start the server with `--tunnel`, then copy the printed `Tunnel` URL. The URL you give to clients must include `/mcp`. ```text theme={null} https://-.tunnel.mcp-use.run/mcp ``` Keep the terminal process running while you test. The public URL stops working when the process exits. With `mcp-use dev --tunnel` or `mcp-use start --tunnel`, the framework connects directly to the relay over WebSocket. It does not install or execute a native tunnel binary or a separate tunnel package. If the relay connection drops while the command is still running, the tunnel reconnects automatically and reuses the same identifier when possible. The relay forwards both HTTP requests and WebSocket upgrades. In development, MCP App views loaded from the public tunnel keep Vite HMR: editing a local view updates the remote Inspector or client without restarting the tunnel. ## Start a tunnel with mcp-use Use `mcp-use dev --tunnel` while you are developing: ```bash theme={null} mcp-use dev --tunnel ``` Use `mcp-use start --tunnel` when you want to test the built server: ```bash theme={null} mcp-use build mcp-use start --port 3000 --tunnel ``` After the production server binds, successful output includes the local and public MCP endpoints: ```text theme={null} [mcp-use] starting tunnel for port 3000… mcp-use server running at http://localhost:3000/mcp mcp-use public MCP URL: https://proper-black.tunnel.mcp-use.run/mcp ``` Copy the value after `mcp-use public MCP URL:` into your remote MCP client. Do not copy only the tunnel origin; the client URL must end with `/mcp`. ## Verify the tunnel Verify the public URL with the `mcp-use client` CLI: ```bash theme={null} npx mcp-use client connect tunnel-test https://proper-black.tunnel.mcp-use.run/mcp npx mcp-use client tunnel-test tools list ``` The `connect` command performs the MCP handshake and saves the tunnel under the name `tunnel-test`. The `tools list` command should print the tools exposed by your local server. If the server uses OAuth or bearer authentication, complete the client authentication flow or pass the required auth option before testing tools. ## Stop the tunnel Press `Ctrl+C` in the terminal running the tunnel. When you started the tunnel with `mcp-use dev --tunnel` or `mcp-use start --tunnel`, stopping the command stops both the local server process and the tunnel. ## Lifetime and limits Tunnels are for local testing before deployment: * The tunnel is active only while the command is running. * With `mcp-use dev --tunnel` or `mcp-use start --tunnel`, a dropped tunnel registration is re-established automatically while the command runs. * Reservations that never connect expire after 5 minutes. * Connected tunnels expire after 24 hours. * Inactive tunnels are cleaned up after 1 hour without activity. * Each source IP can create up to 10 tunnels per hour. * Each source IP can have up to 5 active tunnels at a time. For a stable public URL, deploy the server instead of relying on a local tunnel. ## Next steps * Use the [TypeScript quickstart](/typescript/getting-started/quickstart) to create a local MCP server. * Use [Build your first MCP App](/typescript/mcp-apps/quickstart) to test widgets in a remote client. * Use [Deploy to Manufact Cloud](/typescript/server/deployment/mcp-use) when you are ready for a hosted MCP endpoint. # Updates Source: https://docs.mcp-use.com/typescript/changelog/changelog New updates and improvements Release 2.10.0 ## OAuth Proxy for non-DCR providers Canary release (`mcp-use@2.10.0-canary.4`) adding an OAuth authorization server in front of identity providers without dynamic client registration, secret-free production builds, and `.gitignore`-aware deployments. Stable v2.10.0 has not shipped. * **New** (server): `oauthProxy()` in `mcp-use/oauth` makes the MCP server its own authorization server in front of GitHub (`github()`), Google (`google()`), or any OAuth 2.0 provider (`upstream()`). Clients present a client ID metadata document or register (DCR), approve a server-owned consent page that names the server by its host, and receive the proxy's own opaque tokens (`#2822`) * **New** (server): the `clients` option limits which clients may connect, by metadata document URL, origin, or a client defined on the server (`#2822`) * **New** (server): the upstream client secret and user tokens stay on the server, encrypted in a shared store from `mcp-use/oauth/storage`: Upstash, Redis, Postgres, Firestore, Cloudflare D1 or Durable Object, or in-memory for local development. `redisStorage` takes a connected client or a lazy connect function (`#2822`) * **New** (server): tools read the upstream token with `upstreamToken(ctx.auth)` or `ctx.auth.upstream` (`#2822`) * **Enhancement** (server): failed sign-ins and refreshes log the cause without token or code values (provider error code and description, HTTP status and content type, mismatched `iss`, or network error); refused client metadata documents and records encrypted with a retired secret are also logged (`#2822`) * **Enhancement** (server): clients that signed in through the 1.x `oauthProxy` keep working while registration is on; users approve the consent page once and sign in again without removing the server (`#2822`) * **New** (server): OAuth providers can register public HTTP routes from `setup()` with `host.route()`, read `host.mode` and `host.listenHost`, and compute `oauthMetadata` from the resolved resource URL (`#2822`) * **Fix** (server): OAuth endpoints under the MCP path are never written to trace logs, and `oauthEnvironmentValue` no longer throws on runtimes without `process` (`#2822`) * **Fix** (server): trailing-slash trimming in `upstashStorage` and the GitHub and Google upstream providers no longer uses a backtracking regex * **New** (server, @mcp-use/cli): `mcp-use build` evaluates the entry with `MCP_USE_PHASE=build` and no longer needs runtime secrets; the new `isBuilding()` export lets module-scope code skip reading secrets or connecting to a database. `oauthProxy` and `upstashStorage` require no secrets or credentials while building (`#2830`) * **Fix** (@mcp-use/cli): `mcp-use build` exits when the build finishes, even if the entry opened a connection at module scope such as a Redis client (`#2830`) * **Fix** (@mcp-use/cli): `mcp-use build` builds for production when `NODE_ENV` is unset. Views no longer ship React's development build, and server-side JSX no longer compiles to `jsxDEV`, which failed under `mcp-use start` (`#2830`) * **Fix** (@mcp-use/cli): a failed build or dev start prints the cause of a refused connection instead of an empty line (`#2830`) * **New** (@mcp-use/cli): `mcp-use deploy --no-github` applies `.gitignore` rules when packaging, including wildcards, directory rules, and negation, while keeping the baseline cloud exclusions (`#2485`) * **Fix** (server): `MCPServer.fromOpenAPI` converts OpenAPI 3.0 boolean `exclusiveMinimum` and `exclusiveMaximum` into JSON Schema numeric bounds instead of throwing while registering tools (`#2717`) * **Fix** (@mcp-use/agent): the Anthropic provider sends `"[no content]"` for empty tool result content, avoiding HTTP 400 errors from the Messages API (`#2693`) * **Documentation**: add the [OAuth Proxy](/v2/typescript/server/authentication/providers/oauth-proxy) guide, [OAuth Proxy storage](/v2/typescript/server/authentication/providers/oauth-proxy-storage), v1 migration notes, and API reference; add GitHub and Google `oauthProxy` examples with Firestore (`#2841`, `#2831`) * **Documentation**: correct API reference comments: stdio `env` does not inherit the parent environment, `defaultRequestOptions` applies only to the initial tool listing, `VMExecutorOptions.memoryLimitMb` is not enforced, legacy stateless GET, DELETE, and HEAD return `204`, and `mcp-use/vite`, `mcp-use/tanstack-start`, and `mcp-use/tanstack-start/vite` appear in the generated reference (`#2838`) * **Update**: patch vulnerable transitive dependencies (`proxy-addr`, `shell-quote`, `source-map-js`) and update Next.js examples to `next` ^16.3.8 (`#2842`) * **Update**: Updated @mcp-use/cli to v4.4.0 (canary.2) * **Update**: Updated @mcp-use/agent to v2.0.23 (canary.1) and @mcp-use/client to v2.4.3 (canary.0) * **Update**: Updated @mcp-use/inspector to v20.3.20 (canary.3); see the [Inspector changelog](/inspector/changelog) Release 2.9.0 ## Typed composer mention search Minor release adding typed search for app-owned items in supporting ChatGPT desktop composers. * **New** (server): `server.mentions({ name, search })` registers a normal typed `ToolRef` for searching people, files, channels, and other app-owned items without a View or iframe handshake (`#2792`) * **New** (server): generate a required string `query` input schema and an `{ items: ResourceLink[] }` output schema using the official SDK resource-link schema; export `ResourceLink`, `MentionSearchParams`, `MentionSearchResult`, and `MentionsRegistration` from `mcp-use` (`#2792`) * **Enhancement** (server): mention tools advertise `mentions/search` extension metadata and always include app visibility, preserving unrelated descriptor metadata; search is annotated read-only by default (`#2792`) * **Enhancement** (server): search callbacks receive ordinary request context, OAuth sign-in defaults, and `ctx.signal`; empty and whitespace queries pass through unchanged. Applications control authorization, ranking, and result limits (`#2792`) * **Documentation**: add composer mention registration, result contracts, visibility behavior, and authorization guidance to [ChatGPT Plugin Extensions](/v2/typescript/mcp-apps/chatgpt-extensions#composer-mention-search) (`#2792`) * **Update** (@mcp-use/cli): rebuild bundled workspace code and synchronize published internal package metadata * **Update**: Updated @mcp-use/cli to v4.3.3 * **Update**: Updated @mcp-use/inspector to v20.3.19; see the [Inspector changelog](/inspector/changelog) ## Tunnel cancellation & API reference navigation Patch release keeping development tunnels connected when a cancellation arrives after its request has finished, with clearer API reference navigation. * **Fix** (@mcp-use/tunnel, @mcp-use/cli): ignore valid late or duplicate request cancellations so they no longer close the tunnel or interrupt unrelated requests; active requests still cancel normally (`#2664`) * **Documentation**: improve generated API reference navigation and clarify client and React hook documentation (`#2791`) * **Update**: Updated @mcp-use/tunnel to v0.2.2 and @mcp-use/cli to v4.3.2 * **Update**: Updated @mcp-use/inspector to v20.3.18; see the [Inspector changelog](/inspector/changelog) ## Streaming, code mode & deployment fixes Patch release fixing streamed tool notifications, code-mode discovery, CLI deployment links and remote validation, Windows scaffolding, and Inspector tool timeouts. * **Fix** (server): request logging no longer buffers SSE response bodies, so tool progress and log notifications reach clients before tool completion. This applies at every logging level, including trace; finite JSON response logging is preserved (`#2789`) * **Fix** (@mcp-use/client): `CodeModeConnector.listTools()` returns `execute_code` and `search_tools`, exposes tool capabilities and protocol metadata, and returns empty resource, resource-template, and prompt lists (`#2488`) * **Fix** (@mcp-use/client): `CodeModeConnector` honors request abort signals for listing and tool calls, including cancellation while waiting for code execution or tool search (`#2488`) * **Fix** (@mcp-use/cli): deployment dashboard links use the selected organization slug and server ID for managed uploads and GitHub deployments; organizations without a slug no longer receive an invalid link (`#2744`) * **Fix** (@mcp-use/cli): `mcp-use deploy` validates that Git remotes are hosted on `github.com`, rejecting other hosts that merely contain `github.com` in their hostname or path (`#2687`) * **Fix** (create-mcp-use-app): `--install` and the install prompt run npm and pnpm through a shell on Windows so their `.cmd` shims work instead of failing with `spawn npm ENOENT` (`#2696`) * **Fix** (@mcp-use/inspector): tool calls honor saved timeout settings and cleared timeouts stay cleared; see the [Inspector changelog](/inspector/changelog) (`#2656`) * **Update**: Updated @mcp-use/agent to v2.0.22 and @mcp-use/client to v2.4.2 * **Update**: Updated @mcp-use/inspector to v20.3.17; see the [Inspector changelog](/inspector/changelog) * **Update**: Updated @mcp-use/cli to v4.3.1 * **Update**: Updated create-mcp-use-app to v2.0.10 Release 2.8.0 ## ChatGPT Plugin Extensions Minor release adding typed ChatGPT Plugin Extensions across server and React APIs, with updated MCP SDKs and richer examples. * **New** (server): register typed global, thread, and file entrypoints on `tool.view`; launch contracts are validated and OpenAI tool metadata is preserved (`#2737`) * **New** (server): register native ChatGPT plugin settings with typed fields, optional layout, validated read/update tools, request context callbacks, and per-request capability advertisement. Applications keep control of persistence and authorization (`#2739`) * **New** (server): advertise top-level tool icons in `tools/list`, including proxied tools, and support public-relative icon assets (`#2779`) * **New** (@mcp-use/react): `useDeepLink` reads the initial and subsequent ChatGPT deep-link URLs through the existing MCP App connection (`#2738`) * **New** (@mcp-use/react): `useModelContext` manages keyed native text, image, resource-link, and embedded-resource attachments. It activates only for committed hook consumers and handles replacement, removal, cancellation, and delivery failures without restoring stale content (`#2776`) * **Enhancement** (server): define supported MCP App display modes and an optional initial ChatGPT display preference in the named `viewConfig` export; validate preferences while preserving broader host capabilities (`#2740`) * **Enhancement** (@mcp-use/cli): include display-mode configuration in development and production view manifests and pre-bundle the model-context schema for cold iframe startup (`#2740`, `#2776`) * **New** (examples): add a Bookshop Plugin Extensions example with entrypoint icons, plugin settings, and model-context attachments (`#2773`) * **Fix** (create-mcp-use-app): failed template selection or GitHub template cloning no longer leaves an empty project directory that blocks a retry (`#2765`) * **Update** (@mcp-use/client): update the official MCP client, core, and server SDKs to 2.3.1 and MCP Apps to 2.0.3. Node follows only same-origin redirects that preserve the request method; browsers reject redirects by default, so configure the final endpoint URL (`#2784`) * **Documentation**: add the ChatGPT Plugin Extensions guide for MCP Apps and clarify browser redirect restrictions (`#2772`, #2784) * **Update**: Updated @mcp-use/agent to v2.0.21 and @mcp-use/client to v2.4.1 * **Update**: Updated @mcp-use/inspector to v20.3.16; see the [Inspector changelog](/inspector/changelog) * **Update**: Updated @mcp-use/cli to v4.3.0 * **Update**: Updated create-mcp-use-app to v2.0.9 ## CLI argument & Windows screenshot fixes Patch release fixing CLI argument parsing, Windows browser discovery, scaffold deploy guidance, and Inspector chat input spacing, with dependency security updates. * **Fix** (@mcp-use/cli): plain `key=value` tool and prompt arguments preserve `:=` inside the value, so `code="x := 1"` is sent as a string; `key:=` still parses a typed JSON value (`#2665`) * **Fix** (@mcp-use/cli): on Windows, `mcp-use screenshot` also finds Chrome under `Program Files (x86)`, Microsoft Edge, and Brave instead of failing with `chrome_not_found` when neither original Chrome location exists (`#2725`) * **Fix** (create-mcp-use-app): scaffold completion prints `pnpm run deploy` so pnpm runs the project's deploy script instead of its built-in `deploy` command (`#2701`) * **Fix** (@mcp-use/inspector): multiline chat input stays clear of the bottom toolbar; see the [Inspector changelog](/inspector/changelog) (`#2735`) * **Update** (server): update Hono to `^4.13.7` and raise workspace dependency security floors (`#2746`) * **Documentation** (@mcp-use/client): the AI SDK OpenAI example installs from a fresh checkout with a frozen lockfile and runs TypeScript directly on Node.js 22.22.2 or newer (`#2672`) * **Documentation** (create-mcp-use-app): the Connect to AI example configures its MCP server through `MCPClient`'s `mcpServers` map (`#2727`) * **Update**: Updated @mcp-use/inspector to v20.3.15; see the [Inspector changelog](/inspector/changelog) * **Update**: Updated @mcp-use/cli to v4.2.1 * **Update**: Updated create-mcp-use-app to v2.0.8 ## OAuth UserInfo & stricter CLI flags Patch release exposing optional OAuth UserInfo, plus a CLI minor that rejects inline values on boolean flags. * **New** (@mcp-use/client): `useMcp` and `useMcpServer` expose reactive OAuth UserInfo. Set `oauth.fetchUserInfo: true` to load the account after the connection is ready, or call `getUserInfo()`. `userInfo` is `idle`, `loading`, `available`, `unavailable`, or `error`; a UserInfo failure does not change `state`. See [OAuth UserInfo](/v2/typescript/client/usemcp#oauth-userinfo) (`#2688`) * **Fix** (@mcp-use/client): base64 MCP App HTML resources decode as UTF-8, so non-ASCII text renders correctly in React views (`#2632`) * **Fix** (@mcp-use/agent): array-valued Gemini tool results are wrapped in an object so function responses match the provider schema in streaming and non-streaming calls (`#2675`) * **Fix** (@mcp-use/agent): `runToolLoopNonStreaming` stops dispatching the rest of a turn's tool calls when `signal` is aborted, matching `runToolLoop` (`#2667`) * **Fix** (server): proxied prompt requests receive the downstream cancellation signal (`#2568`) * **Fix** (@mcp-use/cli): an inline value on a boolean flag is rejected instead of ignored. `mcp-use dev --tunnel=false` used to open a public tunnel; it now fails with `--tunnel does not take a value`. The same applies to `--no-open`, `--no-inspector`, `--with-inspector`, `--source-maps`, `--inline`, `--help`, and `--version`. Flags that take a value still accept `--flag value` and `--flag=value` (`#2521`) * **Fix** (@mcp-use/cli): `mcp-use servers env --help` prints `servers env` help instead of the root `servers` help (`#2690`) * **Fix** (@mcp-use/inspector): the Express adapter aborts the upstream stream when the client disconnects during a response (`#2394`) * **Enhancement** (@mcp-use/inspector): the OAuth proxy allows GET to UserInfo endpoints advertised in authorization-server metadata (`#2688`) * **Update**: Updated @mcp-use/inspector to v20.3.14; see the [Inspector changelog](/inspector/changelog) * **Update**: Updated @mcp-use/cli to v4.2.0 * **Update**: Updated @mcp-use/client to v2.4.0 ## View cancellation & client fixes Patch release surfacing host tool cancellation in views, plus browser client and OAuth token expiry fixes. * **Fix** (server): views no longer stay pending when the host cancels the tool call that rendered them. `useToolContext()` switches to `status: "error"` with a new `ToolCancelledError` (exported from `mcp-use/react`) carrying the host's `reason`; a cancellation after a result is still ignored. `ToolContextError` is now `ToolError | ToolCancelledError`, so narrow with `instanceof ToolError` before reading `error.result` (`#2646`) * **Fix** (@mcp-use/client): `ViewRenderer` no longer sends `tool-cancelled` when a tool call made by the view fails; that failure already rejects the view's call (`#2646`) * **Fix** (@mcp-use/client): `BrowserMCPClient` expands the `capabilities.views` shorthand into the `io.modelcontextprotocol/ui` extension and forwards `roots` and `defaultRequestOptions` to the connector, matching the Node client (`#2476`) * **Fix** (@mcp-use/client): `getOAuthTokenExpiry` reads the JWT `exp` claim from Base64URL payloads containing `-` or `_`, which previously fell back to `expires_in`; the `authTokens.expires_at` docs now say milliseconds (`#2660`) * **Documentation** (@mcp-use/agent): `RunOptions.messages` is documented as native-agent only; the LangChain agent ignores it, so pass prior messages through `externalHistory` (`#2658`) * **Documentation**: the v2 migration guide shows a temporary middleware rewrite so ChatGPT apps that cached v1 widget URIs (`ui://widget/…`) can still read Views served at `ui://views/…` until the app is resubmitted (`#2668`) * **Update**: Updated @mcp-use/inspector to v20.3.13; see the [Inspector changelog](/inspector/changelog) * **Update**: Updated @mcp-use/cli to v4.1.17 Release 2.7.0 ## Mixed authentication Minor release serving public, optional, and sign-in tools from one OAuth-enabled endpoint in Claude and ChatGPT, plus an OAuth provider setup hook. * **New** (server): `mixedAuth: true` lets clients connect and list tools, resources, and prompts without a token; it requires an `oauth` provider and makes nothing public on its own. See [Mixed authentication](/v2/typescript/server/authentication/mixed-auth) (`#2630`) * **New** (server): tools accept a `securitySchemes` field in the shape ChatGPT reads on `tools/list`: `[{ type: "noauth" }]` (public), `[{ type: "noauth" }, { type: "oauth2", scopes }]` (optional), or `[{ type: "oauth2", scopes }]` (sign-in with extra scopes); omitting it means sign-in with the provider's `requiredScopes`. The new `ToolSecurityScheme` type describes the entries (`#2630`) * **New** (server): a tool's `ctx.auth` is typed from its literal `securitySchemes`: required when the tool needs sign-in, possibly `undefined` when it accepts `noauth` (`#2630`) * **New** (server): refused calls are answered before the callback runs, as HTTP `401`/`403` with `WWW-Authenticate` for Claude and spec clients, or as an `isError` result with `_meta["mcp/www_authenticate"]` for ChatGPT; invalid or expired tokens always get `401`, even on public tools (`#2630`) * **Enhancement** (server): on a `mixedAuth` server, resources, resource templates, and prompts always require sign-in, while every tool's view loads signed out so ChatGPT can read views during app creation; tool results stay gated (`#2630`) * **Enhancement** (server): tools advertise their resolved `securitySchemes` on `tools/list`, top level and in `_meta.securitySchemes`; a hand-written `_meta.securitySchemes` passes through unenforced, with a warning on `mixedAuth` servers or when it differs from the declared field. `oauth2` scopes also work without `mixedAuth`, adding to the endpoint-wide requirement (`#2630`) * **New** (server): `oauthCustomProvider` accepts an optional synchronous `setup(host)` hook that runs once at mount to install `mcp:` middleware, register provider-owned tools, resources, resource templates, and prompts, validate app tools with `listTools()`, and rewrite instructions; `host.mixedAuth` reports signed-out access. A failed or async hook fails the mount. `OAuthProviderHost` is exported from `mcp-use/oauth` (`#2405`) * **Fix** (server): `ThemeProvider` no longer remounts the view when the display mode switches between inline and fullscreen or pip, so local state and `useCallTool` results survive (`#2641`) * **Fix** (@mcp-use/cli): `screenshot` rejects `--width` and `--height` values Chrome cannot use (`#2617`) * **Documentation**: new Mixed authentication guide and `setup` hook docs for custom providers; the `mixed-oauth` example now uses `mixedAuth` and `securitySchemes`, covers every scheme shape, and runs behind `mcp-use dev --tunnel` for testing in Claude and ChatGPT (`#2630`, `#2405`) * **Update**: Updated @mcp-use/inspector to v20.3.12; see the [Inspector changelog](/inspector/changelog) * **Update**: Updated @mcp-use/cli to v4.1.16 Release 2.6.0 ## TanStack Start integration Minor release adding Vite-powered MCP servers in TanStack Start, along with client, CLI, scaffold, and documentation updates. * **New** (server): `mcp-use/vite`, `mcp-use/tanstack-start`, and `mcp-use/tanstack-start/vite` mount an MCP server in a TanStack Start route; a dedicated Vite environment reloads server code, skills, and views during development and builds deployable assets for production (`#2517`) * **Fix** (server): the landing page hides the public chat button until public chat is available (`#2612`) * **Fix** (server): Vite integration base-path validation handles long paths with repeated slashes without slow regex matching * **Fix** (@mcp-use/client): sibling inline widgets preserve each other's fullscreen and picture-in-picture document state, and MCP App iframes remain transparent in dark hosts (`#2454`, `#2610`) * **Fix** (@mcp-use/cli): `whoami` uses the account's default organization when none is selected locally, and whitespace around `skills.directory` no longer breaks skill discovery (`#2570`, `#2597`) * **Fix** (create-mcp-use-app): template tsconfigs load Node types explicitly so new projects typecheck with TypeScript 7 (`#2595`) * **Documentation**: new cookbook recipes cover Daytona code execution, Next.js, Upstash rate limiting, Sentry error tracking, and TanStack Start; examples also show A2UI generative views (`#2513`, `#2515`, `#2564`, `#2566`, `#2572`, `#2518`) * **Update**: release CI checks SDK changesets and changelog entries (`#2579`) * **Update**: Updated @mcp-use/inspector to v20.3.11; see the [Inspector changelog](/inspector/changelog) * **Update**: Updated @mcp-use/cli to v4.1.15 * **Update**: Updated create-mcp-use-app to v2.0.7 ## Scrollable Inspector app results Patch release keeping tall MCP App tool results accessible in Inspector. * **Fix** (@mcp-use/inspector): tall MCP App results scroll within the tool result panel; see the [Inspector changelog](/inspector/changelog) (`#2598`) * **Update**: Updated @mcp-use/inspector to v20.3.10 * **Update**: Updated @mcp-use/cli to v4.1.14 ## Agent step limits & client progress routing Patch release fixing per-call agent budgets and SDK notification handling, with Inspector cloud model selection improvements. * **Fix** (@mcp-use/agent): `maxSteps` passed to `run`, `stream`, or `streamEvents` limits model calls for that invocation while preserving the constructor default for later calls (`#2437`) * **Fix** (@mcp-use/client): progress and cancellation notifications reach the SDK handlers with all required arguments; progress stays associated with the correct call across concurrent requests and multi-round retries (`#2548`) * **Update** (@mcp-use/agent): `MCPServerConfig.auth_token` is deprecated but retained for type compatibility; use `authToken` to send an authentication token (`#2486`) * **Fix** (@mcp-use/inspector): managed chat uses the selected model's branding and a curated cloud provider picker; see the [Inspector changelog](/inspector/changelog) (`#2575`, `#2576`) * **Update** (server): update Hono to `^4.13.5` and Next.js to `^16.3.3` (`#2492`, `#2495`) * **Update**: the TypeScript workspace no longer installs Husky Git hooks; contributors must run formatting and lint checks manually (`#2582`) * **Update**: Updated @mcp-use/inspector to v20.3.9 * **Update**: Updated @mcp-use/cli to v4.1.13 Release 2.5.0 ## Public chat CTA Minor release adding a landing-page chat button plus client, CLI, and agent lifecycle fixes. * **New** (server): the HTML landing page shows a “Go to chat” button when public chat is ready (`#2496`) * **Fix** (server): proxied `resources/list` keeps upstream `annotations` and `_meta` (`#2469`) * **Fix** (server): a malformed `createJwtVerifier` `resource` option throws `TypeError` at startup instead of reporting `invalid_token` (`#2412`) * **Fix** (@mcp-use/client): concurrent connect and disconnect calls are coalesced; a later disconnect cancels in-flight reconnects (`#2458`) * **Fix** (@mcp-use/client): `useMcp` stabilizes `clientInfo` and `proxyConfig` dependencies so parent re-renders do not reconnect (`#2403`) * **Fix** (@mcp-use/client): `ViewRenderer` removes the sandbox listener and cancels the readiness wait on unmount (`#2421`) * **Fix** (@mcp-use/cli): `servers list` validates `--limit` and `--skip` before authenticating so bad pagination is a usage error instead of “Not logged in.” (`#2448`) * **Fix** (@mcp-use/cli): a malformed JSON argument to `client` or `screenshot` is a usage error (exit 2) (`#2444`) * **Fix** (@mcp-use/cli): `--secret` must be passed on every `servers env set` write; omitting it stores the value as non-sensitive (`#2423`) * **Fix** (@mcp-use/tunnel): standalone `mcp-tunnel` defaults `localHostHeader` to `localhost` (`#2456`) * **Fix** (@mcp-use/agent): OpenRouter BYOK requests to OpenAI models use the Responses API (`#2501`) * **Update**: replace the `@mcp-use/ext-apps` package alias with official `@modelcontextprotocol/ext-apps` 2.0.0 (`#2498`) * **Fix** (@mcp-use/inspector): standalone Inspector rebuilds with the agent OpenRouter fix and repaired peer metadata; see the Inspector changelog (`#2504`) * **Documentation** (@mcp-use/cli): CLI reference states that `--secret` must be passed on every `servers env set` write (`#2423`) * **Update**: Updated @mcp-use/inspector to v20.3.8 * **Update**: Updated @mcp-use/cli to v4.1.12 ## AI SDK adapter & stricter CLI deletes Patch release adding a dependency-free Vercel AI SDK adapter and failing CLI deletes when the target does not exist. * **New** (@mcp-use/client): `createAiSdkTools` exposes MCP tools as AI SDK dynamic tools (v5–v7) without adding an AI SDK dependency; example at `packages/client/examples/node/ai-sdk-openai` (`#2441`) * **Fix** (@mcp-use/cli): `servers env unset` and `client remove` fail when the target does not exist instead of printing a success line (`#2411`) * **Documentation**: elicitation samples no longer teach the removed `ctx.elicit` API (`#2409`); custom JWT docs distinguish `aud` from the RFC 8707 `resource` request parameter (`#2443`) * **Update**: Updated @mcp-use/inspector to v20.3.7 * **Update**: Updated @mcp-use/cli to v4.1.11 ## Publish artifact preservation Patch release keeping package builds intact while npm pack runs. * **Fix**: concurrent publishing no longer drops the Client build while its tarball is created, and packed artifacts are checked for declared files and entry points (`#2428`) * **Update**: Updated @mcp-use/inspector to v20.3.6 ## OAuth loopback recovery & scaffold help Patch release recovering Node OAuth after a failed loopback bind, dropping a dead scaffold flag, and fixing Inspector chat widget connections. * **Fix** (@mcp-use/client): Node OAuth rebinds the loopback listener after a failed bind instead of hanging until `authTimeoutMs` (`#2393`) * **Fix** (create-mcp-use-app): help no longer lists `--no-git`; scaffolding has not initialized a git repository since #820 (`#2392`) * **Fix** (@mcp-use/inspector): chat MCP Apps use the registered connection id while keeping the logical server id for chat state and storage; see the Inspector changelog (`#2404`) * **Update**: Updated @mcp-use/inspector to v20.3.5 * **Update**: Updated @mcp-use/cli to v4.1.10 * **Update**: Updated create-mcp-use-app to v2.0.6 Release 2.4.0 ## Convex OAuth provider Minor release adding a built-in Convex verifier, failing screenshots on MCP App init errors, and stopping client OAuth retries after disconnect. * **New** (server/oauth): `oauthConvexProvider` verifies Convex OAuth Provider JWTs and exports from `mcp-use/oauth/convex` (`#2372`) * **Fix** (@mcp-use/client): OAuth authorization retries stop after the client disconnects (`#2367`) * **Fix** (@mcp-use/client): `listAllResources` holds one client reference across pagination so a mid-list disconnect surfaces the transport error instead of `TypeError` (`#2387`) * **Fix** (@mcp-use/cli): `mcp-use screenshot` fails with `view_load_failed` instead of writing a PNG when the MCP App fails to initialize (`#2355`) * **Enhancement** (@mcp-use/inspector): RPC traffic shows request duration instead of wall-clock time; see the Inspector changelog (`#2364`) * **Enhancement** (@mcp-use/inspector): embedded client-side chats can configure up to 100 agent steps; see the Inspector changelog (`#2401`) * **Documentation**: Convex provider guide under v2 TypeScript authentication (`#2372`) * **Documentation** (@mcp-use/cli): CLI reference corrections for org use, `logout --yes`, `deployments`, `client remove --json`, and removal of non-existent deploy flags (`#2376`, `#2379`, `#2380`, `#2382`) * **Update**: Updated @mcp-use/inspector to v20.3.4 * **Update**: Updated @mcp-use/cli to v4.1.9 ## Compact request logs & OAuth-ready tokens Patch release collapsing MCP request logs to one line, projecting React OAuth tokens before ready, and using native Windows file watching in `mcp-use dev`. * **Enhancement** (server): request logs collapse to one compact line per HTTP request (`tools/call greet /mcp 200 client=… 12ms`); default `info` omits payloads, `debug`/`trace` add detail, and colocated `mcp-use dev` prefixes server lines with `[server]` (`#2351`) * **Fix** (@mcp-use/client): `useMcp` exposes OAuth `authTokens` in the same render that marks an authenticated connection as ready (`#2358`) * **Fix** (@mcp-use/cli): `mcp-use dev` uses Vite's native file watching on Windows instead of 100ms polling, so an edit during startup is not swallowed as the watch baseline (`#2338`) * **Enhancement** (@mcp-use/inspector): JSON-RPC traffic rows show response latency in the timing column; see the Inspector changelog (`#2349`) * **Documentation** (@mcp-use/cli): published package README so the npm page is no longer blank (`#2350`) * **Update**: Updated @mcp-use/inspector to v20.3.3 * **Update**: Updated @mcp-use/cli to v4.1.8 ## Safer session replacement & scaffolds Patch release cleaning up replaced client sessions, fresh-project validation, and scaffold guidance. * **Fix** (@mcp-use/client): `MCPClient.createSession()` disconnects an existing session before replacing it, preventing unreachable stdio children and HTTP sessions from remaining open (`#1964`) * **Fix** (@mcp-use/cli): binding validation no longer loads the React Vite plugin for projects without views, eliminating first-build dependency-resolution warnings in fresh `mcp-server`, `blank`, and `starter` projects (`#2307`) * **Fix** (create-mcp-use-app): scaffold output sends its “Learn more” link to `docs.mcp-use.com` instead of Manufact dashboard documentation (`#2328`) * **Enhancement** (@mcp-use/inspector): chat warns when a server exceeds the documented 128-tool limit for OpenAI or Gemini models; see the Inspector changelog (`#2333`) * **Update**: Updated @mcp-use/inspector to v20.3.2 * **Update**: Updated @mcp-use/cli to v4.1.7 * **Update**: Updated create-mcp-use-app to v2.0.5 ## Claude view compatibility & request diagnostics Patch release restoring Claude's resource-domain contract, exposing prompt request controls, and making Inspector RPC responses easier to diagnose. * **Fix** (server/views): `resources/read` rewrites authored view domains to the stable SHA-256-based `*.claudemcpcontent.com` domain expected by Claude clients, using per-request client identity with a legacy `User-Agent` fallback while leaving other clients and `resources/list` unchanged (`#2326`) * **Enhancement** (@mcp-use/client): prompt reads accept MCP `RequestOptions` through both `MCPClientSession.getPrompt` and the underlying connector (`#2302`) * **Enhancement** (@mcp-use/inspector): JSON-RPC response rows show the correlated request method and elapsed time and flag error responses; see the Inspector changelog (`#2303`) * **Update**: Updated @mcp-use/inspector to v20.3.1 * **Update**: Updated @mcp-use/cli to v4.1.6 ## Responsive server URLs & reusable connection settings Patch release keeping long landing-page URLs contained and exposing Inspector connection controls for embedded consumers. * **Fix** (server): long MCP server URLs truncate inside the landing-page hero on narrow viewports while remaining available through the copy button (`#2313`) * **Enhancement** (@mcp-use/inspector): export `ConnectionSettingsForm`, `useConnectionFormState`, connection configuration types, and optional consumer URL validation from `@mcp-use/inspector/client`; see the Inspector changelog (`#2319`) * **Update**: Updated @mcp-use/inspector to v20.3.0 Release 2.3.0 ## Scalekit OAuth provider Minor release adding a built-in Scalekit verifier and improving Inspector chat usage and session isolation. * **New** (server/oauth): `oauthScalekitProvider` validates environment-root and resource-scoped issuers, binds the JWT audience to the Scalekit `res_…` resource identifier, and advertises Dynamic Client Registration and Client ID Metadata Document support (`#2272`) * **Fix** (@mcp-use/inspector): Anthropic cache-creation tokens survive usage aggregation and Inspector traces without double-counting OpenAI cache reads; see the Inspector changelog (`#2127`) * **Fix** (@mcp-use/inspector): chat state, persistence, streaming, and OAuth retry are isolated by session so **New Chat** can start while another session is streaming; see the Inspector changelog (`#2232`) * **Update**: Updated @mcp-use/inspector to v20.2.5 ## Workspace package alignment Patch release aligning the published workspace dependency versions. * **Update**: Updated @mcp-use/inspector to v20.2.4 * **Update**: Updated @mcp-use/cli to v4.1.5 ## Inspector protocol selection Patch release exposing protocol version controls in Inspector connections. * **Enhancement** (@mcp-use/inspector): connection setup and settings expose MCP protocol version selection and make configuration options easier to find; see the Inspector changelog * **Update**: Updated @mcp-use/inspector to v20.2.3 ## Workspace package alignment Patch release aligning the published workspace dependency versions. * **Update**: Updated @mcp-use/inspector to v20.2.2 * **Update**: Updated @mcp-use/cli to v4.1.4 ## OAuth protected-resource compatibility Patch release accepting secure parent-path resource metadata in OAuth discovery. * **Fix** (auth): protected-resource metadata may identify a same-origin, segment-aware parent of the MCP endpoint, matching the official MCP TypeScript SDK while still rejecting unsafe resource values * **Update**: Updated @mcp-use/inspector to v20.2.1 * **Update**: Updated @mcp-use/cli to v4.1.3 Release 2.2.0 ## Custom OAuth verification & remote development Minor release exporting JWT verification primitives and making remote MCP App development more reliable. * **New** (server/oauth): export `createJwtVerifier`, `JwtVerifierOptions`, and `VerifiedPayload` from `mcp-use/oauth` for custom OAuth providers * **Fix** (server): restore zero-config OAuth provider setup through `MCP_USE_OAUTH_*` environment variables while preserving explicit overrides * **Fix** (@mcp-use/cli): route Vite assets and HMR through the configured public MCP origin, pre-bundle view runtime dependencies and Zod, and ignore managed dev-server logs so remote views mount and update reliably * **Enhancement** (@mcp-use/inspector): embedded Chat exposes CSP mode and audit commands and ships the canonical Inspector style contract; see the Inspector changelog * **Fix** (create-mcp-use-app): canary scaffolds install canary SDK and skill sources instead of falling back to stable branches * **Update**: Updated @mcp-use/inspector to v20.2.0 * **Update**: Updated @mcp-use/cli to v4.1.2 * **Update**: Updated create-mcp-use-app to v2.0.4 ## Mixed-auth recovery & scaffold names Patch release supporting optional OAuth without blocking anonymous MCP connections and fixing generated npm package names. * **Enhancement** (auth): detect mixed-auth servers without blocking anonymous connections, resume protected operations through the official SDK OAuth flow, and preserve multiple `Set-Cookie` headers through the Node bridge * **Fix** (auth): recover optional OAuth discovery and CLI login after transient failures, keep ready React connections stable, and avoid reporting user-cancelled Inspector tool calls as failures * **Fix** (server): disable reverse-proxy buffering for open-ended MCP SSE responses so subscription acknowledgements are delivered immediately * **Fix** (create-mcp-use-app): sanitize named projects into valid npm package names, including quoted names and names beginning with underscores * **Enhancement** (@mcp-use/inspector): mixed-auth tool calls pause for authentication and resume the same chat turn; see the Inspector changelog * **Update**: Updated @mcp-use/inspector to v20.1.1 * **Update**: Updated @mcp-use/cli to v4.1.1 * **Update**: Updated create-mcp-use-app to v2.0.3 Release 2.1.0 ## Skills over MCP & v2 server tooling Minor release adding experimental Skills over MCP authoring to the v2 server and completing the package split around the standalone CLI and Inspector. * **Fix**: MCP v2 server responses preserve tool JSON Schema dialects and accept input-required prompt results (`#2147`) * **Fix**: Modern connections remain ready when optional upstream identity metadata is absent, while anonymous direct-proxy upstreams report a clear namespace error * **New**: Experimental Skills over MCP authoring discovers `skills/`, supports explicit disable and directory configuration, SEP-2640 resource methods, development reloads, and build-time embedding * **New**: Authenticated WebSocket tunneling is published as a standalone package and bundled into `mcp-use dev/start --tunnel`, with bounded HTTP, streaming, MCP JSON-RPC, and public WebSocket forwarding * **Enhancement**: `mcp-use dev` reconciles server and v2 view changes as coherent project generations, so stale reload candidates cannot replace the active handler or publish outdated catalogs * **Update** (@mcp-use/cli): CLI implementation and tests now live in `@mcp-use/cli` while preserving the `mcp-use` command and server API; Windows path handling and bundled SDK/license packaging are covered * **Enhancement** (@mcp-use/cli): Skills over MCP discovery in Inspector filters invalid skills from fresh development snapshots * **Fix**: Next.js Turbopack builds resolve the Skills over MCP loader correctly (`#2197`) * **Enhancement** (@mcp-use/inspector): typed Skills operations, a capability-gated file explorer with integrity verification, the `window.openai` compatibility bridge, and related runtime fixes; see the Inspector changelog * **Fix** (create-mcp-use-app): clear unused TypeScript export surface flagged by Knip without changing published package entry APIs * **Update**: Updated @mcp-use/inspector to v20.1.0 * **Update**: Updated @mcp-use/cli to v4.1.0 * **Update**: Updated create-mcp-use-app to v2.0.2 ## Stable npm README links Patch release fixing absolute links in the published package documentation. * **Fix**: README images and repository links use stable absolute URLs so npm renders the published package documentation correctly * **Update**: Updated @mcp-use/inspector to v20.0.4 ## Stable package README metadata Patch release making the published package README reliable on npm. * **Fix**: Publish a package-root README and verify that it stays synchronized with the repository README before packing * **Update**: Updated @mcp-use/inspector to v20.0.3 ## Safer Inspector proxy & clearer CLI feedback Patch release hardening hosted Inspector proxy defaults and making successful CLI commands visible. * **Fix** (@mcp-use/inspector): embedded and hosted Inspector mounts block loopback OAuth proxy targets by default; standalone local development keeps loopback access unless running in production * **Enhancement** (@mcp-use/cli): `mcp-use start --with-inspector` prints the mounted Inspector URL, and successful `mcp-use typecheck` runs print a completion message with elapsed time * **Update**: runtime and bundled dependencies use patched stable releases with tightened transitive resolutions * **Update**: Updated @mcp-use/inspector to v20.0.1 * **Update**: Updated @mcp-use/cli to v4.0.1 Release 2.0.0 ## MCP SDK v2 & server tooling Major release migrating the TypeScript stack to the official MCP SDK v2 and introducing the v2 server, views, CLI, and scaffold architecture. * **Update**: The client and agent stack moves to the official MCP SDK v2, with automatic protocol negotiation, redesigned OAuth handling, ESM-only packages, a Node.js 22.22.2+ floor, and removal of v1 API aliases * **New**: The v2 server exposes a fetch-native Hono surface with typed MCP middleware, observers, CORS, OpenAPI generation, a Next.js adapter, request-scoped helpers, and production `build`/`start` tooling * **New**: The v2 views runtime adds typed `ToolRef`/`useCallTool` registration, file-based views, external or inline assets, shared React runtime handling, and managed Inspector integration * **Enhancement** (@mcp-use/cli): the CLI becomes ESM, adds `client connect --negotiate`, automatic client SDK installation, `mcp-use typecheck`, device-code login, and production tunneling * **Enhancement** (create-mcp-use-app): v2 templates use `mcp-server`, `views/`, `mcp-env.d.ts`, Bun-aware installs, and opt-in source maps while retaining the `starter` template as a deprecated alias * **Enhancement** (@mcp-use/inspector): the v2 Inspector adds project-pinned relay/OAuth tooling, hosted and local chat, immutable CDN assets, and MCP Apps/fullscreen improvements; see the Inspector changelog * **Update**: Updated @mcp-use/inspector to v20.0.0 * **Update**: Updated @mcp-use/cli to v4.0.0 * **Update**: Updated create-mcp-use-app to v2.0.0 ## Proxied OAuth fallback & token refresh Last v1 patch before 2.0.0. Ships the unpublished 1.34.4/1.34.5 canary fixes on the `mcp-use@1.34.6` tag. * **Fix**: default `useMcp` auto-proxy fallback uses `https://inspector.manufact.com/inspector/api/proxy` instead of the retired `inspector.mcp-use.com` host, whose 301 broke CORS preflight * **Fix**: refresh expiring OAuth access tokens with the discovered protected-resource URL, retain rotated refresh tokens, and do not reuse an expired token after refresh fails * **Fix**: proxied browser OAuth resource validation succeeds, and discovery failures surface immediately instead of waiting for a popup timeout * **Documentation**: CLI client example and Inspector README drop dead documentation links * **Update**: Updated @mcp-use/inspector to v12.0.6 * **Update**: Updated @mcp-use/cli to v3.6.7 ## Tunneling docs link Patch release fixing the tunnel popover documentation link. * **Documentation** (@mcp-use/inspector): the tunnel popover now links to `https://mcp-use.com/docs/tunneling` instead of the removed Manufact URL * **Update**: Updated @mcp-use/inspector to v12.0.3 * **Update**: Updated @mcp-use/cli to v3.6.4 ## Backend-less Inspector CDN shell Patch release improving the Inspector bundle used by the SDK v2 backend-less shell. * **Fix** (@mcp-use/inspector): CDN auto-connect reads the URL injected by the SDK v2 shell, while the version badge and MCP `clientInfo` fall back to the compile-time bundle version when runtime injection is absent * **Update**: Updated @mcp-use/inspector to v12.0.2 * **Update**: Updated @mcp-use/cli to v3.6.3 ## Hosted OAuth discovery through the proxy Patch release fixing the Authenticate button on gateway-hosted OAuth servers when MCP traffic is proxied for CORS. * **Fix** (auth): `BrowserOAuthClientProvider` re-anchors proxy-origin `.well-known` OAuth discovery onto the actual MCP server. When MCP is tunneled through the inspector/gateway proxy, the SDK derived discovery URLs from the proxy origin whenever no `WWW-Authenticate` hint was available (SSE transport, token refresh) — discovery failed on the proxy origin and the server was misclassified as "does not support OAuth". Lookups are now rewritten to the server origin (including the RFC 8414 §3.1 / RFC 9728 §3.1 path-insertion form), so MCP traffic can stay behind the proxy while OAuth still resolves (`#1843`) * **Update**: Updated @mcp-use/inspector to v12.0.1 * **Update**: Updated @mcp-use/cli to v3.6.2 Release 1.34.0 ## OAuth proxy URL & hosted auth reliability Minor release wiring `oauthProxyUrl` for transparent OAuth-only proxying and fixing false "Server does not support OAuth" failures on gateway-hosted servers. * **New** (react): `UseMcpOptions.oauthProxyUrl` routes OAuth discovery, DCR, and token exchange through a transparent server-side proxy while MCP traffic stays direct — takes precedence over the URL derived from `proxyConfig.proxyAddress`, preserves RFC 8414 issuer validation, and fixes gateway-fronted servers where proxying MCP anchored OAuth discovery on the wrong origin (`#1840`) * **Fix** (react): when OAuth discovery already succeeded and `preventAutoAuth` is set, a later failure (token refresh, SSE fallback, metadata probe on transport origin) surfaces `pending_auth` with the Authenticate button instead of `failed` / "Server does not support OAuth" (`#1840`) * **Enhancement** (@mcp-use/inspector): picks up mcp-use v1.34.0 OAuth fixes — see inspector changelog * **Update**: Updated @mcp-use/cli to v3.6.1 * **Update**: Updated @mcp-use/inspector to v12.0.0 Release 1.33.0 ## MCP Apps runtime, Auto connections & monorepo deploy triggers Minor release making MCP Apps the primary widget runtime (with an Apps SDK compatibility fallback), enforcing `outputSchema` at the tool return position, adding monorepo auto-deploy controls to the CLI, and improving Inspector connection fallback behavior. Inspector ships major v11.0.0 (see inspector changelog). * **New** (react): MCP Apps is now the primary widget runtime — `useWidget` connects the MCP Apps bridge in any hosted iframe (including ChatGPT) and applies host context style variables, while `window.openai` is kept for extension APIs such as file upload/download (`#1739`) * **Fix** (react): widgets on Apps SDK-only hosts no longer hang on the loading spinner — `useWidget` falls back to `window.openai` data and actions when the MCP Apps bridge does not connect, and a connected bridge still takes priority (`#1794`) * **Fix** (react/auth): OAuth proxy fetch is scoped to the selected server's provider instead of mutating global `fetch`, so Via Proxy connections no longer affect Direct connections or unrelated requests (`#1770`) * **Fix** (react): automatic proxy fallback applies the runtime proxy config before deriving gateway URLs and headers, so fallback retries route through the configured Inspector proxy (`#1795`) * **New** (server): a tool's `outputSchema` is now type-checked at the return position — returning a shape that does not match is a compile-time error, while content-only helpers (`text()`, `markdown()`, `image()`, …) stay allowed; the Apps SDK adapter auto-derives `openai/widgetDescription` from the widget description (`#1772`) * **Enhancement** (connectors): the `stdio` connector exposes a `cwd` argument for the spawned server process (`#1785`) * **New** (@mcp-use/cli): monorepo auto-deploy trigger config — `mcp-use deploy` gains `--watch-paths` and `--wait-for-ci`, and `servers update` gains `--watch-paths`, `--deploy-branches`, `--wait-for-ci` / `--no-wait-for-ci`, and `--root-dir`; `servers get` / `update` print the effective trigger config (`#1793`) * **Enhancement** (@mcp-use/cli): `deploy` surfaces the GitHub App installation URL up front when the app is not connected or lacks repo access, and exits cleanly in non-interactive contexts instead of hanging on a prompt (`#1761`) * **Fix** (@mcp-use/cli): `deployments list` preserves the API's ordering instead of re-sorting by creation date client-side (`#1752`) * **Fix** (@mcp-use/cli): Codex skills install to `.agents/skills` instead of the unsupported `.agent/skills` path (`#1756`) * **New** (create-mcp-use-app): the `starter` and `mcp-apps` templates score 100% on the publishing checklist — tools declare a `title` and `outputSchema` and return matching `structuredContent` (`#1772`) * **Enhancement** (@mcp-use/inspector): new connections default to Auto mode, trying Direct first and falling back to the configured proxy when browser connection errors can be resolved through the proxy; see inspector changelog (`#1795`) * **Documentation** (@mcp-use/cli): the new monorepo deploy flags are documented in the CLI reference, deployment guide, and package README (`#1793`) * **Update**: Bumped `hono` to 4.12.25 (`#1755`) and `vite` to 8.0.16 (`#1742`) * **Update**: Updated @mcp-use/cli to v3.6.0 * **Update**: Updated create-mcp-use-app to v0.14.17 * **Update**: Updated @mcp-use/inspector to v11.0.0 ## OAuth proxy callbacks, deploy fixes & hosted localhost chat Patch release for OAuth proxy callback routing, server notification logs, dev-widget noise reduction, and CLI deploy/env fixes. Inspector ships v10.0.1 with hosted-localhost chat fallback and a chat scroll helper (see inspector changelog). * **Fix** (server/oauth): OAuth proxy mode brokers the upstream provider callback through the server's own `/oauth/callback`, so providers only need one registered redirect URI per server while MCP clients keep their own redirect URI and state (`#1728`) * **Fix** (server/oauth): OAuth metadata discovery now mounts the RFC 8414 canonical `/.well-known/oauth-authorization-server{issuer-path}` route for authorization servers with path-suffix issuers (`#1684`) * **New** (server): outgoing notifications log sent and failed deliveries with session identifiers and error details (`#1674`) * **Fix** (server/widgets): dev mode no longer prints widget mounting, serving, or watcher logs when a project has no widgets; the watcher still detects widgets created later (`#1730`) * **Enhancement** (@mcp-use/cli): `mcp-use deploy --dockerfile ` selects a non-default Dockerfile relative to `--root-dir` or the repo root while keeping root `Dockerfile` auto-detection (`#1746`) * **Enhancement** (@mcp-use/cli): REPL/interactive tool calls support `--screenshot`, and resource subscription mode unsubscribes cleanly on Ctrl+C (`#1592`, `#1687`) * **Fix** (@mcp-use/cli): sensitive env vars returned without values render as `` and `EnvVariable.value` accepts `null`; remote API calls use the `manufact.com` base URL (`#1717`, `#1745`) * **Fix** (@mcp-use/cli): deploy repo-access checks use the backend's authoritative per-installation repo endpoint, avoiding false "GitHub App cannot access repository" failures on large or multi-installation orgs (`#1737`) * **Update**: Bumped `esbuild` to v0.28.1 (`#1734`) * **Update**: Updated @mcp-use/cli to v3.5.2 * **Update**: Updated @mcp-use/inspector to v10.0.1 Release 1.32.0 ## OAuth token endpoint discovery Minor release exposing the resolved OAuth `token_endpoint` and client credentials on `useMcp().authTokens` so backends can persist everything needed for proactive server-side token refresh. * **New** (auth): `getTokenEndpoint()` on `BrowserOAuthClientProvider` and `OAuthSessionStore` — resolves and caches the OAuth token endpoint via PRM → authorization-server metadata discovery; persisted in storage for consumers (`#1714`) * **New** (auth): `getClientCredentials()` returns stored `client_id` / `client_secret` from Dynamic Client Registration or a static client — most token endpoints require `client_id` on refresh (`#1714`) * **Enhancement** (react): `useMcp().authTokens` includes optional `token_endpoint`, `client_id`, and `client_secret` after auth — best-effort resolution that never blocks the auth flow (`#1714`) * **Update**: Updated @mcp-use/inspector to v10.0.0 ## Servers update & branch-scoped deploy env Patch release for workspace dependency alignment; `@mcp-use/cli` minor adds `servers update` and branch-scoped environment and deploy management. * **New** (@mcp-use/cli): `mcp-use servers update ` mutates server config in place (production branch, name, description, build/start commands) without delete/recreate — preserving the URL slug and env vars; `--branch` maps to `productionBranch`; pass an empty string to `--build-command`/`--start-command` to clear overrides (`#1711`) * **New** (@mcp-use/cli): `deploy --branch ` defaults to the current git branch and scopes `--env`/`--env-file` sync to that branch's preview environment (`#1711`) * **Enhancement** (@mcp-use/cli): `servers env list/add/update/rm` gain `--branch` for branch-scoped variables; `update`/`rm` accept a variable KEY (resolved within the branch scope) in addition to a UUID (`#1711`) * **Enhancement** (@mcp-use/cli): `deployments restart` gains `--branch ` (defaults to the deployment's branch) (`#1711`) * **Documentation** (@mcp-use/cli): `servers update` and branch-scoped deploy/env flags in the package README and mcp-apps-builder deploy skill reference (`#1711`) * **Update**: Updated @mcp-use/cli to v3.5.0 * **Update**: Updated @mcp-use/inspector to v9.0.1 Release 1.31.0 ## OAuth popup reliability & credential lifecycle Minor release fixing browser OAuth popup flows that stranded connections in "Authenticating…", preserving credentials across routine React lifecycle churn, and clarifying platform-managed deploy feedback in the CLI. Inspector ships major v9.0.0 tracking the new peer dependency (see inspector changelog). * **New**: `runAuthPopup()` exported from `mcp-use/auth` — opener-owned popup runner that settles on a `state`-matched postMessage or BroadcastChannel result, popup close, a `storage` event for persisted tokens, or a timeout; close and timeout paths check storage before declaring cancelled so a missed message with landed tokens still succeeds (`#1703`) * **Enhancement**: `runAuthPopup()` keeps message and storage listeners alive for a grace window (default 20s) after `popup.closed` reports true without tokens — tolerates COOP browsing-context-group swaps that sever `window.opener` while the consent window is still open (`#1703`) * **Fix** (react): `useMcp().authenticate()` awaits `runAuthPopup()` and owns every terminal transition — success reconnects, cancelled/timeout return to `pending_auth` (re-enabling Authenticate), error fails the connection instead of hanging indefinitely (`#1703`) * **Fix** (auth): OAuth callback detects popup flow from stored `flowType` (not only `window.name`) and always broadcasts the result; result payloads carry the originating `state` and `serverUrlHash` so listeners scope to the right server and late failures do not clobber an already-`ready` connection (`#1703`) * **Enhancement** (auth): `renderCloseWindowMessage()` accepts an optional `returnUrl` link for tab-mode fallbacks when the popup cannot auto-close (`#1703`) * **Fix** (react): `McpClientProvider.removeServer()` no longer clears OAuth storage by default — pass `{ clearCredentials: true }` for explicit logout; `updateServer()` and `useMcp` unmount no longer wipe credentials on routine lifecycle churn (`#1703`) * **Fix**: move `chalk` from optionalDependencies to dependencies — statically imported by server logging/lifecycle code, so `pnpm install --no-optional` no longer fails at module load (`#1702`) * **Enhancement** (@mcp-use/cli): after `deploy --no-github`, print a note that source lives in a private platform-managed repository and link to the dashboard to view or migrate to GitHub (`#1703`) * **Enhancement** (@mcp-use/cli): `servers get` shows `mcp-use-managed (private)` when the connected repo has no exposed GitHub full name (`#1703`) * **Fix** (@mcp-use/inspector): delete-server passes `{ clearCredentials: true }` on explicit removal — see inspector changelog (`#1703`) * **Update**: Updated @mcp-use/inspector to v9.0.0 * **Update**: Updated @mcp-use/cli to v3.4.2 ## Chalk CJS compatibility Patch release restoring CommonJS startup compatibility for server bundles on Node 22 and newer; Inspector ships v8.0.2 with the same `mcp-use` peer update. * **Fix**: downgrade chalk to v4 — chalk 5 is ESM-only and kept external by tsup, so the CJS bundle's `require("chalk")` on Node 22 and newer returned the module namespace instead of the chalk instance, crashing CJS-built backends (e.g. the Next.js template) on startup with `TypeError: import_chalk.default.gray is not a function` (`#1701`) * **Update**: Updated @mcp-use/inspector to v8.0.2 * **Update**: Updated @mcp-use/cli to v3.4.1 ## Deploy without GitHub, device-code login & widget iframe fixes Patch release for `McpUseProvider` zero-height collapse, `useMcp` disconnect/reconnect race fixes, and clearer not-ready errors; `@mcp-use/cli` minor adds tarball deploy without a user GitHub repo and non-interactive device-code login for web onboarding. * **Enhancement** (@mcp-use/cli): `mcp-use deploy --no-github` packs the local project into a tarball and uploads it to the platform-managed org so first deploy works without connecting GitHub; redeploys of a linked platform-managed server auto-detect from `connectedRepository.isManaged` (`#1691`) * **New** (@mcp-use/cli): `mcp-use login --device-code ` authenticates with a pre-approved OAuth device code for non-interactive flows (web onboarding), skipping the browser step (`#1691`) * **Fix**: `McpUseProvider` with `autoSize` now notifies zero height when a widget renders `null`, so host iframes collapse instead of keeping the last non-zero height (`#1693`) * **Fix** (react): `useMcp` stale `disconnect()` after a URL change or a manual disconnect racing a reconnect no longer nulls `clientRef` or resets hook state to `discovering` when superseded by a newer `connect()` (`connectEpochRef`) — fixes "MCP client is not ready (current state: ready)" and similar races in the inspector and other embeds (`#1528`) * **Fix** (client): `BaseMCPClient.closeSession()` only deletes a session slot when it still references the closing session, so a parallel `createSession()` from a reconnect is not wiped — fixes "No active session found" on the next tool call after reconnect (`#1528`) * **Enhancement** (react): clearer "MCP client is not ready" errors via `formatMcpNotReadyReason`, distinguishing a missing client (`client disconnected`) from a non-ready state (`#1528`) * **Fix** (@mcp-use/inspector): MCP Apps / Apps SDK status labels no longer intercept iframe pointer events - see inspector changelog (`#1694`, `#1678`) * **Documentation**: tip on `` for widgets that conditionally return `null` with `autoSize` * **Documentation**: `deploy --no-github`, `login --device-code`, and dual deploy paths in the CLI reference and Manufact Cloud deployment guide * **Update**: Updated @mcp-use/inspector to v8.0.1 * **Update**: Updated @mcp-use/cli to v3.4.0 Release 1.30.0 ## OpenAPI server generation & MCP instructions Minor release adding `MCPServer.fromOpenAPI()` for generating MCP tools from OpenAPI documents, server-wide `instructions` returned during MCP initialization, idle session ref cleanup, and CLI fixes for paginated cloud lists and multi-installation GitHub repo access. Inspector ships major v8.0.0 tracking the new `mcp-use` peer dependency (see inspector changelog). * **New**: `MCPServer.fromOpenAPI()` - create an MCP server from a parsed OpenAPI document; each included operation registers as a tool with generated input schemas and HTTP request handling (`baseUrl`, bearer token, and static header auth supported); ships with an `openapi` server example against live `api.weather.gov` (`#1583`) * **New**: `instructions` option on `MCPServer` - server-wide model instructions returned during MCP initialization for cross-tool workflows and constraints that do not belong in individual tool descriptions (`#1601`) * **New** (create-mcp-use-app): `starter` and `mcp-apps` templates scaffold with an `instructions` placeholder (`#1601`) * **Fix**: idle session cleanup releases registered refs for expired sessions instead of leaving stale registrations behind (`#1624`) * **Fix**: escape backslashes before double quotes when converting Zod string literals and enums to TypeScript in `zod-to-ts`, so generated `.d.ts` output stays valid when literal values contain `\` or `"` (`#1661`) * **Update**: bump `hono` to `4.12.23` for [CVE-2026-47674](https://github.com/advisories/GHSA-xrhx-7g5j-rcj5) - non-canonical IPv6 forms could bypass static deny rules in the `ip-restriction` middleware (`#1663`) * **Enhancement** (@mcp-use/cli): `servers list` and `deployments list` handle paginated Cloud API responses with a default page size of 30 and next-page guidance (`#1619`) * **Fix** (@mcp-use/cli): deploy repo access check aggregates repos across all GitHub App installations linked to the organization instead of only the first one, so deploys no longer fail with "GitHub App doesn't have access" when the repo belongs to a different installation (`#1629`, MCP-2358) * **Documentation**: OpenAPI server generation guide and `examples/server/features/openapi` (`#1583`) * **Documentation**: MCP server `instructions` in configuration, quickstart, and installation docs (`#1601`) * **Update**: Updated @mcp-use/inspector to v8.0.0 * **Update**: Updated @mcp-use/cli to v3.3.2 * **Update**: Updated create-mcp-use-app to v0.14.15 ## OAuth transport auth hardening & security dependency bumps Patch release hardening OAuth-protected MCP transport routes and resolving open Dependabot security advisories across the TypeScript workspace. * **Fix**: Harden authentication coverage for OAuth-protected MCP transport endpoints and advertise path-scoped protected-resource metadata where required by OAuth clients (`#1628`) * **Update**: Bump `hono` to `^4.12.18` and raise `pnpm.overrides` floors for `axios`, `protobufjs`, `ws`, `uuid`, `fast-uri`, `postcss`, `langsmith`, `dompurify`, `qs`, `react-router`, `better-auth`, and other flagged transitive deps so the lockfile resolves to patched versions within current majors (`#1615`, `#1626`) * **Update**: Updated @mcp-use/inspector to v7.0.1 * **Update**: Updated @mcp-use/cli to v3.3.1 Release 1.29.0 ## Public landing pages and Ollama chat support Minor release adding a public browser landing page for OAuth-protected servers, a Supabase URL override for local/self-hosted instances, Claude UI-resource domain hashing, and a round of OAuth callback and React-provider hardening. Inspector ships a major v7.0.0 with local LLM (Ollama) chat and image tool results (see inspector changelog). * **New**: `publicLandingPage` option on `MCPServer` - keep the browser landing page (`GET` + `Accept: text/html`) reachable without authentication while the MCP endpoint stays OAuth-protected; ships with a `public-landing-page` server example (`#1550`) * **New**: `supabaseUrl` override on `oauthSupabaseProvider` - point the provider at a local or self-hosted Supabase (e.g. `http://localhost:54321`) instead of the hosted `https://${projectId}.supabase.co`; set via the `supabaseUrl` config option or `MCP_USE_OAUTH_SUPABASE_URL`, and `projectId` becomes optional when it is set (`#1517`) * **New**: Claude UI-resource domain hashing - when a Claude client requests a widget/UI resource that declares a `ui.domain`, the server rewrites it to a stable `.claudemcpcontent.com` content domain (`#1599`) * **Breaking**: `mcp-use/browser` no longer exports the LangChain agents (`MCPAgent`, `RemoteAgent`, adapters, observability, AI SDK utils) - they moved to `mcp-use/browser/agent`, so client bundles that only need `MCPClient` no longer pull in `@langchain/*` (`#1580`) * **Fix**: browser OAuth popup callback edge cases in `onMcpAuthorization()` - popups whose `window.opener` was severed by COOP / cross-origin redirects now render an in-place close-window message and broadcast over a same-origin `BroadcastChannel("mcp_auth_callback")` so `useMcp` no longer hangs in `authenticating`; repeat invocations in one page load (HMR, strict-mode double render) reuse a cached promise instead of re-exchanging the code (`#1580`) * **Fix**: redact OAuth token-verification errors from client responses while logging the details server-side (`#1573`) * **Fix**: normalize the issuer trailing slash before appending `/.well-known/oauth-authorization-server` in the DCR-direct metadata proxy, fixing the double-slash 404 against providers like Auth0 (`#1483`) * **Fix**: normalize `0.0.0.0` and `::` to `localhost` in the inspector autoConnect URL so OAuth-protected `mcp-use dev` flows match the published resource metadata and pass the SDK's strict origin check (`#1552`) * **Fix** (react): `McpClientProvider.removeServer` / `updateServer` no longer trigger React's "cannot update a component while rendering a different component" warning - teardown side effects (`disconnect()`, `clearStorage()`) now run after the state updaters instead of inside them (`#1561`) * **Fix** (react): treat `name` as a meaningful change in `McpServerWrapper` so alias-only edits propagate through `onUpdate` and the inspector tile heading updates immediately (`#1539`) * **Fix**: pin published dependency versions in `mcp-use`'s `package.json` (`#1610`) * **New** (@mcp-use/cli): `mcp-use client screenshot` auto-sizes captures to the widget's natural rendered dimensions when `--width`/`--height` are omitted, and now handles external MCP server URIs like `ui://excalidraw/mcp-app.html` (flattened to `-`) that previously broke the preview route (`#1579`) * **Fix** (@mcp-use/cli): widget assets resolve correctly when `MCP_URL` is set at build time - Vite `base` and `window.__getFile` now point at `${MCP_URL}/mcp-use/widgets/{widget}/`, matching the production static route (`#1560`) * **Fix** (create-mcp-use-app): move the `mcp-apps` template's pnpm settings into `pnpm-workspace.yaml` so scaffolded apps install cleanly under pnpm 10 (`#1602`) * **Enhancement** (@mcp-use/inspector): local LLM provider (Ollama) chat, MCP image tool results forwarded as real image content, an MCP-server reconnect banner, and widget fullscreen / display-mode fixes (see inspector changelog) * **Documentation**: clarify the "Inspector: Skipped in production" log and the `start` CLI reference so users rebuild with `mcp-use build --with-inspector` instead of passing the flag to `mcp-use start` (`#1505`) * **Chore**: prune 187 unused exports and delete unused source files flagged by Knip across the workspace, and enforce Knip in CI (`#1511`, `#1476`, `#1510`, `#1512`) * **Update**: Updated @mcp-use/inspector to v7.0.0 * **Update**: Updated @mcp-use/cli to v3.3.0 * **Update**: Updated create-mcp-use-app to v0.14.13 Release 1.28.0 ## Node OAuth & widget screenshot Minor release adding a Node OAuth client provider and widget screenshot improvements. * **New**: `mcp-use/auth/node` entrypoint — `NodeOAuthClientProvider`, `FileKVStore`, the `KVStore` type, and re-exports of the SDK's `auth` and `UnauthorizedError`; the provider owns a localhost OAuth loopback (preferred port 33418, walks up to 33427 on conflict) and persists tokens, client info, and code verifiers to `~/.mcp-use/oauth//` with `0o600` perms and atomic-rename writes (`#1452`) * **Refactor**: `OAuthSessionStore` extracted from `BrowserOAuthClientProvider` — platform-neutral helper parameterised over a `KVStore` that owns token storage, JWT-expiry-driven refresh (with deduplication), client-info validation, code-verifier handling, and authorization-state persistence; the browser provider now delegates the SDK `OAuthClientProvider` methods to it, no behavior change (`#1451`) * **Fix**: `forceRefresh()` now actually exchanges the refresh token via `OAuthSessionStore.forceRefresh()` instead of zeroing `access_token` and re-reading via `tokens()` (which gated the refresh path on a truthy `access_token` and silently returned stale tokens); the loopback failure page also HTML-escapes `error` and `error_description` (`#1452`) * **Documentation**: `MCPServer.tool()` JSDoc `@example` blocks now include the matching `import { ... } from "mcp-use/server"` line and name the response helpers (`text`, `object`, `image`, `markdown`, `html`, `error`, `widget`, …); the `create-mcp-use-app` blank template's commented tool/resource/prompt blocks gain the same import breadcrumbs (`#1474`) * **Fix** (@mcp-use/cli): tests no longer touch the developer's real `~/.mcp-use` directory — `session-storage.test.ts` mocks `node:os.homedir` and `cli-integration.test.ts` spawns the CLI with `HOME`/`USERPROFILE` set to per-test temp dirs (`#1494`) * **Update** (@mcp-use/cli): rename "mcp-use cloud" to "Manufact cloud" in `mcp-use login --help` and the body banner, matching the existing wording in `logout` and `deploy` (`#1488`) * **Enhancement** (@mcp-use/inspector): new `ViewPreview` component and `/preview/:view` route, dark-mode aware scrollbars (see inspector changelog) * **Fix**: resolved duplicate exports flagged by Knip — annotated the `Tel` alias for `Telemetry` with `@alias`, unified the canonical source path for telemetry exports in `src/telemetry/index.ts` (Node default, tsup substitutes the browser implementation in browser bundles), and removed the redundant default export of `JsonRpcLoggerView` in `@mcp-use/inspector`; named exports unchanged (`#1453`) * **Chore**: drop unused dependencies and devDependencies flagged by `knip` across the workspace; declare `jsdom` and `@vitest/coverage-v8` as explicit devDependencies on `mcp-use` (`@vitest/coverage-v8` pinned to `~4.0.18` to match `vitest`) (`#1458`, `#1454`) * **Documentation**: refreshed CLI references in the docs site (`#1488`) * **Update**: Updated @mcp-use/inspector to v6.0.0 * **Update**: Updated @mcp-use/cli to v3.2.0 * **Update**: Updated create-mcp-use-app to v0.14.12 ## ChatGPT App metadata & inspector MCP App width fix Patch release surfacing tool `outputSchema` in `tools/list`, adding tool annotations and `outputSchema` to the `create-mcp-use-app` mcp-apps template, and fixing MCP App width in inspector chat. * **Fix**: Forward `outputSchema` from tool definitions into the MCP SDK so `tools/list` exposes output JSON Schema for clients - required for ChatGPT App Store metadata validation (`#1466`) * **New** (create-mcp-use-app): MCP tool `annotations` (`readOnlyHint`, `openWorldHint`, `destructiveHint`) and widget `outputSchema` in the `mcp-apps` template; tool annotations in the `starter` template; MCP Apps docs aligned with ChatGPT App Store metadata expectations (`#1466`) * **Fix** (@mcp-use/inspector): MCP App width is pinned in chat - only height responds to widget-reported sizes, so the chat panel no longer collapses when a widget reports narrower content (`#1462`) (see inspector changelog) * **Documentation**: Clerk and WorkOS OAuth example READMEs now link to live pages - Clerk Dashboard `/sign-in` (200 instead of 404) and WorkOS `/docs/authkit` (`#1470`) * **Update**: Updated @mcp-use/inspector to v5.0.1 * **Update**: Updated @mcp-use/cli to v3.1.4 * **Update**: Updated create-mcp-use-app to v0.14.11 Release 1.27.0 ## Clerk OAuth, pre-registered client IDs & inspector providers Minor release adding a Clerk OAuth provider, pre-registered OAuth client credentials for proxy-mode flows, OpenRouter and OpenAI-compatible providers in the Inspector chat, browser-side telemetry env-var honoring, and a CLI fix for env propagation on redeploys. * **New**: `oauthClerkProvider` for using Clerk as an OAuth authorization server in MCP servers - DCR-direct mode where MCP clients register and authenticate directly with Clerk and the server verifies Clerk-issued JWTs via JWKS; default scopes are `["profile", "email", "offline_access"]` and `openid` is excluded by default because it requires OIDC to be explicitly enabled in the Clerk Dashboard (`#1429`) * **New**: Pre-registered OAuth client credentials in proxy mode - `UseMcpOptions` / `McpServerOptions` accept `oauth: { clientId?, clientSecret?, scope? }`; with `clientId` set, `BrowserOAuthClientProvider` returns it from `clientInformation()` so the SDK skips Dynamic Client Registration (required for providers like Slack or WorkOS that strip `registration_endpoint` from metadata); with `clientSecret` set, the SDK auto-switches token-endpoint auth from `none` to `client_secret_basic`/`client_secret_post` (`#1400`) * **Fix**: `MCP_USE_ANONYMIZED_TELEMETRY=false` now disables the in-browser `useMcp` `posthog-js` init - the inspector server mirrors the env var into a per-page runtime flag (`window.__MCP_USE_ANONYMIZED_TELEMETRY__`) before the client bundle runs, so a single env var disables every telemetry path (Node-side, server-side proxy, and browser); the flag is page-scoped so unsetting the env var fully restores defaults on the next page load (`#1443`) * **Fix** (@mcp-use/cli): `mcp-use deploy --env`/`--env-file` propagates env vars on redeploys - previously only forwarded on initial server creation, now upserts each entry against the env-variables API (`PATCH` for existing keys, `POST` for new keys) before triggering the deployment (`#1433`) * **Enhancement** (@mcp-use/inspector): OpenRouter and OpenAI-compatible providers in chat configuration; `Client ID` / `Client Secret` / `Scope` fields in the Authentication dialog (see inspector changelog) * **Update**: Updated @mcp-use/inspector to v5.0.0 * **Update**: Updated @mcp-use/cli to v3.1.3 ## Debug log tiers & widget dev first render Patch release adding tiered `MCP_DEBUG_LEVEL` logging for MCP servers, pre-warming Vite widget entries in dev to avoid first-render 504s, and Inspector 3.0.2 (see inspector changelog). * **New**: `MCP_DEBUG_LEVEL` environment variable on MCP servers - `info` (default), `debug`, or `trace` - tiered framework logging with clearer precedence than legacy truthy `DEBUG` (`#1430`) * **Fix**: Widget dev server pre-warms Vite entries before tool registration so the first widget render does not time out with HTTP 504 (`#1425`) * **Fix** (@mcp-use/inspector): Command palette e2e tests updated for the Settings dropdown trigger (`#1428`) (see inspector changelog) * **Update**: Updated @mcp-use/inspector to v3.0.2 * **Update**: Updated @mcp-use/cli to v3.1.2 * **Update**: Updated create-mcp-use-app to v0.14.10 ## OAuth error handling, Supabase endpoints & CLI bundling Patch release fixing OAuth error redirects, Supabase OAuth 2.1 endpoints, CLI bundling for Node ESM, bun build compatibility, `create-mcp-use-app` dot-directory init, and Inspector 3.0.1 (see inspector changelog). * **Fix**: OAuth callback redirects back to the inspector with error parameters when authorization fails (user denies, server error) instead of surfacing a raw error page with stack traces; the inspector surfaces these as a persistent toast (`#1381`) * **Fix**: `SupabaseOAuthProvider` endpoint getters now return OAuth 2.1 paths (`/auth/v1/oauth/authorize`, `/auth/v1/oauth/token`) instead of the legacy `/auth/v1/authorize` and `/auth/v1/token` (`#1422`) * **Fix** (@mcp-use/cli): `mcp-use build` is non-fatal under the bun runtime - detects bun, skips `tsx/esm/api` type-generation with a warning, wraps the build in try/catch, and runs `tsc` via `process.execPath` instead of hardcoded `node` (`#1382`) * **Fix** (@mcp-use/cli): bundle each server entry with esbuild (`bundle: true`, `packages: "external"`) so extensionless relative TypeScript imports resolve under plain Node ESM without `ERR_MODULE_NOT_FOUND` (`#1357`) * **Fix** (create-mcp-use-app): allow `.` as project name to initialize in the current directory; errors if the directory is not empty (`#1413`) * **Enhancement** (@mcp-use/inspector): OAuth single-tab redirect, session-storage reconnect, Hono duck-type detection, widget z-index, free-tier embed UI, managed LLM embed chrome (see inspector changelog) * **Update**: Updated @mcp-use/inspector to v3.0.1 * **Update**: Updated @mcp-use/cli to v3.1.1 * **Update**: Updated create-mcp-use-app to v0.14.10 Release 1.25.0 ## OAuth DCR-direct, Next.js drop-in & CLI 3.1 Minor release refactoring built-in OAuth providers to DCR-direct by default, adding a Next.js MCP drop-in via `--mcp-dir`, CLI 3.1 with better org and session handling, and Inspector 3.0 (see inspector changelog). * **New**: `oauthProxy` helper for building proxy-mode providers (Google, GitHub, or any upstream authorization server that does not support Dynamic Client Registration) - complements the new DCR-direct default (`#1321`) * **New**: `jwksVerifier` helper for JWKS-based token verification inside custom providers (`#1321`) * **New**: Auth0 OAuth proxy example under `examples/server/oauth/auth0-proxy` demonstrating the new proxy pattern * **Update**: Built-in providers (Auth0, WorkOS, Supabase, Keycloak, Better Auth) now only support DCR-direct - clients talk to upstream authorization servers directly, and provider configurations no longer accept `clientId` / `clientSecret` (`#1321`) * **Update**: `verifyToken` is now a required function on custom providers (`#1321`) * **Fix**: OAuth `authenticate()` preserves the pathname component (for example `/api/auth`) when the authorization server uses a `basePath`, instead of collapsing the URL to its origin (`#1360`) * **New**: Next.js drop-in - `mcp-use dev/build/start --mcp-dir ` lets a Next.js app colocate an MCP server (default `src/mcp/`), share `@/*` aliases, Tailwind, and the app's component library; the CLI auto-shims Next.js server-runtime modules (`server-only`, `client-only`, `next/cache`, `next/headers`, `next/navigation`, `next/server`) when `next` is detected, loads the Next.js env cascade in the MCP server process, and widget builds fail fast when a widget transitively imports a server-only module (`#1332`) * **New** (@mcp-use/cli): `mcp-use login --org ` for non-interactive org selection; login fails fast without a TTY and no `--org` instead of hanging on stdin (`#1379`) * **New** (@mcp-use/cli): ORG column in `mcp-use deployments list` output (`#1378`) * **Fix** (@mcp-use/cli): `mcp-use deploy --org ` now respects the flag when `.mcp-use/project.json` links to a server in a different org - CLI warns and creates a new server in the requested org instead of silently redeploying to the linked one (`#1380`) * **Fix** (@mcp-use/cli): `mcp-use login` validates the stored API key against the backend before short-circuiting with "already logged in"; expired or revoked keys drop into device-auth automatically, and authenticated commands (`whoami`, `org`, `servers`, `deployments`, `env`) funnel 401s through a shared handler with a "session expired - run `npx mcp-use login`" hint (`#1383`) * **Fix** (@mcp-use/cli): `mcp-use start` auto-discovers an available port when the default port is in use (`#1377`) * **Enhancement** (@mcp-use/inspector): Inline elicitation in the chat thread, Open Graph and Twitter Card meta tags on the hosted inspector (see inspector changelog) * **Enhancement** (create-mcp-use-app): Only copy the `mcp-apps-builder` skill into new projects; skip the deprecated `mcp-builder` and `chatgpt-app-builder` skills (`#1375`) * **Documentation**: New `oauth-proxy` provider guide and refactored provider pages (Auth0, WorkOS, Supabase, Keycloak, Better Auth, custom); new Next.js drop-in guide; updated CLI reference * **Update**: Updated @mcp-use/inspector to v3.0.0 * **Update**: Updated @mcp-use/cli to v3.1.0 * **Update**: Updated create-mcp-use-app to v0.14.9 ## Landing deeplinks, `colorScheme` & Inspector 2.2 Patch release adding optional `colorScheme` on `McpUseProvider`, a server landing deeplink to the hosted inspector, stronger deploy behavior in `@mcp-use/cli`, cloud server environment-variable commands, and Inspector 2.2 (see inspector changelog). * **New**: `colorScheme` on `McpUseProvider` (default `false`) - when `false`, `ThemeProvider` does not set `color-scheme` on the document root so transparent iframe backgrounds stay transparent; opt in with `true` for native scrollbars / `light-dark()` in widgets * **Fix**: Server landing routes include a deeplink to open the MCP server in the hosted manufact inspector * **New** (@mcp-use/cli): `mcp-use servers env` subcommands to list, create, update, and delete environment variables on cloud servers (`#1372`) * **Fix** (@mcp-use/cli): `mcp-use deploy` surfaces failures from mutating git commands (init, commit, push), normalizes the default branch to `main` before push, verifies a commit exists, and shell-quotes commit messages (`#1354`) * **Update** (@mcp-use/cli): Deploy treats HTTP 401 as an invalid or expired API session and prompts re-authentication instead of misreporting GitHub App connection state (`#1356`) * **Enhancement** (@mcp-use/inspector): Hosted chat configuration, copy/export chat, inspector LLM stack without LangChain, OAuth popup close page, and related UX (see inspector changelog) * **Update**: Updated @mcp-use/inspector to v2.2.0 * **Update**: Updated @mcp-use/cli to v3.0.2 ## OAuth fetch cleanup when switching transports Patch release fixing OAuth in the embedded inspector when switching from Via Proxy to Direct - `BrowserOAuthClientProvider` restores `window.fetch` when `useMcp` unmounts so a stale proxy interceptor cannot break direct flows. * **Fix**: Restore the `window.fetch` interceptor installed by `BrowserOAuthClientProvider` when `useMcp` unmounts - resolves "Protected resource does not match" after switching from Via Proxy to Direct * **Fix** (@mcp-use/inspector): Same fetch lifecycle in the inspector client (see inspector changelog) * **Update**: Updated @mcp-use/inspector to v2.1.0 * **Update**: Updated @mcp-use/cli to v3.0.1 Release 1.24.0 ## OAuth scopes, telemetry & CLI 3 Minor release for `mcp-use` with OAuth scope customization, telemetry, sub-path OAuth routing, and a Generative-AI JSON Schema fix; major `@mcp-use/cli` release with device-flow auth and manufact API alignment; Inspector 2.0 (see inspector changelog). * **New**: Configurable OAuth scopes - `scopesSupported` on shared OAuth config and built-in providers * **Fix**: `CustomProviderConfig` matches documented fields (`jwksUrl`, `scopesSupported`, `userInfoEndpoint`, `clientId`, `clientSecret`, `mode`, `audience`); optional `getClientId()`, `getUserInfoEndpoint()`, and `getAudience()` on `OAuthProvider`; OAuth routes use those accessors instead of unsafe casts * **New**: Telemetry support with browser and Node implementations and related dependency updates * **New**: `defaultCallbackUrl` on `McpClientProvider` so OAuth redirect URLs stay correct when the UI is mounted under a path basename (for example embedded inspector at `/inspector`) * **Fix**: Google provider tool schemas - use `z.object({}).catchall()` instead of `z.record()` so emitted JSON Schema omits `propertyNames`, which Google's API rejects * **Fix**: Windows path handling in server and tooling code paths * **Enhancement**: Several internal log lines moved from info to debug to reduce noise in normal operation * **Fix** (@mcp-use/inspector): OAuth callback URL when the inspector basename is `/inspector`; thinking indicator after streamed assistant messages; tab persistence across refresh (see inspector changelog) * **New** (@mcp-use/cli): Device-flow authentication for login and session refresh against the cloud * **Update** (@mcp-use/cli): CLI refactored to new manufact cloud APIs across deploy, auth, organization, and server commands * **Fix** (@mcp-use/cli): Deployment flow when linking GitHub repositories (`#1331`) * **Update**: Updated @mcp-use/inspector to v2.0.0 * **Update**: Updated @mcp-use/cli to v3.0.0 ## Embedded inspector without LangChain Patch release fixing embedded inspector when the agent graph is not installed, and clearer diagnostics when mounting the inspector UI fails. * **Fix**: Export `telFetch` from `mcp-use/telemetry/tel-fetch` (tsup build) so inspector server code does not import the root `mcp-use` entry, which eagerly loads the agent stack - fixes embedded inspector when `langchain` is not installed * **Fix**: Log inspector UI mount failures in development or when `MCP_USE_DEBUG` is set (production remains quiet) * **Fix** (@mcp-use/inspector): `telFetch` import uses the telemetry subpath (see inspector changelog) * **Update**: Updated @mcp-use/inspector to v1.0.1 * **Update**: Updated @mcp-use/cli to v2.21.4 Release 1.23.0 ## Better Auth, server metadata & Inspector 1.0 Minor release adding a Better Auth OAuth provider, metadata-only client updates, dependency hardening, and a major Inspector release. * **New**: Better Auth OAuth provider for MCP servers - see authentication docs and `examples/server/oauth/better-auth` * **New**: `updateServerMetadata()` on `McpClientProvider` updates display metadata without reconnecting; connection-affecting changes still use `updateServer()` * **Fix**: Windows-compatible ESM import paths for dev and tooling * **Enhancement** (@mcp-use/inspector): Stream protocol in chat, `disabledTools`, editable server aliases with shared display-name resolution, tab persistence and URL sync, tool-invocation serialization and screenshots (see inspector changelog) * **Update**: Vite 8.0.5, Hono 4.12.12, `@hono/node-server` 1.19.13 across the TypeScript workspace * **Fix**: Tighter `pnpm` overrides and lockfile refresh for `pnpm audit`; `lodash` override in the mcp-apps scaffold template for standalone installs * **Documentation**: `updateServerMetadata` in the `useMcpClient` API reference; authentication overview links to the Better Auth guide * **Update**: Updated @mcp-use/inspector to v1.0.0 * **Update**: Updated @mcp-use/cli to v2.21.3 * **Update**: Updated create-mcp-use-app to v0.14.8 ## Inspector dependency & bundling alignment Patch release adjusting how `@mcp-use/inspector` depends on `mcp-use` so bundling and shared types both work. * **Fix** (@mcp-use/inspector): Restore `mcp-use` as both a `dependency` and `peerDependency` - needed to bundle non-React subpaths (`mcp-use/auth`, `mcp-use/browser`) with transitive deps (e.g. LangChain), while `peerDependency` keeps `mcp-use`/`react` types aligned with the host app * **Update**: Updated @mcp-use/inspector to v0.26.1 * **Update**: Updated @mcp-use/cli to v2.21.2 * **Update**: Updated create-mcp-use-app to v0.14.7 ## Type Compatibility & Peer Dependency Alignment Patch release focused on pnpm peer-variant type compatibility, inspector dependency alignment, and template dependency cleanup. * **Fix**: Resolved TypeScript nominal type conflicts when `mcp-use` is installed as multiple pnpm peer-variant copies - moved internal client-init tracking off class surface to avoid `.d.ts` incompatibilities * **Fix**: Reverted `stripInternal`/`@internal` approach that degraded downstream tool handler type inference; keeps type safety while preserving consumer inference behavior * **Fix** (@mcp-use/inspector): Moved `mcp-use` from `dependencies` to `peerDependencies` so consumers share a single `mcp-use` type instance (addresses TS2322 duplicate-type scenarios) * **Update** (@mcp-use/inspector): Upgraded `@mcp-ui/client` to v7; replaced removed legacy renderer path with sandboxed iframe handling for `ui://` resources and removed remote-dom usage * **Update**: Updated @mcp-use/inspector to v0.26.0 * **Update**: Updated @mcp-use/cli to v2.21.1 * **Update**: Updated create-mcp-use-app to v0.14.7 ## CLI Organizations, Non-Interactive Deploy & Typed Middleware Patch release with CLI org management, non-interactive deployments, improved middleware/tool context propagation, typed middleware ergonomics, and ErrorBoundary customization. * **New** (@mcp-use/cli): Organization commands - `mcp-use org list`, `mcp-use org switch`, `mcp-use org current`; login prompts for org selection when multiple; `whoami` shows active organization; org preference persisted in `~/.mcp-use/config.json` * **Enhancement** (@mcp-use/cli): Deploy to a specific org with `mcp-use deploy --org `; all org-scoped API requests include `x-profile-id` * **New** (@mcp-use/cli): Non-interactive deploy with `-y` / `--yes` - skips confirmations; replaces “Press Enter” with polling; errors if not logged in (requires `mcp-use login`) * **Fix**: Context propagation into tool handlers - singleton AsyncLocalStorage via `globalThis`, safe Hono context extraction, and forwarding middleware `ctx.auth` / `ctx.state` into enhanced tool context * **Fix**: `ctx.auth` typing is now `AuthInfo | undefined` when OAuth isn’t configured (enables `if (!ctx.auth) ...` guards) * **Enhancement**: Typed MCP middleware context - `server.use("mcp:tools/call" | "mcp:resources/read" | "mcp:prompts/get", ...)` now narrows `ctx.params` to method-specific shapes; `mcp:*` remains generic * **Enhancement**: `outputSchema` tools can return response helpers (`text()`, `markdown()`, `mix()`, etc.) without type errors * **Enhancement**: `server.resourceTemplate()` supports an optional Zod `schema` to type `params` as `z.infer` * **Enhancement**: `ErrorBoundary` now supports `fallback` (node or `(error) => node`) and `onError` for reporting (default UI unchanged) * **Update**: Updated @mcp-use/inspector to v0.25.1 * **Update**: Updated @mcp-use/cli to v2.21.0 Release 1.22.0 ## Vite 8, MCP Middleware & Model Context Minor release with Vite 8 across tooling, MCP operation middleware, files and model context APIs, elicit and adapter fixes, and Inspector tunnel controls. * **New**: MCP operation-level middleware - `server.use("mcp:*", ...)` and specific patterns (`mcp:tools/call`, `mcp:tools/list`, `mcp:resources/read`, `mcp:resources/list`, `mcp:prompts/get`, `mcp:prompts/list`) with typed `MiddlewareContext` (`method`, `params`, `session`, `auth`, `state`) * **New**: `useFiles` React hook with `isSupported` and `modelVisible` for file attachments; `ModelContext` component and `modelContext` imperative API for server-side model context injection * **Enhancement**: Vite 8.0 with Rolldown bundler and `@vitejs/plugin-react` 6 across packages, examples, and CLI/inspector tooling * **Enhancement**: Conformance client - pass `reconnectionOptions` so SDK-level SSE reconnection behaves correctly when `autoReconnect` is disabled * **Fix**: Elicit - map `result.content` to `result.data` for Zod validation; spec-compliant clients use `content`; backward-compatible fallback to `data` * **Fix**: LangChainAdapter - tool name collisions when exposing resources/prompts as tools; `reserveName` resolves prefixed names with a numeric suffix when needed; prompt names sanitized like resource names * **Enhancement** (@mcp-use/inspector): Start/stop the `mcp-use dev` tunnel from the Inspector (see inspector changelog) * **Update**: Updated @mcp-use/inspector to v0.25.0 * **Update**: Updated @mcp-use/cli to v2.20.0 ## Zod Peer Dep, Esbuild Build & Windows Fix Patch release with Zod peer dependency, esbuild transpilation, TypeGen Zod v4 fixes, and Windows path handling. * **Fix**: Move zod from dependencies to peerDependencies - prevents duplicate type trees when users have a different Zod v4 version; avoids type errors or OOM during `mcp-use build` * **Fix**: TypeGen crash with Zod v4 enum schemas - `zod-to-ts` now handles Zod v4 `ZodEnum` (`_def.entries`), `ZodDiscriminatedUnion`; CLI reports success/failure of type generation instead of silently failing * **Fix** (@mcp-use/cli): Windows crash in `mcp-use dev` and `mcp-use generate-types` - use `file://` URL in tsImport instead of raw OS paths (fixes `ERR_UNSUPPORTED_ESM_URL_SCHEME`) * **Fix**: Dependabot security alerts - updated flatted, tar, hono, express-rate-limit, dompurify, minimatch, rollup, form-data, lodash, and other transitive deps * **Enhancement** (@mcp-use/cli): `mcp-use build` uses esbuild for transpilation instead of tsc - avoids OOM on complex type graphs (Zod v4, Prisma); type checking runs separately via `tsc --noEmit`; add `--no-typecheck` to skip type checking for faster builds * **Update**: Updated @mcp-use/inspector to v0.24.5 * **Update**: Updated @mcp-use/cli to v2.19.0 * **Update**: Updated create-mcp-use-app to v0.14.6 ## Request Context, CLI Build & README Fixes Patch release fixing request context propagation, CLI build hang, and stale monorepo references. * **Fix**: `ctx.auth` and other request context properties were `undefined` in tool callbacks; `mountMcp()` now wraps `transport.handleRequest()` with `runWithContext()` so `getRequestContext()` is populated * **Fix** (@mcp-use/cli): `mcp-use build` no longer hangs - add `process.exit(0)` on success (tsImport creates active handles) * **Fix**: Update stale mcp-use-ts references in README badges, image URLs, eslint config to mcp-use monorepo * **Update**: Updated @mcp-use/inspector to v0.24.4 * **Update**: Updated @mcp-use/cli to v2.18.3 ## Inspector Sandbox Host Fix Patch release fixing sandbox host derivation for cloud-embedded inspector pages. * **Fix** (@mcp-use/inspector): Sandbox host derivation for cloud-embedded pages - apex hosts (e.g. manufact.com) now resolve to `sandbox-inspector.{domain}` instead of `sandbox-{domain}` * **Update**: Updated @mcp-use/inspector to v0.24.3 * **Update**: Updated @mcp-use/cli to v2.18.2 ## Inspector Proxy Fix for Embedded Servers Patch release fixing inspector auto-connect when served from MCP server (Python, etc.). * **Fix** (@mcp-use/inspector): Skip proxy when inspector is served from the MCP server itself - auto-connect no longer routes through missing `/inspector/api/proxy` on embedded servers * **Fix** (@mcp-use/inspector): Detect proxy availability via runtime config injection; disable autoProxyFallback when no proxy is available * **Update**: Updated @mcp-use/inspector to v0.24.2 * **Update**: Updated @mcp-use/cli to v2.18.1 ## Session Persistence & CLI Improvements Patch release with session recovery fix, CLI enhancements, and create-mcp-use-app install improvements. * **Fix**: Session recovery after restart returns 400 fix; distributed SSE stream routing via Redis Pub/Sub * **Enhancement** (@mcp-use/cli): `mcp-use build` runs tool registry type generation before TypeScript compilation when server file exists * **Enhancement** (@mcp-use/cli): `--root-dir` option for deploy command for monorepo support * **Fix** (create-mcp-use-app): Remove flickering behaviour from `npm i` * **Update**: Updated @mcp-use/inspector to v0.24.1 * **Update**: Updated @mcp-use/cli to v2.18.0 * **Update**: Updated create-mcp-use-app to v0.14.4 Release 1.21.0 ## Proxy Servers & Client Completion Minor release with server composition, client-side completion, user context, and Express middleware types. * **New**: `MCPServer.proxy()` for composing multiple MCP servers into a single aggregator - automatic orchestration, schema translation, namespacing, list-changed multiplexing * **New**: Client-side completion support - `complete()` on BaseConnector, MCPSession, and `useMcp`; `refreshResourceTemplates()`; prompt argument and resource template URI autocomplete * **New**: `ctx.client.user()` for per-invocation end-user metadata (`subject`, `conversationId`) from tools/call params * **Enhancement**: `ctx.client.supportsApps()` now correctly returns true for MCP Apps clients (fixed ClientCapabilitiesSchema `extensions` stripping) * **Enhancement**: `autoReconnect` options - configurable health check interval, reconnection delay, timeout via `reconnectionOptions` * **Enhancement**: `sendFollowUpMessage` accepts `MessageContentBlock` arrays (text, image, resource blocks) per SEP-1865 * **Enhancement**: Host info and capabilities - `hostInfo`, `hostCapabilities` in `useWidget`; `getHostInfo`, `getHostCapabilities` on `McpAppsBridge` * **Fix**: Express middleware types - proper TypeScript types for `server.use()` with Express middleware (auto-detected and adapted) * **Fix**: Session isolation - `findSessionContext` no longer falls back to arbitrary session, preventing metadata leakage * **Fix**: Remove deprecated `@types/tar`; update tar to latest (cli, create-mcp-use-app) * **Update**: Updated @mcp-use/inspector to v0.24.0 * **Update**: Updated @mcp-use/cli to v2.17.0 * **Update**: Updated create-mcp-use-app to v0.14.3 * **Documentation**: Per-server elicitation and sampling callbacks examples; proxy servers section ## CLI Tunnel Support Patch release adding tunnel flag for ChatGPT HMR. * **New** (@mcp-use/cli): Support for `--tunnel` flag with full ChatGPT HMR * **Update**: Updated @mcp-use/inspector to v0.23.1 * **Update**: Updated @mcp-use/cli to v2.16.0 ## Inspector Embedded Chat Patch release with inspector embedded chat improvements. * **Enhancement** (@mcp-use/inspector): Improved embedded chat * **Update**: Updated @mcp-use/inspector to v0.23.0 * **Update**: Updated @mcp-use/cli to v2.15.4 ## Inspector Standalone Deployment Fix Patch release fixing inspector standalone deployment version import. * **Fix** (@mcp-use/inspector): Standalone deployment was importing the version from the wrong path * **Update**: Updated @mcp-use/inspector to v0.22.3 * **Update**: Updated @mcp-use/cli to v2.15.3 ## Health Monitoring & MCPAgentOptions Patch release with dynamic auth headers for health checks and MCPAgentOptions for chat agent. * **Enhancement**: `getAuthHeaders` parameter to `startConnectionHealthMonitoring` for customizable authentication headers during health checks; HEAD requests allowed without authentication * **Enhancement**: `exposeResourcesAsTools` and `exposePromptsAsTools` options in MCPAgentOptions (both default to `true`); inspector chat tab sets both to `false` so agent only exposes actual MCP tools * **Update**: Updated @mcp-use/inspector to v0.22.2 * **Update**: Updated @mcp-use/cli to v2.15.2 ## Widget Status Texts & CSP Handling Patch release with widget metadata enhancements and CSP improvements. * **New**: `invoking` and `invoked` properties in widget metadata for customizable status messages during tool execution * **Breaking**: McpUseProvider no longer includes BrowserRouter; add it explicitly if your widget uses react-router * **Enhancement**: MCPAppsDebugControls CSP mode violation indicators; sandbox-proxy strips existing CSP meta tags before injecting permissive CSP * **Fix** (create-mcp-use-app): Unify logo display across all CLI entry paths * **Update**: Updated @mcp-use/inspector to v0.22.1 * **Update**: Updated @mcp-use/cli to v2.15.1 Release 1.20.0 ## Widget Debug & CSP Improvements Minor release with Iframe Console enhancements, MCP Apps debug controls, and CSP handling. * **New**: CLI update check notifies when a newer mcp-use release is available * **Fix**: CLI TSC build uses node with increased heap; avoid npx installing wrong package * **Fix**: CLI fallback MCP\_URL when tunnel is unavailable * **New** (create-mcp-use-app): @types/react and @types/react-dom in template devDependencies * **Enhancement**: Slim down generated READMEs; improve mcp-apps template (Carousel, product-search-result widget); include .mcp-use in tsconfig; fix postinstall script * **Fix**: create-mcp-use-app product-search-result template styling and CSP metadata * **Enhancement**: Iframe Console with expandable logs, level filter, search, resizable height * **New**: Widget debug context for chat; MCP Apps debug controls (tool props JSON view, required props hint, SEP-1865 semantics) * **New**: CDN build for inspector; CSP violations panel with clear action; widget re-execution on CSP mode change; CSP mode for Apps SDK * **Fix**: useSyncExternalStore first-render handling; reconnect logic; Tools tab only sends explicitly set fields; resource annotations include `_meta` * **Fix**: mcp-use widget CSP fallback from tool metadata; protocol and mount-widgets-dev improvements * **Enhancement**: useWidget merges props from toolInput and structuredContent per SEP-1865 * **New**: updateModelContext and useMcp clientOptions * **Fix**: WorkOS subdomain config to accept full AuthKit domain (e.g., `name.authkit.app`) * **Update**: Updated @mcp-use/inspector to v0.22.0 * **Update**: Updated @mcp-use/cli to v2.15.0 ## CLI Skills & Template Updates Patch release with CLI skills commands and create-mcp-use-app template improvements. * **New** (@mcp-use/cli): `mcp-use skills add` and `mcp-use skills install` commands to install AI agent skills (Cursor, Claude Code, Codex) from the mcp-use repository * **Enhancement** (create-mcp-use-app): Add @types/react and @types/react-dom to template devDependencies * **Update**: Updated @mcp-use/inspector to v0.21.1 * **Update**: Updated @mcp-use/cli to v2.14.0 ## Tool Schema & Type Testing Improvements Patch release with nested input schema fixes and compile-time type regression testing. * **Fix**: Correctly convert nested input schema args for tools * **New**: Added everything-server example for compile-time type regression testing * **Update**: Updated @mcp-use/inspector to v0.21.0 * **Update**: Updated @mcp-use/cli to v2.13.10 ## MCPApps & Widget Loading Enhancements Patch release improving widget loading logic and iframe handling. * **Enhancement**: Improved MCPAppsRenderer loading logic with better state management * **Enhancement**: Enhanced useWidget for iframe handling * **Update**: Updated @mcp-use/inspector to v0.20.1 * **Update**: Updated @mcp-use/cli to v2.13.9 Release 1.19.0 ## Client Conformance & Type Safety Improvements Minor release with full MCP client conformance, direct stdio connector support, and type inference fixes. * **New**: Client implementation is now 100% conformant with the MCP spec * **Enhancement**: Node.js client handles stdio connector directly with command/argument configuration * **Fix**: `error()` return type now compatible with tool callbacks using `outputSchema` * **Fix**: Fixed `TypedCallToolResult` type inference with explicit properties instead of Omit * **Fix**: Enhanced `prompt()` method generic type inference to match `tool()` pattern * **Enhancement**: Console output routes through Logger class with improved consistency; added tests for logLevel * **Enhancement**: Added support for additional Vitest file extensions in config * **Fix**: Correct MIME type for mcp\_apps resource counting; disabled telemetry in local tests * **Update**: Updated @mcp-use/inspector to v0.20.0 * **Update**: Updated @mcp-use/cli to v2.13.8 ### @mcp-use/cli v2.13.8 * **Enhancement**: Improved loading states with spinner component * **Fix**: Correct MIME type for mcp\_apps resource counting ### create-mcp-use-app v0.13.0 * **New**: Interactive prompts for optional skills installation (claude-code, cursor, codex) * **New**: `--install` and `--no-install` CLI flags for non-interactive mode * **Fix**: Corrected template reference in test-cli.sh Release 1.18.0 ## DNS Rebinding Protection & Deferred Client Callbacks Minor release adding DNS rebinding protection and deferred React client callbacks. * **New**: `allowedOrigins` configuration on `MCPServer` for DNS rebinding protection and host validation; docs and example (curl tests) added * **Enhancement**: `McpClientProvider` defers `onServerAdded` and `onServerStateChange` callbacks via `queueMicrotask` to avoid render-phase updates and improve stability * **Update**: Updated @mcp-use/inspector to v0.19.0 * **Update**: Updated @mcp-use/cli to v2.13.7 ## Widget Resource Propagation & Log Noise Reduction Patch release improving HMR reliability for widget resources and reducing dev server log noise. * **Fix**: Reduced noisy logs in the dev server * **Fix**: Propagated widget resources and resource templates to already-connected MCP sessions during HMR to avoid `Resource ui://widget/... not found` errors without reconnecting * **Update**: Updated @mcp-use/inspector to v0.18.9 * **Update**: Updated @mcp-use/cli to v2.13.6 ## Inspector Reliability Alignment Patch release aligning TypeScript packages with the latest inspector reliability fixes. * **Enhancement**: Pulled in inspector fixes for widget readiness resets and safer iframe global update handling * **Update**: Updated @mcp-use/inspector to v0.18.8 * **Update**: Updated @mcp-use/cli to v2.13.5 ## UI Resource Metadata & CSP Injection Fixes Patch release improving server-origin metadata enrichment for UI resources. * **Fix**: UI resource metadata enrichment now guarantees metadata initialization before applying origin-based updates * **Enhancement**: Server origin is now consistently injected into widget CSP fields (`resourceDomains`, `connectDomains`, `baseUriDomains`) * **Update**: Updated @mcp-use/inspector to v0.18.7 * **Update**: Updated @mcp-use/cli to v2.13.4 ## useWidget Type Inference Improvements Patch release improving `useWidget` typing precision for pending vs ready states. * **Enhancement**: `UseWidgetResult` now uses a discriminated union on `isPending` for more accurate TypeScript inference * **Enhancement**: Added `UseWidgetResultBase` to separate shared fields from pending-state-specific props * **Update**: Updated @mcp-use/inspector to v0.18.6 * **Update**: Updated @mcp-use/cli to v2.13.3 Release 1.17.0 ## Resource Template Completion & Reverse Proxy Support Minor release adding resource template variable completion, custom route HMR, and comprehensive reverse proxy support. ### Resource Template Completion * **New**: Resource template variable completion - templates can define `callbacks.complete` per variable (string array or callback) for client-side autocomplete of URI template variables * **New**: `toResourceTemplateCompleteCallbacks` utility for normalizing completion definitions * **New**: MCP servers now publish completion capabilities ### HMR & Reverse Proxy Improvements * **New**: Custom HTTP route HMR - routes registered via `server.get()`, `server.post()`, etc. now hot-swap without restart * **New**: Widget tool protection during HMR - tools tagged with `_meta["mcp-use/widget"]` preserved during sync * **New**: Dynamic widget creation - `resources/` directory auto-created, dev server watches for new widgets even if none exist at startup * **New**: Vite HMR WebSocket proxy for hot-reload through reverse proxies (ngrok, E2B, Cloudflare tunnels) * **New**: `MCP_URL` environment variable can be pre-set by users for external proxy URLs; CLI will not overwrite it * **New**: `window.__mcpServerUrl` global injected into widget HTML for dynamic API URL construction * **Enhancement**: List-changed notifications now fire on removal, not just add/update * **Enhancement**: Pre-initialized request handlers prevent `-32601 Method not found` errors on dynamic tool registration * **Enhancement**: Widget type default changed to `mcpApps` (dual-protocol) instead of `appsSdk` ### Dependencies * **Update**: Updated @mcp-use/inspector to v0.18.5 * **Update**: Updated @mcp-use/cli to v2.13.2 Release 1.16.4 ## HMR Improvements & Widget Enhancements Patch release with Hot Module Reload improvements, widget lifecycle enhancements, and CLI build system improvements. ### HMR & Server Improvements * **Fix**: Tool schema preservation during HMR now uses Zod schemas directly instead of converting to params * **Fix**: Empty schema changed from `{}` to `z.object({})` to ensure `safeParseAsync` works correctly * **Enhancement**: Prompts now support tool response helpers (`text()`, `object()`, `image()`, etc.) via automatic conversion to `GetPromptResult` * **Enhancement**: Resources now support tool response helpers via automatic conversion to `ReadResourceResult` * **Enhancement**: Widget resources (`ui://widget/*`) and resource templates preserved during HMR * **Enhancement**: Enhanced prompt conversion to handle edge cases (single content objects, bare content items, mixed content arrays) ### CLI Build Improvements * **New**: Build manifest with `entryPoint` tracking written to `dist/mcp-use.json` for reliable server location * **Enhancement**: Support for multiple TypeScript output paths (dist/index.js, dist/src/index.js, custom paths) * **Enhancement**: Start command reads `entryPoint` from manifest for accurate server location * **Enhancement**: Clear error messages when no built server file is found, listing all attempted locations ### Widget Improvements * **Fix**: Widget pending state now correctly emulated to reflect ChatGPT behavior * **Enhancement**: Immediate widget rendering during pending states * **Enhancement**: Enhanced widget lifecycle management with better tool output handling * **New**: Delayed weather tool example (`get-weather-delayed`) in conformance server for testing widget lifecycle ### Dependencies * **Update**: Updated @modelcontextprotocol/sdk to v1.26.0 (with Zod 4 compatibility patch) * **Update**: Updated @mcp-use/inspector to v0.18.4 * **Update**: Updated @mcp-use/cli to v2.13.1 * **Update**: Updated create-mcp-use-app to v0.12.3 Release 1.16.3 ## CLI Manufact Rebrand Minor release with CLI branding updates and authentication improvements. ### CLI Rebrand * **Enhancement**: Updated CLI branding from "mcp-use" to "Manufact" * **Enhancement**: Changed default web URL from `mcp-use.com` to `manufact.com` for login flow * **Fix**: Fixed 431 "Request Header Fields Too Large" error by increasing callback server header limit to 16KB * **Enhancement**: Updated dashboard, inspector, and settings URLs to use `manufact.com` domain * **Enhancement**: Gateway domain remains `run.mcp-use.com` for backward compatibility with existing deployments ### Dependencies * **Update**: Updated @mcp-use/cli to v2.13.0 * **Update**: Updated @mcp-use/inspector to v0.18.3 ## Widget Behavior Fix Patch release fixing widget pending state emulation. * **Fix**: Widget pending state now correctly emulated to reflect ChatGPT behavior * **Update**: Updated @mcp-use/inspector to v0.18.2 * **Update**: Updated @mcp-use/cli to v2.12.6 ## Widget CSP Enhancement Patch release fixing widget Content Security Policy configuration. * **Fix**: Auto-inject server origin into `connectDomains` CSP * **Enhancement**: Widgets can now make fetch/XHR/WebSocket calls back to the MCP server without explicitly declaring the domain * **Fix**: Corrected oversight where CHANGELOG mentioned connectDomains injection but it was not implemented Release 1.16.0 ## Prompt Autocomplete & Dynamic CSP Minor release introducing prompt argument autocomplete and dynamic CSP domain injection for widgets. ### New Features * **New**: `completable()` helper for prompt argument autocomplete * **New**: Dynamic CSP domain injection for widgets at tools/list time ### Enhancements * **Enhancement**: Request origin (from X-Forwarded-Host or Host header) now automatically added to `connectDomains` and `resourceDomains` in tool metadata * **Enhancement**: Widgets now work correctly when accessed through proxies like ngrok, Cloudflare tunnels, or other reverse proxies * **Enhancement**: Server origin automatically enriched in widget CSP metadata ### Dependencies * **Update**: Updated @mcp-use/inspector to v0.18.0 * **Update**: Updated @mcp-use/cli to v2.12.4 ## HMR & Theme Fixes Patch release fixing Hot Module Reloading edge cases and theme functionality. * **Fix**: HMR not working when server starts with 0 tools initially * **Fix**: Dark mode can now be enabled through theme URL parameter * **Update**: Updated @mcp-use/inspector to v0.17.3 * **Update**: Updated @mcp-use/cli to v2.12.3 ## HMR File Watcher Fix Patch release fixing file watcher resource exhaustion in containerized environments. * **Fix**: HMR file watcher exhausting inotify limits by properly ignoring node\_modules * **Fix**: Prevented ENOSPC errors in containerized environments caused by watching files inside `node_modules/` despite ignore patterns * **Update**: Updated @mcp-use/inspector to v0.17.2 * **Update**: Updated @mcp-use/cli to v2.12.2 ## CLI Deployment Enhancement Patch release with CLI deployment improvements. * **Enhancement**: CLI `getMcpServerUrl()` function for improved deployment URL handling * **Update**: Updated @mcp-use/cli to v2.12.1 * **Update**: Updated @mcp-use/inspector to v0.17.1 Release 1.15.0 ## MCP Apps Support & Landing Pages Major release introducing MCP Apps support with dual-protocol widget rendering and HTML landing pages for MCP server endpoints. ### MCP Apps Support * **New**: Dual-protocol support enabling widgets to work with both MCP Apps and ChatGPT Apps SDK * **New**: `MCPAppsRenderer` component for advanced debugging and visualization * **New**: `MCPAppsDebugControls` component for widget debugging * **New**: Sandboxed iframe support with console logging and safe area insets for isolated widget rendering * **New**: Widget adapters (MCP Apps, Apps SDK) with protocol helpers for seamless cross-protocol compatibility * **New**: MCP Apps documentation and example server ### Landing Pages * **New**: `generateLandingPage()` function that generates styled HTML landing pages for browser GET requests * **New**: Connection instructions for Claude Code, Cursor, VS Code, VS Code Insiders, and ChatGPT on landing pages * **Enhancement**: Browser host normalization for server connections in CLI ### Bug Fixes & Security * **Fix**: MCP server landing now shows the external URL instead of the internal URL * **Fix**: Zod JIT compilation to prevent CSP violations in sandboxed environments * **Security**: Fixed vulnerabilities in dependencies ### Dependencies * **Update**: Updated @mcp-use/inspector to v0.17.0 * **Update**: Updated @mcp-use/cli to v2.12.0 ## Widget Rendering & Session Management Improvements Patch release with widget rendering fixes, session timeout adjustments, and CLI deployment enhancements. ### Widget Rendering & Session Management * **Fix**: Widget iframe reload by adding timestamp query parameter to force refresh when widget data changes * **Fix**: Retry logic with exponential backoff for dev widget fetching to handle Vite dev server cold starts * **Fix**: Default session idle timeout changed from 5 minutes to 1 day (86400000ms) to prevent premature session expiration * **Fix**: Session lastAccessedAt tracking now updates both persistent store and in-memory map * **Fix**: \_meta merging now preserves existing fields (e.g., openai/outputTemplate) when updating tools and widgets * **Enhancement**: Support for frame\_domains and redirect\_domains in widget CSP metadata ### CLI Improvements * **Fix**: Environment variables, build command, start command, and port configuration now properly passed during redeployment ### Documentation * **Fix**: Updated sessionIdleTimeoutMs default value documentation from 5 minutes to 1 day across multiple files ## Dependency Updates Patch release with dependency updates. * **Update**: Updated dependencies to @mcp-use/inspector v0.16.1 and @mcp-use/cli v2.11.1 Release 1.14.0 ## Server Metadata & Widget Enhancements Release introducing server metadata configuration and enhanced widget development experience. ### Server Metadata & Configuration * **New**: Server metadata support with `title`, `websiteUrl`, and `icons` fields in MCP server configuration * **New**: Inspector UI displays server website URLs and icons for better branding * **Deprecated**: `autoCreateSessionOnInvalidId` config option - use `sessionStore` for persistent sessions * **Enhancement**: Dynamic project name support in server configurations ### Widget & Development Experience * **Enhancement**: HMR support for widget tool management - widgets update immediately without server restart * **Enhancement**: Parallel widget building for improved development performance * **Enhancement**: ReDoS attack prevention in widget name slugification with input length validation * **Enhancement**: Improved widget lifecycle documentation with loading state guidance ### CLI Improvements * **New**: `MCP_URL` environment variable automatically set in server process for easy access to server URL * **Enhancement**: Server process environment now includes `MCP_URL` in both development and production modes * **Enhancement**: CLI now displays all 4 package versions (`@mcp-use/cli`, `mcp-use`, `@mcp-use/inspector`, `create-mcp-use-app`) in `dev` and `build` commands with `mcp-use` highlighted for clarity ### API & Protocol * **New**: HEAD request support in `mountMcp` function * **Enhancement**: Improved input schema handling in tool registration with better defaults ### MCP Proxy Middleware * **Enhancement**: Improved error logging with better context for debugging * **Enhancement**: Connection refused errors now logged as warnings instead of errors * **Enhancement**: Error responses include target URL to help identify failing proxy requests * **Enhancement**: More detailed error messages for proxy request failures ### Bug Fixes * **Fix**: Anthropic `tool_use.id` error resolved with LangChain package updates * **Fix**: Telemetry shutdown method compatibility with posthog-node v5.22.0 * **Fix**: Input schema initialization now defaults to empty object when not provided ### Dependencies * **Update**: `@langchain/anthropic` to 1.3.10 (fixes tool\_call ID generation) * **Update**: `@langchain/core` to 1.1.15 * **Update**: `langchain` to 1.2.10 * **Update**: `react-resizable-panels` to 4.4.1 ## CLI Documentation Enhancement Patch release adding comprehensive CLI documentation. * **Enhancement**: Added `.gitignore` file to CLI package to exclude `.mcp-use` directory from version control * **Enhancement**: Added `CLAUDE.md` to CLI package with comprehensive guidance on usage, development commands, architecture details, and deployment instructions * **Enhancement**: Improved CSRF protection in authentication flow * **Enhancement**: Enhanced error handling for GitHub integration in deploy command ## OAuth Proxy URL Handling Improvements Patch release improving OAuth proxy URL handling and connection logic. * **Refactor**: Changed `connectionUrl` from `let` to `const` to enforce immutability * **Enhancement**: Enhanced logic for deriving `oauthProxyUrl` from callback URL, including handling cases where callback is at root path * **Enhancement**: Updated comments to clarify distinction between `oauthProxyUrl` and `connectionUrl` * **Fix**: Removed clearing of OAuth storage before connecting to maintain valid tokens across sessions ## Telemetry & Inspector Enhancements Patch release with telemetry improvements and inspector URL validation enhancements. * **Fix**: Enhanced localStorage checks in Telemetry class to verify both existence and functional methods (getItem, setItem, removeItem) * **Enhancement**: Added error handling to throw exception if localStorage is not available or functional * **Enhancement**: Inspector now automatically prepends "https\://" to URLs without protocol for better user experience * **Enhancement**: Improved error handling for invalid URLs in Inspector dashboard and server connection modal * **Enhancement**: Added localStorage clearing functionality in Inspector for troubleshooting ## Dependency Updates & CLI Enhancements Minor release with dependency updates and CLI improvements for deployment workflows. * **Fix**: Updated dependency `hono` to 4.11.4 * **Enhancement**: CLI login command with improved error handling and user feedback * **Enhancement**: CLI deployment command now prompts for login if not authenticated * **Enhancement**: Added git uncommitted changes check before deployment * **Fix**: Removed `fromSource` option from CLI deployment command * **Enhancement**: Simplified authentication UI in Inspector ## Edge Runtime Fix Patch release improving edge runtime compatibility. * **Fix**: Enable JSON response in stateless mode for edge runtimes (Deno, Cloudflare Workers) * **Enhancement**: Improved reliability of API in various deployment scenarios Release 1.13.0 ## Hot Module Reloading & OAuth Enhancements Release introducing Hot Module Reloading for development and enhanced OAuth capabilities. ### Hot Module Reloading (HMR) * **New**: HMR support for `mcp-use dev` command - tools, prompts, and resources update instantly without server restart * **New**: Connected clients receive `list_changed` notifications and auto-refresh * **New**: Syntax errors during reload caught gracefully without crashing server * **New**: Comprehensive test suite for HMR functionality with integration tests * **Enhancement**: CLI uses `chokidar` to watch file changes with automatic module re-import * **Enhancement**: Session persistence during HMR - no client disconnections ### OAuth & Client Info * **New**: Enhanced OAuth proxy to support gateway/proxy scenarios (e.g., Supabase MCP servers) * **New**: `clientInfo` configuration prop for OAuth registration with client metadata (name, version, icons, website) * **New**: Server metadata caching with `CachedServerMetadata` interface for instant display on reconnect * **Enhancement**: OAuth metadata URL rewriting from gateway URLs to actual server URLs * **Enhancement**: Client info displayed on OAuth consent pages * **Enhancement**: Extended `StorageProvider` interface with metadata methods ### Inspector & Favicon * **Enhancement**: Enhanced favicon detector to try all subdomain levels (e.g., mcp.supabase.com → supabase.com) * **Enhancement**: Detection of default vs custom favicons using JSON API response * **Enhancement**: Improved logging middleware for API routes * **Enhancement**: X-Forwarded-Host support for proxy URL construction in dev ### Bug Fixes * **Fix**: Remove import from "mcp-use" which causes langchain import in server * **Fix**: Enhanced synchronization for tools, prompts, and resources during HMR ## Connection Fix Patch release fixing autoconnect configuration parsing. * **Fix**: Autoconnect now correctly parses config objects in addition to string URLs ## Security Fixes & OAuth Improvements Patch release addressing multiple security vulnerabilities and fixing OAuth flow issues. ### Security Fixes * **Security**: Fixed 13 vulnerabilities (3 moderate, 10 high) * **Security**: Updated `langchain` to 1.2.3 (fixes serialization injection vulnerability) * **Security**: Updated `@langchain/core` to 1.1.8 (fixes serialization injection vulnerability) * **Security**: Updated `react-router` to 7.12.0 (fixes XSS and CSRF vulnerabilities) * **Security**: Added override for `qs` to >=6.14.1 (fixes DoS vulnerability) * **Security**: Added override for `preact` to >=10.28.2 (fixes JSON VNode injection) ### OAuth & Connection Improvements * **Fix**: Resolved OAuth flow looping issue by removing duplicate fallback logic * **Enhancement**: Simplified connection handling with consolidated state management * **Enhancement**: Enhanced OAuth authentication flow with improved connection settings * **Enhancement**: Improved auto-connect functionality with better proxy handling and error management * **Enhancement**: Enhanced theme toggling with dropdown menu for better UX and accessibility Release 1.12.2 ## Automatic Proxy Fallback & API Improvements Release with automatic proxy fallback, OAuth proxy support, and API naming improvements. ### Breaking Changes (with Deprecation Warnings) * **Breaking**: Renamed `customHeaders` to `headers` across all APIs for consistency. Old name still works but shows deprecation warnings. * **Breaking**: Renamed `samplingCallback` to `onSampling` for consistency with event handler patterns. Old name still works but shows deprecation warnings. * **Deprecated**: `clientConfig` option in favor of deriving configuration from `clientInfo` ### New Features * **New**: Automatic Proxy Fallback - `autoProxyFallback` option automatically retries failed connections through proxy on CORS/4xx errors * **New**: Provider-level proxy defaults with `defaultProxyConfig` and `defaultAutoProxyFallback` props in `McpClientProvider` * **New**: OAuth Proxy Support - `oauthProxyUrl` configuration to route OAuth discovery and token requests through backend proxy * **New**: Configurable `clientInfo` for MCP connection initialization with full metadata (name, title, version, description, icons, website URL) * **New**: Reconnect functionality for failed connections with reconnect button in Inspector UI ### Improvements * **Enhancement**: Better detection of OAuth discovery failures, CORS errors, and connection issues * **Enhancement**: OAuth provider uses original target URL for discovery, not proxy URL * **Enhancement**: Improved session cleanup to avoid noisy warning logs * **Enhancement**: Type safety with deprecation notices in TypeScript types * **Enhancement**: Proxy header support - `proxyConfig` now accepts a `headers` field for custom headers ### Bug Fixes * **Fix**: Custom headers now correctly included when copying connection configuration from saved tiles * **Fix**: HttpConnector automatic reconnection disabled, shifting responsibility to higher-level logic ### Refactoring * **Refactor**: Removed `oauth-helper.ts` (521 lines), consolidated into `browser-provider.ts` * **Refactor**: Major `useMcp` hook refactor with automatic retry, better error handling, and proxy fallback support ## Security Update Patch release with security fixes and build improvements. * **Security**: Updated `@modelcontextprotocol/sdk` to 1.25.2 (fixes ReDoS vulnerability in UriTemplate regex patterns) * **Fix**: Updated building script to correctly export types for inspector/client components Release 1.12.0 ## Browser Compatibility & Multi-Server Support Release focusing on browser compatibility, multi-server management, and improved React architecture. ### Breaking Changes * **Breaking**: Removed `winston` dependency. The logging system now uses a simple console logger that works in both browser and Node.js environments. ### Browser Runtime Support * **New**: Full browser compatibility - removed Node.js-specific dependencies from browser builds * **New**: Enhanced `browser.ts` entry point with improved browser-specific utilities * **New**: Browser utilities: * `utils/favicon-detector.ts` - Detect and extract favicons from URLs * `utils/proxy-config.ts` - Proxy configuration utilities for browser environments * `utils/mcpClientUtils.ts` - MCP client utilities moved from client package * **New**: `MCPAgent` exported for browser usage with `BrowserMCPClient` instance or through `RemoteAgent` * **Enhancement**: Comprehensive test suite to ensure `mcp-use/react` and `mcp-use/browser` do not import Node.js dependencies ### Multi-Server Support * **New**: `McpClientProvider` component to manage multiple MCP server connections in React applications * **New**: Pluggable storage system with `LocalStorageProvider` and `MemoryStorageProvider` for flexible server configuration persistence * **New**: Dynamic addition and removal of servers in React applications * **New**: Multi-server React example demonstrating new capabilities * **Enhancement**: Refactored `useMcp` hook for better multi-server support * **Enhancement**: Removed obsolete `McpContext` (replaced with `McpClientProvider`) ### Server Middleware * **New**: MCP Proxy Middleware (`server/middleware/mcp-proxy.ts`) - Hono middleware for proxying MCP server requests with optional authentication and request validation ### Inspector Enhancements * **Enhancement**: Improved UI responsiveness with enhanced mobile and tablet layouts and adaptive component visibility * **Enhancement**: Better server management with refactored server connection handling, improved icon display, and status tracking * **Enhancement**: Enhanced debugging with detailed logging in Layout and useAutoConnect components for better monitoring of server connection states * **Enhancement**: Simplified connection settings by removing deprecated transport types * **Enhancement**: Enhanced inspector components for better browser compatibility * **Enhancement**: Improved server icon support and component interactions * **Enhancement**: Added embedded mode support * **Enhancement**: Better configuration handling and MCP proxy integration ### RPC Logging * **New**: Enhanced RPC logging with new `rpc-logger` module and filtering capabilities to reduce noisy endpoint logging (telemetry, RPC streams). ### Architecture Improvements * **Refactor**: Separated telemetry into `telemetry-browser.ts` (browser) and `telemetry-node.ts` (Node.js) for better environment-specific implementations * **Refactor**: Replaced Winston with `SimpleConsoleLogger` that works across all environments. See the [ServerConfig API reference](/typescript/api-reference/server/server-config) for server environment settings. * **Refactor**: Updated `tsup.config.ts` to exclude Node.js-specific dependencies (`winston`, `posthog-node`) from browser builds * **Refactor**: Updated components across inspector for cleaner architecture and imports ### Bug Fixes * **Fix**: Prevent rendering loop when autoretry is true in React hooks * **Fix**: Respect options timeout in HTTP connector (reduced default timeout from 30 seconds to 10 seconds) * **Fix**: Add client SDKs to add to client dropdown in inspector * **Fix**: Server connection retrieval in `OpenAIComponentRenderer` to directly access connections array * **Fix**: Linux patch for watch mode * **Fix**: Query URL handling in built mode to preserve arguments * **Fix**: Enhanced Zod version mapping in TypeScript PR preview workflow * **Fix**: Pinned Zod version to 3.24.4 for compatibility with modelcontextprotocol/sdk * **Fix**: Updated modelcontextprotocol-sdk references to new package name ### Documentation * **New**: Added troubleshooting section for Zod version conflicts in Supabase deployment * **Enhancement**: Updated Supabase deployment documentation with improved compatibility information ## Documentation Updates - **Enhancement**: Updated examples and documentation to use preferred methods and APIs ## Bug Fixes - **Fix**: Widget props not picked up when using Zod schemas Release 1.11.0 ## Session Management Architecture Release introducing distributed session management with Redis support. ### Breaking Changes * **Breaking**: WebSocket transport support removed. Use streamable HTTP or SSE transports instead. * **Breaking**: LangChain adapter moved from main entry point to `mcp-use/adapters` subpath. `@langchain/core` and `langchain` are now optional peer dependencies. * **Deprecated**: `autoCreateSessionOnInvalidId` server config option. Now follows MCP spec strictly (returns 404 for invalid sessions). ### Session Management Features * **New**: Pluggable session management architecture separating metadata storage (`SessionStore`) from active connections (`StreamManager`) * **New**: `RedisSessionStore` for persistent, distributed session metadata storage * **New**: `RedisStreamManager` for cross-server notifications via Redis Pub/Sub * **New**: `FileSystemSessionStore` (dev mode default) persists sessions to `.mcp-use/sessions.json` for hot reload support * **New**: `InMemorySessionStore` and `InMemoryStreamManager` (production defaults) * **New**: Automatic 404 handling and re-initialization in clients per MCP spec * **New**: Convenience methods: `sendToolsListChanged()`, `sendResourcesListChanged()`, `sendPromptsListChanged()` * **Enhancement**: Auto-detection of stateless/stateful mode based on client `Accept` header * **Enhancement**: Sessions survive server restarts in dev mode with filesystem storage * **Enhancement**: Auto-cleanup of expired sessions (>24 hours) ### Client Improvements * **New**: Auto-refresh tools/resources/prompts when receiving list change notifications * **New**: Manual refresh methods: `refreshTools()`, `refreshResources()`, `refreshPrompts()`, `refreshAll()` * **New**: Automatic 404 handling and re-initialization per MCP spec * **Enhancement**: Deprecated `sse` transport type in React (use `http` or `auto`) ### Additional Features * **New**: CommonJS module support - full compatibility with `require()` syntax * **New**: Favicon support for widget pages with automatic serving and long-term caching * **New**: Enhanced session methods: `callTool()` defaults args to empty object, new `requireSession()` method * **New**: Session architecture documentation with ARCHITECTURE.md * **New**: Comparison guide with other MCP implementations (tmcp, FastMCP, xmcp, official SDK) * **New**: Comprehensive environments guide (Node.js, Browser, React) ### Documentation * **New**: Session Management guide with storage provider documentation (Memory, FileSystem, Redis) * **New**: Environments guide explaining usage across different JavaScript runtimes * **New**: Comparison documentation analyzing mcp-use vs other implementations * **Enhancement**: Major documentation restructuring for better organization * **Enhancement**: Removed/consolidated outdated guides (direct-tool-calls, sandbox, connection-types) * **Enhancement**: Updated agent documentation with improved examples ### Widget Improvements * **Enhancement**: Automatic cleanup of stale widget directories in `.mcp-use` folder * **Enhancement**: Dev mode watches for widget file/directory deletions and cleans up build artifacts * **Fix**: Fixed widget styling isolation - widgets no longer pick up mcp-use styles * **Fix**: Fixed favicon URL generator for proper asset resolution * **Fix**: Fixed transport cleanup when session becomes idle ### Testing & Quality * **New**: Comprehensive test suite for session stores (498 lines) * **New**: Stream managers test suite (478 lines) * **New**: Widget data flow tests (496 lines) * **New**: CLI integration tests (242 lines) * **New**: CommonJS compatibility tests (256 lines) * **New**: Documentation example tests (agent, prompts, tools) * **New**: Client 404 re-initialization tests * **Enhancement**: Improved test coverage across all major features ### Dependencies & Compatibility * **Enhancement**: Added support for Node.js >= 18 * **Enhancement**: CommonJS builds for all entry points * **Enhancement**: Migrated from `react-router-dom` to `react-router` for better compatibility * **Enhancement**: Repository metadata added to package.json * **Enhancement**: Dependency updates and optimizations ### Fixes * **Fix**: Agent access to resources and prompts * **Fix**: Import paths in CLI to avoid mixing dependencies * **Fix**: UUID generation and URL handling improvements * **Fix**: Various formatting and linting improvements ## Deno stateless mode Patch release fixing stateless server mode when running on Deno. * **Fix**: stateless mode works correctly on Deno * **Update**: Updated @mcp-use/inspector to v0.12.6 * **Update**: Updated @mcp-use/cli to v2.5.6 Release 1.10.0 ## API Improvements & Session Management Enhanced APIs with better type safety and improved session management capabilities. ### Breaking Changes * **Breaking**: Renamed `createMCPServer()` factory function to `MCPServer` class constructor. Factory function still available for backward compatibility but new code should use `new MCPServer({ name, ... })`. * **Breaking**: Replaced `session.connector.tools`, `session.connector.callTool()`, etc. with direct session methods: `session.tools`, `session.callTool()`, `session.listResources()`, `session.readResource()`, etc. * **Breaking**: Standardized OAuth environment variables to `MCP_USE_OAUTH_*` prefix (e.g., `AUTH0_DOMAIN` → `MCP_USE_OAUTH_AUTH0_DOMAIN`). ### New Features * **New**: Client Capabilities API with `ctx.client.can()` and `ctx.client.capabilities()` to check client capabilities in tool callbacks * **New**: Session Notifications API with `ctx.sendNotification()` and `ctx.sendNotificationToSession()` for sending notifications from tool callbacks * **New**: Session Info API with `ctx.session.sessionId` to access current session ID in tool callbacks * **New**: Resource Template Flat Structure support with `uriTemplate` directly on definition (in addition to nested structure) * **New**: Resource Template Callback Signatures now support multiple signatures: `()`, `(uri)`, `(uri, params)`, `(uri, params, ctx)` * **New**: Type Exports for `CallToolResult`, `Tool`, `ToolAnnotations`, `PromptResult`, `GetPromptResult` types ### Improvements * **Enhancement**: Enhanced type inference for resource template callbacks with better overload support * **Enhancement**: Server now captures and stores client capabilities during initialization * **Enhancement**: Added convenience methods to `MCPSession` for all MCP operations (listResources, readResource, subscribeToResource, listPrompts, getPrompt, etc.) * **Enhancement**: Major documentation refactoring and restructuring for better organization ### Fixes (v1.10.1 - v1.10.6) * **Fix**: Stateless mode for Deno runtime * **Fix**: Added CORS support to `getHandler()` method * **Fix**: Deno 5 compatibility improvements * **Fix**: Deno 3 compatibility fixes * **Fix**: Zod error handling improvements * **Fix**: Zod import in official SDK * **Fix**: Clear transport when session becomes idle * **Fix**: Allow agent to access resources and prompts * **Enhancement**: Added repository metadata in package.json Release 1.9.0 ## Elicitation Support Added comprehensive elicitation support following MCP specification, enabling servers to request user input through clients. * **New**: Simplified API with `ctx.elicit(message, zodSchema)` and `ctx.elicit(message, url)` with automatic mode detection * **New**: Form Mode for structured data collection with Zod schema validation and full TypeScript type inference * **New**: URL Mode to direct users to external URLs for sensitive operations (OAuth, credentials) * **New**: Server-side validation with automatic Zod validation and clear error messages * **New**: Client support via `elicitationCallback` to MCPClient and `onElicitation` to React `useMcp` hook * **Enhancement**: Type-safe return types automatically inferred from Zod schemas * **Enhancement**: Configurable timeout with 5-minute default for user interactions * **Fix**: Transport bug fixes Release 1.8.0 ## Sampling Support Added sampling support in inspector with improved timeout handling for long-running requests. * **New**: LLM sampling capabilities in inspector * **Fix**: Long running sampling requests no longer timeout after 60 seconds * **Enhancement**: Better handling of extended sampling operations Release 1.7.0 ## OAuth Authentication System Complete OAuth 2.0 support with built-in providers and enhanced server capabilities. * **New**: Complete OAuth 2.0 authentication framework with built-in providers (Auth0, WorkOS, Supabase, Keycloak) * **New**: OAuth middleware and routes for server-side OAuth flow handling with automatic token management * **New**: OAuth callback component in inspector for authentication flows * **New**: Context storage with async local storage for request-scoped context in servers * **New**: Response helpers for standardized HTTP responses and error handling * **New**: Runtime detection utilities for Node.js, Bun, and Deno environments * **New**: Server authentication examples for Auth0, WorkOS, and Supabase * **Enhancement**: Enhanced useMcp hook with improved connection management and OAuth support * **Enhancement**: Enhanced inspector dashboard with OAuth configuration UI * **Enhancement**: Better authentication flow handling with OAuth integration * **Enhancement**: Enhanced HTTP connectors with OAuth token handling * **Fix**: Dependency optimizations and AI SDK updates Release 1.6.0 ## Notifications & Sampling Bidirectional notification support and LLM sampling capabilities. * **New**: Bidirectional notification support between clients and servers with handler registration * **New**: LLM sampling allowing MCP tools to request completions from connected clients * **New**: Widget build ID support for cache busting in widget UI resources * **New**: Inspector notifications tab with real-time display * **New**: Server capabilities modal showing supported MCP features * **Enhancement**: Refactored HTTP transport to reuse sessions across requests with configurable idle timeout * **Enhancement**: Session management with tracking and automatic cleanup * **Enhancement**: Roots support in connectors and session API * **Enhancement**: Session event handling API for notification registration * **Enhancement**: Server methods for session management and targeted notifications * **Enhancement**: Enhanced search\_tools with metadata (total\_tools, namespaces, result\_count) * **Enhancement**: RPC message logging support in inspector Release 1.5.0 ## OpenAI Apps SDK Integration Release with comprehensive OpenAI Apps SDK support and widget system. * **New**: McpUseProvider component combining React setup (StrictMode, ThemeProvider, BrowserRouter, ErrorBoundary) * **New**: WidgetControls component with debug overlay and view controls (fullscreen, PIP) * **New**: useWidget hook for type-safe React adapter to OpenAI Apps SDK API * **New**: ErrorBoundary component for graceful error handling * **New**: Image component handling data URLs and public file paths * **New**: ThemeProvider for consistent theme management * **New**: WidgetInspectorControls for inspector-specific debugging * **New**: Console proxy toggle for iframe console logs * **New**: Product search result widget template with carousel and accordion components * **New**: Folder-based widget support with automatic detection * **New**: Public folder support for static assets * **Enhancement**: Enhanced SSR configuration with proper Vite settings * **Enhancement**: Improved OpenAI component renderer with better height calculation * **Enhancement**: Enhanced tool result display with multiple content types * **Enhancement**: Resizable panels with collapse support * **Enhancement**: Better widget security headers and CSP configuration Release 1.4.0 ## Code Mode Introduced code execution capabilities for agents. * **New**: Code Mode feature allowing agents to execute code using MCP tools * **New**: VMCodeExecutor for local execution environments * **New**: E2BCodeExecutor for remote execution in cloud sandboxes * **New**: CodeModeConnector for tool discovery and execution * **Enhancement**: Enhanced MCPClient with code execution configuration * **Enhancement**: Comprehensive tests for code execution functionality Release 1.3.0 ## Edge Runtime Support Migrated to Hono framework for edge runtime compatibility. * **Major**: Migrated from Express to Hono framework for edge runtime support (Cloudflare Workers, Deno Deploy, Supabase) * **New**: Runtime detection for Deno and Node.js environments * **New**: Connect middleware adapter for compatibility * **New**: `getHandler()` method for edge deployment * **New**: Supabase deployment documentation and templates * **Enhancement**: Improved MCPAgent message detection with robust helpers for different LangChain formats * **Enhancement**: Fixed server base URL handling for proper connection and routing * **Enhancement**: Better auto-connection logic with error handling and retry mechanisms * **Enhancement**: Enhanced useMcp hook with improved connection state management Release 1.2.0 ## LangChain 1.0.0 Support Updated to support LangChain 1.0.0 with improved compatibility. * **Major**: Support for LangChain 1.0.0 * **Fix**: Model type compatibility for LangChain 1.0.0 * **Fix**: Apps SDK metadata setup from widget build * **Enhancement**: Set CLI and inspector as dependencies Release 1.1.0 ## Apps SDK Initial Integration First integration of OpenAI Apps SDK support. * **New**: OpenAI Apps SDK integration with UI resource type * **New**: Enhanced MCP-UI adapter for Apps SDK metadata * **New**: Resource URI format supporting `ui://widget/` scheme * **New**: Tool definitions with Apps SDK-specific metadata * **Enhancement**: Comprehensive test suite for Apps SDK resources * **Refactor**: Renamed `fn` to `cb` in tool and prompt definitions for consistency * **Refactor**: Updated resource definitions to use `readCallback` # Introduction Source: https://docs.mcp-use.com/v2/typescript/agent/index Build a TypeScript MCP agent that calls tools from MCP servers. `MCPAgent` from `@mcp-use/agent` connects a model to MCP tools, runs a bounded tool-calling loop, and returns the model's final answer. ## Install the agent ```bash npm theme={null} npm install @mcp-use/agent @mcp-use/client ``` ```bash pnpm theme={null} pnpm add @mcp-use/agent @mcp-use/client ``` ```bash bun theme={null} bun add @mcp-use/agent @mcp-use/client ``` `@mcp-use/agent` requires Node.js 22.22.2 or later. ## Run your first agent Set `OPENAI_API_KEY`, then run this example from a directory the filesystem server may read. ```typescript theme={null} import { MCPAgent } from "@mcp-use/agent"; async function main() { const agent = new MCPAgent({ llm: "openai/gpt-4o", mcpServers: { filesystem: { command: "npx", args: ["-y", "@modelcontextprotocol/server-filesystem", "./"], }, }, }); try { await agent.initialize(); const result = await agent.run({ prompt: "List the files in this directory, then summarize what the project does.", }); console.log(result); } finally { await agent.close(); } } main().catch(console.error); ``` A successful run prints a text answer based on the files the MCP server returned. Initialization is manual by default. Call `await agent.initialize()` before `run()`, `stream()`, or `streamEvents()`. Set `autoInitialize: true` only when you want the first call to initialize the agent for you. ## Understand the runtime defaults `maxSteps` defaults to `10`. Override it for the agent or for one call: ```typescript theme={null} const agent = new MCPAgent({ llm: "openai/gpt-4o", mcpServers, maxSteps: 15, }); await agent.initialize(); const result = await agent.run({ prompt: "Complete the audit.", maxSteps: 20 }); await agent.close(); ``` Conversation memory is enabled by default. Memory stores the user prompt and final assistant text from successful `run()` and `stream()` calls. It does not store tool transcripts or `streamEvents()` output. When you pass `mcpServers`, the agent creates and owns its `MCPClient`; `close()` closes those sessions. If you pass an existing client or connectors, their lifecycle remains under your control. ## Choose the next guide Configure OpenAI, Anthropic, Google, OpenRouter, Ollama, or an OpenAI-compatible endpoint. Inspect, disable, and clear conversation history. Stream tool steps or provider-neutral events. Add LangChain models, structured output, Server Manager, and callbacks. # Overview Source: https://docs.mcp-use.com/v2/typescript/agent/langchain/index Set up LangChainMCPAgent with a LangChain chat model and MCP tools. `LangChainMCPAgent` connects LangChain chat models and callbacks to MCP tools. Import it from `@mcp-use/agent/langchain`. ## When to use LangChainMCPAgent Use `LangChainMCPAgent` when you need at least one of these capabilities: * an existing LangChain chat model or custom LangChain tool; * Zod structured-output conversion after an agent run; * LangChain `StreamEvent` output or `prettyStreamEvents()`; * Server Manager for on-demand access to one MCP server's tools; or * LangChain callbacks, Langfuse tracing, metadata, and tags. ## Install LangChainMCPAgent Install the agent package, LangChain core packages, and the provider package for your model. ```bash npm theme={null} npm install @mcp-use/agent @mcp-use/client langchain @langchain/core @langchain/openai ``` ```bash pnpm theme={null} pnpm add @mcp-use/agent @mcp-use/client langchain @langchain/core @langchain/openai ``` ```bash bun theme={null} bun add @mcp-use/agent @mcp-use/client langchain @langchain/core @langchain/openai ``` Add `zod` for structured output. Add `langfuse` and `langfuse-langchain` for built-in Langfuse tracing. ## Run a LangChain agent Set `OPENAI_API_KEY`, then run: ```typescript theme={null} import { ChatOpenAI } from "@langchain/openai"; import { MCPClient } from "@mcp-use/client"; import { LangChainMCPAgent } from "@mcp-use/agent/langchain"; async function main() { const client = new MCPClient({ mcpServers: { filesystem: { command: "npx", args: ["-y", "@modelcontextprotocol/server-filesystem", "./"], }, }, }); const agent = new LangChainMCPAgent({ llm: new ChatOpenAI({ model: "gpt-4o", temperature: 0 }), client, }); try { await agent.initialize(); const result = await agent.run({ prompt: "Read package.json and summarize the project scripts.", }); console.log(result); } finally { await agent.close(); } } main().catch(console.error); ``` A successful run prints a text answer based on `package.json`. `LangChainMCPAgent` defaults to `5` model-call steps. `LangChainMCPAgent.close()` closes its MCP client even when you supplied that client. Do not share the client with work that must continue after the agent closes. ## Next steps Convert final text into validated Zod data. Load one server's tools on demand. Trace runs with Langfuse or custom callbacks. # Observability Source: https://docs.mcp-use.com/v2/typescript/agent/langchain/observability Trace LangChainMCPAgent runs with Langfuse or custom LangChain callbacks. `LangChainMCPAgent` passes callbacks, metadata, and tags into LangChain agent execution. Use the built-in Langfuse integration or provide your own LangChain callbacks. ## Trace a run with Langfuse Install both Langfuse packages: ```bash theme={null} npm install langfuse langfuse-langchain ``` Set credentials before the process imports `@mcp-use/agent/langchain`: ```bash theme={null} export LANGFUSE_PUBLIC_KEY="pk-lf-..." export LANGFUSE_SECRET_KEY="sk-lf-..." export LANGFUSE_HOST="https://cloud.langfuse.com" ``` Then initialize and run the agent: ```typescript theme={null} import { ChatOpenAI } from "@langchain/openai"; import { MCPClient } from "@mcp-use/client"; import { LangChainMCPAgent } from "@mcp-use/agent/langchain"; async function main() { const client = new MCPClient({ mcpServers: { filesystem: { command: "npx", args: ["-y", "@modelcontextprotocol/server-filesystem", "./"], }, }, }); const agent = new LangChainMCPAgent({ llm: new ChatOpenAI({ model: "gpt-4o", temperature: 0 }), client, }); agent.setMetadata({ trace_name: "project-audit", session_id: "session-123", user_id: "user-456", environment: "production", }); agent.setTags(["docs", "project-audit"]); try { await agent.initialize(); const result = await agent.run({ prompt: "Inspect package.json and summarize the project scripts.", }); console.log(result); } finally { await agent.flush(); await agent.close(); } } main().catch(console.error); ``` Initialization auto-detects Langfuse only when both keys are present and `langfuse-langchain` can be imported. If no handler is available, the agent still runs without traces. ## Add metadata and tags `setMetadata()` merges new values into existing metadata. `setTags()` appends tags and removes duplicates. Both apply to later `stream()` and `streamEvents()` executions. Two metadata keys also control LangChain and Langfuse behavior: * `trace_name` sets the LangChain run name. The default is `mcp-use-agent`. * `session_id` is forwarded as the Langfuse session ID. The built-in Langfuse handler also recognizes `user_id`, adds MCP server metadata during initialization, and adds environment and agent tags when configured. Metadata keys replace characters outside letters, numbers, underscores, and hyphens with `_`. Arrays keep only primitive values. Serializable objects longer than 1,000 characters are stored as truncated strings. Unsupported or circular values are skipped. Tags allow letters, numbers, underscores, colons, and hyphens. Invalid characters become `_`, and tags longer than 50 characters are removed. ## Use custom callbacks Constructor callbacks replace auto-detected callbacks; they are not merged with the built-in Langfuse handler. ```typescript theme={null} import { ChatOpenAI } from "@langchain/openai"; import { CallbackHandler } from "langfuse-langchain"; import { MCPClient } from "@mcp-use/client"; import { LangChainMCPAgent } from "@mcp-use/agent/langchain"; const callback = new CallbackHandler({ publicKey: process.env.LANGFUSE_PUBLIC_KEY, secretKey: process.env.LANGFUSE_SECRET_KEY, baseUrl: process.env.LANGFUSE_HOST, }); const agent = new LangChainMCPAgent({ llm: new ChatOpenAI({ model: "gpt-4o" }), client: new MCPClient({ mcpServers }), callbacks: [callback], }); try { await agent.initialize(); console.log(await agent.run({ prompt: "Complete the traced task." })); } finally { await agent.flush(); await agent.close(); } ``` Custom callback objects receive normal LangChain lifecycle events. If a callback implements `flushAsync()`, `agent.flush()` calls it. During `agent.close()`, the observability manager flushes again, then calls `shutdownAsync()` or `shutdown()` when implemented. ## Flush and clean up Call `await agent.flush()` before a serverless function or short-lived process exits. It waits for each configured callback's `flushAsync()` method when present. Always call `await agent.close()` for full cleanup. Closing: 1. flushes and shuts down observability callbacks; 2. clears the LangChain executor and tool list; 3. closes the MCP client or direct connectors; and 4. marks the agent uninitialized. ## Disable callback discovery Set `observe: false` to disable all observability callbacks, including custom callbacks: ```typescript theme={null} const agent = new LangChainMCPAgent({ llm, client, observe: false, }); await agent.initialize(); console.log((await agent.observabilityManager.getStatus()).enabled); // false await agent.close(); ``` Set `MCP_USE_LANGFUSE=false` when you want callbacks in general but do not want built-in Langfuse auto-detection. ## Next steps * [Use structured output](/v2/typescript/agent/langchain/structured-output) * [Route tools with Server Manager](/v2/typescript/agent/langchain/server-manager) # Server Manager Source: https://docs.mcp-use.com/v2/typescript/agent/langchain/server-manager Let LangChainMCPAgent load one MCP server's tools on demand. Server Manager gives `LangChainMCPAgent` management tools first, then exposes the active MCP server's tools after the model selects a server. Use it when loading every tool from every configured server would create an oversized or confusing tool list. ## Enable Server Manager Server Manager requires explicit mode with an `MCPClient`. It cannot run with connectors alone. ```typescript theme={null} import { ChatOpenAI } from "@langchain/openai"; import { MCPClient } from "@mcp-use/client"; import { LangChainMCPAgent } from "@mcp-use/agent/langchain"; async function main() { const client = new MCPClient({ mcpServers: { filesystem: { command: "npx", args: ["-y", "@modelcontextprotocol/server-filesystem", "/tmp"], }, browser: { command: "npx", args: ["@playwright/mcp@latest"], }, }, }); const agent = new LangChainMCPAgent({ llm: new ChatOpenAI({ model: "gpt-4o", temperature: 0 }), client, useServerManager: true, maxSteps: 12, }); try { await agent.initialize(); const result = await agent.run({ prompt: "List the available MCP servers, select the filesystem server, and summarize /tmp.", }); console.log(result); } finally { await agent.close(); } } main().catch(console.error); ``` A successful run lists the configured servers, activates `filesystem`, and uses its tools. The agent rebuilds its LangChain executor when the active tool set changes. ## Understand the management tools | Tool | Behavior | | - | - | | `list_mcp_servers` | Lists configured server names and cached item counts. Counts can be zero before tools are loaded or prefetched. | | `connect_to_mcp_server` | Reuses or creates a session, activates the server, and loads its tools, resources, and prompts when not cached. | | `get_active_mcp_server` | Reports the selected active server without changing it. | | `disconnect_from_mcp_server` | Releases the active selection so its cached tools are no longer exposed. | | `add_mcp_server_from_config` | Adds a server, creates its session, loads its tools, and makes it active. | Only one server is active at a time. The five management tools remain available alongside the active server's cached tools. `add_mcp_server_from_config` loads tools only. `connect_to_mcp_server` loads tools, resources, and prompts when it first caches a configured server. ## Release a server without closing its session Despite its tool name, `disconnect_from_mcp_server` does not close the underlying MCP session. It sets the active server to `null`; the session and cached tools remain available for later selection. Use `await agent.close()` to finish the agent lifecycle. `LangChainMCPAgent` shuts down observability, clears its executor and tools, and closes the `MCPClient` sessions. ## Customize the manager Import `ServerManager` and `LangChainAdapter` from the LangChain subpath. Use `serverManagerFactory` when you need to prefetch tools or provide a custom manager instance. ```typescript theme={null} import { LangChainAdapter, LangChainMCPAgent, ServerManager, } from "@mcp-use/agent/langchain"; const agent = new LangChainMCPAgent({ llm, client, useServerManager: true, serverManagerFactory: (managerClient) => { const adapter = new LangChainAdapter(); return new ServerManager(managerClient, adapter); }, }); await agent.initialize(); await agent.close(); ``` `prefetchServerTools()` caches tools, resources, and prompts for configured servers. It can create sessions and leaves those sessions open until client cleanup. ## Know when to skip it For one or two small servers, load tools normally. Server Manager adds a model decision before the first server tool call and can restart execution when the exposed tool set changes. ## Next steps * [Set up LangChainMCPAgent](/v2/typescript/agent/langchain/index) * [Trace Server Manager runs](/v2/typescript/agent/langchain/observability) # Structured output Source: https://docs.mcp-use.com/v2/typescript/agent/langchain/structured-output Convert LangChainMCPAgent results into validated Zod data. Pass a Zod `schema` to `LangChainMCPAgent` when you need validated data. The agent completes the task first, then asks the model to convert the final text and validates the result with Zod. ## Return a typed result Install `zod`, set `OPENAI_API_KEY`, and run: ```typescript theme={null} import { ChatOpenAI } from "@langchain/openai"; import { MCPClient } from "@mcp-use/client"; import { LangChainMCPAgent } from "@mcp-use/agent/langchain"; import { z } from "zod"; const ProjectSummary = z.object({ packageName: z.string().nullable(), scripts: z.array(z.string()), hasTests: z.boolean(), notes: z.string(), }); async function main() { const client = new MCPClient({ mcpServers: { filesystem: { command: "npx", args: ["-y", "@modelcontextprotocol/server-filesystem", "./"], }, }, }); const agent = new LangChainMCPAgent({ llm: new ChatOpenAI({ model: "gpt-4o", temperature: 0 }), client, maxSteps: 8, }); try { await agent.initialize(); const summary = await agent.run({ prompt: "Inspect package.json and summarize the project.", schema: ProjectSummary, }); console.log(summary.scripts); } finally { await agent.close(); } } main().catch(console.error); ``` A successful call returns `z.infer`. It does not return the raw final text. ## Choose a structured-output method | Method | During agent execution | Structured result | Conversion failure | | - | - | - | - | | `run()` | Does not yield progress | Resolves to the validated value | Rejects with `Failed to generate structured output: ...` | | `stream()` | Yields tool-call `AgentStep` values | Returns the validated value from the generator | Throws from the generator | | `streamEvents()` | Yields LangChain v2 events | Emits `on_structured_output` after the LangChain stream | Emits `on_structured_output_error`; it does not return the value | `run()` consumes `stream()` internally, so both methods use the same conversion path. ## Read the return value from `stream()` A `for await` loop cannot read an async generator's return value. Call `next()` until `done` when you need the validated result: ```typescript theme={null} const stream = agent.stream({ prompt: "Inspect package.json and summarize the project.", schema: ProjectSummary, }); while (true) { const next = await stream.next(); if (next.done) { console.log(next.value.scripts); break; } console.log(`Called ${next.value.action.tool}`); } ``` Tool steps are yielded before conversion. Conversion begins only after the agent produces non-empty final text. ## Handle structured events `streamEvents()` adds the schema description to the task so the agent gathers the required fields. It yields the underlying LangChain v2 events first, then custom conversion events: ```typescript theme={null} for await (const event of agent.streamEvents({ prompt: "Inspect package.json and summarize the project.", schema: ProjectSummary, })) { if (event.event === "on_structured_output_progress") { console.log(event.data?.message); } if (event.event === "on_structured_output") { const summary = ProjectSummary.parse(event.data?.output); console.log(summary.scripts); } if (event.event === "on_structured_output_error") { throw new Error(String(event.data?.error)); } } ``` Progress events are emitted every two seconds while conversion is still running. `streamEvents()` returns `void`; store the `on_structured_output` payload yourself. ## Handle validation boundaries `LangChainMCPAgent` uses `withStructuredOutput(schema)` when the model implements it. Otherwise, it prompts the same model to format JSON. It validates the result and retries conversion up to three times, including the previous validation error in later attempts. After three failures, the conversion error includes: ```text theme={null} Failed to generate valid structured output after 3 attempts. Last error: ... ``` `run()` and `stream()` wrap that message in `Failed to generate structured output: ...`. `streamEvents()` emits the message in `on_structured_output_error`. Required fields fail validation when they are `null`, `undefined`, an empty string, or an empty array, even if a broad Zod schema would otherwise accept the empty value. Mark genuinely missing values as optional or nullable. Conversion runs only when the agent produces non-empty final text. If no final text exists, `run()` and `stream()` currently return `"No output generated"` even when `schema` is set. Treat that string as an unsuccessful structured result. ## Next steps * [Trace LangChain runs](/v2/typescript/agent/langchain/observability) # LLM providers Source: https://docs.mcp-use.com/v2/typescript/agent/llm-providers Configure MCPAgent for OpenAI, Anthropic, Google, OpenRouter, Ollama, or an OpenAI-compatible endpoint. `MCPAgent` supports OpenAI, Anthropic, Google, OpenRouter, Ollama, and OpenAI-compatible endpoints. Configure a provider with a `"provider/model"` string or a `ProviderConfig`. ## Choose a provider | Provider prefix | API key lookup | Configuration note | | - | - | - | | `openai` | `OPENAI_API_KEY` | Uses the built-in OpenAI provider. | | `anthropic` | `ANTHROPIC_API_KEY` | Uses the built-in Anthropic provider. | | `google` | `GOOGLE_API_KEY` or `GOOGLE_GENERATIVE_AI_API_KEY` | Uses the built-in Google provider. | | `openrouter` | `OPENROUTER_API_KEY` | Model names may contain `/`, such as `openai/gpt-4o`. | | `ollama` | No key required | Defaults to `http://localhost:11434`. | | `openai-compatible` | `OPENAI_API_KEY` or `llmConfig.apiKey` | Requires the endpoint in `llmConfig.baseUrl`. | ## Configure a provider string Set the provider's environment variable before starting the process. The agent resolves the key when it initializes. ```typescript theme={null} import { MCPAgent } from "@mcp-use/agent"; async function main() { const agent = new MCPAgent({ llm: "anthropic/claude-sonnet-4-6", llmConfig: { temperature: 0.2, maxTokens: 1_000, }, mcpServers: { filesystem: { command: "npx", args: ["-y", "@modelcontextprotocol/server-filesystem", "./"], }, }, }); try { await agent.initialize(); const result = await agent.run({ prompt: "Read package.json and list the available scripts.", }); console.log(result); } finally { await agent.close(); } } main().catch(console.error); ``` A successful run prints scripts found through the filesystem MCP server. The string parser accepts model names that contain `/`. For example, `openrouter/openai/gpt-4o` selects the `openrouter` provider and passes `openai/gpt-4o` as the model name. ## Connect an OpenAI-compatible endpoint Use `openai-compatible` for an endpoint that implements OpenAI chat-completions semantics. Supply the full API base URL and any required headers. ```typescript theme={null} import { MCPAgent, type ProviderConfig } from "@mcp-use/agent"; const provider: ProviderConfig = { provider: "openai-compatible", model: "my-tool-calling-model", apiKey: process.env.COMPATIBLE_API_KEY ?? "local", baseUrl: "http://localhost:8000/v1", extraHeaders: { "X-Workspace": "docs-example", }, }; const agent = new MCPAgent({ llm: provider, mcpServers }); try { await agent.initialize(); const result = await agent.run({ prompt: "Call one available tool and report its result.", }); console.log(result); } finally { await agent.close(); } ``` Verify that the selected model supports tool calling. A reachable text-only model cannot use MCP tools. ## Handle configuration errors Initialization throws when: * a provider string is not in `provider/model` form; * the provider prefix is unsupported; * a required API key is missing; or * no model driver can be created. Keep provider-specific tuning in `llmConfig` or `ProviderConfig`. See the [MCPAgent API reference](https://mcp-use-typescript-api-reference.vercel.app/modules/_mcp-use_agent.index.html#mcpagent) for the complete option types. ## Next steps * [Build an MCP agent](/v2/typescript/agent/index) * [Stream agent output](/v2/typescript/agent/streaming) # Memory management Source: https://docs.mcp-use.com/v2/typescript/agent/memory-management Inspect, disable, persist, and clear MCPAgent conversation history. `MCPAgent` keeps conversation history in memory by default. Successful `run()` and `stream()` calls store the user prompt and final assistant text as `ProviderMessage[]`. ## Keep conversation context This example completes two turns, inspects the stored messages, and then clears them. ```typescript theme={null} import { MCPAgent, type ProviderMessage } from "@mcp-use/agent"; async function main() { const agent = new MCPAgent({ llm: "openai/gpt-4o", mcpServers: { filesystem: { command: "npx", args: ["-y", "@modelcontextprotocol/server-filesystem", "./"], }, }, }); try { await agent.initialize(); await agent.run({ prompt: "My project codename is Cedar." }); const answer = await agent.run({ prompt: "What is the project codename?" }); console.log(answer); const history: ProviderMessage[] = agent.getConversationHistory(); console.log(history.map(({ role, content }) => ({ role, content }))); agent.clearConversationHistory(); console.log(agent.getConversationHistory().length); // 0 } finally { await agent.close(); } } main().catch(console.error); ``` After two successful calls, history normally contains four messages: one user and one assistant message for each turn. ## Know what is stored Conversation history uses the provider-neutral `ProviderMessage` shape. Each message has a `role` and `content`; provider messages can also represent tool calls and results. The agent's automatic memory is narrower: * `run()` and `stream()` append the prompt and final assistant text after a successful call. * Tool calls and tool results are not appended to automatic memory. * `streamEvents()` does not append any conversation history. * Per-call `messages` and `externalHistory` affect that call but are not copied into stored history. * A failed or aborted call does not append the prompt as a completed turn. `getConversationHistory()` returns a new array. Changing that array does not replace agent memory, although message objects inside it are not deep-cloned. ## Disable memory Set `memoryEnabled: false` when every call must start with only the system prompt, per-call messages, and current prompt. ```typescript theme={null} const agent = new MCPAgent({ llm: "openai/gpt-4o", mcpServers, memoryEnabled: false, }); await agent.initialize(); await agent.run({ prompt: "Remember the number 42." }); const result = await agent.run({ prompt: "What number did I give you?" }); console.log(result); await agent.close(); ``` With memory disabled, the second call does not receive the first turn from agent memory. ## Persist history outside the agent History lives only on the `MCPAgent` instance. It is not written to disk or restored after a process restart. Store `getConversationHistory()` in your application if you need durable conversations. Pass restored `ProviderMessage` values through `messages` for a later call: ```typescript theme={null} const savedHistory: ProviderMessage[] = agent.getConversationHistory(); const result = await anotherAgent.run({ messages: savedHistory, prompt: "Continue from the saved conversation.", }); ``` Passing `messages` provides context for that call. It does not seed `anotherAgent`'s internal history. ## Clear a conversation `clearConversationHistory()` removes all stored conversation messages immediately. The system prompt is held separately, so clearing history does not change it. Closing an agent does not clear its in-memory history. If you initialize the same instance again, its stored conversation remains until you clear it or discard the instance. ## Next steps * [Stream agent output](/v2/typescript/agent/streaming) * [Configure an LLM provider](/v2/typescript/agent/llm-providers) # Streaming Source: https://docs.mcp-use.com/v2/typescript/agent/streaming Stream MCPAgent tool steps and provider-neutral LLM events. `MCPAgent` provides two streaming APIs. Use `stream()` for tool-step progress and a final string. Use `streamEvents()` for provider-neutral token, tool, usage, error, and completion events. | Method | Use it for | Output | | - | - | - | | `stream()` | Tool progress and a final answer | Yields `AgentStep`; returns the final string | | `streamEvents()` | Token UIs and detailed tool lifecycle state | Yields `LlmStreamEvent`; returns `void` | ## Stream tool steps Read the generator directly when you need both yielded steps and its final return value. ```typescript theme={null} import { MCPAgent } from "@mcp-use/agent"; async function main() { const agent = new MCPAgent({ llm: "openai/gpt-4o", mcpServers: { filesystem: { command: "npx", args: ["-y", "@modelcontextprotocol/server-filesystem", "./"], }, }, }); try { await agent.initialize(); const stream = agent.stream({ prompt: "Inspect package.json and summarize the project scripts.", }); while (true) { const next = await stream.next(); if (next.done) { console.log("Final answer:", next.value); break; } console.log(`Tool: ${next.value.action.tool}`); console.log(`Input: ${JSON.stringify(next.value.action.toolInput)}`); if (next.value.observation) { console.log(`Result: ${next.value.observation}`); } } } finally { await agent.close(); } } main().catch(console.error); ``` For each tool call, `stream()` can yield an initial step with an empty `observation`, followed by another step containing the tool result. A `for await` loop receives the steps but does not expose the generator's final return value. ## Stream provider-neutral events `streamEvents()` uses the same `LlmStreamEvent` variants for every supported provider. ```typescript theme={null} import { MCPAgent, type LlmStreamEvent } from "@mcp-use/agent"; async function main() { const agent = new MCPAgent({ llm: "openai/gpt-4o", mcpServers: { filesystem: { command: "npx", args: ["-y", "@modelcontextprotocol/server-filesystem", "./"], }, }, }); let answer = ""; try { await agent.initialize(); for await (const event of agent.streamEvents({ prompt: "List the TypeScript files and summarize their purpose.", })) { handleEvent(event); if (event.type === "text-delta") { answer += event.delta; } } console.log("\nFinal answer:", answer); } finally { await agent.close(); } } function handleEvent(event: LlmStreamEvent) { switch (event.type) { case "tool-call-ready": console.log(`\nCalling ${event.toolName}`, event.args); break; case "tool-result": console.log(`\n${event.toolName} finished; error=${event.isError}`); break; case "error": console.error(`\nModel error: ${event.message}`); break; } } main().catch(console.error); ``` Accumulate `text-delta` values when your UI needs the complete final answer. `streamEvents()` itself returns no result and does not write the streamed turn to conversation memory. ## Handle every event variant | `type` | Meaning | | - | - | | `text-delta` | A text fragment from the model | | `tool-call-start` | The model started producing a tool call | | `tool-call-args-delta` | A partial JSON argument fragment; concatenate fragments before parsing | | `tool-call-ready` | A complete tool name and parsed argument object | | `tool-result` | The tool result, with `isError` indicating tool failure | | `usage` | Provider token usage, when available | | `error` | A model-loop error message | | `done` | The tool loop finished | Tool execution failures are emitted as `tool-result` with `isError: true`. Other streaming failures can appear as `error`. Decide whether your UI should show a partial answer, retry, or fail the request. ## Cancel a stream Pass an `AbortSignal` through the run options: ```typescript theme={null} const controller = new AbortController(); const timeout = setTimeout(() => controller.abort(), 5_000); try { for await (const event of agent.streamEvents({ prompt: "Perform a long audit.", signal: controller.signal, })) { console.log(event.type); } } finally { clearTimeout(timeout); } ``` ## Next steps * [Manage conversation memory](/v2/typescript/agent/memory-management) * [Configure an LLM provider](/v2/typescript/agent/llm-providers) # CLI Reference Source: https://docs.mcp-use.com/v2/typescript/api-reference/cli-reference Command reference for the @mcp-use/cli package and mcp-use executable. The `mcp-use` package installs the `mcp-use` executable and includes the prebuilt `@mcp-use/cli` implementation. Use this page as the exhaustive command reference for local development, production builds, cloud deploys, saved MCP client sessions, and CLI environment variables. For hands-on workflows, see the [CLI Client guide](/v2/typescript/tooling/client-cli), [Tunneling guide](/tunneling/index), and [Manufact Cloud deployment guide](/v2/typescript/server/deployment/mcp-use). ## Command map `mcp-use dev` starts the development server, view watcher, and Inspector. `mcp-use build` writes production artifacts. `mcp-use start` runs the built server. `mcp-use deploy`, `mcp-use deployments`, and `mcp-use servers` manage Manufact Cloud resources. `mcp-use client` saves MCP servers, calls tools, reads resources, gets prompts, and handles OAuth. `mcp-use dev --tunnel` exposes a local server through a public URL. `mcp-use typecheck` refreshes MCP view types and runs the project's own TypeScript compiler. ## Install the CLI Most projects install the framework, CLI, and Inspector together: ```bash theme={null} npm install mcp-use ``` The CLI package can also be installed directly: ```bash theme={null} npm install -g @mcp-use/cli ``` ```bash theme={null} npx @mcp-use/cli dev ``` ```bash theme={null} npm install --save-dev @mcp-use/cli ``` `create-mcp-use-app` installs `mcp-use`, which supplies the CLI and Inspector at matching versions. ## `dev` **Purpose:** Start a development server with TypeScript watching, view builds, automatic reloads, and the Inspector. **Syntax:** ```bash theme={null} mcp-use dev [options] ``` **Options:** | Option | Description | Default | | - | - | - | | `--path ` | Project root used for entry/view discovery, `.env`, and `tsconfig.json`. | Current directory | | `--entry ` | MCP server entry file, relative to the project. | Auto-detected | | `--mcp-dir ` | MCP source directory containing the entry and `views/`. | None | | `--views-dir ` | View directory, relative to the project root. | `views/` or `/views/` | | `--port ` | Server port. | `PORT` or `3000` | | `--host ` | Bind address. Use `0.0.0.0` to listen on all interfaces. | `HOST` or `127.0.0.1` | | `--no-open` | Do not open the Inspector automatically. | Opens by default | | `--no-inspector` | Run without loading the project-local Inspector. | Inspector enabled | | `--tunnel` | Create a public tunnel for the local server. | Disabled | **Examples:** ```bash theme={null} mcp-use dev mcp-use dev --port 8080 mcp-use dev --host 127.0.0.1 --no-open mcp-use dev --mcp-dir src/mcp mcp-use dev --entry src/server.ts --views-dir src/views mcp-use dev --path apps/web --entry ../mcp/src/server.ts --views-dir ../mcp/src/views mcp-use dev --tunnel ``` **Notes and behavior:** * The MCP endpoint is served at `/mcp`. * Address precedence is `--port` / `--host`, then `PORT` / `HOST`, then the defaults. `dev` does not import the server until after its listener is chosen, so it cannot use a server-configured address. * The Inspector supplied by `mcp-use` is mounted at `/mcp/inspector` and opens automatically unless `--no-open` is set. * Inspector UI, proxy, and OAuth routes remain local-only. A public tunnel exposes the MCP endpoint but returns `404` for `/mcp/inspector`. * The command sets `NODE_ENV=development` when it is not already set and sets `PORT` to the chosen listener port before importing the entry. * When `MCP_URL` is unset and the listener binds a loopback host, the command sets `MCP_URL` to `http://localhost:` only while it imports the entry, so module-scope OAuth configuration sees the local origin. Request handlers and tool code do not see this value. With `--tunnel`, the command still sets this local value and does not replace it with the public tunnel URL. * Source changes reload the exported server without dropping the long-lived HTTP listener. View modules use Vite HMR when views exist at startup. * Adding the first view to a project that started with none requires restarting `mcp-use dev`. * `mcp-use dev` keeps its Vite cache in `.mcp-use/cache/` and the tunnel subdomain in `.mcp-use/state/tunnel.json`. * See [Tunneling reference](#tunneling-reference) for the lifecycle and limits of `--tunnel`. ## `typecheck` **Purpose:** Refresh the managed `mcp-env.d.ts` declaration for the discovered server entry, then run the project's installed TypeScript compiler with `--noEmit`. **Syntax:** ```bash theme={null} mcp-use typecheck [options] [-- ] ``` The command accepts `--path`, `--entry`, and `--mcp-dir` with the same meanings as `dev` and `build`. Arguments after `--` are forwarded to TypeScript: ```bash theme={null} mcp-use typecheck mcp-use typecheck --entry src/server.ts mcp-use typecheck -- --project tsconfig.check.json --pretty false ``` `mcp-env.d.ts` is scaffolded into new projects, so editors and plain `tsc --noEmit` work before the first CLI run. The command refreshes declarations carrying an mcp-use generated header when the entry changes and never overwrites a user-owned declaration. TypeScript must be installed in the selected project. ## `build` **Purpose:** Build the exported MCP server and its views into `.mcp-use/build/`. **Syntax:** ```bash theme={null} mcp-use build [options] ``` **Options:** | Option | Description | Default | | - | - | - | | `--path ` | Project root used for entry/view discovery, `.env`, and `tsconfig.json`. | Current directory | | `--entry ` | MCP server entry file, relative to the project. | Auto-detected | | `--mcp-dir ` | MCP source directory containing the entry and `views/`. | None | | `--views-dir ` | View directory, relative to the project root. | `views/` or `/views/` | | `--source-maps` | Emit source maps for server and external view bundles. | Disabled | | `--inline` | Embed each view's bundled JavaScript and CSS in its MCP resource. | Disabled | **Examples:** ```bash theme={null} mcp-use build mcp-use build --inline mcp-use build --mcp-dir src/mcp mcp-use build --entry src/server.ts --views-dir src/views mcp-use build --path ./my-server ``` **Notes and behavior:** * The command bundles the default-exported server as `.mcp-use/build/index.js` and writes `.mcp-use/build/manifest.json`. * Each `views//view.tsx` builds to hashed external assets under `.mcp-use/build/views//` by default. * Pass `--inline` to embed each view's bundled JavaScript and CSS directly in the HTML returned by `resources/read`. There is no `--no-inline`; omit `--inline` to use external assets. * The build is transpile-only. Run `mcp-use typecheck` as a separate project script when type checking is required. * TypeScript path aliases come from the selected project's `tsconfig.json`. * If `MCP_ASSETS_URL` is set for an external build, view paths are rewritten to that asset origin using the server's `basePath`. Inline view bundles are not rewritten. * The selected project's `public/` directory is copied to `.mcp-use/build/views/public/`. ## `start` **Purpose:** Run the production server previously written to `.mcp-use/build/`. **Syntax:** ```bash theme={null} mcp-use start [options] ``` **Options:** | Option | Description | Default | | - | - | - | | `--path ` | Project root containing `.mcp-use/build/`. | Current directory | | `--port ` | Server port. | `PORT`, server config, or `3000` | | `--host ` | Bind address. Use `0.0.0.0` to listen on all interfaces. | `HOST`, server config, or `127.0.0.1` | | `--with-inspector` | Mount the bundled Inspector at `${basePath}/inspector`. | Disabled | | `--tunnel` | Create a public tunnel for the production server. | Disabled | **Examples:** ```bash theme={null} mcp-use start mcp-use start --port 8080 mcp-use start --host 0.0.0.0 mcp-use start --with-inspector mcp-use start --path ./my-server mcp-use start --tunnel ``` **Notes and behavior:** * Address precedence is CLI flag, environment variable, server configuration, then default: `--port` → `PORT` → `config.port` → `3000`, and `--host` → `HOST` → `config.host` → `127.0.0.1`. * `--tunnel` starts the tunnel only after the production server binds. The command prints the public MCP URL and closes the tunnel when the process shuts down. * The command requires `.mcp-use/build/manifest.json`; run `mcp-use build` first. * It imports the manifest's built `entryPoint` and requires that module to default-export an `MCPServer`. * `start` does not rediscover source entries or views. `--entry`, `--mcp-dir`, and `--views-dir` belong to `dev` and `build`. * The command sets `NODE_ENV=production` when it is not already defined and loads the selected project's production `.env` values before importing the built entry. * The build manifest never records Inspector state. `--with-inspector` is a runtime-only opt-in that mounts the Inspector on the same listener; it does not rebuild or alter `.mcp-use/build`. * The Inspector can call tools and proxy OAuth flows. Keep `--with-inspector` behind access controls when serving beyond localhost. ## Tunneling reference `mcp-use dev --tunnel` and `mcp-use start --tunnel` create a public URL that forwards to the local MCP server. ```bash theme={null} mcp-use dev --tunnel mcp-use start --tunnel ``` Tunnel limits and lifecycle: | Limit or behavior | Value | | - | - | | Tunnel lifetime | Expires 24 hours after creation | | Inactive tunnel cleanup | 1 hour of no activity | | Creation rate limit | 10 tunnel creations per IP per hour | | Active tunnel limit | 5 active tunnels per IP | | Close behavior | The tunnel closes when the CLI process exits | The standalone package is also available: ```bash theme={null} npx @mcp-use/tunnel 3000 ``` See the [Tunneling guide](/tunneling/index) for client setup and testing workflows. ## `deploy` **Purpose:** Create or update a Manufact Cloud deployment for an MCP server. **Syntax:** ```bash theme={null} mcp-use deploy [path] [options] ``` `[path]` is the project directory. It defaults to the current directory. **Options:** | Option | Description | Default | | - | - | - | | `--open` | Open the deployment in a browser after a successful deploy. | Disabled | | `--name ` | Server name. Also names the GitHub repository when the CLI creates one. | GitHub repository name; with `--no-github`, the `package.json` name or directory name | | `--new` | Create a new server instead of reusing the linked project. | Disabled | | `--env ` | Environment variable assignment. Repeatable. | None | | `--env-file ` | Load environment variables from a `.env` file. | None | | `--branch ` | Branch to deploy. Also scopes env sync to that branch preview environment. | Current git branch; `main` with `--no-github` | | `--root-dir ` | Root directory inside the repository for monorepos. | Repository root | | `--org ` | Target organization. | Active org | | `-y, --yes` | Accept confirmation prompts and authorize Git and repository changes: creating a private GitHub repository, committing and pushing uncommitted changes, and selecting the default GitHub App installation. | Disabled | | `--region ` | Deployment region: `US`, `EU`, or `APAC`. | `US` | | `--build-command ` | Build command override. | Auto-detected | | `--start-command ` | Start command override. | Auto-detected | | `--dockerfile ` | Non-default Dockerfile path, relative to `--root-dir` or repository root. | None | | `--watch-paths ` | Only auto-deploy when matching files change. Repeatable. GitHub only. | All changes | | `--wait-for-ci` | Hold GitHub auto-deploys until other check runs pass. GitHub only. | Disabled | | `--no-github` | Upload local source without connecting GitHub. | Disabled | | `--json` | Emit exactly one JSON result or error. Never prompts or opens a browser; cannot be combined with `--open`. | Human-readable text | **Examples:** ```bash theme={null} mcp-use deploy mcp-use deploy --no-github mcp-use deploy --name my-server --open mcp-use deploy --env DATABASE_URL=postgres://... --env API_KEY=secret mcp-use deploy --env-file .env.production mcp-use deploy --root-dir apps/mcp-server mcp-use deploy --root-dir apps/mcp-server --watch-paths "apps/mcp-server/**" --watch-paths "packages/shared/**" mcp-use deploy --new --name my-server-v2 mcp-use deploy --org manufact-inc --region EU --yes ``` **Notes and behavior:** * The default path deploys from GitHub. When it creates a new GitHub-backed server and the organization has no GitHub App installation, the command exits with `github_installation_required` and a link to the dashboard settings. If the project has no `origin` remote, an interactive run offers to create a private repository, initialize Git, commit, and push to `main`. If the working tree has uncommitted changes, it offers to commit and push them with `git add .`. `--yes` authorizes these Git changes without prompting. * `--no-github` packs and uploads local source to a platform-managed repository. * Redeploys of a project already linked to a platform-managed server auto-detect the upload path. `--no-github` is only required on the first deploy for that path. * The command writes `.mcp-use/cloud/link.json` to link the local project to the cloud server. * When it writes the project link, the CLI adds `.mcp-use/` to the repository's local `.git/info/exclude` if that file exists. It writes `.mcp-use/` to `.gitignore` only when it creates a new repository. * On a redeploy of a linked server, the supplied `--name`, `--branch`, `--region`, `--root-dir`, `--build-command`, `--start-command`, `--dockerfile`, `--watch-paths`, and `--wait-for-ci` values update that server's configuration before the deployment starts. * Environment variables passed through `--env` and `--env-file` are synced to the target branch preview environment when `--branch` is set. ## Authentication commands Authentication commands manage the user-level Manufact Cloud credentials in `~/.mcp-use/config.json`. ### `login` **Purpose:** Authenticate the CLI with Manufact Cloud. **Syntax:** ```bash theme={null} mcp-use login [options] ``` **Options:** | Option | Description | Default | | - | - | - | | `--api-key ` | Authenticate with an API key. | Browser/device flow | | `--device-code ` | Redeem a short-lived, pre-approved RFC 8628 device code. | None | | `--org ` | Select the active organization by ID or slug. | Account default | | `--no-open` | Do not open the verification URL during interactive login. | Opens on a TTY | | `--json` | Emit one machine-readable JSON result. | Human-readable text | **Examples:** ```bash theme={null} mcp-use login mcp-use login --device-code ABC123 mcp-use login --api-key mcp_... --org my-org ``` **Notes and behavior:** * Interactive login starts a device-code flow and opens a browser. * `--device-code` skips the browser and redeems the code through the same token endpoint. The CLI then creates, validates, and stores a persistent API key. * `--api-key` and `--device-code` cannot be combined. An explicit `--device-code` takes precedence over `MCP_USE_API_KEY`. * The CLI never writes the device code, bearer token, or API key to human-readable or JSON output. * If `--org` is omitted, the CLI stores the account-default organization when one is available. * `MCP_USE_API_KEY` can provide the API key for non-interactive login. ### `whoami` **Purpose:** Print the current authentication status and user information. **Syntax:** ```bash theme={null} mcp-use whoami ``` **Options:** | Option | Description | Default | | - | - | - | | `--json` | Emit a machine-readable identity object. | Human-readable text | **Examples:** ```bash theme={null} mcp-use whoami ``` **Notes and behavior:** The command reads `~/.mcp-use/config.json`. When that file selects no organization, it reports the account default, matching `org current` and the `servers`/`deployments` commands. This is the usual case when authenticating with `MCP_USE_API_KEY` instead of `mcp-use login`. ### `logout` **Purpose:** Remove saved Manufact Cloud credentials. **Syntax:** ```bash theme={null} mcp-use logout [options] ``` **Options:** | Option | Description | Default | | - | - | - | | `--yes` | Skip confirmation. Required for non-interactive and JSON runs. | Prompts on a TTY | | `--json` | Emit one machine-readable JSON result. | Human-readable text | **Examples:** ```bash theme={null} mcp-use logout --yes ``` **Notes and behavior:** The command removes credentials from `~/.mcp-use/config.json`. ## Organization commands Organization commands control the active Manufact Cloud organization for cloud commands. | Command | Purpose | Syntax | | - | - | - | | `org list` | List organizations available to the authenticated user. | `mcp-use org list` | | `org current` | Show the active organization. | `mcp-use org current` | | `org use ` | Select and persist a different active organization. | `mcp-use org use ` | **Notes and behavior:** * `deploy`, `deployments`, and `servers` use the active organization unless `--org` overrides it. * For CI or agent runs, pass `--org ` to `login`, `deploy`, `servers`, or `deployments` commands instead of switching global state. The value can be an organization slug, ID, or name. ## Deployment management commands **Purpose:** Inspect and manage existing Manufact Cloud deployments. **Syntax:** ```bash theme={null} mcp-use deployments [options] ``` **Subcommands:** | Subcommand | Purpose | Options | | - | - | - | | `list` | List deployments. | `--org `, `--server `, `--limit `, `--skip `, `--json` | | `get ` | Show deployment details. | `--json` | | `logs ` | View runtime logs. | `--build`, `--follow`, `--json` | | `restart ` | Trigger a new deployment on the same server. | `--follow`, `--branch `, `--json` | | `stop ` | Stop a running deployment. | `--yes`, `--json` | | `delete ` | Delete a deployment. | `--yes`, `--json` | **Examples:** ```bash theme={null} mcp-use deployments list mcp-use deployments get dep_abc123 mcp-use deployments logs dep_abc123 --build --follow mcp-use deployments restart dep_abc123 --branch main --follow mcp-use deployments stop dep_abc123 --yes mcp-use deployments delete dep_abc123 --yes ``` **Notes and behavior:** * `logs` shows runtime logs by default. Use `--build` for build logs. * `restart` redeploys the same server and uses the deployment branch unless `--branch` is set. * `stop` and `delete` prompt for confirmation on a TTY. Pass `--yes` in non-interactive or JSON runs. ## Server management commands **Purpose:** Manage cloud servers, which are long-lived Git-backed deploy targets that own deployments. **Syntax:** ```bash theme={null} mcp-use servers [options] ``` **Subcommands:** | Subcommand | Purpose | Options | | - | - | - | | `list` | List servers for an organization. | `--org `, `--limit `, `--skip ` | | `get ` | Show server details and recent deployments. | `--org ` | | `update ` | Update server configuration. | `--branch `, `--name `, `--description `, `--build-command `, `--start-command `, `--root-dir `, `--watch-paths `, `--deploy-branches `, `--wait-for-ci`, `--no-wait-for-ci`, `--org ` | | `delete ` | Delete a server and its deployments. | `--yes`, `--org ` | | `env ` | Manage server environment variables. | See [Server environment commands](#server-environment-commands). | **Examples:** ```bash theme={null} mcp-use servers list mcp-use servers get srv_abc123 mcp-use servers update srv_abc123 --branch main mcp-use servers update srv_abc123 --build-command "npm run build" mcp-use servers update srv_abc123 --watch-paths "apps/api/**" --watch-paths "packages/shared/**" --deploy-branches "release/*" mcp-use servers delete srv_abc123 --yes ``` **Notes and behavior:** * `servers update --branch` changes the production branch for future production deploys. * `--watch-paths` and `--deploy-branches` are repeatable. Pass the flag once per pattern; a second bare value is read as a positional, not as another pattern. * Pass an empty string to `--build-command`, `--start-command`, `--root-dir`, `--watch-paths`, or `--deploy-branches` to clear that setting. * `--wait-for-ci` and `--no-wait-for-ci` control whether auto-deploys wait for other check runs before deploying. * `servers delete` prompts for confirmation unless `--yes` is set. ## Server environment commands **Purpose:** List, set, and unset environment variables on a cloud server. **Syntax:** ```bash theme={null} mcp-use servers env [options] ``` **Subcommands:** | Subcommand | Purpose | Required arguments | Other options | | - | - | - | - | | `list ` | List environment variable metadata. | Server ID or slug | `--org `, `--branch ` | | `set ` | Create or update an environment variable. | Server ID or slug, value | `--org `, `--branch `, `--secret` | | `unset ` | Delete an environment variable by key. | Server ID or slug, key | `--org `, `--branch `, `--yes` | **Examples:** ```bash theme={null} mcp-use servers env list srv_abc123 mcp-use servers env list srv_abc123 --branch feature/example mcp-use servers env set srv_abc123 API_KEY=secret --secret mcp-use servers env set srv_abc123 FEATURE_FLAG=true --branch feature/example mcp-use servers env unset srv_abc123 API_KEY --yes ``` **Notes and behavior:** * `env list` returns metadata only. Values are never returned. * `env set` creates a production variable when `--branch` is omitted, or a preview variable when it is supplied. * `--secret` stores a value as write-only. It must be passed on **every** write to the variable, including updates and rotations: omitting it stores the value as non-sensitive, even if the variable was previously write-only. * `--branch ` scopes preview environment variables to a branch. Omit `--branch` for production resolution. * `env unset` prompts for confirmation unless `--yes` is set. If the key doesn't exist in the selected production or branch scope, it fails with `env_variable_not_found`. ## `client` **Purpose:** Save HTTP MCP server connections, call tools, read resources, get prompts, and manage OAuth credentials from the terminal. **Syntax:** ```bash theme={null} mcp-use client mcp-use client ``` **Top-level subcommands:** | Command | Purpose | Key options | | - | - | - | | `connect ` | Verify and save an HTTP(S) MCP server. | `-H, --header`, `--no-oauth`, `--auth-timeout `, `--protocol `, `--no-open`, `--json` | | `list` | List saved servers. | `--json` | | `remove ` | Remove a saved server and credentials. | `--json` | **Per-server scopes:** | Scope | Actions | | - | - | | `tools` | `list`, `describe `, `call [args...] [--timeout ]` | | `resources` | `list`, `read ` | | `prompts` | `list`, `get [args...]` | | `auth` | `login`, `status`, `logout [--yes]` | Every action in this table accepts `--json` except where the top-level table does not advertise it. **Examples:** ```bash theme={null} mcp-use client connect local http://localhost:3000/mcp mcp-use client list mcp-use client local tools list mcp-use client local tools call read_file path=/tmp/test.txt mcp-use client local resources read "file:///tmp/data.json" mcp-use client local prompts get greeting name=Alice mcp-use client local auth login mcp-use client local auth status ``` **Notes and behavior:** * Saved server metadata is stored in `~/.mcp-use/client/servers.json`. Credentials are stored separately under `~/.mcp-use/client/credentials/`. * In an interactive TTY, OAuth displays `This server requires OAuth. Press Enter to open your browser.` and opens the browser only after Enter. * When protected-resource metadata identifies mixed auth, `connect` succeeds anonymously, reports that public tools are available, and suggests `mcp-use client auth login`. The JSON connection result includes `authorization` metadata. * `auth login` starts OAuth for an already-saved server; otherwise the first wire-level OAuth challenge can start the flow later and the CLI retries that operation once. * `--no-open` and non-TTY human output never prompt or open a browser; they print a state-free local launcher URL while the loopback callback continues waiting. The local route redirects to the provider without exposing OAuth state in terminal output. * `--json` never opens a browser or prints an OAuth URL or state. If fresh consent is required, it exits `1` with `oauth_interaction_required` and an interactive retry command in `error.details.nextSteps`. * `connect --no-oauth` prevents automatic OAuth when the server returns `401`. * `--protocol auto` prefers the modern wire and falls back to legacy. `legacy` selects only the legacy wire. `modern` selects the stateless, sessionless modern wire with no fallback. * Repeated `-H, --header <"Key: Value">` options store static headers as credentials. * Tool and prompt arguments accept `key=value`, `key:=`, or a single JSON object argument. * `--json` may appear anywhere after `client`. Success emits exactly one JSON value to stdout. Errors emit exactly one JSON error envelope to stderr and no stdout value. * Calls, resource reads, and prompt gets emit raw MCP result envelopes. Lists emit arrays, and `tools describe` emits one tool object. * Tool `isError` results exit `1` and retain the original protocol result in `error.details` under `--json`; they and auth-like error text are not interpreted as OAuth challenges. Use the guide for connection workflows, OAuth behavior, argument parsing examples, and scripting patterns. ## `screenshot` **Purpose:** Call a view-backed MCP tool and capture its rendered MCP App as a PNG. **Syntax:** ```bash theme={null} mcp-use screenshot (--server | --mcp ) --tool [args...] [options] ``` Pass tool arguments after the options, either as one JSON object or as `key=value` / `key:=` pairs. **Source options:** | Option | Description | | - | - | | `--server ` | Use a server saved by `mcp-use client`. | | `--mcp ` | Connect directly to an HTTP(S) MCP endpoint. | | `-H, --header <"Key: Value">` | Header for `--mcp`. Repeatable, and incompatible with `--server`. | **Capture options:** | Option | Description | Default | | - | - | - | | `--tool ` | View-backed tool to call. Required. | None | | `--output ` | Output PNG path. | Timestamped view name | | `--width ` | Host and widget width, an integer from `1` to `10000000`. | `768` | | `--height ` | Host viewport height, an integer from `1` to `10000000`. The PNG is cropped to the widget bounds. | `720` | | `--device-scale-factor ` | Pixel density, greater than 0 and at most 4. | `1` | | `--theme ` | Host theme. | `light` | | `--wait-for ` | Wait for a selector before capture. | None | | `--delay ` | Additional delay after readiness. | `0` | | `--timeout ` | Tool, browser, and readiness timeout. | `30000` | | `--inspector ` | Use an existing Inspector origin. | Starts one | | `--cdp-url ` | Use an existing Chrome DevTools endpoint. | Launches Chrome | | `--json` | Emit one result or error and never prompt. | Off | **Examples:** ```bash theme={null} mcp-use screenshot --server demo --tool show-app appName=Demo mcp-use screenshot --mcp https://example.com/mcp --tool show-app \ '{"appName":"CI"}' --theme dark --output app.png --json ``` **Exit codes:** | Code | Meaning | | - | - | | `0` | Capture succeeded, or help was requested. | | `2` | Invalid arguments. | | `1` | MCP, tool, Inspector, browser, readiness, or write failure. | ## Environment variables | Variable | Used by | Description | Default | | - | - | - | - | | `PORT` | `dev`, `start`, server runtime | Server port when `--port` is not provided. `dev` sets it to the resolved listener port before importing the entry; `start` reads it before importing the built entry. | `3000` | | `HOST` | `dev`, `start`, server runtime | Bind host when `--host` is not provided. `start` and direct `listen()` fall back to `config.host` before `127.0.0.1`. | `127.0.0.1` | | `NODE_ENV` | `dev`, `build`, `start` | Runtime environment. When it is not already set, `dev` uses `development`, and `build` and `start` set `production` before loading the project `.env`. | Command-specific | | `MCP_URL` | server runtime, `dev`, `build` | **Server public origin**, such as `https://mcp.example.com`. OAuth resource URL, CSP `connectDomains`, dev HMR websocket. When OAuth derives its resource from `MCP_URL` (the provider sets no `resource`), a value with a path, query, or credentials makes the server constructor throw; views and CSP use only its origin. Lower priority than `CSP_URLS`. `dev` sets it only while importing the entry on loopback binds, `build` sets `http://localhost:3000` only while inspecting the entry, and `start` never sets it. | None (request origin) | | `MCP_ASSETS_URL` | `build`, server runtime | **Assets URL prefix** (origin + optional path) for view JS/CSS and `public/`. Falls back to `MCP_URL` origin. When set at build, manifest paths become full CDN URLs (path segment from server `basePath`). | None (falls back to server origin) | | `CSP_URLS` | server runtime | Comma-separated CSP domain shortcut — applied to all four MCP Apps categories when per-category vars are unset. Higher priority than `MCP_URL` auto-append. | None | | `CSP_CONNECT_DOMAINS` | server runtime | Overrides `CSP_URLS` for `connectDomains` | None | | `CSP_RESOURCE_DOMAINS` | server runtime | Overrides `CSP_URLS` for `resourceDomains` | None | | `CSP_FRAME_DOMAINS` | server runtime | Overrides `CSP_URLS` for `frameDomains` | None | | `CSP_BASE_URI_DOMAINS` | server runtime | Overrides `CSP_URLS` for `baseUriDomains` | None | | `MCP_USE_CLOUD_WEB_URL` | `deploy` | Manufact web URL for dashboard and GitHub settings links. | `https://manufact.com` | | `MCP_USE_CLOUD_API_URL` | `login` and all cloud commands | Manufact API URL. Takes precedence over `MCP_API_URL`. The CLI normalizes it to include `/api/v1`. | `https://cloud.manufact.com/api/v1` | | `MCP_API_URL` | `login` and all cloud commands | Fallback Manufact API URL when `MCP_USE_CLOUD_API_URL` is unset. | `https://cloud.manufact.com/api/v1` | | `MCP_USE_API_KEY` | `login` and all cloud commands | API key for non-interactive login. Cloud commands (`deploy`, `servers`, `deployments`, `org`, `whoami`) use it directly and prefer it over the saved credential. | None | | `MCP_USE_WS_RELAY` | `dev --tunnel`, `start --tunnel` | WebSocket relay API origin used when creating authenticated local tunnels. | `https://api.tunnel.mcp-use.run` | | `MCP_USE_CHROME_PATH` | `screenshot` | Chrome executable path for screenshots. | Auto-detected | | `PUPPETEER_EXECUTABLE_PATH` | `screenshot` | Fallback Chrome executable path. | Auto-detected | | `CHROME_PATH` | `screenshot` | Fallback Chrome executable path. | Auto-detected | **Examples:** ```bash theme={null} PORT=8080 mcp-use start MCP_URL=https://my-server.example.com MCP_ASSETS_URL=https://cdn.example.com/bucket mcp-use build MCP_USE_API_KEY=mcp_... mcp-use login --org my-org MCP_USE_CHROME_PATH=/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome \ mcp-use screenshot --server local --tool show-board ``` ## Related references * [CLI Client guide](/v2/typescript/tooling/client-cli) * [Tunneling guide](/tunneling/index) * [Manufact Cloud deployment guide](/v2/typescript/server/deployment/mcp-use) * [ServerConfig API reference](https://mcp-use-typescript-api-reference.vercel.app/modules/mcp-use.index.html#serverconfig) # Authentication Source: https://docs.mcp-use.com/v2/typescript/client/authentication OAuth and bearer tokens for MCP client connections HTTP connections support automatic OAuth, pre-registered public clients, bearer tokens, custom headers, and custom authentication providers. ## Automatic OAuth with `MCPClient` `MCPClient` creates an OAuth provider for an HTTP server unless the server configuration already supplies an `authProvider`, `authToken`, `oauth: false`, or an `Authorization` header. ```typescript theme={null} import { MCPClient } from "@mcp-use/client"; const client = new MCPClient({ mcpServers: { demo: { url: "https://api.example.com/mcp" }, }, }); try { await client.connect("demo"); } finally { await client.close(); } ``` In Node.js, the default provider opens a browser and waits for its loopback callback. In the browser build, the default provider opens a popup; set `useRedirectFlow: true` inside the server's `oauth` options to use a full-page redirect. Pass a custom `authProvider` when your application owns the authorization flow. ## Whole-server and mixed OAuth Whole-server OAuth rejects the MCP connection until the user authorizes. A mixed-auth server instead allows anonymous connection and public operations, then requires OAuth only for protected tools, resources, or prompts. When a successfully connected server publishes [RFC 9728 protected-resource metadata](https://www.rfc-editor.org/rfc/rfc9728.html), `MCPClient` exposes it as mixed auth without forcing authorization: ```typescript theme={null} const connection = await client.connect("demo"); const authorization = await connection.discoverAuthorization(); if (authorization?.mode === "mixed" && !authorization.authenticated) { console.log("Public operations are available without signing in."); // Optional: authenticate now instead of waiting for a protected operation. await connection.authenticate(); } ``` After discovery, `connection.authorization` and `connection.info.authorization` expose the same state. It includes `resource` and `scopesSupported` when the protected-resource metadata advertises them. Mixed-auth discovery is best-effort and defaults to enabled for HTTP servers with an OAuth provider. Call `discoverAuthorization()` when using `MCPClient` directly; React performs the same discovery after publishing the ready connection. Set `detectMixedAuth: false` on the server configuration to skip the discovery request. If the client stays anonymous, a later wire-level OAuth challenge from a protected operation starts the official SDK flow. Automatic flows finish OAuth through the active transport and retry the logical operation once. Explicit browser flows surface the prepared authentication action so the host can authenticate and retry. MCP tool results with `isError: true` or auth-like text are application errors, not OAuth challenges. ## React: explicit authentication React connection APIs use an explicit authorization step by default. `preventAutoAuth` defaults to `true`, so an unauthorized connection enters `pending_auth` until the user calls `authenticate()`. ```tsx theme={null} import { useMcp } from "@mcp-use/client/react"; export function ProtectedConnection() { const mcp = useMcp({ url: "https://api.example.com/mcp", }); if (mcp.state === "pending_auth") { return ; } if ( mcp.authorization?.mode === "mixed" && !mcp.authorization.authenticated ) { return ( <>

Public tools are available. Sign in to use protected tools.

); } return

Connection state: {mcp.state}

; } ``` Set `preventAutoAuth: false` on `useMcp` or a `McpClientProvider` server configuration to start authorization automatically. Popup mode is the default; set the top-level React option `useRedirectFlow: true` for a full-page redirect. On your callback route, import `onMcpAuthorization` from `@mcp-use/client/react`. See [React integration](/v2/typescript/client/usemcp#oauth-callback). To show the authorized account, set `oauth.fetchUserInfo: true` and read `mcp.userInfo`. Its status is `idle`, `loading`, `available`, `unavailable`, or `error`; claims such as `email` are present only when released by the authorization server. You can also fetch explicitly: ```tsx theme={null} const result = await mcp.getUserInfo(); if (result.status === "available") console.log(result.claims.email); ``` See [OAuth UserInfo](/v2/typescript/client/usemcp#oauth-userinfo) for the options, state details, and a React example. ## Pre-registered clients The `MCPClient` configuration uses `oauth.staticClientInfo.client_id`: ```typescript theme={null} import { MCPClient } from "@mcp-use/client"; const client = new MCPClient({ mcpServers: { slack: { url: "https://mcp.example.com/mcp", oauth: { staticClientInfo: { client_id: "my-client-id", }, clientMetadataUrl: "https://app.example.com/.well-known/oauth-client-metadata.json", scope: "openid profile", }, }, }, }); ``` React uses a different, UI-oriented shape: ```tsx theme={null} import { useMcp } from "@mcp-use/client/react"; const mcp = useMcp({ url: "https://mcp.example.com/mcp", oauth: { clientId: "my-client-id", clientMetadataUrl: "https://app.example.com/.well-known/oauth-client-metadata.json", scope: "openid profile", }, }); ``` Browser OAuth clients are public PKCE clients. Do not put a `client_secret` in browser configuration; `BrowserOAuthClientProvider` rejects one in `staticClientInfo`. ## OAuth proxy in the browser Use an OAuth proxy when the authorization server's metadata, token, or registration endpoints do not support browser CORS: ```tsx theme={null} import { useMcp } from "@mcp-use/client/react"; const mcp = useMcp({ url: "https://mcp.example.com/mcp", oauthProxyUrl: "https://app.example.com/api/mcp-oauth", }); ``` For the browser `MCPClient`, `oauth.oauthProxyUrl` configures the proxy and `oauth.proxyOAuthRequests` controls whether OAuth HTTP requests use it. The latter defaults to `true` when the browser provider is created. React routes its OAuth requests through the configured `oauthProxyUrl`; it does not expose `proxyOAuthRequests` as a `useMcp` option. ## Manual browser authorization Construct a `BrowserOAuthClientProvider` with `preventAutoAuth: true` and pass it to the browser client when you need to present the authorization URL yourself. Set `useRedirectFlow: true` when you navigate the current page to that URL: ```typescript theme={null} import { BrowserOAuthClientProvider, isUnauthorized, MCPClient, } from "@mcp-use/client"; const authProvider = new BrowserOAuthClientProvider( "https://api.example.com/mcp", { preventAutoAuth: true, useRedirectFlow: true } ); const client = new MCPClient({ mcpServers: { api: { url: "https://api.example.com/mcp", authProvider, }, }, }); try { await client.connect("api"); } catch (error) { if (!isUnauthorized(error)) throw error; const authorizationUrl = authProvider.getLastAttemptedAuthUrl(); if (authorizationUrl) { window.location.assign(authorizationUrl); } } ``` `getLastAttemptedAuthUrl()` returns the URL for the current provider instance. It is kept in memory only, so start a new authorization attempt after a page reload. The auto-provisioned browser provider also accepts `oauth.preventAutoAuth`, but an explicit provider gives your application access to the prepared URL. The provider records the flow type when it prepares the URL. With `useRedirectFlow: true`, the callback page that calls `onMcpAuthorization()` returns to the page that started authorization. Without it, the callback treats the navigation as a popup and leaves the user on the callback page. ## Bearer tokens ```typescript theme={null} import { MCPClient } from "@mcp-use/client"; const client = new MCPClient({ mcpServers: { api: { url: "https://api.example.com/mcp", authToken: process.env.API_KEY, }, }, }); ``` An explicit `Authorization` header also disables automatic OAuth: ```typescript theme={null} import { MCPClient } from "@mcp-use/client"; const client = new MCPClient({ mcpServers: { api: { url: "https://api.example.com/mcp", headers: { Authorization: `Bearer ${process.env.API_KEY}`, }, }, }, }); ``` ## `MCPClient` server fields | Field | Description | | - | - | | `authToken` | Bearer token | | `headers` | Custom HTTP headers | | `oauth` | Automatic OAuth options, or `false` to disable automatic OAuth | | `authProvider` | Custom SDK-compatible provider | | `detectMixedAuth` | Discover optional mixed OAuth after anonymous connection; defaults to `true` | ## Node OAuth helpers ```typescript theme={null} import { createOAuthProvider, NodeOAuthClientProvider, completeOAuthFlow, isUnauthorized, FileKVStore, } from "@mcp-use/client"; ``` Use these exports for headless scripts, custom storage, or an authorization flow you manage directly. # Code Mode Source: https://docs.mcp-use.com/v2/typescript/client/code-mode Let agents write code to call MCP tools Code mode exposes `execute_code` and `search_tools` so agents run JavaScript with access to connected MCP tools instead of making individual tool calls. Node.js only. ## Enable ```typescript theme={null} import { MCPClient } from "@mcp-use/client"; const client = new MCPClient( { mcpServers: { fs: { command: "npx", args: ["-y", "@modelcontextprotocol/server-filesystem", "./data"], }, }, }, { codeMode: true }, ); const result = await client.executeCode(` const files = await fs.list_directory({ path: "." }); return files.length; `); console.log(result.result, result.logs, result.error); await client.close(); ``` ## Executors | Executor | Use case | | - | - | | `"vm"` (default) | Local Node.js VM — fast, trusted environments | | `"e2b"` | Cloud sandbox — untrusted code (`@e2b/code-interpreter` + API key) | | Custom function / `BaseCodeExecutor` | Your own runtime | ```typescript theme={null} { codeMode: { enabled: true, executor: "e2b", executorOptions: { apiKey: process.env.E2B_API_KEY!, timeoutMs: 300_000 }, }} ``` A custom function receives `(code, timeout?)` and returns an `ExecutionResult`. It owns cleanup for whatever runtime it wraps — `client.close()` does not release anything on its behalf. A non-arrow function is invoked with the `MCPClient` as its `this`, so it can reach the client without closing over it: ```typescript theme={null} { codeMode: { enabled: true, executor: async function (this: MCPClient, code, timeout) { const servers = this.getServerNames(); return { result: await myRuntime.run(code, timeout, servers), logs: [], error: null, execution_time: 0, }; }, }} ``` ## Agent integration Use with `@mcp-use/agent` and `PROMPTS.CODE_MODE`: ```typescript theme={null} import { MCPAgent, PROMPTS } from "@mcp-use/agent"; const agent = new MCPAgent({ llm, client, systemPrompt: PROMPTS.CODE_MODE }); await agent.run("List all files and count them"); ``` ## Reference [Client API reference](https://mcp-use-typescript-api-reference.vercel.app/modules/_mcp-use_client.index.html) — config types, `searchTools`, and `ExecutionResult`. [Anthropic: Code execution with MCP](https://www.anthropic.com/engineering/code-execution-with-mcp) # Completions Source: https://docs.mcp-use.com/v2/typescript/client/completion Autocomplete for prompt and resource template arguments Request suggestions for prompt arguments or resource template URI variables: ```typescript theme={null} import { MCPClient } from "@mcp-use/client"; const client = new MCPClient({ mcpServers: { demo: { url: "http://localhost:3000/mcp" } }, }); try { const conn = await client.connect("demo"); const result = await conn.complete({ ref: { type: "ref/prompt", name: "code-review" }, argument: { name: "language", value: "py" }, }); console.log(result.completion.values); // e.g. ["python", "pytorch"] } finally { await client.close(); } ``` ## React ```tsx theme={null} const mcp = useMcp({ url: "http://localhost:3000/mcp" }); const result = await mcp.complete({ ref: { type: "ref/resource", uri: "file:///{path}" }, argument: { name: "path", value: "/tmp" }, }); ``` ## Reference [`MCPConnection`](https://mcp-use-typescript-api-reference.vercel.app/modules/_mcp-use_client.index.html#mcpconnection) — `complete()`. # Elicitation Source: https://docs.mcp-use.com/v2/typescript/client/elicitation Handle interactive user input requests from MCP servers Servers can ask the client for user input mid-tool-call via `elicitation/create`. Two modes: * **Form** — structured fields with a JSON schema * **URL** — redirect the user to an external page (required for credentials/OAuth) ## Setup ```typescript theme={null} import { stdin, stdout } from "node:process"; import { createInterface } from "node:readline/promises"; import { acceptWithDefaults, MCPClient, type OnElicitationCallback, } from "@mcp-use/client"; const onElicitation: OnElicitationCallback = async (params) => { if (params.mode === "url") { // The tool call continues as soon as this returns, so accept only after // the user has finished the external flow. console.log(`Visit: ${params.url}`); const prompt = createInterface({ input: stdin, output: stdout }); await prompt.question("Press Enter after you finish in the browser. "); prompt.close(); return { action: "accept" }; } // Form mode — collect fields from params.requestedSchema return acceptWithDefaults(params); }; const client = new MCPClient( { mcpServers: { demo: { url: "http://localhost:3000/mcp" } } }, { onElicitation }, ); ``` The second constructor argument is available only in the Node.js entry. In a browser build, set `onElicitation` at the top level of the configuration or on an individual server configuration instead. ## Helpers These helpers are exported only by the Node.js entry of `@mcp-use/client`. The browser entry and `@mcp-use/client/react` do not export them. | Helper | Purpose | | - | - | | `acceptWithDefaults(params)` | Accept using schema defaults | | `accept(content)` | Accept with user content | | `decline()`, `cancel()` | Reject or dismiss | | `validate(params, content)` | Client-side validation | | `getDefaults`, `applyDefaults` | Work with schema defaults | ## React The helpers above are not available in a browser build, so handle the request directly. This handler waits for the user to finish a URL request and accepts form requests with their schema defaults: ```tsx theme={null} import { useMcp, type ElicitResult } from "@mcp-use/client/react"; const mcp = useMcp({ url: "http://localhost:3000/mcp", onElicitation: async (params): Promise => { if (params.mode === "url") { window.open(params.url, "_blank", "noopener"); // The tool call continues as soon as this resolves, so accept only // after the user confirms they finished the external flow. const finished = window.confirm( `${params.message}\n\nSelect OK after you finish in the new tab.` ); return { action: finished ? "accept" : "cancel" }; } const content: NonNullable = {}; for (const [name, field] of Object.entries( params.requestedSchema.properties )) { if (field.default !== undefined) content[name] = field.default; } return { action: "accept", content }; }, }); ``` With the provider, use `pendingElicitationRequests` and `approveElicitation` / `rejectElicitation`. Without an `onElicitation` handler, tool calls that require input will fail. ## Reference Server-side: [Elicitation](/v2/typescript/server/elicitation) # Environments Source: https://docs.mcp-use.com/v2/typescript/client/environments Use the MCP client in Node.js, browser, and React The root `@mcp-use/client` import uses package conditions to select its runtime implementation. Node gets the Node entry; browsers and other default environments get the browser-safe entry. React connection management is available from a separate entry point. | Environment | Import | HTTP | Stdio | Config files | Code Mode | | - | - | - | - | - | - | | Node.js `>=22.22.2` | `@mcp-use/client` | Yes | Yes | Yes | Yes | | Browser | `@mcp-use/client` | Yes | No | No | No | | React | `@mcp-use/client/react` | Yes | No | No | No | ## Node.js The Node entry includes HTTP and stdio transports, filesystem configuration, Code Mode, and Node OAuth helpers. ```typescript theme={null} import { MCPClient, loadConfigFile } from "@mcp-use/client"; const client = new MCPClient({ mcpServers: { api: { url: "https://api.example.com/mcp" }, fs: { command: "npx", args: ["-y", "@modelcontextprotocol/server-filesystem", "/tmp"], }, }, }); const clientFromFile = new MCPClient(loadConfigFile("./mcp-config.json")); try { const connections = await client.connectAll(); await connections.api.callTool("ping", {}); } finally { await Promise.all([client.close(), clientFromFile.close()]); } ``` ## Browser The browser entry exposes the HTTP connection API and browser OAuth support. It does not include process spawning, filesystem configuration, or local code execution. ```typescript theme={null} import { MCPClient } from "@mcp-use/client"; const client = new MCPClient({ mcpServers: { api: { url: "https://api.example.com/mcp" }, }, }); try { const connection = await client.connect("api"); await connection.callTool("tool", {}); } finally { await client.close(); } ``` Do not hardcode secrets in browser bundles. Use OAuth or a backend proxy. ## React Install the client and your application's supported React version: ```bash theme={null} npm install @mcp-use/client react ``` `@mcp-use/client/react` provides connection-management APIs such as `useMcp`, `McpClientProvider`, `useMcpClient`, and `useMcpServer`. It also exports `ViewRenderer` for hosts that render an MCP App View. Code running inside a View uses the View APIs from `mcp-use/react`, including `useToolContext`, `useCallTool`, and `useViewState`. These hooks communicate with the host; they do not create or manage MCP server connections. See [React integration](/v2/typescript/client/usemcp) for connection setup and [MCP Apps](/v2/typescript/mcp-apps) for building and hosting Views. # MCP Client Source: https://docs.mcp-use.com/v2/typescript/client/index Connect a TypeScript app to MCP servers and call tools, resources, and prompts. `@mcp-use/client` connects your app to one or more MCP servers. By default, HTTP connections negotiate the server's supported MCP protocol automatically and stdio connections use the sessionful protocol; set `protocolNegotiation` to override either default. The same connection API works across sessionful and sessionless servers. ## Install ```bash theme={null} npm install @mcp-use/client ``` The package requires Node.js `>=22.22.2` for Node applications and is ESM-only. ## Quick start ```typescript theme={null} import { MCPClient } from "@mcp-use/client"; const client = new MCPClient({ mcpServers: { demo: { url: "http://localhost:3000/mcp" }, }, }); try { const connection = await client.connect("demo"); const tools = await connection.listTools(); console.log(tools.map((tool) => tool.name)); const result = await connection.callTool("echo", { message: "hello" }); const text = result.content.find((block) => block.type === "text"); if (text?.type === "text") { console.log(text.text); } } finally { await client.close(); } ``` `connect(name)` returns a ready `MCPConnection`. Always close the client when your application is finished so its active connections and transports are released. ## Core types * **`MCPClient`** — holds server configuration and opens connections. * **`MCPConnection`** — calls tools, reads resources, and fetches prompts. `connection.info` exposes the negotiated protocol, server metadata, capabilities, and instructions. * **`MCPSession`** — deprecated compatibility alias for `MCPConnection`. Use `client.connect(name)` for one configured server or `client.connectAll()` to connect to every configured server. ## Configure servers ```typescript theme={null} import { MCPClient } from "@mcp-use/client"; const client = new MCPClient({ mcpServers: { remote: { url: "https://api.example.com/mcp", authToken: process.env.MCP_TOKEN, }, local: { command: "npx", args: ["-y", "@modelcontextprotocol/server-filesystem", "./"], }, }, }); ``` HTTP servers support automatic OAuth, bearer tokens, and custom headers. Stdio connections are available only in Node.js. Migrating existing client code? Follow the [client migration guide](/v2/typescript/client/migration). ## Next steps List and call server tools. Update packages, imports, configuration, and connection code. Configure OAuth and bearer tokens. Manage connections with `McpClientProvider` and hooks. Compare Node, browser, and React support. # Migrate to v2 Source: https://docs.mcp-use.com/v2/typescript/client/migration Migrate client, agent, and React connection code from mcp-use 1.x This guide updates applications from the mcp-use 1.x client surface to the v2 packages. It covers client, agent, and React connection code. Server and interactive UI APIs also have breaking changes. Do not assume that existing server or widget code can be carried forward unchanged. Follow the [server guide](/v2/typescript/server) and [MCP Apps guide](/v2/typescript/mcp-apps) for those parts of your application. ## 1. Update the runtime and packages The current client and agent packages require Node.js `>=22.22.2` and are ESM-only. ```bash theme={null} npm install @mcp-use/client @mcp-use/agent ``` Install `mcp-use` when the same project builds a server or MCP App View: ```bash theme={null} npm install mcp-use ``` Ensure your project emits ESM and your bundler respects the package's `node` and `browser` export conditions. ## 2. Move imports to their package entry points | 1.x surface | Current import | Purpose | | - | - | - | | `MCPClient`, connectors, OAuth, and sessions from `mcp-use` | `@mcp-use/client` | Node or browser MCP client | | `useMcp` and `McpClientProvider` from `mcp-use/react` | `@mcp-use/client/react` | React connection management | | `MCPAgent` and `PROMPTS` from `mcp-use` | `@mcp-use/agent` | Native agent | | LangChain agent compatibility and `ServerManager` | `@mcp-use/agent/langchain` | Optional LangChain integration | | Widget hooks such as `useWidget` (removed) | `mcp-use/react` View hooks | Code running inside MCP App Views | | `MCPServer` and server capabilities | `mcp-use` | MCP server | ```typescript theme={null} import { MCPClient } from "@mcp-use/client"; import { MCPAgent, PROMPTS } from "@mcp-use/agent"; ``` For the optional LangChain compatibility layer: ```typescript theme={null} import { LangChainMCPAgent, ServerManager, } from "@mcp-use/agent/langchain"; ``` The native `MCPAgent` and the LangChain compatibility agent are separate public entry points. Import `ServerManager` only from the LangChain entry. ### Removed client subpaths The client package exports its conditional root, the `./react` entry, and a `./sandbox` entry for the MCP Apps sandbox proxy document. Replace these removed imports: | Removed import | Use instead | | - | - | | `@mcp-use/client/browser` | `@mcp-use/client` in a browser build | | `@mcp-use/client/auth` | `@mcp-use/client` | | `@mcp-use/client/auth/node` | Node OAuth helpers from `@mcp-use/client` | The root entry resolves to the Node build under the `node` condition and to the browser-safe build under the `browser` or default condition. ## 3. Update the connection API Use `connect()` and `connectAll()`: ```typescript theme={null} import { MCPClient, type MCPConnection, } from "@mcp-use/client"; const client = new MCPClient({ mcpServers: { demo: { url: "https://api.example.com/mcp" }, }, }); try { const connection: MCPConnection = await client.connect("demo"); await connection.callTool("echo", { message: "hello" }); } finally { await client.close(); } ``` `createSession()` and `createAllSessions()` remain as deprecated compatibility aliases. `MCPSession` is a deprecated runtime and type alias for `MCPConnection`. Every connection exposes the negotiated server information: ```typescript theme={null} console.log(connection.info.protocolEra); console.log(connection.info.protocolVersion); console.log(connection.info.capabilities); console.log(connection.info.instructions); ``` ## 4. Configure protocol negotiation The public configuration field is `protocolNegotiation`, not `versionNegotiation`. HTTP connections default to `protocolNegotiation: "auto"`: they probe the sessionless protocol and fall back to the sessionful protocol. Stdio defaults to `"legacy"` to avoid probing a process that may be launched for one invocation. ```typescript theme={null} import { MCPClient } from "@mcp-use/client"; const client = new MCPClient({ mcpServers: { compatible: { url: "https://api.example.com/mcp", protocolNegotiation: "auto", }, }, }); ``` The accepted values are `"auto"`, `"legacy"`, and `{ pin: "2026-07-28" }`. There is no `"modern"` value; pin the modern protocol version to use the sessionless protocol without fallback. The client CLI exposes the same choices as `--protocol auto`, `legacy`, and `modern`. Its `modern` mode uses `{ pin: "2026-07-28" }`: ```bash theme={null} mcp-use client connect demo https://api.example.com/mcp --protocol auto mcp-use client connect legacy https://legacy.example.com/mcp --protocol legacy mcp-use client connect modern https://modern.example.com/mcp --protocol modern ``` There is no `--negotiate` flag. ## 5. Rename client configuration Search your client configuration for the removed 1.x names and update them: | 1.x name | Current name | | - | - | | `samplingCallback` | `onSampling` | | `elicitationCallback` | `onElicitation` | | `auth_token` | `authToken` | | `customHeaders` | `headers` | | `clientConfig` | `clientInfo` | | `debug` | `logLevel` on `useMcp` | | `BrowserTelemetry` | `Telemetry` | | `ResourceTemplate` client type | `ResourceTemplateType` | `MCPClient` has no `logLevel` option. Set `MCP_USE_LOG_LEVEL` (for example `debug`; `DEBUG=2` also works) in the environment, or assign `logger.level` on the `logger` exported by `@mcp-use/client`. Sampling, elicitation, and notification callbacks can be set as global client defaults or on an individual server configuration. Per-server callbacks take precedence. ## 6. Update authentication behavior `MCPClient` automatically creates an OAuth provider for HTTP servers that do not already configure an `authProvider`, `authToken`, `oauth: false`, or an `Authorization` header. * Node OAuth opens a browser and waits for its loopback callback. * The browser root client opens a popup by default and can use a redirect. * `useMcp` and `McpClientProvider` default to `preventAutoAuth: true`. Handle `pending_auth` and call `authenticate()`. ```tsx theme={null} import { useMcpServer } from "@mcp-use/client/react"; export function ServerAuth() { const server = useMcpServer("demo"); if (server?.state === "pending_auth") { return ( ); } return null; } ``` For a React OAuth callback route, import `onMcpAuthorization` from `@mcp-use/client/react`. A non-React browser build can use the browser conditional root export. Pre-registered clients also have different configuration shapes: * `MCPClient`: `oauth.staticClientInfo.client_id` * React: `oauth.clientId` See [Authentication](/v2/typescript/client/authentication) for complete Node, browser, React, proxy, and public-client examples. ## 7. Update React connection code and Views Move connection management to `@mcp-use/client/react`: | 1.x usage | Current usage | | - | - | | `useMcp` from `mcp-use/react` | `useMcp` from `@mcp-use/client/react` | | `McpServerOptions` | `McpServerConfig` (`McpServerOptions` is deprecated) | | Server config `name` used as a display label | `displayName` | | Displayed `server.name` | Negotiated `server.serverInfo?.name` | `@mcp-use/client/react` also exports `ViewRenderer` for a host application that renders MCP App Views. Code running inside a View stays in `mcp-use/react`, but must use focused View hooks such as `useToolContext`, `useCallTool`, and `useViewState`. The widget hooks `useWidget`, `useWidgetProps`, and `useWidgetState` were removed; see the [server migration guide](/v2/typescript/server/migration) for their replacements. ## 8. Replace removed low-level exports The client root no longer re-exports the old Zod `*Schema` constants or `JSONSchemaToZod`. * Import protocol types from `@modelcontextprotocol/client`. * Use `ResourceTemplateType` for the protocol resource-template type. * Use Zod 4's `z.fromJSONSchema()` when you need to convert JSON Schema. The current telemetry implementation does not bundle the PostHog browser or Node SDKs. If you used the old telemetry override, note that `telFetch` is now a non-throwing `(url, init) => Promise` helper. Do not remove `@modelcontextprotocol/ext-apps` based on the old migration notes; the current client still uses it for MCP Apps bridging. ## 9. Review server and MCP App changes The server is now built around the root `mcp-use` entry, a stateless `MCPServer`, and standard protocol result envelopes. Review tool, resource, prompt, middleware, authentication, and deployment APIs against the [server guide](/v2/typescript/server). Interactive results use MCP Apps Views. Bind a View to a tool, return model-facing `content` and View props in `structuredContent`, and consume the result with focused hooks such as `useToolContext`. The widget hooks were removed; the deprecated `widget()` response helper remains only for compatibility. Follow the [MCP Apps guide](/v2/typescript/mcp-apps) before updating interactive UI code. ## 10. Check Inspector callback URLs The standalone Inspector OAuth callback resolves relative to the configured Inspector base path. With the normal `/inspector` base, the callback is `/inspector/oauth/callback`; deployments under another base use that base's `/oauth/callback`. If you run a custom OAuth proxy, continue to bind upstream targets to SDK-discovered metadata. The Inspector proxy rejects arbitrary upstream target URLs. ## Migration checklist Use Node.js `>=22.22.2`, install the v2 packages, and confirm ESM output. Search for client and agent imports from `mcp-use`, removed `@mcp-use/client/*` subpaths, and connection hooks from `mcp-use/react`. Keep `MCPAgent` and `PROMPTS` on `@mcp-use/agent`; move `ServerManager` and LangChain compatibility imports to `@mcp-use/agent/langchain`. Search for `versionNegotiation`, `samplingCallback`, `elicitationCallback`, `auth_token`, `customHeaders`, `clientConfig`, and `debug`. Replace `createSession` and `createAllSessions` calls with `connect` and `connectAll`; replace `MCPSession` annotations with `MCPConnection`. Handle React's `pending_auth` state, use the correct pre-registered client shape for each API, and verify callback and proxy URLs. Separate React connection management from code that runs inside an MCP App View, then replace the removed widget hooks with View hooks. Type-check Node, browser, and React entry points independently, then connect to one sessionful and one sessionless server if your application supports both. ## Related * [Client overview](/v2/typescript/client/index) * [Authentication](/v2/typescript/client/authentication) * [React integration](/v2/typescript/client/usemcp) * [Server guide](/v2/typescript/server) * [MCP Apps guide](/v2/typescript/mcp-apps) # Notifications Source: https://docs.mcp-use.com/v2/typescript/client/notifications Handle one-way updates from MCP servers MCP notifications are one-way JSON-RPC messages with no response. Register a handler when your application needs to react to server updates. ## Receive server notifications Set a default handler on the client: ```typescript theme={null} import { MCPClient } from "@mcp-use/client"; const client = new MCPClient({ mcpServers: { demo: { url: "http://localhost:3000/mcp" }, }, onNotification: async (notification) => { console.log(notification.method, notification.params); }, }); ``` An individual server configuration can provide its own `onNotification` callback. Per-server callbacks take precedence over the global default. You can also register a handler on a connection: ```typescript theme={null} const connection = await client.connect("demo"); connection.on("notification", async (notification) => { if (notification.method === "notifications/tools/list_changed") { await connection.listTools(); } }); ``` The standard list-change method names are: * `notifications/tools/list_changed` * `notifications/resources/list_changed` * `notifications/prompts/list_changed` The client automatically refreshes its tool cache for tool list changes. Refresh resources or prompts when your application needs their updated values. ## React Each server managed by `McpClientProvider` exposes: * `notifications`, the stored notification entries * `unreadNotificationCount` * `markNotificationRead`, `markAllNotificationsRead`, and `clearNotifications` Set `onNotificationReceived` on a server configuration to run custom logic when the provider receives and stores a notification. ## Roots compatibility `setRoots()` and `getRoots()` are compatibility APIs for sessionful servers. Roots are not part of the current sessionless protocol. For a compatible server, pass initial roots in its client configuration: ```typescript theme={null} import { MCPClient } from "@mcp-use/client"; const client = new MCPClient({ mcpServers: { legacy: { url: "http://localhost:3000/mcp", roots: [{ uri: "file:///home/user/project", name: "Project" }], }, }, }); ``` Calling `connection.setRoots(roots)` replaces the cached roots and sends `notifications/roots/list_changed` when connected. `connection.getRoots()` returns the current cached list. Use these methods only for a server that negotiated the sessionful protocol and requests roots. ## Related Server-side notification sending is covered in [Notifications](/v2/typescript/server/notifications). # Prompts Source: https://docs.mcp-use.com/v2/typescript/client/prompts Fetch server-defined prompt templates Prompts are server-defined message templates. List the available prompts, then request one by name with its arguments. ```typescript theme={null} import { MCPClient } from "@mcp-use/client"; const client = new MCPClient({ mcpServers: { demo: { url: "http://localhost:3000/mcp" }, }, }); try { const connection = await client.connect("demo"); const { prompts } = await connection.listPrompts(); for (const prompt of prompts) { console.log(prompt.name, prompt.description); } const result = await connection.getPrompt("plan_trip", { destination: "Japan", days: "7", }); console.log(result.description); for (const message of result.messages) { if (message.content.type === "text") { console.log(message.role, message.content.text); } } } finally { await client.close(); } ``` `listPrompts()` returns `{ prompts }`. `getPrompt(name, args)` returns a prompt result with an optional `description` and a `messages` array. Each message has a `role` and one MCP content block. ## React ```tsx theme={null} import { useMcpServer } from "@mcp-use/client/react"; export function LoadPromptButton() { const server = useMcpServer("demo"); async function handleLoad() { if (server?.state !== "ready") return; const result = await server.getPrompt("code_review", { language: "ts", }); console.log(result.messages); } return ( ); } ``` The React `getPrompt` arguments are optional and use string values. ## Reference [`MCPConnection`](https://mcp-use-typescript-api-reference.vercel.app/modules/_mcp-use_client.index.html#mcpconnection) — `listPrompts` and `getPrompt`. # Resources Source: https://docs.mcp-use.com/v2/typescript/client/resources List and read MCP server resources Resources are URI-addressed content exposed by MCP servers. ```typescript theme={null} import { MCPClient } from "@mcp-use/client"; const client = new MCPClient({ mcpServers: { demo: { url: "http://localhost:3000/mcp" }, }, }); try { const connection = await client.connect("demo"); const { resources } = await connection.listAllResources(); for (const resource of resources) { console.log(resource.uri, resource.name, resource.mimeType); } const result = await connection.readResource("file:///config.json"); for (const content of result.contents) { if ("text" in content) { console.log(content.text); } } } finally { await client.close(); } ``` Use `listAllResources()` when you want the complete resource list. It follows pagination cursors for you and returns `{ resources }`. ## Paginate resources `listResources(cursor?)` returns an envelope with `resources` and an optional `nextCursor`. Handle the cursor yourself when you want to process one page at a time: ```typescript theme={null} import type { MCPConnection } from "@mcp-use/client"; async function logResourcePages(connection: MCPConnection): Promise { let cursor: string | undefined; do { const page = await connection.listResources(cursor); for (const resource of page.resources) { console.log(resource.uri); } cursor = page.nextCursor; } while (cursor); } ``` ## Resource templates Parameterized URIs such as `db://users/{id}` are discovered with `listResourceTemplates()`. Its result contains `resourceTemplates` and may contain `nextCursor`. The current `MCPConnection` method retrieves the first template page and does not accept a cursor argument. ```typescript theme={null} const page = await connection.listResourceTemplates(); for (const template of page.resourceTemplates) { console.log(template.uriTemplate, template.name); } ``` Resolve a template to a concrete URI in your application, then pass that URI to `readResource(uri)`. ## Subscribe to updates If the server supports resource subscriptions, subscribe and unsubscribe with the same concrete URI: ```typescript theme={null} await connection.subscribeToResource("file:///config.json"); // Receive notifications/resources/updated through your notification handler. await connection.unsubscribeFromResource("file:///config.json"); ``` ## React `useMcpServer` exposes the resource contents envelope returned by `readResource(uri)`: ```tsx theme={null} import { useMcpServer } from "@mcp-use/client/react"; export function ReadResourceButton({ uri }: { uri: string }) { const server = useMcpServer("demo"); async function handleRead() { if (server?.state !== "ready") return; const { contents } = await server.readResource(uri); console.log(contents); } return ( ); } ``` ## Reference [`MCPConnection`](https://mcp-use-typescript-api-reference.vercel.app/modules/_mcp-use_client.index.html#mcpconnection) — `listResources`, `listAllResources`, `listResourceTemplates`, `readResource`, `subscribeToResource`, and `unsubscribeFromResource`. # Sampling compatibility Source: https://docs.mcp-use.com/v2/typescript/client/sampling Handle sampling requests from compatible MCP server flows Sampling is a compatibility capability, not a primary capability of the current sessionless MCP protocol. Configure it only when a server flow requires the client to provide model output. The client can invoke `onSampling` in two cases: * A legacy sessionful server sends a `sampling/createMessage` request. * A sessionless server enters the temporary `input_required` multi-round-trip compatibility flow. Sampling is deprecated by the current sessionless protocol. Prefer server and tool designs that do not depend on client-provided sampling when you control both sides. ## Handle a request ```typescript theme={null} import { MCPClient, type OnSamplingCallback, type SamplingCreateMessageParams, } from "@mcp-use/client"; async function completeWithModel( params: SamplingCreateMessageParams ): Promise { // Send params.messages and the other sampling constraints to your model. throw new Error(`Connect a model for ${params.messages.length} messages`); } const onSampling: OnSamplingCallback = async (params) => { const text = await completeWithModel(params); return { role: "assistant", content: { type: "text", text }, model: "your-model", stopReason: "endTurn", }; }; const client = new MCPClient({ mcpServers: { demo: { url: "http://localhost:3000/mcp", onSampling, }, }, }); try { await client.connect("demo"); // A compatible server flow can now call onSampling. } finally { await client.close(); } ``` `OnSamplingCallback` receives the protocol parameters for `sampling/createMessage` and must return a `SamplingCreateMessageResult`. Setting the callback also advertises the sampling capability where the negotiated protocol supports it. ## Global and per-server handlers Set `onSampling` at the top level of the `MCPClient` configuration to use it as a global default. An `onSampling` callback on an individual server configuration takes precedence over that default. The Node client also accepts the global callback in its second constructor argument. ## React `useMcp({ onSampling })` handles compatible requests directly with your callback. `McpClientProvider` instead installs a handler that queues each request on the managed server: * `server.pendingSamplingRequests` contains the requests awaiting a decision. * `server.approveSampling(requestId, result)` resolves a request with a complete `SamplingCreateMessageResult`. * `server.rejectSampling(requestId, error?)` rejects it. * `onSamplingRequest` on the server configuration can notify your UI when a request is added to the queue. Queued requests remain pending until they are approved, rejected, disconnected, or timed out. ## Runnable example The maintained [sampling client example](https://github.com/mcp-use/mcp-use/blob/main/libraries/typescript/packages/client/examples/node/communication/sampling-client.ts) exercises both the legacy push request and the sessionless `input_required` compatibility flow. # Tools Source: https://docs.mcp-use.com/v2/typescript/client/tools List and call MCP server tools Use a ready `MCPConnection` to list and call tools. ```typescript theme={null} import { MCPClient } from "@mcp-use/client"; const client = new MCPClient({ mcpServers: { demo: { url: "http://localhost:3000/mcp" } }, }); try { const conn = await client.connect("demo"); const tools = await conn.listTools(); for (const tool of tools) { console.log(tool.name, tool.description); } const result = await conn.callTool("read_file", { path: "/tmp/a.txt" }); if (result.isError) { console.error(result.content); } else { for (const block of result.content) { if (block.type === "text") console.log(block.text); } } } finally { await client.close(); } ``` ## Timeouts Pass MCP request options as the third argument: ```typescript theme={null} const abortController = new AbortController(); await conn.callTool( "long_task", { input: "data" }, { timeout: 300_000, resetTimeoutOnProgress: true, maxTotalTimeout: 900_000, signal: abortController.signal, }, ); ``` ## Lazy connect ```typescript theme={null} let conn = client.getSession("demo"); if (!conn) conn = await client.connect("demo"); await conn.callTool("echo", { message: "hello" }); ``` `getSession` returns `null` when not connected. `requireSession` throws. ## Reference [`MCPConnection`](https://mcp-use-typescript-api-reference.vercel.app/modules/_mcp-use_client.index.html#mcpconnection) — `listTools`, `callTool`, and request options. # React Integration Source: https://docs.mcp-use.com/v2/typescript/client/usemcp React hooks and providers for MCP client connections Import from `@mcp-use/client/react`: ```typescript theme={null} import { McpClientProvider, useMcpClient, useMcpServer, useMcp, onMcpAuthorization, } from "@mcp-use/client/react"; ``` Use **`McpClientProvider`** for multi-server apps. Use standalone **`useMcp`** only for a single server. ## Provider setup ```tsx theme={null} import { useEffect } from "react"; import { McpClientProvider, useMcpClient, useMcpServer, } from "@mcp-use/client/react"; function App() { return ( ); } function Dashboard() { const { addServer, servers, storageLoaded } = useMcpClient(); useEffect(() => { // Wait for the provider's initial server load before adding servers. if (!storageLoaded) return; addServer("demo", { url: "http://localhost:3000/mcp", displayName: "Demo", }); }, [addServer, storageLoaded]); return servers.map((s) => ); } function ServerPanel({ serverId }: { serverId: string }) { const server = useMcpServer(serverId); if (!server || server.state !== "ready") { return
{server?.state ?? "loading"}…
; } return (

{server.displayName}

{server.tools.length} tools

); } ``` Call `addServer` only after `storageLoaded` is `true`. When the provider finishes its initial load, it replaces its server list with the servers from `storageProvider` and the `mcpServers` prop, if either is set, so a server added earlier is dropped. `addServer` ignores an ID that is already registered. ## Connection states | State | Meaning | | - | - | | `discovering` | Connecting | | `pending_auth` | OAuth required — call `server.authenticate()` | | `authenticating` | OAuth in progress | | `ready` | Connected | | `failed` | Error — call `server.retry()` | OAuth does not auto-start by default (`preventAutoAuth: true`). Show a sign-in button when `state === "pending_auth"`. Mixed auth is reported separately from the connection state. A mixed-auth server remains `ready` because its public operations are usable, while `authorization` describes the optional OAuth state: ```tsx theme={null} function ServerAuth({ serverId }: { serverId: string }) { const server = useMcpServer(serverId); if (!server) return null; const needsOptionalAuth = server.authorization?.mode === "mixed" && !server.authorization.authenticated; return needsOptionalAuth ? (

This server is using mixed auth. Public tools are available.

) : null; } ``` The hook detects mixed auth from RFC 9728 protected-resource metadata after an anonymous connection. Set `detectMixedAuth: false` to disable this best-effort discovery. With the default explicit browser flow, a wire-level OAuth challenge from a protected operation prepares the auth action; call `authenticate()` and retry that operation. Tool-level `isError` results do not trigger OAuth. ## OAuth callback Create a route (default: `/oauth/callback`): ```tsx theme={null} import { onMcpAuthorization } from "@mcp-use/client/react"; import { useEffect } from "react"; export default function OAuthCallback() { useEffect(() => { void onMcpAuthorization(); }, []); return
Completing sign-in…
; } ``` Override with `defaultCallbackUrl` on the provider or `callbackUrl` per server. `McpClientProvider` skips connecting its servers only on a page whose path ends in `/oauth/callback`. A connection attempt on the callback page can replace the in-flight PKCE verifier before `onMcpAuthorization()` exchanges the code. If your callback URL uses a different path, render that route outside `McpClientProvider`. ## Proxy fallback When direct browser connections fail (CORS / FastMCP), retry through a proxy: ```tsx theme={null} ``` MCP traffic and OAuth use separate proxy URLs so resource identity stays the upstream MCP URL. ## Persistence ```tsx theme={null} import { LocalStorageProvider } from "@mcp-use/client/react"; ; ``` Built-in providers persist only non-secret connection settings. Supply bearer tokens, request headers, and proxy headers again at runtime after a reload. Browser OAuth tokens remain persistent by default and are encrypted with AES-256-GCM using a non-extractable origin key stored in IndexedDB. ## Standalone `useMcp` For one server without the provider: ```tsx theme={null} const mcp = useMcp({ url: "http://localhost:3000/mcp" }); if (mcp.state === "pending_auth") { return ; } if (mcp.state !== "ready") return
Connecting…
; return ( <> {mcp.authorization?.mode === "mixed" && !mcp.authorization.authenticated && ( )}
{mcp.tools.map((t) => t.name).join("\n")}
); ``` ## OAuth UserInfo Set `oauth.fetchUserInfo: true` to fetch the authenticated account's UserInfo after the MCP connection becomes ready. The fetch runs independently of the connection; a UserInfo error does not change `mcp.state`. The authorization server must advertise a `userinfo_endpoint`, and the requested scopes must permit the claims you need (often `openid profile email`). ```tsx theme={null} function Account() { const mcp = useMcp({ url: "https://example.com/mcp", oauth: { scope: "openid profile email", fetchUserInfo: true }, }); return (
{mcp.userInfo.status === "available" && (mcp.userInfo.claims.email ?? mcp.userInfo.claims.sub)}
); } ``` `mcp.userInfo` is reactive and has these states: | Status | Meaning | | - | - | | `idle` | No request is in progress. | | `loading` | UserInfo is being fetched. | | `available` | Read `claims` and optional `issuer`; claims such as `email` may be absent. | | `unavailable` | Read `reason`: `not_authenticated`, `no_userinfo_endpoint`, or `session_changed`. | | `error` | Read `error`; call `getUserInfo()` to retry. | Automatic fetching is opt-in and retries an error once after a short delay. You can omit `fetchUserInfo` and call `await mcp.getUserInfo()` whenever you want to fetch the account explicitly; the method returns the same state it publishes to `mcp.userInfo`. ## Types * **`McpServerConfig`** — server options passed to `addServer` (replaces deprecated `McpServerOptions`). * **`displayName`** — your label for the server in UI. * **`serverInfo.name`** — name returned by the server at init. * **`authorization`** — optional mixed-auth metadata with `mode`, `authenticated`, `resource`, and `scopesSupported`. Sampling, elicitation, and notifications are queued on each `McpServer` (`pendingSamplingRequests`, `pendingElicitationRequests`, `notifications`). See [Sampling](/v2/typescript/client/sampling) and [Elicitation](/v2/typescript/client/elicitation). ## Reference [React client API reference](https://mcp-use-typescript-api-reference.vercel.app/modules/_mcp-use_client.react.html) — provider props, hook return values, and storage types. # A2UI Source: https://docs.mcp-use.com/v2/typescript/cookbook/a2ui Let the chat model generate interactive A2UI layouts and render them in an MCP App view. Add a `render-ui` tool that renders model-generated [A2UI](https://a2ui.org/) layouts inside an MCP App. The model writes the component layout and initial data as tool arguments, and the stock A2UI React renderer displays them in the view. The server needs no model API key or agent runtime. The host's chat model generates the tool arguments. ## Try the live example Ask the chat for a UI. Pick a suggestion or describe your own layout, then edit the inputs, sliders, and checkboxes in the result.