Commit Graph

9 Commits

Author SHA1 Message Date
Andrew Khadder 68afda5885 docs(typescript): review and rewrite TypeScript docs (MCP-2466) (#1780)
* docs: remove stale feedback block and orphaned anchor from docs.json

* chore(docs): make Typescript more prominent

* chore(docs): Update `welcome.mdx`

* docs: rewrite TypeScript quickstart and welcome pages

Refocus the quickstart on create-mcp-use-app (scaffold, run, and deploy a
first MCP server) and drop the agent/client/server primer table and
diagram. Convert the welcome page's server + widget example from Tabs to
CodeGroup and tighten the intro wording.

* docs: remove stale server templates page and fix its references

Delete the typescript/server/templates page and repoint the home
templates tip to the quickstart, which now covers create-mcp-use-app.

* docs(typescript): fix dead example links to real example paths

The 'see a full example' links pointed at GitHub folders that 404 or
contain only a README. Corrected to the real runnable examples under
libraries/typescript/packages/mcp-use/examples/, verified against
origin/main (incl. matching cd commands):

- installation: examples/server -> packages/.../examples/server
- client-configuration: a .py link -> real TS multi-server example
- code-mode: examples/client/* -> examples/agent/code-mode/*
- elicitation, sampling, notifications: server/X -> server/features/X
- supabase: server/supabase -> server/deployment/supabase
- clerk: restore missing packages/mcp-use/ path segment

Quickstart links were already fixed by the quickstart rewrite (e6903716).
Part of the docs audit (MCP-2466).

* docs(typescript): rewrite Agent and Client introduction pages

Rewrite the Agent and Client intro pages to be task-oriented and
scannable: concise feature lists with cross-links, runnable quick-start
examples, and added API reference sections. Drop stale CodeSandbox
embeds and outdated model names.

* docs(typescript): fix MCPServer class name casing in server reference

The API Reference heading, prose, and class signature used McpServer;
the real SDK export is MCPServer. Corrected all three occurrences in
server/index.mdx.

* docs: add redirect for bare /typescript/server path

Routes the bare /typescript/server path to its index page now that the
server section has been restructured.

Claude-Session: https://claude.ai/code/session_015uioJjKTAZXGQpbXHUHZWp

* docs(typescript): fix broken code examples across MCP Server & Apps section

Fix all 102 confirmed code defects found in the MCP Server & MCP Apps
documentation audit (47 pages, 401 code blocks), verified against the
mcp-use@1.32 SDK source. The recurring patterns that made copy-pasted
examples fail to compile or run are now corrected everywhere they appeared:

- server.start() -> await server.listen() (no start() method exists)
- bare-object tool returns wrapped in object()/text() response helpers;
  catch blocks renamed so they no longer shadow the error() helper
- prompt messages use role:"user" with typed { type:"text" } content
  instead of the invalid role:"system" + bare-string shape
- auth reads ctx.auth.user.userId (not ctx.auth.userId); user fields live
  under ctx.auth.user, scopes/permissions stay top-level
- security: remove verifyJwt: process.env.NODE_ENV === 'production' from all
  six OAuth provider pages (off-prod it skips signature verification and
  accepts forged tokens); rely on the secure default, with a warning never
  to disable it
- correct import subpaths: Logger/MCPClient from mcp-use, response helpers
  and server symbols from mcp-use/server, MCPClient as BrowserMCPClient from
  mcp-use/browser; drop the unexported getMcpAppsBridge
- useWidget generics use the real <TProps, TState, TOutput, ...> order;
  remove the non-existent notifyIntrinsicHeight (auto-size via McpUseProvider)
- fix the deployment URL to <id>.run.mcp-use.com/mcp, add missing z/helper
  imports, add the --branch/--dockerfile CLI options, and clean up em dashes
  and bare/malformed code fences

Each page was fixed and then independently re-verified against the SDK
source, with a repo-wide pattern sweep confirming no instances remain.
Structural IA changes (moving widget-components to /react/, orphan
redirects) are intentionally deferred to the docs rewrite.

* docs(typescript): restructure MCP Server & MCP Apps IA

Promote MCP Apps to its own top-level section in the TypeScript SDK Docs tab and move the 9 React widget-component pages out of /server/widget-components/ into /typescript/react/.

- Move 9 React component pages to typescript/react/ (git renames) with 9 redirects
- Promote MCP Apps to a top-level group (Overview pages + React subgroup)
- Remove the duplicate MCP Apps group from the Home product nav; rehome guides/chatgpt-apps-flow under MCP Apps so it no longer orphans
- Move cli-reference out of MCP Server into a new Tooling group
- Relocate response-helpers -> Core Components, openapi -> Advanced Features, nextjs-drop-in -> Deployment
- Repoint all widget-components links to /typescript/react/
- Fix 3 broken anchor links (inspector CLI env var, mcp-apps metadata, auth providers)

Structure-only change; no page content rewrites. Refs MCP-2466.

* docs: refresh TypeScript server app docs

* docs: add TypeScript API reference

* docs: streamline TypeScript server navigation

* docs: rewrite core TypeScript server guides

* docs: rewrite advanced TypeScript server guides

* docs: rewrite TypeScript server OAuth guides

* docs: rewrite TypeScript server session storage guides

* docs: rewrite MCP Apps section

* docs: add TypeScript MCP client API reference

* docs: add TypeScript MCP agent API reference

* docs: reorder TypeScript API reference nav

* docs: reorganize TypeScript tooling nav

* docs: rewrite inspector guides

* docs: rewrite MCP server tunneling guide

* docs: rewrite CLI client and reference docs

* docs: finalize TypeScript documentation rewrite

* docs: move inspector updates under get started

* Fix Mintlify validation errors

* Fix Mintlify broken links

* docs: update Manufact Cloud deployment guide

* chore: retrigger Mintlify docs preview

* Fix MDX comment syntax on home page

* docs: rework TypeScript server examples

* docs: fix server docs links

* docs: restore SDK links in home sidebar

* docs: move SDK links to end of home sidebar
2026-06-29 10:05:13 -07:00
Pietro Zullo 8348c59a53 docs: reorganize, fix accuracy, and update for agent readability (#1502)
* docs: reorganize navigation and clean up content

- Remove 'Misc' group with misplaced blog posts
- Remove 'Libraries' redirect group from Home nav
- Simplify 'Dev Tools' group (flatten Inspector, CLI, Tunneling)
- Remove individual changelog versions from Python nav (keep summary)
- Remove changelog from TypeScript 'Get Started' group
- Remove tunneling duplicate from Python Development group
- Rewrite mcp101 as clean MCP concepts page (was pitch deck)
- Delete typescript/blog posts (not technical docs)
- Add redirects for deleted blog post URLs

* docs: fix content accuracy and remove sloppy language

- Fix broken python/server/mcp-apps link in home page
- Remove informal pitch-speak from python/server/index.mdx
- Fix grammar error in typescript/server/index.mdx
- Update typescript/client/logging.mdx: remove fake 'coming soon' API code
- Fix non-existent model name gpt-5.1 in typescript quickstart
- Fix mcp_use naming in development contributing guide

* docs: fix incorrect TypeScript server API calls in inspector docs

- Replace server.addTool() with server.tool() (correct mcp-use API)
- Add missing zod import to debugging-chatgpt-apps example

* docs: fix fake model names (gpt-5.1 → gpt-4o) in agent docs

* docs: update model names, fix APIs, and add agent visibility hints

- Replace all deprecated model names with latest: gpt-4.1, gpt-4.1-mini,
  claude-sonnet-4-6, claude-opus-4-7, gemini-2.5-flash across all docs
- Fix TypeScript server.tool() API in installation.mdx (old positional string form)
- Fix TypeScript agent.run() in quickstart.mdx (deprecated string form → object)
- Remove broken manufact.com/docs/llms.txt hidden hints from 5 pages
- Add <Visibility for="agents"> block to mcp101.mdx with install commands,
  key classes, and API signatures for agent-oriented navigation
- Add LangChain provider install note to Python quickstart (mcp-use agent
  requires a separate langchain-* provider package)
- Update model name cards in Python llm-integration.mdx

* docs: clean up remaining stale model names and improve accuracy

- Update supported model lists in Python and TypeScript llm-integration pages
- Fix cost optimization table to use current model IDs
- Update TypeScript agent overview supported providers list

* docs: add LangChain provider install to TypeScript quickstart agent section

The MCPAgent requires a separate @langchain/* provider package; this was
not mentioned before the code example that imports from @langchain/openai.

* docs: update to latest flagship model IDs (May 2026)

- OpenAI: gpt-4.1 → gpt-5.5, gpt-4.1-mini → gpt-5.5-mini
- Google: gemini-2.5-flash → gemini-3.1-flash, gemini-2.5-pro → gemini-3.1-pro
- Groq: llama-3.1-* → llama-4-scout-17b-16e-instruct
- Anthropic (claude-opus-4-7, claude-sonnet-4-6) already current, no change

* docs: replace all em dashes with hyphens

* docs: restore llms.txt hints using Visibility component

* docs: simplify TypeScript logging page to unsupported notice only

* docs: rewrite mcp101 to explain MCP protocol with mcp-use examples and doc links

* docs: remove goal.md

* docs: revert nav changes, keep only Misc group removal and blog redirects

* docs: reorder mcp101 to Server/App -> Client/Inspector -> Agent, restore title

* docs: add code examples for Resources and Prompts in mcp101

* docs: remove em dashes from mcp101

* docs: add MCPClient code examples to mcp101

* docs: add React client example to mcp101

* docs: add agent code examples to mcp101

* docs: expand MCP Apps section in mcp101 with example and links

* docs: restore Contacts, Socials, and Founders sections to mcp101

* docs: add context-setting intro paragraph to mcp101 for new readers

* docs: add MCP stores section to mcp101 intro with Claude, ChatGPT, Cursor

* docs: fix Claude store link

* docs: fix ChatGPT store link

* docs: fix Cursor store link

* docs: replace store Cards with linked image grid

* docs: add captions to store images

* docs: add Notifications to client primitives table in mcp101

* docs: add lead-in paragraph before resource cards at bottom of mcp101

* docs: move resource cards to end of page after Contacts/Socials/Founders

* docs: demote Contacts/Socials/Founders to bold text to remove from TOC

* docs: move Contacts/Socials/Founders to very end of mcp101

* docs: add Resources and Contacts section headers, link official MCP docs

* chore(docs): update site metadata, footer links, and rename mcp_use to mcp-use

* update docs metadata + images

* docs: enhance MCP section by highlighting the reach of MCP stores with 1 billion weekly active users

* api ref
2026-05-14 18:49:06 +02:00
Luigi Pederzani 6b2db4a2b0 docs: reorganize docs and examples around MCP Servers + MCP Apps (#1363)
Reshape docs, examples, and indexes to mirror the README narrative:
MCP Servers + MCP Apps are primary; MCP Agent and MCP Client are
present but secondary. Remove duplicated concepts, deprecated pages,
and stale examples; add redirects for removed paths.

Docs
- Rewrite home/index.mdx: tagline + MCP Server / MCP App split cards,
  quickstart tabs, MCP Apps widget snippet, Templates teaser, Inspector,
  Deploy, Agent+Client in a collapsed accordion.
- New home/templates.mdx gallery (Chart Builder, Diagram Builder, Slide
  Deck, Maps Explorer, Widget Gallery, and more) with demo URLs and
  deploy buttons, mirroring the README.
- Simplify python/typescript welcome.mdx: drop duplicated "What is MCP?"
  / "Why mcp-use?" (single pointer to home/mcp101); server-first Next
  Steps; fix broken Python links.
- docs.json: Home product reshaped (Welcome, MCP Apps, Templates, Dev
  Tools + CLI reference, Concepts, Libraries, Misc). Python
  Integrations collapsed into MCP Agents → LLM Adapters.
  fastapi_mount added to Python MCP Server Overview. TS MCP Apps adds
  creating-mcp-apps-server; OAuth Providers gets keycloak + custom.
  Empty API Reference, misrouted Community, and Blog tabs removed from
  TS SDK.
- Delete: ui-widgets.mdx, mcp-ui-resources.mdx,
  comparison-with-other-implementations.mdx, api-reference.mdx (empty),
  typescript/development/security.mdx, python/blog/middleware.mdx,
  python/server/auth/index.mdx.
- Redirects: old paths → current equivalents.
- CLI reference: new "What's New" card group (HMR, --tunnel, skills
  add, generate-types); cross-link from `start` to Tunneling guide.

Examples
- Rewrite libraries/typescript/.../examples/server/ui/mcp-ui/ as a
  programmatic MCP Apps widget gallery (welcome-card, quick-poll,
  task-card) using server.uiResource({ type: "mcpApps", htmlTemplate }).
  Removes deprecated UIResource / rawHtml / remoteDom patterns.
- Delete empty server/ui/apps-sdk/.
- Fix stale docs URL in server/ui/mcp-apps/apps-sdk/index.ts.
- Update examples/README.md and TS examples README: add Templates
  pointer (github.com/mcp-use/mcp-use#templates + docs/home/templates),
  list previously-missing examples (mcp-apps, files, model-context,
  middleware, session-management, better-auth, Python orphans), flag
  apps-sdk as legacy.
2026-05-03 22:57:45 +02:00
Pietro Zullo bd808f6eb6 docs: update chatgpt-apps-flow (#1367) 2026-04-20 13:19:48 +02:00
Enrico Toniato 5a73b41355 Canary (#1062)
* fix(auth): resolve OAuth flow for WorkOS across client, server, and inspector (#1058)

* add proactive token refresh and credential invalidation to BrowserOAuthClientProvider

* fix OAuth token refresh by removing static Authorization header from transport config

* add changeset

* update refresh to use official mcp sdk methods

* update workos to always use proxy method since its an external provider

* update autoConnect to always include proxyAddress even without bearer tokens

* run format

* update changeset

* chore: update pnpm-lock.yaml after rebase onto main

---------

Co-authored-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com>

* chore: enter canary prerelease mode

* chore(typescript): version packages (canary)

* improvement(auth): accept full AuthKit domain in WorkOS subdomain config (#1057)

* change subdomain to include authkit.app

* add changeset

* chore(typescript): version packages (canary)

* Fix/inspector/first render (#1060)

* fix(tsconfig): include .mcp-use directory in TypeScript configuration for starter and blank templates

* fix(package.json): update postinstall script to remove fallback for generate-types in mcp-apps template

* fix(MessageList): enhance tool metadata retrieval by normalizing tool names for consistency with API responses

* feat(inspector): enhance MCPApps components with required props handling and improved UI feedback

- Added `requiredProps` to `MCPAppsDebugControls` to auto-open a popover when required props are missing, providing users with a clear indication of necessary inputs.
- Updated `MCPAppsRenderer` and `MessageList` to support cancellation state, allowing for better user experience during tool execution.
- Enhanced `PropsConfigDialog` to detect and display required props from widget schemas, improving the configuration process.
- Introduced utility functions in `usePropsLLM` for better JSON extraction from LLM responses, ensuring accurate prop generation.

* feat(inspector): enhance IframeConsole with expandable log entries and improved log formatting

- Added expandable functionality to log entries, allowing users to view detailed logs on click.
- Introduced a copy button for logs, enabling easy copying of log content to the clipboard.
- Improved log formatting and display, including inline previews and better handling of log levels.
- Updated UI elements with new icons and styles for a more intuitive user experience.

* feat(inspector): add clientOptions to InspectorDashboard for enhanced capabilities

- Introduced `clientOptions` with `capabilities` to support new extensions in the InspectorDashboard component.
- This enhancement allows for better integration with the MCP application protocol, improving overall functionality.

* feat(inspector): refine Layout component by updating validTabs and adding clientOptions

- Updated the `validTabs` array in the Layout component to remove the "playground" tab.
- Added `clientOptions` with specific capabilities to enhance integration with MCP application protocol, improving functionality.

* feat(types): enhance type definitions with detailed documentation and examples

- Updated `MCPServerClass` tool and prompt definitions to include more specific type constraints for better type safety.
- Enhanced `ServerConfig`, `InputDefinition`, and various resource and tool interfaces with comprehensive JSDoc comments, including examples for clarity.
- Improved overall type definitions for widgets and tools, ensuring better integration and usability within the MCP framework.
- Added missing descriptions and examples to several interfaces, improving developer experience and documentation quality.

* feat(mcp-apps): update server and widget integration for enhanced functionality

- Refactored the MCP server setup to improve integration with MCP Apps, including updated descriptions and documentation links.
- Introduced a new search tool for fruits, allowing users to filter results and display them in a visual widget.
- Enhanced the product search result widget with improved loading states and detail views for selected fruits.
- Removed unused dependencies and components to streamline the project structure.
- Updated README files to reflect changes and provide clearer guidance for users.

* feat(inspector): enhance MCPAppsRenderer and ui-resource-registration for improved widget re-initialization and metadata handling

- Added logic in MCPAppsRenderer to re-read `prefersBorder` from the server upon widget re-initialization, improving responsiveness to metadata changes.
- Implemented detection of widget re-initialization to ensure tool input is correctly sent to new widget instances after events like HMR page reloads.
- Refactored resource registration in ui-resource-registration to dynamically resolve the latest enriched definitions, ensuring accurate metadata is used during HMR updates.
- Updated read callbacks to handle dynamic URIs and maintain consistency in resource handling, enhancing overall widget functionality.

* feat(widget): enhance useWidget hook and documentation for improved functionality

- Updated the `useWidget` hook to support additional generic parameters for better type safety and flexibility.
- Introduced new props for real-time streaming and external link handling, enhancing widget capabilities.
- Improved documentation in SKILL.md and ui-widgets.mdx to clarify usage of new features, including partial argument streaming and external navigation.
- Removed deprecated dependencies from package.json files across templates to streamline project setup.
- Enhanced various components to utilize new props and improve user experience during tool interactions.

* feat(tsconfig): enhance TypeScript configuration and widget functionality

- Updated TypeScript configurations across multiple templates to include incremental builds and build info file paths, improving build performance and efficiency.
- Modified the `useWidget` hook to streamline state management and enhance type safety by refining generic parameters.
- Simplified the `ProductSearchResult` component by reducing unnecessary generic parameters, improving code clarity and maintainability.
- Adjusted helper functions to ensure consistent type handling across the widget framework.

* feat(update-check): implement update notification for mcp-use CLI

- Added a new utility to check for updates of the mcp-use package and notify users if a newer version is available.
- Integrated the update check into the CLI's pre-action hook, ensuring users are informed before executing commands.
- Created a caching mechanism to minimize unnecessary network requests and improve performance.

* feat(inspector): add file utilities for client file management

- Introduced a new `file-utils.ts` module containing functions to determine content types based on file extensions, check for the existence of client files, and retrieve the client distribution path.
- Updated the middleware to utilize these new utilities for improved handling of client files, including warnings when files are not found.

* feat(inspector): update TypeScript and MCPApps components for improved functionality

- Added TypeScript version 5.9.3 to the pnpm-lock.yaml for enhanced type safety and features.
- Enhanced MCPAppsDebugControls to prevent auto-application of localStorage presets in tool context.
- Refactored MCPAppsRenderer to optimize state management and prevent unnecessary re-renders, including the use of refs for tool input and output.
- Improved OpenAIComponentRenderer with better state handling and batching of updates to prevent double renders.
- Updated ToolsTab to streamline resource pre-fetching and reduce unnecessary renders during tool execution.
- Enhanced ToolResultRenderer and ToolResultDisplay for better memoization and performance.
- Introduced a new RelativeTimeDisplay component to manage time updates without affecting parent re-renders.

* chore: update pnpm-lock.yaml after rebase onto main

Co-authored-by: Cursor <cursoragent@cursor.com>

* fix: update postinstall script in package.json templates to prevent failure on type generation

* Potential fix for code scanning alert no. 81: Uncontrolled data used in path expression

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Signed-off-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com>

* feat(inspector): add HTML escaping function for safe user input handling

- Introduced a new `escapeHtml` function to sanitize user input in responses, preventing potential XSS vulnerabilities.
- Updated the CDN server response to utilize the `escapeHtml` function when returning 404 error messages.

* chore: update TypeScript version to 5.9.3 across multiple packages and enhance component functionality

- Added TypeScript version 5.9.3 to pnpm-lock.yaml and various package.json files for improved type safety.
- Enhanced OpenAIComponentRenderer to optimize state updates and prevent redundant dispatches.
- Updated ResourceResultDisplay to include a data-testid for better testing capabilities.
- Improved debugging tools to scope props dialog interactions to the correct resource widget preview.

* format

* refactor(tests): update widget integration and data flow tests to align with SEP-1865 specifications

- Adjusted tests to verify that widget metadata is now located on tool definitions rather than in tool call results, as per SEP-1865.
- Updated assertions to check for structured content in results instead of relying on metadata properties.
- Enhanced test coverage for tool invocation and output structure to ensure compliance with new standards.

* package

* test(widget-helper): enhance integration tests for tool metadata validation

- Updated assertions to ensure manual and auto tools are defined before checking metadata properties.
- Improved handling of auto tool metadata to account for potential absence of _meta.
- Enhanced regex checks for output templates to ensure proper formatting and compliance with widget standards.

* changeset

---------

Signed-off-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* chore(typescript): version packages (canary)

* feat(inspector): enhance MCPApps components and improve widget handling (#1063)

* feat(inspector): enhance MCPApps components and improve widget handling

- Added a new test_app configuration in pnpm-lock.yaml with updated dependencies for better development support.
- Updated InspectorDashboard to set a default MCP_URL when not provided.
- Refined ProductSearchResult and CarouselItem components to use a consistent text-danger class for better styling.
- Improved error handling in InspectorDashboard for connection retries.
- Streamlined MCPAppsRenderer to enhance widget re-initialization and metadata handling.
- Removed deprecated dev widget endpoints and related logic to simplify the codebase.
- Enhanced FormattedContentDisplay to allow toggling between formatted and plain text for better user experience.
- Updated PropsConfigDialog and ResourceResultDisplay to utilize standardized metadata paths for improved prop detection.

This commit focuses on enhancing the overall functionality and user experience of the MCPApps components and related widgets.

* feat(inspector): enhance ToolsTab and ToolExecutionPanel for improved field handling

- Introduced state management for tracking fields that should be sent as empty, allowing for explicit control over empty values in tool arguments.
- Updated ToolsTab to initialize and manage sets of fields, enhancing the handling of tool input schemas.
- Enhanced ToolExecutionPanel to accept and utilize the new payload structure, ensuring accurate representation of data sent during tool execution.
- Added toggle functionality in ToolInputForm for explicitly sending empty objects and arrays, improving user experience and flexibility in input handling.

This commit focuses on refining the input handling process within the inspector, providing users with better control over the data they send.

* feat(widget): enhance useWidget hook to unwrap CallToolResult envelope

- Updated the useWidget hook to unwrap the CallToolResult envelope when the OpenAI provider is used, allowing for direct access to structured content.
- Improved handling of toolOutput to ensure compatibility with hosts that pass the full tool-result parameters.
- Enhanced documentation comments to clarify the changes and improve understanding of the new logic.

This commit focuses on refining the output handling within the useWidget hook, improving type safety and usability for developers.

* feat(inspector): enhance CSP handling and widget re-execution logic

- Updated the Inspector components to improve handling of Content Security Policy (CSP) settings, ensuring that widget metadata is correctly enriched with CSP directives.
- Introduced logic to re-execute widgets when CSP mode changes, allowing for dynamic updates to the widget's execution context.
- Enhanced the MCPAppsDebugControls and MCPAppsRenderer to better manage CSP violations and provide clearer user feedback on required props.
- Refactored the PropsConfigDialog to utilize standardized metadata paths for improved prop detection and configuration.

This commit focuses on refining the CSP management and widget lifecycle within the inspector, enhancing overall functionality and user experience.

* refactor(tests): update weather-display widget tests for props handling

- Modified tests in `aaa-ui-widgets.test.ts` to check for visibility of props wall text instead of iframe visibility, ensuring that the widget's required props are correctly validated.
- Removed unnecessary iframe visibility checks in `debugger-tools.test.ts` to streamline the test flow and focus on props configuration.
- Updated `navigateToResourcesAndSelectWeather` helper function to wait for props wall text, enhancing clarity on widget requirements during testing.

This commit enhances the accuracy of widget tests by focusing on required props visibility, improving overall test reliability.

* chore(typescript): version packages (canary)

* refactor(docs): update documentation for MCP Apps and enhance content security policy (#1067)

* refactor(docs): update documentation for MCP Apps and enhance content security policy

- Changed "UI Widgets" group to "MCP Apps" in the documentation structure.
- Added a new section on Content Security Policy (CSP) for MCP Apps, detailing configuration and automatic settings.
- Updated references from "mcp-use Cloud" to "Manufact Cloud" across various documents for consistency.
- Introduced a deprecation notice for the Apps SDK in the ChatGPT Apps flow guide.
- Enhanced the inspector documentation to include CSP configuration and debugging tips.
- Updated various SVG icons to a consistent color scheme and added a new Keycloak icon.
- Refined CLI reference and quickstart guides to reflect changes in deployment terminology and commands.

* refactor(inspector): enhance MCPApps components and improve widget handling

- Updated Inspector components to refine handling of Content Security Policy (CSP) settings and widget re-execution logic.
- Improved error handling in InspectorDashboard and streamlined MCPAppsRenderer for better widget re-initialization.
- Enhanced PropsConfigDialog and ResourceResultDisplay to utilize standardized metadata paths for improved prop detection.
- Updated various components to ensure better user experience and functionality, including state management for tool input schemas and improved logging in IframeConsole.

* chore(typescript): version packages (canary)

* refactor(typescript): improve create-mcp-use-app CLI prompts, install order, branding, and project structure output (#1068)

* refactor: improve create-mcp-use-app CLI prompts, install order, branding, and project structure output

Co-authored-by: Cursor <cursoragent@cursor.com>

* add changeset

* run format

---------

Co-authored-by: Cursor <cursoragent@cursor.com>

* chore(typescript): version packages (canary)

---------

Signed-off-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com>
Co-authored-by: Joaquin Coromina <75667013+bjoaquinc@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2026-02-20 10:24:32 -08:00
Enrico Toniato 3334a67769 Canary (#1012)
* feat(dns-rebinding): implement DNS rebinding protection and examples (#1001)

- Added `allowedOrigins` configuration to the `MCPServer` for DNS rebinding protection, enabling host validation for specified origins.
- Updated documentation to clarify the behavior of `allowedOrigins` in development and production environments.
- Introduced a new example demonstrating DNS rebinding protection, including curl commands for testing.
- Enhanced server methods and middleware to support the new host validation feature.
- Refactored related documentation to improve clarity on middleware and configuration options.

* chore: enter canary prerelease mode

* chore(typescript): version packages (canary)

* fix(inspector): enhance readiness state management and tool output handling

- Added a useEffect hook in OpenAIComponentRenderer to reset the readiness state when the widget URL changes, ensuring proper updates for new iframes.
- Updated shared-utils to improve handling of tool output and response metadata, facilitating smoother transitions of widget states from pending to ready.

* feat(mcp): defer server callbacks to avoid render-phase updates (#1002)

- Introduced a mechanism to collect callbacks for server state changes and defer their execution using `queueMicrotask`, preventing potential render-phase updates during state updates.
- Updated the `McpClientProvider` to push `onServerAdded` and `onServerStateChange` callbacks into an array for deferred execution, enhancing performance and stability.

* chore(typescript): version packages (canary)

* feat(inspector): enhance elicitation support with SEP-1330 enum schema variants (#1010)

- Added detailed documentation for the Elicitation tab, outlining its features and supported schema patterns.
- Implemented handling for various SEP-1330 enum schema variants in the client and server, including single-select and multi-select options.
- Introduced new tests to validate the elicitation flow for all enum schema variants, ensuring correct rendering and submission behavior.
- Updated examples and README files to reflect the new elicitation capabilities and SEP-1330 patterns.

* chore(typescript): version packages (canary)

* feat(inspector): implement partial tool input handling for streaming arguments

- Added support for partial tool input in the MCPAppsRenderer, allowing for real-time updates during LLM argument generation.
- Enhanced MessageList and ToolResultRenderer components to accommodate new streaming states and partial arguments.
- Updated useChatMessagesClientSide to handle streaming tool call arguments, improving user experience during interactions.
- Introduced new types and state management in useWidget for tracking partial tool input and streaming status.

* chore(typescript): version packages (canary)

* feat(inspector): enhance tool argument handling with type coercion and schema resolution (#1013)

- Introduced utility functions for coercing input values based on their expected types, improving the handling of boolean, array, and object parameters.
- Updated ToolsTab and ToolInputForm components to utilize new schema utilities for resolving property types and extracting enum values.
- Added a new server tool for validating argument typing, ensuring correct submission of typed values.
- Enhanced end-to-end tests to verify the correct behavior of typed arguments in tool execution.

* chore(typescript): version packages (canary)

* changelog

* feat(docs): enhance documentation for streaming tool arguments and live previews

- Updated guides and examples to include details on streaming tool arguments in widgets, enabling real-time updates during LLM interactions.
- Added new sections in `useWidget` documentation to explain `partialToolInput` and `isStreaming` properties.
- Included a new example demonstrating live previews while streaming tool arguments in the MCP Inspector and MCP Apps clients.

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-02-15 17:39:27 -08:00
Enrico Toniato 1dcba404b4 Feat/mcp apps 2 (#886) (#887)
* Feat/mcp apps 2 (#886)

* feat(mcp-use): implement dual-protocol support for MCP Apps and ChatGPT widgets

- Added support for the MCP Apps Extension (SEP-1865) in mcp-use, enabling widgets to function with both ChatGPT and MCP Apps-compatible clients.
- Introduced a new `mcpApps` widget type, allowing unified widget definitions that automatically generate protocol-specific metadata.
- Created protocol adapters for transforming widget definitions into formats compatible with both protocols.
- Enhanced the server and client code to handle dual-protocol metadata generation and widget registration.
- Updated documentation and examples to demonstrate the new functionality and usage patterns.

This implementation improves compatibility and flexibility for developers creating widgets across different platforms.

* feat(cli, mcp-use): implement Zod JIT compilation patching to prevent CSP violations

- Added functionality to post-process JavaScript bundles and patch Zod's JIT compilation to avoid CSP eval violations in sandboxed iframes.
- Introduced a new plugin in mcp-use to transform Zod's globalConfig, ensuring compatibility with strict CSP requirements.
- Enhanced error handling for asset processing to gracefully manage missing directories.

These changes improve security and compatibility for applications using Zod in restricted environments.

* feat(inspector): add MCP Apps debugging support and UI Playground

- Implemented comprehensive debugging capabilities for MCP Apps (SEP-1865) in the inspector, including a new `MCPAppsRenderer` for rendering widgets.
- Introduced a `WidgetDebugContext` to manage widget state, CSP violations, and playground settings.
- Added a UI Playground tab for testing widgets with device emulation, CSP mode switching, and traffic logs.
- Enhanced existing components to support the new debugging features and integrated CSP violation tracking.
- Updated package dependencies to include `@modelcontextprotocol/ext-apps@^0.4.1` for improved functionality.

These changes enhance the developer experience by providing robust tools for testing and debugging MCP Apps alongside existing widgets.

* feat(cli, inspector, mcp-use): enhance widget metadata and logging capabilities

- Updated CLI to allow the server host to default to "0.0.0.0" for broader interface listening.
- Enhanced `MCPAppsRenderer` to include a console logging handler for improved debugging of MCP logging notifications.
- Refactored `WeatherDisplay` widget to utilize additional user agent and context information, improving display accuracy.
- Introduced new properties in `useWidget` and `widget-types` for maximum width and timezone support, enhancing widget adaptability.
- Improved server helper functions to normalize URLs and manage X-Frame-Options for cross-origin iframe embedding.

These changes collectively enhance the developer experience by providing better logging, improved widget context handling, and more flexible server configurations.

* feat(inspector): add MCP Apps support in ResourceResultDisplay

- Integrated MCP Apps detection and rendering into the ResourceResultDisplay component.
- Implemented logic to check for MCP Apps resources and display corresponding badges.
- Enhanced the rendering flow to prioritize MCP Apps over other widget types, improving user experience and functionality.

These changes enhance the inspector's capability to handle MCP Apps, aligning with ongoing development efforts for better widget integration.

* feat(inspector): enhance inspector with new components and constants for MCP Apps

- Updated `tsconfig.client.json` to include constants directory for better module resolution.
- Refactored `LayoutContent` to improve the handling of prompt calls with enhanced argument processing.
- Introduced `PopoverSelect` and `SafeAreaInsetsEditor` components for reusable UI elements in the inspector.
- Added `debug-options` and `iframe` constants for improved configuration management.
- Enhanced `MCPAppsDebugControls` and `MCPAppsRenderer` to utilize new constants and improve widget rendering.
- Implemented dual-protocol support in various components to streamline widget integration.

These changes collectively enhance the inspector's functionality and maintainability, aligning with ongoing development efforts for better widget integration.

* feat(cli): normalize browser host for server connections

- Introduced a `normalizeBrowserHost` function to convert "0.0.0.0" to "localhost" for browser connections, ensuring compatibility.
- Updated CLI logging to reflect the normalized host for local connections, enhancing user experience.
- Refactored MCP endpoint and inspector URL generation to utilize the normalized host.

These changes improve the reliability of server connections from browsers and streamline the logging output in the CLI.

* refactor(inspector): optimize playground handling in OpenAIComponentRenderer

- Removed stale closure handling for playground settings by directly capturing the playground state at effect run time.
- Enhanced logging to provide better visibility into the stored widget data and playground configuration.
- Updated comments for clarity on the handling of dynamic updates to iframe globals without reloading the widget.

These changes improve the efficiency and maintainability of the OpenAIComponentRenderer component.

* refactor(inspector): remove unused SearchableSelect and UIPlaygroundTab components

- Deleted the SearchableSelect component, which was not utilized in the codebase, streamlining the component library.
- Removed the UIPlaygroundTab component, consolidating playground functionality and reducing code complexity.

These changes enhance maintainability by eliminating redundant components from the inspector package.

* refactor(docs): streamline documentation for dual-protocol widget support

- Consolidated and clarified documentation across various guides to emphasize dual-protocol support for MCP Apps and ChatGPT Apps SDK.
- Updated descriptions and examples to reflect the latest features and best practices for widget development.
- Enhanced the inspector documentation to provide clearer instructions for debugging and testing widgets in both protocols.
- Removed redundant content and improved organization for better user navigation.

These changes improve the overall clarity and usability of the documentation, aiding developers in leveraging the dual-protocol capabilities effectively.

* refactor(inspector): optimize MCPAppsRenderer and ToolResultDisplay components

- Replaced useState with useRef for containerRef in MCPAppsRenderer to prevent unnecessary state updates during ref callback.
- Updated effect dependencies in MCPAppsRenderer to remove unused variables, enhancing performance.
- Memoized onSendFollowUp callback in ToolResultDisplay to prevent infinite re-render loops, improving efficiency.
- Enhanced WidgetDebugProvider by using useMemo for context value to minimize re-renders and added a ref for accessing current state without causing updates.

These changes collectively improve the performance and maintainability of the inspector components.

* feat(mcp-use): add landing page generation for browser requests

- Introduced a new `generateLandingPage` function to handle browser GET requests and serve a landing page.
- Updated the `mountMcp` function to detect browser requests and return the generated landing page with appropriate headers.

These changes enhance user experience by providing a dedicated landing page for browser users, improving accessibility and engagement.

* refactor(docs): update documentation for dual-protocol widget migration

- Enhanced documentation to clarify the migration process from `appsSdk` to `mcpApps`, emphasizing the new `metadata` format.
- Added examples demonstrating the updated widget registration and metadata structure for both protocols.
- Included a migration checklist and field mapping reference to assist developers in transitioning to the dual-protocol support.

These changes improve the clarity and usability of the documentation, aiding developers in effectively leveraging the new features.

* refactor(mcp-use): map console log levels to RFC 5424 standards

- Introduced a mapping of JavaScript console log levels to RFC 5424 log levels for improved logging consistency.
- Updated the logging notification helper to utilize the new mapping, ensuring standardized log level reporting.

These changes enhance the clarity and reliability of logging within the MCP Apps Bridge, aligning with best practices for log management.

* refactor(docs): update documentation for MCP Apps migration and dual-protocol support

- Enhanced the documentation to clarify the migration process from `appsSdk` to `mcpApps`, including updates to the `metadata` format.
- Added detailed examples and a migration checklist to assist developers in transitioning to the new dual-protocol support.
- Improved the organization and clarity of the documentation, making it easier for developers to understand and implement the changes.

These updates aim to facilitate a smoother migration experience and better utilization of the new features in the MCP Apps framework.

* chore: enter canary prerelease mode

* chore(typescript): version packages (canary)

* refactor: update templates and documentation for MCP Apps support (#888)

* refactor: update templates and documentation for MCP Apps support

- Replaced references from `apps-sdk` to `mcp-apps` across various files, including CI workflows, documentation, and template configurations.
- Removed the deprecated `creating-apps-sdk-server` documentation and updated links to the new `creating-mcp-apps-server` guide.
- Enhanced the README and other documentation files to reflect the new `mcp-apps` template usage and features.
- Updated CLI commands and package.json scripts to align with the new template naming conventions.
- Improved clarity in documentation regarding the migration from `apps-sdk` to `mcp-apps`, ensuring a smoother transition for developers.

These changes collectively enhance the developer experience by providing clearer guidance and updated resources for working with MCP Apps.

* chore: update pnpm-lock.yaml for package version adjustments and path corrections

- Renamed the path for `mcp-apps` in the lock file to reflect the new directory structure.
- Updated package versions for `vite` and related dependencies from 7.3.0 to 7.3.1, ensuring compatibility with the latest features.
- Adjusted the path for `mcp-use` dependencies to maintain consistency with the new structure.

* chore(typescript): version packages (canary)

* Docs/update/fic (#889)

* refactor(docs): format documentation page entries for consistency

- Updated the `docs.json` file to format the `pages` entries as arrays for better readability and consistency across different groups.
- Ensured that all `pages` attributes are uniformly structured, enhancing the overall organization of the documentation.

* refactor(docs): improve documentation for dual-protocol widget migration

- Updated documentation to clarify the migration process from `appsSdk` to `mcpApps`, including the new `metadata` format.
- Added detailed examples and a migration checklist to assist developers in transitioning to the dual-protocol support.
- Enhanced organization and clarity of the documentation for better usability.

* chore(typescript): version packages (canary)

* refactor(product-search-result): update widget descriptions for MCP Apps consistency (#890)

- Revised text in the ProductSearchResult widget to replace references from "OpenAI apps sdk" to "mcp-apps specification" for clarity.
- Updated the template title from "Apps SDK Template" to "MCP-Apps Template" and adjusted the description to reflect the new naming conventions, enhancing consistency across the documentation and user experience.

* chore(typescript): version packages (canary)

* refactor(product-search-result): update widget configuration and impr… (#891)

* refactor(product-search-result): update widget configuration and improve HTML injection for MCP Apps

- Cleared the connectDomains in the product search result widget to enhance security.
- Removed the title prop from the Accordion component to simplify its usage.
- Preserved devServerBaseUrl during HTML injection in shared routes for better compatibility with MCP Apps.
- Enhanced the logging notification system in the MCP Apps Bridge to handle serialization of console arguments, improving error handling and preventing DataCloneError.
- Updated protocol helpers to ensure proper merging of UI metadata, maintaining resourceUri integrity.

These changes collectively improve the configuration and functionality of widgets within the MCP Apps framework, enhancing security and usability.

* refactor(ci): update template configurations for consistency across workflows

- Replaced the `mcp-ui` template with `blank` in CI workflows to streamline template options.
- Removed outdated logging tips related to the `mcp-ui` template in the create-mcp-use-app package, enhancing clarity for developers.

These changes improve the consistency and clarity of template usage in the CI processes and documentation.

* refactor(inspector): enhance MCP Apps debugging and widget integration

- Improved the MCPAppsRenderer and ToolResultDisplay components for better performance and maintainability.
- Streamlined the handling of widget state and logging within the inspector, enhancing debugging capabilities for MCP Apps.
- Updated documentation to clarify the dual-protocol support and provide clearer instructions for developers.

These changes collectively enhance the developer experience by optimizing component performance and improving the clarity of documentation for MCP Apps integration.

* chore(typescript): version packages (canary)

* chore(package): add lodash override to package.json templates

* chore(typescript): version packages (canary)

* feat(mount-mcp): add helper function to construct full URL with proxy headers

- Introduced `getFullUrl` function to handle URL construction considering proxy headers, improving compatibility for production deployments.
- Updated landing page generation to use the constructed full URL instead of the raw request URL, enhancing accuracy in response handling.

* refactor(weather): simplify weather response in starter template

- Updated the weather response in the starter template to return a static sunny message instead of fetching real-time data, streamlining the functionality for demonstration purposes.

* chore(typescript): version packages (canary)

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-01-26 16:41:17 -08:00
Enrico Toniato 9a8cb3a85d Canary (#714)
* Cli/manage deployments (#710)

* feat(cli): add deployments command and enhance API client with deployment management features

- Introduced a new `createDeploymentsCommand` for managing deployments in the CLI.
- Enhanced `McpUseAPI` with methods for listing, updating, deleting, and retrieving logs for deployments.
- Added a utility function to format date strings as relative time for better user experience in CLI outputs.

* feat(cli): add option to force new deployment creation

- Introduced a `--new` option in the CLI to allow users to create a new deployment instead of reusing an existing linked deployment.
- Enhanced the `deployCommand` to check for existing deployments and handle redeployment or new creation based on the `--new` flag.
- Updated the `McpUseAPI` to support redeploying with file uploads, improving deployment management capabilities.

* feat(cli): add environment variable support for deployment

- Introduced `--env` and `--env-file` options in the CLI to allow users to specify environment variables for deployments.
- Implemented functions to parse environment variables from both command-line arguments and `.env` files, enhancing deployment configuration flexibility.
- Updated `deployCommand` to utilize the new environment variable handling, improving deployment management capabilities.

* feat(cli): sort deployments by creation date in list command

- Enhanced the `listDeploymentsCommand` to sort deployments by their creation date, displaying the newest deployments first.
- Updated console output to reflect the count of sorted deployments, improving user experience when viewing deployment lists.

* chore: enter canary prerelease mode

* chore(typescript): version packages (canary)

* Docs/google/deployment (#715)

* feat(docs): add new guide for Google Run deployment in documentation

- Included a new page for "guides/google_run" in the documentation structure to enhance resource accessibility for users.
- Updated the existing deployment pages to maintain consistency and improve navigation within the documentation.

* fix(tests): update widget data flow tests to handle optional chaining for content text access

- Modified test assertions in `widget-data-flow.test.ts` to use optional chaining when accessing the `text` property of the result content, ensuring robustness against potential undefined values.

* feat(cli): enhance port configuration logic to prioritize command line flags over environment variables

- Updated the port handling in the CLI to check for explicit command line flags (`--port` or `-p`) before falling back to environment variables or default values. This change improves user control over the server's port configuration.

* refactor(cli): improve error handling in port configuration logic

- Enhanced error handling in the CLI's port configuration to provide clearer feedback when invalid port values are specified. This change aims to improve user experience by preventing silent failures and guiding users towards valid configurations.

* chore(typescript): version packages (canary)

* chore: update documentation and dependencies

- Removed the zoo MCP server graphic from the Google deployment documentation for a cleaner presentation.
- Updated links in the mcp-use documentation to ensure correct navigation paths.
- Upgraded the Zod dependency from version 4.1.13 to 4.2.0 across package.json and pnpm-lock.yaml for improved schema validation.

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-12-18 18:28:52 +01:00
Enrico Toniato 8a2e84e1ca Canary (#669)
* chore/typescript/package visibility (#654)

* cli - update

* create-mcp-use-app - update

* inspector - update

* mcp-use - update

* canary-changeset

* chore: enter canary prerelease mode

* chore(typescript): version packages (canary)

* Fix mcp agent prompts (#655)

* Refactor: Include resources and prompts in agent tool creation

Co-authored-by: tonxipad <tonxipad@gmail.com>

* feat: Add support for MCP resources and prompts

This commit introduces the ability to load and convert MCP resources and prompts into tools. The `BaseAdapter` now includes abstract methods `convertResource` and `convertPrompt`, and concrete implementations are provided in `LangChainAdapter`. The `MCPAgent` and `ServerManager` have been updated to utilize these new functionalities, allowing agents to leverage a broader range of MCP capabilities beyond just tools.

Co-authored-by: tonxipad <tonxipad@gmail.com>

* refactor(langchain_adapter): default all MCP prompt arguments to string type

Updated the LangChainAdapter to ensure that all MCP prompt arguments default to string type due to the absence of type definitions in the Prompt specification. This change simplifies the argument handling and enhances type safety in the schema generation process.

* fix: ruff lint

* fix: streamline server connection message formatting

Removed unnecessary line breaks in the connection message for improved readability. The message now presents a more concise format while maintaining clarity about the number of available tools, resources, and prompts after connecting to the MCP server.

* chore: update TypeScript preview package publishing command to use pnpm flag

Modified the GitHub Actions workflow for TypeScript PR previews to include the `--pnpm` flag in the package publishing command, ensuring compatibility with the pnpm package manager.

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: tonxipad <tonxipad@gmail.com>

* chore(typescript): version packages (canary)

* feat(mcp-use): enhance session management with HEAD request support a… (#659)

* feat(mcp-use): enhance session management with HEAD request support and idle cleanup improvements

- Added handling for HEAD requests in the mountMcp function to support keep-alive and health checks.
- Updated the startIdleCleanup function to close associated transports during session cleanup, preventing errors on reconnection with expired session IDs.
- Enhanced documentation to clarify the new behavior and parameters for idle cleanup.

* feat(telemetry): enhance telemetry tracking and browser support

- Added support for browser environments in the Telemetry class, including dynamic imports of posthog-js for event tracking.
- Introduced new events: ClientAddServerEvent and ClientRemoveServerEvent for better server management tracking.
- Improved telemetry source management and user identification methods for both Node.js and browser contexts.
- Refactored existing methods for better clarity and maintainability, including the initialization of PostHog clients based on the runtime environment.
- Updated event capturing logic to handle both Node.js and browser clients effectively.

* chore(typescript): version packages (canary)

* Docs/agent/refactor (#658)

* chore(ci): enhance TypeScript workflow with matrix strategy for Node.js versions

- Updated the CI workflow to implement a matrix strategy for TypeScript jobs, allowing tests to run on Node.js versions 18, 20, and 22.
- Adjusted Node.js setup steps to dynamically use the specified version from the matrix.
- Renamed job names to reflect the Node.js version being used for better clarity in CI logs.

* feat(mcp-use): add CommonJS support and examples

- Updated package.json to include CommonJS exports for all modules, allowing compatibility with projects using require() syntax.
- Introduced a new CommonJS example demonstrating MCPClient usage with detailed instructions and environment requirements.
- Added a markdown file documenting CommonJS usage, highlighting key features and providing usage examples.
- Implemented a CommonJS compatibility test to ensure proper functionality when using require() syntax across various modules.
- Adjusted Node.js engine requirement in package.json to support Node.js 18.0.0 or higher.

* feat(docs): update TypeScript client documentation and structure

- Added new pages for agent and client configuration, environments, and server manager in the documentation.
- Updated existing documentation to reflect changes in the client structure and features, including the removal of deprecated sections.
- Enhanced the `docs.json` file to include new and updated pages for better navigation.
- Improved clarity in the client configuration and authentication sections, ensuring users have access to the latest information and examples.

* feat(cli): introduce mcp-use CLI client with comprehensive documentation and command support

- Added a new CLI client for interacting with MCP servers directly from the terminal, allowing users to execute commands without writing code.
- Included detailed documentation for installation, usage, troubleshooting, and examples to facilitate user onboarding.
- Implemented various commands for session management, tool interaction, and resource handling, enhancing the CLI's functionality.
- Integrated testing framework with unit and integration tests to ensure reliability and performance of the CLI commands.
- Updated package dependencies and configurations to support the new CLI features.

* feat: remove WebSocket transport support and update related components

- Eliminated WebSocket transport from the mcp-use library, including the removal of WebSocketConnector and related references in various components.
- Updated connection validation to support only HTTP and SSE protocols.
- Adjusted documentation and comments to reflect the removal of WebSocket support, ensuring clarity for users.
- Introduced a new method in MCPSession to list available tools, enhancing functionality.

* feat: enhance documentation and update CLI package for CommonJS support

- Added a CodeSandbox link to the TypeScript client documentation for interactive examples.
- Updated package.json to set the CLI as a module and changed the output file to CommonJS format.
- Modified integration tests to reflect the new CommonJS output path.
- Configured the Logger class to include console transports for improved logging visibility.

* chore: require node 20

* chore: update CLI package dependencies to latest versions

- Upgraded @vitejs/plugin-react from ^4.3.4 to ^5.1.1.
- Upgraded chokidar from ^3.6.0 to ^5.0.0.

* chore: update pnpm-lock.yaml to include React and related dependencies

- Added React, ReactDOM, and React Router DOM with specified versions to the pnpm-lock.yaml file.
- Removed duplicate entries for these packages to streamline the dependency list.

---------

Signed-off-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com>

* chore(typescript): version packages (canary)

* chore(typescript): version packages (canary)

* refactor(docs): update agent documentation and structure (#667)

* refactor(docs): update agent documentation and structure

- Revised the agent configuration documentation to reflect changes in LLM integration and memory management.
- Enhanced the `docs.json` file to include new and updated pages for better navigation.
- Removed the interactive chat patterns documentation as it is now integrated into the memory management section.
- Updated icons and descriptions across various documentation files for consistency and clarity.
- Introduced simplified mode support in the MCPAgent, allowing for easier configuration with string-based LLM specifications.
- Improved examples and added new sections for structured output and streaming capabilities.

* feat(api): remove Simplified MCPAgent API documentation

- Deleted the `SIMPLIFIED_AGENT_API.md` file, which contained the documentation for the simplified MCPAgent API.
- This change reflects the removal of the simplified mode documentation as part of the ongoing refactoring and consolidation of agent-related resources.

* feat(docs): update agent documentation and examples for new run options

* Fix TypeScript compilation errors

- Change MCPClient import from type-only to regular import (used as value)
- Remove async generator markers from overload signatures
- Fix boolean type assignments by adding ?? true fallback
- Fix LanguageModel import in llm_provider.ts
- Add re-exports for backward compatibility
- Remove unused eslint-disable directives

* Fix inspector build: Add node:stream stub for browser compatibility

- Add stream.js stub with PassThrough, Readable, Writable, Transform, Duplex classes
- External node:stream, node:process, child_process, fs, os in Vite build
- Prevents bundling Node.js-only modules in browser build

* chore(typescript): version packages (canary)

* feat(inspector): enhance Vite configuration and add path parsing utility (#670)

- Updated Vite configuration to include more specific aliases for Node.js modules, improving compatibility with browser builds.
- Modified widget URL construction in OpenAIComponentRenderer to remove unnecessary query parameters.
- Added a new `parse` function to the path stub, enabling path string parsing into an object with root, dir, base, ext, and name properties.
- Excluded additional Node.js-only packages from the build process to streamline dependencies.

* feat(inspector): improve favicon fetching logic in ServerIcon component (#672)

- Introduced a new utility function `getBaseDomain` to simplify domain extraction.
- Updated favicon fetching logic to handle response as JSON and cache images more effectively.
- Enhanced error handling and logging for better debugging during favicon retrieval.
- Removed commented-out code for cleaner implementation.

* feat(session): update callTool method to default args to an empty object and add requireSession method for session retrieval (#671)

* chore(typescript): version packages (canary)

* feat(cli, mcp-use): enhance Tailwind CSS configuration to include mcp-use package resources (#673)

- Updated CSS generation to dynamically calculate the relative path to the mcp-use package.
- Modified Tailwind CSS configuration to scan both the resources directory and the mcp-use package for TypeScript and JavaScript files.

* chore(typescript): version packages (canary)

* fix: drop react-router-dom in favor of react-router (#675)

* chore(typescript): version packages (canary)

* typescript release workflow pushes tags and releases (#676)

* fix release action

* Fix/server/enhance (#677)

* feat(mcp-use): add favicon support for MCP server and widgets

- Introduced a favicon configuration option in the MCPServer class to allow custom favicon paths.
- Implemented favicon route setup in the server to serve the favicon at the root URL.
- Updated documentation to include examples for configuring favicons in server setup.
- Cleaned up widget directories on file deletions to maintain a tidy development environment.

* feat(mcp-use): enhance widget data handling and metadata extraction

- Updated OpenAIComponentRenderer to improve state management for tool input and output.
- Added extraction of widget properties from metadata for better integration with the MCP framework.
- Enhanced the useWidget hook to support tool input and output, including a pending state for tool execution.
- Modified WidgetData interface to include optional toolResponseMetadata for improved data handling.
- Updated server-side utilities to ensure consistent handling of widget props and tool output across the application.

* chore(typescript): version packages (canary)

* chore(mcp-use): update package version and add client entry in package.json (#679)

* chore(mcp-use): update package version and add client entry in package.json

- Bumped version from 1.11.0-canary.7 to 1.11.0-canary.9 in package.json.
- Added client entry point in package.json for improved module exports.
- Updated tsup.config.ts to include src/client.ts in the build process.

* chore(deploy): update deno.json to include specific mcp-use client and server imports

- Added specific imports for mcp-use client and server from the PR branch.
- Included zod library version 4 in the deno.json configuration for enhanced type validation.

* Session management (#682)

* feat(mcp-use): enhance session management and transport options

- Added a new "Session Management" group in the documentation for better organization.
- Introduced automatic session recovery for HTTP/SSE transports, allowing clients to handle server restarts seamlessly.
- Updated the transport type preference to deprecate the 'sse' option in favor of 'http' and 'auto', aligning with the MCP spec 2025-11-25.
- Implemented Redis session and stream managers for improved session persistence and management.
- Added new scale testing scripts to the package.json for performance evaluation.
- Updated various types and interfaces to support new session management features and ensure backward compatibility.

* feat(mcp-use): add convenience methods for notifying clients of changes

- Introduced convenience methods: `sendToolsListChanged`, `sendResourcesListChanged`, and `sendPromptsListChanged` to simplify client notifications when tools, resources, or prompts are dynamically added or removed.
- Updated documentation to include examples for notifying clients of changes in tools, resources, and prompts, enhancing clarity and usability.

* feat(mcp-use): implement auto-detection of session mode based on Accept header

- Enhanced session management by introducing auto-detection of stateful or stateless mode based on the client's Accept header.
- Updated documentation to reflect the new behavior, ensuring compatibility with various clients like k6 and curl while maintaining SSE support for capable clients.
- Modified request handling to adapt the server's response based on client capabilities, improving overall flexibility and usability.

* feat(mcp-use): improve client notification system and session handling

- Enhanced client notification methods for dynamic updates, including `sendToolsListChanged`, `sendResourcesListChanged`, and `sendPromptsListChanged`.
- Improved session management with automatic recovery for HTTP/SSE transports and updated documentation for clarity.
- Adjusted request handling to better support client capabilities and maintain backward compatibility.

* Delete libraries/typescript/packages/mcp-use/IMPLEMENTATION_SUMMARY.md

Signed-off-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com>

* Delete libraries/typescript/packages/mcp-use/REDIS_INTEGRATION_VERIFIED.md

Signed-off-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com>

* Delete libraries/typescript/packages/mcp-use/SCALE_TESTING_IMPLEMENTATION.md

Signed-off-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com>

* Update ARCHITECTURE.md

Signed-off-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com>

* feat(mcp-use): add Redis as an optional dependency and enhance Redis integration

- Added Redis as an optional dependency in package.json.
- Updated Redis session and stream managers to include error handling for unsupported Redis client methods.
- Introduced isRedisAvailable() function to check for Redis availability at runtime.
- Enhanced documentation to clarify Redis integration and installation instructions.

* feat(mcp-use): enhance session management with FileSystemSessionStore and auto-refresh capabilities

- Introduced FileSystemSessionStore for development environments, allowing session persistence across hot reloads.
- Added auto-refresh functionality for tools, resources, and prompts in the useMcp hook, triggered by relevant notifications.
- Updated documentation to reflect new session management architecture and usage examples.
- Improved LayoutHeader component with collapsible tabs for better UI experience.

* feat(docs): update session management documentation and add filesystem storage reference

- Added reference to new File System Storage in session management documentation, highlighting its use for development environments.
- Removed outdated comparison with other implementations from the documentation.
- Updated session management overview to include filesystem storage as a viable option for session persistence.
- Adjusted related documentation links to ensure consistency and clarity.

* refactor(docs): streamline Supabase deployment documentation and remove scale testing guide

- Updated the Supabase deployment documentation to use a local icon path for better resource management.
- Removed the scale testing guide as it was deemed unnecessary, simplifying the documentation structure.

* feat(ui): add collapsible tabs to LayoutHeader for improved navigation

- Introduced a CollapseButton component to toggle tab visibility in the LayoutHeader.
- Updated Tabs component to support collapsed state, enhancing user experience.
- Adjusted styles for smoother transitions and improved accessibility with tooltips.
- Refactored tab rendering logic to accommodate the new collapsible feature.

* refactor(tests): remove outdated Redis integration tests and related documentation

- Deleted manual integration tests for Redis session management and related README files to streamline the testing suite.
- Removed scale testing scripts and configuration files that were no longer necessary, simplifying the project structure.
- Updated the remaining test documentation to reflect the changes and ensure clarity for future testing efforts.

* feat(redis): enhance Redis client interface and session management

- Added support for Redis SET operations with sAdd, sRem, and sMembers methods in the RedisClient interface.
- Updated RedisSessionStore to utilize SET for tracking active sessions, improving performance and reducing blocking operations.
- Modified RedisStreamManager to manage active sessions using SET instead of KEYS, ensuring non-blocking behavior.
- Added warnings in documentation regarding the use of KEYS command in production environments.
- Enhanced session cleanup logic to include removal of active sessions from the SET.

---------

Signed-off-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com>

* chore(typescript): version packages (canary)

* Fix/server/enhance (#678)

* feat(mcp-use): add favicon support for MCP server and widgets

- Introduced a favicon configuration option in the MCPServer class to allow custom favicon paths.
- Implemented favicon route setup in the server to serve the favicon at the root URL.
- Updated documentation to include examples for configuring favicons in server setup.
- Cleaned up widget directories on file deletions to maintain a tidy development environment.

* feat(mcp-use): enhance widget data handling and metadata extraction

- Updated OpenAIComponentRenderer to improve state management for tool input and output.
- Added extraction of widget properties from metadata for better integration with the MCP framework.
- Enhanced the useWidget hook to support tool input and output, including a pending state for tool execution.
- Modified WidgetData interface to include optional toolResponseMetadata for improved data handling.
- Updated server-side utilities to ensure consistent handling of widget props and tool output across the application.

* chore(mcp-use): update package version and add client entry in package.json

- Bumped version from 1.11.0-canary.7 to 1.11.0-canary.9 in package.json.
- Added client entry point in package.json for improved module exports.
- Updated tsup.config.ts to include src/client.ts in the build process.

---------

Signed-off-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com>

* Update documentation links and clean up references

- Removed duplicate links in the agent configuration documentation.
- Updated the examples link in the CLI documentation to point to the correct server examples.
- Corrected the Tools guide link in the tools documentation to ensure proper navigation.
- Adjusted the Building Agents link in the useMCP documentation to reflect the new path in the advanced section.

* Refactor RedisStreamManager to remove unnecessary whitespace and improve code readability in session cleanup logic.

* Update API key masking in whoamiCommand to show first 6 characters instead of 8, enhancing security and clarity in output.

* Refactor URL handling and UUID generation for improved readability in git and telemetry utilities. (#686)

* Refactor URL handling and UUID generation for improved readability in git and telemetry utilities.

* Enhance TypeScript library with new features and documentation updates

- Moved `@langchain/core` and `langchain` to optional peer dependencies.
- Removed WebSocket transport; recommended using streamable HTTP or SSE.
- Introduced session management architecture with Redis support.
- Added favicon configuration for widget pages and improved caching.
- Implemented dedicated CLI client support for better command-line integration.
- Enhanced session methods and fixed transport cleanup for idle sessions.
- Updated documentation with links for better navigation and learning resources.

* Enhance session management and improve documentation clarity (#687)

- Refactored session management architecture to streamline Redis integration.
- Updated documentation for better navigation and added new examples.
- Improved clarity in output by adjusting API key masking in whoamiCommand.
- Cleaned up code for better readability and maintainability.

* chore(typescript): version packages (canary)

* Enhance TypeScript release workflow by ensuring the latest commits are fetched and tags are pushed correctly.

- Added steps to fetch the latest commits and tags before tagging and publishing.
- Improved reliability of the release process by ensuring the correct branch is checked out and up-to-date.

* Refactor CI workflows for TypeScript and Deno testing

- Removed the temporary disabled `typescript-deno-test` job from the CI workflow.
- Enhanced the `typescript-pr-preview` workflow by adding a step to retrieve the PR number and create a temporary `deno.json` for testing.
- Implemented a wait mechanism to ensure the preview package is available on esm.sh before running Deno tests.
- Updated changeset versions for several packages from patch to minor.

* Remove outdated documentation files for building custom agents, logging, and multi-server setup in TypeScript. Update links in related documents to reflect the new structure and ensure consistency in navigation.

* Update streaming and code mode documentation with enhanced examples and video content. Removed outdated sections to improve clarity and user experience.

* Update TypeScript documentation to reflect changes in streaming methods and authentication. Removed outdated sections in streaming.mdx, streamlined examples in structured-output.mdx, and updated OAuth version in authentication.mdx for clarity and accuracy.

* Fix cli import (#689)

* fix: update imports to use mcp-use/client for better dependency management

* Refactor Deno tests for MCPServer to utilize Zod for input validation and streamline response handling. Updated deno.json to include new dependencies and improved import paths for better module resolution.

* Refactor Zod import in Deno tests and remove outdated dependency from deno.json for improved module resolution.

* Update Zod import syntax and upgrade Zod version in Deno test files for improved compatibility and module resolution.

* Enhance TypeScript PR preview workflow by adding Zod as a dependency for improved validation and module resolution.

* Update TypeScript PR preview workflow to include `?no-dts` in mcp-use imports and modify Deno test command to skip type checking for improved testing efficiency.

* chore(typescript): version packages (canary)

* chore(typescript): update dependencies and improve package configurations (#690)

* chore(typescript): update dependencies and improve package configurations

- Bump versions for several dependencies including ESLint, TypeScript, and various React-related packages.
- Update `vite` and `tailwindcss` to the latest versions for improved performance and features.
- Enhance `zod` version for better validation capabilities.
- Remove outdated `pnpm-lock.yaml` file from the React example client.
- Adjust package configurations across multiple packages for consistency and compatibility.

* chore(typescript): update package specifiers and versions in pnpm-lock.yaml

- Adjusted version specifiers for several dependencies, including React and Zod, to ensure compatibility and flexibility.
- Updated the version of `@langchain/core` and related packages to the latest stable release.
- Removed outdated entries and improved overall package configuration for better dependency management.

* chore(typescript): version packages (canary)

* Update TypeScript logging documentation to change "Next Steps" section to "Related" and adjust links for improved clarity and navigation.

* Remove changeset for "many-rocks-joke" from TypeScript library updates.

* Remove ServerDetail component and simplify user ID generation in telemetry

* chore: changeset

* chore(typescript): version packages (canary)

* Update deploy script to use latest MCP_USE_VERSION and switch import paths to npm for mcp-use and zod dependencies.

* Add blog link to navbar and include logo href in documentation

* Enhance logo display in documentation by adding noZoom attribute to images for better responsiveness.

* Update changelog for v1.11.0 release, introducing distributed session management, a new CLI client, and various enhancements and fixes across features, documentation, and testing.

* Update changelog for v1.10.0 release, highlighting API improvements, breaking changes, new features, and various enhancements and fixes related to session management and resource templates.

* Update pnpm-lock.yaml and package.json for dependency management; remove outdated example files and enhance CLI documentation.

* Refactor MCP agent examples to use updated import paths and LLM configurations; replace deprecated imports and streamline server management examples for better clarity and functionality.

* Update TypeScript configuration to use 'bundler' for module resolution and clarify MCPClient instantiation in shared-utils-browser.ts for better browser compatibility.

* Refactor TypeScript configuration to improve module resolution and enhance browser compatibility in shared-utils-browser.ts.

* Refactor pnpm-lock.yaml to reorganize example paths and update dependency links for improved project structure and consistency across server features.

* chore(typescript): version packages (canary)

* fix: inspector import

* chore(typescript): version packages (canary)

* improve deploy on supabase docs

* refactor(telemetry): enhance telemetry initialization and user ID management

- Updated the Telemetry class to improve initialization of Scarf telemetry, ensuring it only runs in server-side environments to avoid CORS issues.
- Enhanced user ID generation with fallback mechanisms for both session-based and persistent storage scenarios, improving reliability across different runtime environments.
- Refactored user ID retrieval from the filesystem to handle errors gracefully and ensure consistent behavior in various contexts.
- Improved telemetry event tracking by including runtime environment metadata, enhancing observability and debugging capabilities.

* changeset

* fix: inspector autoconnect

* fix: update conformance workflow paths for TypeScript examples

* format

* refactor(InspectorDashboard): remove debug logging and clean up code

- Removed console warning for logging connections on every render to reduce noise in the console.
- Updated GitHub icon component to use camelCase for SVG attributes, ensuring consistency with React conventions.

* fix(deploy.sh): update import paths to use ESM and enhance CSP URLs for Supabase deployment

* feat(ui-resource-registration): enhance tool definition handling with Zod schema support and legacy input conversion

* chore(typescript): version packages (canary)

* chore(typescript): version packages (canary)

* refactor(widget-metadata): update handling of Zod schemas to preserve full schema objects and improve backward compatibility

* chore(typescript): version packages (canary)

* fix: inspector rpc logs

* chore(typescript): version packages (canary)

* Potential fix for code scanning alert no. 53: Insecure randomness

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Signed-off-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com>

* refactor(widget-metadata): correct handling of props and inputs in widget metadata

* fix(telemetry): remove unnecessary whitespace in secureRandomString function

* chore(typescript): version packages (canary)

* docs

* fix(tests): update pattern replacement to handle all asterisks in session store and stream manager tests

* fix(telemetry): use secureRandomString for userId generation fallback

* chore(typescript): version packages (canary)

---------

Signed-off-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com>
Co-authored-by: Pietro Zullo <62951181+pietrozullo@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: tonxipad <tonxipad@gmail.com>
Co-authored-by: pietrozullo <pietro.zullo@gmail.com>
Co-authored-by: pederzh <luigipederzani@gmail.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2025-12-16 17:18:22 +01:00