Commit Graph

93 Commits

Author SHA1 Message Date
Pietro Zullo 2c8a3f7d88 chore(python): docs update (#795)
* chore(docs): remove Blog section from documentation

- Eliminated the Blog tab and its associated group from the documentation structure, streamlining the content for better clarity and focus on relevant topics.

* chore(docs): update image links in changelog and remove obsolete images

- Replaced local image paths with CDN links for releases 1.3.11, 1.3.12, 1.4.0, 1.4.1, and 1.5.0 in the changelog files.
- Deleted outdated image files for releases 1.3.11 and 1.3.12 to streamline documentation and reduce clutter.

* fix(docs): update documentation link for logo reference

- Changed the logo href from the main site to the documentation page for better navigation and user experience.
2026-01-12 12:09:47 +01:00
Luigi Pederzani b45d9663ec feat(python): introduce roots support in MCPClient and Server (#751)
* fix(python): expose client capabilities to MCP servers

Add list_roots_callback support to Python connectors to properly
advertise the roots capability during MCP initialization handshake.

Previously, the Python library was not exposing any client capabilities
because the list_roots_callback was not being passed to ClientSession.
This fix ensures the roots capability is always advertised, bringing
the Python library in line with the TypeScript implementation.

Changes:
- Add roots and list_roots_callback params to BaseConnector
- Add get_roots() and set_roots() methods for managing roots
- Pass list_roots_callback to ClientSession in all connectors
- Export Root type from connectors module
- Update unit tests to expect list_roots_callback parameter

Closes MCP-1063

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* feat(python): add roots and list_roots_callback params to connectors

- Add roots and list_roots_callback parameters to StdioConnector,
  HttpConnector, and SandboxConnector constructors
- Add comprehensive unit tests for client capabilities exposure
- Tests verify roots capability, get_roots(), set_roots(), and
  that all callbacks are correctly passed to ClientSession

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* chore: fix import sorting and update API documentation

- Fix import sorting in test_client_capabilities.py (ruff)
- Regenerate API documentation for updated connector classes

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

* feat(python): add list_roots() method to server Context

Allow MCP servers to request the list of roots from connected clients
via ctx.list_roots(). This follows the same pattern as ctx.sample()
and ctx.elicit() for server-to-client requests.

* feat(python): add roots params to MCPClient and config

- Add roots and list_roots_callback parameters to MCPClient.__init__,
  from_dict(), and from_config_file() methods
- Update create_connector_from_config() to pass roots params to all
  connector types (Stdio, HTTP, Sandbox)
- Allows clients to configure roots at the MCPClient level and have
  them propagate to all sessions

* test(python): add get_client_roots tool to primitive server

Add a tool that demonstrates the roots capability by requesting and
returning the list of roots from the connected client. Used for
integration testing of the roots feature.

* test(python): add integration tests for roots capability

Add comprehensive integration tests for the roots feature:
- test_roots_capability: Verify server can request/receive roots
- test_roots_empty_by_default: Verify empty roots when not provided
- test_roots_with_custom_callback: Verify custom callback precedence
- test_set_roots_updates_server_view: Verify dynamic root updates

* test(python): update unit tests for roots parameters

Update mock assertions in test_client.py to expect the new roots
and list_roots_callback parameters in create_connector_from_config
calls.

* ci(python): add roots to primitive tests and README badge

- Add roots to CI workflow primitive test matrix
- Add roots to PR comment report primitives list
- Add Roots badge to README Primitives row

* feat(docs): enhance MCP client and server documentation for roots feature

- Added `roots` and `list_roots_callback` parameters to MCP client initialization documentation.
- Updated `create_connector_from_config` documentation to include new parameters.
- Introduced `list_roots` method documentation in server context, detailing its usage and return values.
- Improved overall clarity and completeness of API reference for better developer guidance.

* feat(python): add get_client_roots tool to context example

- Introduced a new tool, `get_client_roots`, to the context example, demonstrating how to retrieve and display the list of roots exposed by the client.
- Updated documentation to include the new tool and its functionality, enhancing the example's coverage of context features.

* feat(docs): add roots documentation for client and server

- Introduced new documentation for the `roots` feature, detailing how clients can expose file system roots to MCP servers and how servers can access these roots.
- Added examples for configuring roots in the MCP client and using the `list_roots()` method in the server context.
- Enhanced overall clarity and usability of the documentation to support developers in implementing the roots functionality.

---------

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Co-authored-by: pietrozullo <pietro.zullo@gmail.com>
2026-01-12 11:16:09 +01:00
Vincenzo Reina aca5f9c040 feat(python): Adapt OAuth to 2.1 version from new MCP spec (#518)
* feat: Add PRM in the metadata discovery

* fix: fallback anyway to PRM

* feat: Implement complete discovery logic

* feat: Final implementation of CIMD

* feat: Implement PKCE

* feat: Add scope from WWW-Authenticate

* feat: Add all URLs possible styles

* feat: Update tests and example

* docs: Update docs

* fix: linting

* docs: update API documentation

* fix: correct typos in OAuth metadata and error messages

- Updated the comment in ProtectedResourceMetadata to use the correct abbreviation (PRM).
- Fixed a typo in the OAuthAuthenticationError message regarding code challenge support.
- Corrected the comment for legacy client paths to use "pre-registered" instead of "pre-reggistered".

* feat: restructure authentication documentation and add new methods

- Updated the authentication section in  to group authentication methods under a new Authentication category with an icon.
- Removed the old  file and replaced it with new documentation files for Bearer Token, Custom Auth, and OAuth 2.1.
- Introduced an overview page for authentication methods, detailing usage and configuration for each method.
- Enhanced security best practices and examples for each authentication type to improve clarity and usability.

* refactor: improve debug logging for OAuth metadata discovery

- Updated debug messages to provide clearer context by specifying the issuer or host being queried during OAuth and OpenID Connect metadata discovery.
- Enhanced error logging to remove redundant information, focusing on the failure reason without repeating the URL.

* fix: correct abbreviation in ProtectedResourceMetadata documentation

- Updated the abbreviation from PRC to PRM in the ProtectedResourceMetadata section to ensure accuracy in the documentation.

* fix(oauth): correct RFC 8414 well-known URL construction for path-based issuers

  The OAuth metadata discovery was incorrectly constructing .well-known URLs
  by appending to the issuer instead of inserting between host and path.

  RFC 8414 specifies that for an issuer like https://github.com/login/oauth,
  the .well-known URL should be:
    https://github.com/.well-known/oauth-authorization-server/login/oauth

  We were incorrectly building:
    https://github.com/login/oauth/.well-known/oauth-authorization-server

  This fix:
  - Implements correct RFC 8414 URL construction (insert between host/path)
  - Supports OpenID Connect style as fallback (append to issuer)
  - Removes GitHub-specific hardcode since discovery now works correctly
  - Adds documentation comments explaining the two standards

  Ref: https://www.rfc-editor.org/rfc/rfc8414.html#section-3

* chore: oauth examples

* docs: enhance OAuth endpoint discovery documentation

- Updated the OAuth documentation to clarify how `mcp-use` discovers OAuth endpoints using both OAuth 2.0 and OpenID Connect standards.
- Added a table detailing the URL construction methods for each standard.
- Included examples for better understanding and a note on fallback behavior when the issuer has no path.

* response to bs codeql

* fix: update API URL Updated the GitHub API URL in the configuration to the correct endpoint for OAuth operations.

---------

Co-authored-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com>
Co-authored-by: pietrozullo <pietro.zullo@gmail.com>
2026-01-11 18:09:34 +01:00
pietrozullo eb4befc2db fix(docs): remove chat reference from docs 2026-01-11 13:16:18 +01:00
Enrico Toniato 53fb6703be Merge canary: Multi-server MCP client, telemetry refactor, and UI enhancements (#730)
* Feat/inspector/open in (#717)

* fix(docs): update title and description for Google Cloud Run deployment guide

* feat(docs): enhance command palette with "Add to Client" functionality

- Introduced new "Add to Client" section in the command palette documentation, detailing actions for adding the current MCP server to various AI clients and code editors.
- Updated the index and command palette files to reflect the new feature, including installation methods and usage instructions.
- Added visual aids to improve user understanding of the new functionality.

* chore: enter canary prerelease mode

* chore(typescript): version packages (canary)

* test: add tests to ensure mcp-use/react and mcp-use/browser do not import Node.js dependencies (#729)

* test: add tests to ensure mcp-use/react and mcp-use/browser do not import Node.js dependencies

- Introduced a new test file to verify that the built outputs of mcp-use/react and mcp-use/browser do not include Node.js built-in modules or Node.js-specific npm packages.
- Implemented checks for both static analysis and runtime behavior to ensure compliance with browser compatibility.
- The tests are expected to fail initially, highlighting any existing Node.js dependencies in the bundles.

* refactor(logging): remove Winston dependency and enhance SimpleConsoleLogger

- Eliminated the Winston logger integration, simplifying the logging mechanism to use only the SimpleConsoleLogger across all environments.
- Updated the Logger class to configure and manage instances of SimpleConsoleLogger, allowing for customizable log formats (minimal, detailed, emoji).
- Adjusted the logging methods to ensure consistent behavior without relying on Node.js-specific modules, improving compatibility with browser environments.
- Cleaned up the codebase by removing unused imports and functions related to Winston.

* feat(telemetry): enhance browser compatibility and logging functionality

- Updated the telemetry system to ensure compatibility with both browser and Node.js environments by introducing a new `telemetry-browser.ts` file.
- Refactored the logging methods in `SimpleConsoleLogger` to support additional arguments, improving log message formatting.
- Adjusted the `RemoteAgent` and various utility functions to safely access environment variables, ensuring they work seamlessly in browser contexts.
- Added tests to verify that the `mcp-use/react` and `mcp-use/browser` modules do not import Node.js dependencies, reinforcing browser compatibility.

* fix(inspector): update imports for server-side compatibility

- Changed the import statements for MCPAgent and MCPClient to use the main entry point instead of the browser-specific version, ensuring proper functionality in server-side contexts.

* chore(pnpm-lock): remove unused dependencies and clean up lock file

- Removed several unused packages from the pnpm-lock.yaml file, including Winston and related dependencies, to streamline the project and reduce potential security vulnerabilities.
- Cleaned up the lock file by eliminating optional dependencies that are no longer required, ensuring a more efficient package management experience.

* refactor(telemetry): improve compatibility checks and logging

- Enhanced the `telemetry-browser.ts` and `telemetry-node.ts` files to ensure better compatibility with various environments by adding checks for `localStorage` and `crypto` availability.
- Updated logging to provide more informative debug messages for potential issues, particularly in private browsing scenarios.
- Refactored the `secureRandomString` function to handle ESM-only environments gracefully, ensuring consistent behavior across different Node.js versions.

* feat(inspector): integrate MCP proxy utilities and enhance configuration handling

- Added utility functions from `mcp-use/utils` to streamline proxy configuration in the Inspector components.
- Updated `vite.config.ts` to include the new utility path and optimize dependencies.
- Refactored `InspectorDashboard` and `McpContext` to utilize the new `applyProxyConfig` function for cleaner URL and header management.
- Mounted MCP proxy middleware in `shared-routes.ts` to handle proxy requests more efficiently.
- Exported utility functions from `mcp-use` for better accessibility across the project.

* feat(auth): add OAuth token handling to useMcp hook

- Introduced `authTokens` state in the `useMcp` hook to store OAuth tokens upon successful authentication.
- Updated the `UseMcpResult` type to include `authTokens` for better integration with OAuth workflows.
- Enhanced error handling in the `HttpConnector` by removing SSE fallback message for clarity.

* feat(inspector): add server icon support in Inspector components

- Enhanced `ServerIcon` component to accept a `serverIcon` prop for displaying a Base64-encoded icon.
- Updated `InspectorDashboard` and `ServerList` components to pass the `serverIcon` from `connection.serverInfo`.
- Introduced `ensureIconLoaded` method in `useMcp` hook to manage icon loading and availability.
- Added utility function for favicon detection to improve icon handling.

* fix(inspector): clean up imports and enhance component structure

- Removed duplicate imports in `ServerList.tsx` for better clarity and organization.
- Adjusted the export statement in `index.ts` to ensure `proxy-config.js` is included, improving utility accessibility.
- Reformatted import statements in `types.ts` for consistency and readability.

* feat(inspector): implement embedded mode support and enhance component interactions

- Added support for embedded mode in the `App`, `Layout`, and `McpProvider` components, allowing for dynamic configuration based on URL parameters.
- Updated `LayoutHeader` and `AddToClientDropdown` components to conditionally render elements based on the embedded state, improving user experience in embedded contexts.
- Refactored utility functions for generating deep links and configuration commands to streamline integration with various clients.
- Introduced new utility functions in `mcpClientUtils` for better handling of server configurations and commands.

* chore: changeset

* chore(typescript): version packages (canary)

* fix(inspector): update root path redirection to preserve query parameters

* chore: changeset (#731)

* chore(typescript): version packages (canary)

* Potential fix for code scanning alert no. 55: Shell command built from environment values

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/client-react-provider (#733)

* refactor(inspector): enhance application structure and multi-server support

- Introduced McpClientProvider to manage multiple MCP server connections, allowing dynamic addition and removal of servers.
- Updated App component to include McpClientProvider and reorganized routing structure for better clarity.
- Refactored InspectorDashboard to simplify server connection handling and improve UI responsiveness.
- Enhanced McpContext to support new server management features, including notification and request handling.
- Added a new example demonstrating multi-server management in a React application.

This refactor improves the overall architecture and usability of the inspector, facilitating better server management and user experience.

* refactor(inspector): update components for improved server management and UI enhancements

- Refactored App component to integrate LocalStorageProvider for managing server connections.
- Updated InspectorDashboard and related components to utilize new McpClientProvider for better server state handling.
- Simplified connection settings by removing deprecated transport types and ensuring consistent use of HTTP.
- Enhanced CommandPalette and ServerDropdown components to improve server icon handling and display.
- Removed obsolete McpContext and adjusted imports across components for cleaner architecture.

These changes enhance the overall structure and usability of the inspector, facilitating better server management and user experience.

* feat(logging): filter out noisy endpoints from request logging

- Added functionality to skip logging for specific noisy endpoints that generate excessive log entries, such as telemetry and RPC stream paths.
- Ensured that requests to these paths are still processed without logging, improving log clarity and reducing spam.

* feat(logging): enhance debugging in Layout and useAutoConnect components

- Added detailed logging in the Layout component to track MCP client context values, including server status and storage loading.
- Improved logging in the useAutoConnect hook to provide insights during the auto-connect process, including checks for configuration loading and query parameters.
- These enhancements facilitate better debugging and monitoring of server connection states and application behavior.

* fix(inspector): correct server connection retrieval in OpenAIComponentRenderer

- Updated the method for retrieving the server connection in OpenAIComponentRenderer to directly access the connections array, improving clarity and functionality in server management.

* feat(mcp-agent): export MCPAgent for browser usage with BrowserMCPClient

- Updated the browser entry point to export MCPAgent, enabling its use in the browser when provided with a BrowserMCPClient instance or through RemoteAgent.
- Adjusted import statements in mcp_agent.ts to dynamically import MCPClient, ensuring compatibility with browser environments.

* feat(inspector): enhance UI components and improve responsiveness

- Updated AddToClientDropdown to include new icons and improved button layout for better user experience.
- Adjusted LayoutHeader to change visibility of the Github label based on screen size.
- Refactored LogoAnimated to hide additional information on smaller screens.
- Enhanced PromptsTab and ResourcesTab with new imports and improved error handling for results.
- Updated ServerDropdown to adjust padding for better alignment.
- Improved ToolsTab with additional imports and responsive design adjustments.

These changes collectively enhance the user interface and responsiveness of the inspector components.

* fix(inspector): resolve layout issues in responsive components

- Corrected alignment and visibility issues in various inspector components to enhance user experience on different screen sizes.
- Adjusted styles in AddToClientDropdown, LayoutHeader, and ServerDropdown for improved responsiveness.
- Ensured consistent behavior across PromptsTab and ResourcesTab with better error handling.

These fixes collectively improve the layout and usability of the inspector on various devices.

* fix(server-lifecycle): remove SSE endpoint from server startup logs

- Updated the server startup log message to exclude the SSE endpoint, simplifying the output for clarity.
- This change enhances the readability of the server's listening information during startup.

* feat(inspector): add global sampling and elicitation request handling

- Implemented toast notifications for sampling and elicitation requests in the App component, enhancing user interaction and response management.
- Updated McpClientProvider to support global callbacks for handling sampling and elicitation requests, allowing for centralized processing.
- Refactored server handling in McpServerWrapper to include new global request handlers, improving the overall request management architecture.
- Adjusted package.json scripts in the elicitation example for consistency with the mcp-use command structure.

These changes collectively improve the user experience by providing immediate feedback on sampling and elicitation requests, while also enhancing the underlying architecture for better request handling.

* chore(typescript): version packages (canary)

* feat(inspector): enhance URL parameter handling in Inspector components

- Updated InspectorDashboard, Layout, and useAutoConnect to preserve both tunnelUrl and tab parameters in navigation.
- Improved query parameter management by utilizing URLSearchParams for cleaner and more maintainable code.
- Added validation for tab parameters to ensure only valid tab types are set, enhancing user experience and navigation consistency.

* chore(typescript): version packages (canary)

* feat(inspector): improve URL navigation handling in useAutoConnect hook

- Enhanced the useAutoConnect hook to utilize URLSearchParams for constructing navigation URLs, preserving tunnelUrl and tab parameters.
- This change simplifies the URL management and improves the overall user experience during navigation.

* chore(typescript): version packages (canary)

* feat(inspector): update AddToClientDropdown and LayoutHeader for improved SDK integration

- Modified AddToClientDropdown to accept serverId and enhance dropdown item handling.
- Updated LayoutHeader to integrate TypeScript and Python SDK options, improving user experience for adding clients.
- Enhanced modal rendering and button interactions for better usability.
- Adjusted code formatting in dropdown content for improved readability.

* fix(inspector): resolve layout and responsiveness issues in inspector components

- Corrected alignment and visibility problems in AddToClientDropdown, LayoutHeader, and ServerDropdown for improved user experience across devices.
- Enhanced error handling in PromptsTab and ResourcesTab to ensure consistent behavior.
- Adjusted styles for better responsiveness and usability in various screen sizes.

* chore(typescript): version packages (canary)

* fix(http): reduce default timeout for HttpConnector from 30 seconds to 10 seconds and adjust connection timeout handling

* chore(typescript): version packages (canary)

* fix(react): optimize mcpOptions handling in McpClientProvider to prevent render loops

- Memoized the options passed to useMcp to avoid unnecessary re-renders.
- Extracted callback options to streamline the component's performance.

* fix(react): prevent duplicate scheduling of auto-retry in useMcp hook

- Introduced a ref to track if a retry is already scheduled, avoiding potential render loops.
- Reset the scheduling ref when the connection state changes from failed to another state.

* fix(react): enhance state management in McpClientProvider and useMcp hook

- Renamed variable for clarity in McpClientProvider to improve readability.
- Updated state comparison logic to use a single reference for previous server state, reducing redundancy.
- Introduced refs for function callbacks in useMcp to prevent stale closures and circular dependencies.
- Ensured that retry logic utilizes updated refs to maintain correct behavior during connection attempts.

* fix(react): improve error handling and state management in useMcp hook

- Enhanced error handling logic in useMcp to provide clearer feedback during connection failures.
- Updated state management to ensure accurate tracking of connection status and retries.
- Refactored code for better readability and maintainability.

* chore(typescript): version packages (canary)

* Refactor: Use 'open' package to open browser

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

* feat(widgets): enhance HMR configuration for better cross-platform support

- Added explicit HMR configuration with WebSocket protocol for improved compatibility.
- Enabled polling for file watching on Linux to address reliability issues in various environments.
- Set polling interval to 100ms for more responsive updates during development.

* feat(inspector): add parsePortFromArgs function to handle port argument parsing

- Introduced a new utility function to parse the port from command line arguments, allowing for dynamic port configuration.
- Updated server.ts to import the new function for enhanced server setup flexibility.

* chore(typescript): version packages (canary)

* 📝 Add docstrings to `canary`

Docstrings generation was requested by @tonxxd.

* https://github.com/mcp-use/mcp-use/pull/730#issuecomment-3711382419

The following files were modified:

* `libraries/typescript/packages/inspector/src/client/App.tsx`
* `libraries/typescript/packages/inspector/src/client/components/CommandPalette.tsx`
* `libraries/typescript/packages/inspector/src/client/components/ConnectionSettingsForm.tsx`
* `libraries/typescript/packages/inspector/src/client/components/InspectorDashboard.tsx`
* `libraries/typescript/packages/inspector/src/client/components/Layout.tsx`
* `libraries/typescript/packages/inspector/src/client/components/LayoutHeader.tsx`
* `libraries/typescript/packages/inspector/src/client/components/LogoAnimated.tsx`
* `libraries/typescript/packages/inspector/src/client/components/OpenAIComponentRenderer.tsx`
* `libraries/typescript/packages/inspector/src/client/components/PromptsTab.tsx`
* `libraries/typescript/packages/inspector/src/client/components/ResourcesTab.tsx`
* `libraries/typescript/packages/inspector/src/client/components/SdkIntegrationModal.tsx`
* `libraries/typescript/packages/inspector/src/client/components/ServerCapabilitiesModal.tsx`
* `libraries/typescript/packages/inspector/src/client/components/ServerConnectionModal.tsx`
* `libraries/typescript/packages/inspector/src/client/components/ServerDropdown.tsx`
* `libraries/typescript/packages/inspector/src/client/components/ServerIcon.tsx`
* `libraries/typescript/packages/inspector/src/client/components/ServerList.tsx`
* `libraries/typescript/packages/inspector/src/client/components/ToolsTab.tsx`
* `libraries/typescript/packages/inspector/src/client/components/chat/AssistantMessage.tsx`
* `libraries/typescript/packages/inspector/src/client/components/logging/JsonRpcLoggerView.tsx`
* `libraries/typescript/packages/inspector/src/client/components/prompts/PromptMessageCard.tsx`
* `libraries/typescript/packages/inspector/src/client/components/prompts/PromptResultDisplay.tsx`
* `libraries/typescript/packages/inspector/src/client/components/shared/MarkdownRenderer.tsx`
* `libraries/typescript/packages/inspector/src/client/components/ui/client-icons.tsx`
* `libraries/typescript/packages/inspector/src/client/context/InspectorContext.tsx`
* `libraries/typescript/packages/inspector/src/client/hooks/useAutoConnect.ts`
* `libraries/typescript/packages/inspector/src/server/server.ts`
* `libraries/typescript/packages/inspector/src/server/shared-static.ts`
* `libraries/typescript/packages/inspector/src/server/shared-utils-browser.ts`
* `libraries/typescript/packages/inspector/src/server/utils.ts`
* `libraries/typescript/packages/mcp-use/src/agents/utils/llm_provider.ts`
* `libraries/typescript/packages/mcp-use/src/logging.ts`
* `libraries/typescript/packages/mcp-use/src/observability/langfuse.ts`
* `libraries/typescript/packages/mcp-use/src/react/McpClientProvider.tsx`
* `libraries/typescript/packages/mcp-use/src/react/rpc-logger.ts`
* `libraries/typescript/packages/mcp-use/src/server/logging.ts`
* `libraries/typescript/packages/mcp-use/src/server/utils/server-lifecycle.ts`
* `libraries/typescript/packages/mcp-use/src/server/widgets/mount-widgets-dev.ts`
* `libraries/typescript/packages/mcp-use/src/telemetry/telemetry-browser.ts`
* `libraries/typescript/packages/mcp-use/src/telemetry/telemetry-node.ts`
* `libraries/typescript/packages/mcp-use/src/utils/favicon-detector.ts`
* `libraries/typescript/packages/mcp-use/src/utils/mcpClientUtils.ts`

* feat(inspector, layout): implement updateServer functionality for connection management

- Added `updateServer` method to handle server configuration updates in both InspectorDashboard and Layout components.
- Introduced state management to track concurrent updates and prevent race conditions during connection updates and reconnections.
- Enhanced error handling for connection updates to provide clearer feedback in case of failures.

* fix: ensure consistent formatting by adding missing newlines at the end of multiple files

- Added newlines at the end of several TypeScript files to adhere to coding standards and improve compatibility with various tools.
- Files modified include components, hooks, and server utilities across the inspector and mcp-use packages.

* chore(typescript): version packages (canary)

* chore(deps): add @types/node@25.0.2 to package.json and pnpm-lock.yaml

* chore(typescript): version packages (canary)

* refactor: update modelcontextprotocol-sdk references to new package name

- Replaced all instances of `@mcp-use/modelcontextprotocol-sdk` with `@modelcontextprotocol/sdk` across various files.
- Updated version in `package.json` and `pnpm-lock.yaml` to `1.25.1`.
- Adjusted import paths in components, utilities, and tests to reflect the new package structure.
- Ensured compatibility with existing code by maintaining type imports and functionality.

* feat(inspector): enhance client configuration and UI components

- Added support for client exports in the build process by introducing a new build script for client exports in `package.json`.
- Enhanced the `CommandPalette` and `SdkIntegrationModal` components to utilize local utility functions instead of external dependencies.
- Introduced a new CSS animation for status indicators in `index.css`.
- Updated the `LayoutHeader` component to conditionally display notification dots based on tab activity.
- Removed the deprecated `AddToClientDropdown` component and adjusted related imports accordingly.
- Improved client configuration examples in the `notification-client` and `sampling-client` files to include client identification for better server-side logging.
- Cleaned up unused imports and ensured consistent formatting across several files.

* fix: pin zod version to 3.24.4 for compatibility with modelcontextprotocol/sdk

- Updated the temporary deno.json in the TypeScript PR preview workflow to use zod@3.24.4, ensuring compatibility with @modelcontextprotocol/sdk@1.25.1.
- Adjusted import URLs to include the pinned zod version as a dependency.

* chore(typescript): version packages (canary)

* fix: update zod version handling in TypeScript PR preview workflow

- Modified the temporary deno.json to use zod from npm instead of pinning to a specific version, resolving potential version conflicts between mcp-use and @modelcontextprotocol/sdk.
- Adjusted import paths to accommodate the new zod versioning and subpath imports.

* fix: refine zod version mapping in TypeScript PR preview workflow

- Updated the temporary deno.json to implement a hybrid mapping for zod, addressing conflicting version requirements between SDK and other dependencies.
- Adjusted import paths to ensure compatibility with both zod v3 and v4, utilizing esm.sh for consistent environment resolution.

* fix: enhance zod version mapping in TypeScript PR preview workflow

- Updated the deno.json to include additional zod subpath imports, ensuring compatibility with both zod v4 and its mini version.
- Adjusted import URLs to reflect the new zod versioning structure, maintaining consistency in the PR preview environment.

* docs: add troubleshooting section for Zod version conflicts in Supabase deployment

- Introduced a new section addressing the "custom is not a function" error related to Zod version conflicts during Deno/Supabase deployments.
- Provided solutions for using npm specifiers in deno.json to resolve compatibility issues between Zod v3 and v4.
- Included example configurations for both npm and esm.sh imports to guide users in managing dependencies effectively.

* chore(typescript): version packages (canary)

* docs: update inspector documentation and changelog

- Added a new "Changelog" section to the inspector documentation for version history and updates.
- Expanded the changelog with multiple updates, including bug fixes, documentation enhancements, and major improvements in browser compatibility and multi-server support.

* docs: improve elicitation documentation for TypeScript client

- Enhanced clarity and formatting in the elicitation documentation, including better structure for modes and parameters.
- Updated code examples for consistency in quotation marks and improved readability.
- Added notes on validation flows and best practices for client-side and server-side validation.
- Ensured all sections are clearly defined and easy to follow for users implementing elicitation in their applications.

* docs: format pages in docs.json for improved readability

- Reformatted the "pages" entries in the docs.json file to use a consistent multi-line structure for better clarity and organization.
- Ensured all groups have a uniform format, enhancing the overall maintainability of the documentation structure.

* ci: add dev command testing to CI workflow

- Implemented a new job in the CI workflow to test the development command without the --dev flag.
- The job starts the dev server in the background, waits for it to initialize, and then stops it, ensuring the server starts and stops successfully.
- Adjusted the shell option in the TypeScript CLI to use the platform-specific shell on Windows for better compatibility.

* ci: add dev command testing to CI workflow & fix issue [#742](https://github.com/mcp-use/mcp-use/issues/742)

* chore(typescript): version packages (canary)

* fix(ci): improve Windows process termination in CI workflow

- Enhanced the method for killing the development server on Windows by using port-based identification for more reliable process termination.
- Added a fallback to the existing process tree kill method to ensure robustness in stopping the server.

* chore(typescript): version packages (canary)

* chore(docs): update changelog for TypeScript and inspector

- Updated changelog entries for TypeScript and inspector documentation to include new features, enhancements, and bug fixes.
- Improved clarity by adding descriptions to version labels and restructuring sections for better readability.
- Notable updates include multi-server support, browser compatibility improvements, and enhanced RPC logging.

* chore(docs): update changelog for inspector and TypeScript

- Revised changelog entries to reflect recent updates, including new features, enhancements, and bug fixes.
- Improved organization and clarity of version labels and descriptions.
- Notable changes include the addition of browser telemetry, improved server middleware, and various bug fixes across components.

---------

Signed-off-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: tonxipad <tonxipad@gmail.com>
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
2026-01-06 10:11:10 +01:00
Enrico Toniato f9eb0c8966 Add redirect for changelog to Python docs (#732)
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: tonxipad <tonxipad@gmail.com>
2026-01-03 17:29:49 +01: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 694ced58eb refactor(docs): streamline API reference structure by removing deprecated groups and adding new pages (#702)
- Removed outdated groups such as "Adapters," "Auth," "Connectors," "Managers," "Middleware," "Task Managers," and "Types" from the documentation structure.
- Added a new page for Google adapters to the "Agents" group for improved resource accessibility.
- Updated the overall organization of the API reference to enhance clarity and navigation for users.
2025-12-16 17:31:35 +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
Pietro Zullo ebef017114 python/server/middleware&tel (#650)
* chore: add example server pretty print JSON RPC for transparency

* updated telemetry module

* chore: agent side tel - langchain adapter - client tel

* server side tel:

* update API reference

* python transports and primitive reports are publishes only if not skipped

* remove wrongly generate files

* properly typed middleware

* remove examples

* feat(docs): add middleware and session management documentation

- Introduced new documentation for middleware, detailing hooks, minimal examples, and best practices for integrating middleware in MCP servers.
- Added a session management guide explaining session ID handling, usage patterns, and examples for managing per-client state in MCP servers.
- Updated  to include links to the new middleware and session management pages.

* generate docs

* remove few events

* adapter tel

* adapter tel

* api ref docs update

* google adapter fix

* fix version

* fix event naming

* server example is streamable and echo tool fix

* removed initialize middleware hook, initialize requests are not passed thorugh normal handlers

* api ref

* beta on middleware
2025-12-10 17:02:08 +01:00
Enrico Toniato 6ec11cdae2 Canary (#617)
* Fix/server/reafctor complete (#616)

* feat: add MCP Conformance Test Servers for Python and TypeScript (#605)

* chore(deps): bump express from 5.1.0 to 5.2.0 in /libraries/typescript (#602)

* chore(deps): bump express from 5.1.0 to 5.2.0 in /libraries/typescript

Bumps [express](https://github.com/expressjs/express) from 5.1.0 to 5.2.0.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/v5.1.0...v5.2.0)

---
updated-dependencies:
- dependency-name: express
  dependency-version: 5.2.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore: add changeset for dependabot updates

* Delete libraries/typescript/.changeset/dependabot-e19bd45.md

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

* chore: add changeset for dependabot updates

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com>

* feat: add MCP Conformance Test Servers for Python and TypeScript

- Introduced a new GitHub Actions workflow for running conformance tests on both Python and TypeScript servers.
- Implemented a Python conformance server that supports various MCP features and tools.
- Developed a TypeScript conformance server with similar functionality, including tools and resources.
- Added necessary configuration files for TypeScript server setup, including package.json and tsconfig.json.
- Updated pnpm-lock.yaml to include dependencies for the new conformance server.

This commit enhances the testing framework by providing dedicated servers for conformance testing, ensuring better validation of MCP features.

* feat: enhance conformance workflow with conditional inputs

- Added workflow_dispatch inputs to allow running only Python or TypeScript conformance tests.
- Updated job conditions to skip unnecessary tests based on the selected input.
- Modified the conformance summary job to ensure it does not run if cancelled.

This update improves flexibility in running conformance tests, enabling targeted testing based on user input.

* feat: add PR comment with conformance results and remove ext-apps

* feat: show individual test results as columns in PR comment

* feat: simplify conformance PR comment table

* feat: add conformance comparison with main and canary branches

- Fix test name parsing to remove ': X passed, Y failed' suffix
- Fetch baseline results from main and canary branches
- Show comparison columns (vs Main, vs Canary) with color-coded indicators
- Show +1/-1 on individual tests that changed from baseline
- Use 🟢 for improvements, 🔴 for regressions, ⚪ for no change, 🆕 for new

* feat: prevent test name line breaks and add MCP icon

- Use non-breaking hyphens (&#8209;) in test headers to prevent wrapping
- Replace microscope emoji with MCP SVG icon in PR comments

* fix: use picture element for MCP icon with dark/light mode support

* feat: display MCP icon inline with heading with gap

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* chore: enter canary prerelease mode

* chore(typescript): version packages (canary)

* Feature/mcp 924 implement tool elicitation support in typescript sdk tools (#606)

* chore(deps): bump express from 5.1.0 to 5.2.0 in /libraries/typescript (#602)

* chore(deps): bump express from 5.1.0 to 5.2.0 in /libraries/typescript

Bumps [express](https://github.com/expressjs/express) from 5.1.0 to 5.2.0.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/v5.1.0...v5.2.0)

---
updated-dependencies:
- dependency-name: express
  dependency-version: 5.2.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore: add changeset for dependabot updates

* Delete libraries/typescript/.changeset/dependabot-e19bd45.md

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

* chore: add changeset for dependabot updates

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com>

* chore: enter canary prerelease mode

* feat(docs): add elicitation feature documentation and update client structure

- Introduced new documentation for the elicitation feature, detailing both form and URL modes for user input requests.
- Updated `docs.json` to include a new page for elicitation.
- Enhanced the `MCPClient` and related connectors to support elicitation callbacks, allowing servers to request additional user information.
- Implemented elicitation handling in various connectors (HTTP, Stdio) and updated the server context to support elicitation requests.
- Added examples for using elicitation in React components and TypeScript.

* feat: enhance elicitation feature documentation and server-side validation

- Updated documentation to clarify server-side validation with mcp-use when using Zod schemas.
- Added custom error types for elicitation validation in the mcp-use library.
- Improved MCPClient to support elicitation callbacks for better user interaction.
- Refactored elicitation ID generation to use UUID for uniqueness.
- Enhanced error handling in the server to throw specific validation errors.

* feat: add Zod dependency and implement elicitation tool in conformance server

- Updated .gitignore to exclude conformance test results.
- Added Zod as a dependency in the conformance package.
- Implemented a new elicitation tool in the conformance server, allowing for user input with validation using Zod schemas.
- Updated server feature list to include the new elicitation tool.

* feat: add elicitation tool with default values in conformance server

- Introduced a new elicitation tool that utilizes default values for various primitive types as per SEP-1034.
- Enhanced the server's ability to handle user input with validation using Zod schemas.
- Updated the server feature list to include the new elicitation tool.

* fix: resolve pre.json conflict with canary - accept newer versions

* chore: remove ELICITATION_IMPLEMENTATION.md and ext-apps from tracking

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* chore(typescript): version packages (canary)

* fix: update elicitation example server paths and enhance documentation (#608)

- Updated paths in documentation and examples to reflect the new `examples/server/elicitation/` structure, replacing the previous `examples/server/elicitation-test/`.
- Enhanced the elicitation feature documentation to clarify usage and examples.
- Removed deprecated example files related to the old elicitation test structure.

* chore(typescript): version packages (canary)

* chore(typescript): update package versions to patch for mcp-use and inspector

* Fix/server/json response (#609)

* feat: update dependencies and enhance server functionality

- Added new dependencies '@openai/apps-sdk-ui' and '@tanstack/react-query' to the starter template and test app.
- Updated the pnpm-lock.yaml to reflect the new dependencies and their versions.
- Modified mcp-server.ts to enable JSON response for SSE streaming.
- Refactored createExternalUrlResource, createRawHtmlResource, and createRemoteDomResource functions to return promises for better async handling.

* refactor: update create-mcp-use-app package to use React and Ink components

- Changed the build script to compile TypeScript files with JSX support.
- Replaced Inquirer with Ink components for interactive CLI prompts.
- Removed the old index.ts file, transitioning to a more modern React-based approach.
- Updated package dependencies to include React and Ink, ensuring compatibility with the new structure.
- Enhanced the TypeScript configuration to support JSX.

* chore(typescript): version packages (canary)

* chore(typescript): update mcp-use and inspector versions to minor for elicitation support

* refactor(typescript): clean up mcp-use package structure and enhance type exports

- Removed deprecated '@mcp-use/cli' and 'tsx' from devDependencies in package.json and pnpm-lock.yaml.
- Reorganized type exports in mcp-server.ts to improve clarity and accessibility of ToolContext-related types.
- Refactored logging.ts to utilize a centralized getEnv function for environment variable access.
- Updated imports in various files to reflect the new structure and removed unused code.
- Deleted the mcp-ui-adapter.ts file as it was no longer needed.

* feat(typescript): enhance mcp-use package with new dependencies and refactor server endpoints

- Added 'express' as a dependency in package.json and updated its version to 5.2.1.
- Introduced new dependencies for examples in the mcp-use package, including '@openai/apps-sdk-ui', '@tanstack/react-query', and others.
- Refactored server endpoint handling by consolidating request/response management and removing deprecated handlers.
- Improved logging functionality with a new truncate method for better JSON output.
- Cleaned up unused code and removed legacy endpoint files to streamline the package structure.

* feat(mcp-server): enhance session handling with context-aware tool registration

- Introduced context enhancement for tool handlers in the MCP server to support session-specific logic.
- Added utility functions for session context management and improved message creation within session scope.
- Refactored tool registration to wrap handlers with context-aware logic, enabling better handling of request metadata and notifications.

* feat(mcp-use): update @modelcontextprotocol/sdk version and refactor server handling

- Updated the @modelcontextprotocol/sdk dependency to version 1209 in package.json and pnpm-lock.yaml.
- Adjusted the server port in the elicitation example from 3002 to 3000 for consistency.
- Enhanced the MCP server's session handling to follow the official SDK pattern, ensuring each session has its own transport and server instance.
- Refactored the mountMcp function to utilize FetchStreamableHTTPServerTransport, improving bidirectional communication and simplifying request handling.
- Cleaned up deprecated Express-like request/response handling, streamlining the server's architecture.

* feat(mcp-server): integrate ResourceTemplate and refactor resource registration

- Imported ResourceTemplate from the SDK to enhance resource handling.
- Updated resource registration to use readCallback instead of cb for improved clarity.
- Created ResourceTemplate instances and associated metadata during resource registration, streamlining the process and ensuring better integration with the SDK.

* refactor(mcp-use): streamline server examples and update dependencies

- Removed deprecated '@mcp-use/cli' and 'tsx' from devDependencies in package.json and pnpm-lock.yaml.
- Refactored server examples to utilize new response helpers for consistency and clarity.
- Updated the MCP server examples to improve structure and remove unnecessary code.
- Enhanced the resource and prompt registration to support new callback patterns, ensuring better integration with the SDK.
- Cleaned up unused files related to elicitation tests, improving overall package organization.

* feat(mcp-use): enhance server tools and improve type handling

- Added new server tools with optional message parameters, providing default values for better usability.
- Refactored server example files to streamline tool definitions and improve clarity.
- Updated type exports to include new utility types for handling optional fields in Zod schemas, enhancing type safety and flexibility in callbacks.
- Improved server initialization by removing hardcoded port values, allowing for dynamic port assignment.
- Cleaned up unnecessary console logs and comments to enhance code readability.

* refactor(mcp-use): enhance context handling in server tools and resource registration

- Removed redundant tool definitions in server examples to streamline code.
- Improved type handling by introducing EnhancedPromptContext and EnhancedResourceContext for better access to request context.
- Updated callback signatures in resource and prompt definitions to support context-aware execution.
- Enhanced error handling and response management in server tools for improved reliability.

* refactor(mcp-use): improve context management and streamline server tools

- Enhanced context handling in server tools by refining callback signatures and introducing new context types.
- Streamlined server examples by removing redundant tool definitions and improving error handling.
- Updated resource and prompt registration processes for better integration and reliability.

* chore(conformance): remove branch restrictions from push and pull_request triggers

- Eliminated specific branch filters for push and pull_request events in the conformance workflow, allowing for broader execution on any branch changes.

* only those branches

* default 3000

* fix: update default port from 3001 to 3000 across various components

- Changed default URL and port settings in ConnectionSettingsForm, middleware, and example scripts to use port 3000.
- Updated related documentation and comments to reflect the new default port for consistency.

* fix(conformance): set TypeScript server port to 3000 for conformance tests

- Updated the conformance workflow to explicitly set the TypeScript server to run on port 3000, ensuring consistency with recent changes across components.

* chore: update @modelcontextprotocol/sdk version in package files

- Updated the version of @modelcontextprotocol/sdk from 1194 to 1209 in pnpm-lock.yaml, package.json, and deno.json to reflect the latest changes in the SDK.

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* chore(typescript): version packages (canary)

* fix(docs): update sampling link in elicitation documentation (#618)

- Changed the sampling link in the elicitation documentation to point to the correct GitHub repository path for LLM completions, ensuring users have access to the latest examples and resources.

* Fix/server/increase conformance score (#619)

* feat(server): enhance conformance server with new audio and logging tools

- Added a new tool for returning silent audio content in WAV format.
- Updated the image tool to include a more descriptive name.
- Introduced a tool that simulates logging during execution, providing console output for tool processing steps.
- Enhanced the mixed content tool to support multiple content types, including text, image, and resource data.
- Updated prompt handling to accept new argument names for better clarity.

* refactor(mcp-server): enhance schema handling for prompts and server configuration

- Updated schema handling in McpServer and prompt registration to create parameter schemas when arguments are provided.
- Improved error handling by setting argsSchema to undefined when no schema or arguments are available, ensuring clearer validation logic.
- Refactored regex pattern in server helpers to correctly replace parameter placeholders, enhancing template URI parsing.

* feat(server): enhance audio handling and logging capabilities

- Introduced a new audio tool for returning audio content, supporting both base64 data and file paths.
- Updated server tools to utilize a logging mechanism that sends log notifications during execution.
- Enhanced resource handling to support new content types and improved error handling for logging levels.
- Refactored existing tools to streamline code and improve clarity in tool definitions.

* feat(server): implement resource subscription management and dynamic updates

- Added a new subscribable resource that can be updated and subscribed to by clients.
- Introduced a tool for updating the subscribable resource, notifying all subscribers of changes.
- Enhanced session management by cleaning up resource subscriptions when sessions are closed.
- Updated context storage to include optional session IDs for better tracking.
- Refactored idle cleanup to support session-specific resource subscription cleanup.

* feat: enhance conformance workflow with dynamic badge generation for Python and TypeScript

- Added new steps in the GitHub Actions workflow to calculate and create conformance badges for both Python and TypeScript based on test results.
- Updated README.md to include links and badges for Python and TypeScript conformance, providing users with immediate feedback on test status.

* fix action uses

* fix: update conformance workflow badge calculations and labels

- Changed the conformance badge calculation to use integer scaling for percentage rates.
- Adjusted the passing rate threshold from 80% to 60% for badge color determination.
- Updated badge labels for Python and TypeScript to reflect "MCP Conformance" instead of just the language.

* fix: enable conformance comments on forked PRs with two-workflow pattern

- Split conformance workflow into test execution and comment posting
- Created conformance-comment.yml with workflow_run trigger for full permissions
- Upload PR metadata and parsed results as artifacts
- Updated badge labels to 'MCP Conformance (TS)' and 'MCP Conformance (PY)'
- Fixed badge colors: green at 100%, yellow ≥60%, red <60%
- Resolves permission errors when posting comments on forked PRs

* feat(server): update serverBaseUrl to use environment variable helper (#625)

* feat(server): update serverBaseUrl to use environment variable helper

- Implemented a helper function to set serverBaseUrl based on MCP_URL environment variable, ensuring correct public URL usage for widgets/assets.

* fix(server): improve error handling and logging for resource management

- Enhanced error handling in resource subscription management to ensure clearer validation and logging.
- Updated logging mechanisms to provide better insights during execution, particularly for resource updates and session management.
- Refactored code for improved clarity and maintainability in server tools.

* chore(typescript): version packages (canary)

* fix: prevent code injection in conformance-comment workflow

Use environment variables instead of direct string interpolation to pass
PR metadata to the github-script action, preventing potential code injection
from untrusted input.

Addresses CodeQL security findings.

* chore: trigger conformance workflow

* feat: allow conformance comment workflow to run on push events

- Remove pull_request-only restriction from workflow trigger
- Make PR metadata download and comment posting conditional
- Workflow now runs for both push and pull_request events
- For push events, workflow completes without posting comment
- Badges remain branch-specific per existing logic in conformance.yml

* fix: revert comment workflow to PR-only events

- Comment workflow only runs for pull_request events (not push)
- For push events, there's no PR to comment on
- Conformance workflow already runs on all branch pushes for iteration
- Badges remain branch-specific (only updated for main/canary pushes)

* Docs/refactor (#633)

* quickstart

* chore: update documentation and assets

- Renamed "Getting Started" group to "Get Started" in docs.json.
- Added new SVG logo for MCP use and several images for TypeScript documentation.
- Created a new changelog file for tracking updates and improvements.
- Removed outdated security and logging documentation, and updated links in various guides.
- Introduced new response helpers and improved server logging documentation.
- Enhanced the UI widgets section to support OpenAI Apps SDK with zero boilerplate.

* refactor: update MCP server instantiation to use class constructor

- Replaced instances of `createMCPServer` with the new `MCPServer` class constructor across documentation and example files.
- Updated related documentation to reflect the new instantiation method, enhancing clarity and consistency.
- Ensured backward compatibility by retaining the `createMCPServer` function for legacy support.

* refactor: standardize MCPServer instantiation in documentation

- Updated examples to utilize the new `MCPServer` class constructor instead of the legacy `createMCPServer` function.
- Enhanced documentation clarity by providing consistent usage patterns and emphasizing the recommended instantiation method.
- Maintained backward compatibility by retaining the legacy function for existing users.

* refactor: update subscribable resource schema to use default value

- Changed the `newValue` property in the subscribable resource schema to have a default value of "Updated value".
- Updated the async function to utilize the default value, simplifying the parameter handling.

* refactor: enhance type inference and callback signatures for resource templates

- Updated the `registerResourceTemplate` function to support multiple callback signatures, improving type inference for developers.
- Removed the deprecated `ReadResourceTemplateCallbackBivariant` interface to streamline the codebase.
- Adjusted the handling of `uri` and `variables` in the server example to ensure non-null assertions, enhancing type safety.

* refactor: improve resource template registration and type safety

- Enhanced the `registerResourceTemplate` function to better support multiple callback signatures, improving developer experience.
- Removed the obsolete `ReadResourceTemplateCallbackBivariant` interface to clean up the codebase.
- Updated the handling of `uri` and `variables` in the server example to enforce non-null assertions, boosting type safety.

* chore(typescript): version packages (canary)

* refactor: streamline async callback syntax in server tools

- Updated async callback definitions in various server tools to improve consistency and readability.
- Removed unnecessary line breaks and streamlined the structure of callback functions across multiple files.
- Enhanced overall code clarity while maintaining existing functionality.

* refactor: enhance async callback handling in server tools

- Improved the structure and readability of async callback functions in server tools.
- Standardized callback definitions across multiple files for better consistency.
- Maintained existing functionality while enhancing code clarity.

* feat: add weather tools and manual widget registration

- Introduced two new server tools: `get-current-weather` and `get-weather-forecast`, utilizing the `weather-display` widget.
- Updated the README to include a manual tool registration pattern for widgets that do not auto-register.
- Enhanced the example structure to demonstrate custom tool usage and widget integration.
- Improved documentation clarity regarding widget registration and usage patterns.

* refactor: simplify input schema for get-current-weather tool

- Replaced the manual input definition with a Zod schema for the `get-current-weather` tool, enhancing type safety and readability.
- Streamlined the async callback function by removing explicit type annotations for inputs, improving code clarity.

* refactor: enhance type safety and structure in MCPServer resource registration

- Updated the `resource` and `resourceTemplate` methods in `MCPServer` to use generic types for improved type safety and clarity.
- Refactored the `uiResourceRegistration` function to accept a more generalized server context, enhancing compatibility with various resource definitions.
- Renamed `UIResourceServerContext` to `UIResourceServer` for better alignment with its purpose and updated its interface to reflect the new structure.
- Improved overall code readability and maintainability by streamlining method signatures and enhancing type definitions.

* Chore/typescript/any (#634)

* fix: add noZoom attribute to images in SimpleSplitCard component

- Added the `noZoom` attribute to image elements in the `SimpleSplitCard` component to prevent zooming effects on hover.
- Updated image tags for both light and dark mode images, as well as logos in the action links, ensuring consistent behavior across the component.

* refactor: enhance type safety and error handling in result displays

- Updated the `PromptResult`, `ResourceResult`, and `ToolResult` interfaces to use specific types instead of `any`, improving type safety.
- Refactored error handling in the `extractErrorMessage` functions across multiple components to handle new result structures, ensuring consistent error messaging.
- Improved the handling of result properties in the `onCopy` callbacks to align with the updated types, enhancing overall code clarity and maintainability.

* refactor: improve error handling and type definitions in result processing

- Enhanced error handling in the `extractErrorMessage` functions to accommodate updated result structures, ensuring consistent messaging.
- Updated `PromptResult`, `ResourceResult`, and `ToolResult` interfaces to utilize specific types, improving type safety.
- Refactored `onCopy` callbacks to align with new type definitions, enhancing code clarity and maintainability.

* chore(typescript): version packages (canary)

* fix typo

* Fix/mcp use/typing (#636)

* refactor: remove get-weather-forecast tool and update MCPServer class structure

- Removed the `get-weather-forecast` tool implementation from the server example, streamlining the codebase.
- Refactored the `MCPServer` class to `MCPServerClass` for improved clarity and updated type definitions for better type safety.
- Enhanced the `WidgetMetadata` interface to include new properties for input validation and annotations, aligning with tool naming conventions.

* refactor: enhance widget registration logic and metadata handling

- Updated the `uiResourceRegistration` function to conditionally register tools based on the `exposeAsTool` flag, improving flexibility in widget registration.
- Refactored the handling of tool metadata, ensuring that relevant fields from `appsSdkMetadata` are copied only when necessary.
- Enhanced the `createWidgetRegistration` function to extract and utilize the `exposeAsTool` flag from metadata, defaulting to true if not specified, for consistent behavior across widgets.

* feat: add tool annotations and exposeAsTool flag to resource definition

- Introduced `exposeAsTool` and `toolAnnotations` properties to the `BaseUIResourceDefinition` interface, allowing for more flexible tool registration.
- Updated the `uiResourceRegistration` function to utilize the new `exposeAsTool` property directly from the resource definition, enhancing the registration logic.

* feat: enhance widget integration and tool metadata handling

- Added support for returning interactive UI widgets from tools using the `widget()` helper and `returnsWidget` option, improving user experience in the Inspector and ChatGPT.
- Updated documentation to clarify the usage of the `widget` configuration in tool definitions, including examples for better understanding.
- Enhanced the `MCPServer` class to manage widget definitions and inject metadata into tool responses, streamlining the integration of custom tools with widgets.
- Improved type definitions for tools and widgets, ensuring better type safety and clarity in the codebase.

* Fix/server/oauth (#637)

* refactor: enhance MCPServerClass with generic OAuth support

- Updated the `MCPServerClass` to support generics for OAuth, improving type safety and flexibility in tool and resource registration methods.
- Refactored method signatures for `tool`, `prompt`, `resource`, and `resourceTemplate` to utilize the new `HasOAuth` type parameter, ensuring consistent behavior based on OAuth configuration.
- Adjusted the `McpServerInstance` and `MCPServer` types to reflect the new generic structure, enhancing clarity in type annotations for server instances.

* refactor: simplify OAuth handling in MCPServerClass

- Removed the unused `oauthConfig` property and streamlined the OAuth setup logic by directly using `oauthProvider`.
- Updated conditional checks for OAuth setup to enhance clarity and reduce redundancy in the codebase.

* chore(ci): add --dev flag to create-mcp-use-app commands in CI workflow

- Updated the CI workflow to include the `--dev` flag in both npm and yarn commands for creating test applications, ensuring development dependencies are installed correctly.

* chore(ci): update CI workflow to build and pack all packages

- Modified the CI workflow to build all packages in the TypeScript library and pack individual packages, including `create-mcp-use-app`, `mcp-use`, `@mcp-use/cli`, and `@mcp-use/inspector`.
- Updated artifact upload and download steps to handle multiple package artifacts, ensuring all necessary packages are available for testing.
- Added a step to replace workspace dependencies with file references in `package.json` for both npm and yarn test applications, improving dependency management.

* chore(ci): improve PACKAGE_PATH resolution in CI workflow

- Updated the CI workflow to enhance the resolution of the PACKAGE_PATH variable for the create-mcp-use-app package.
- Modified the logic to handle cases where multiple package files exist, ensuring the first available package is used, improving reliability in the build process.

* chore(ci): refine PACKAGE_PATH resolution in CI workflow

- Enhanced the logic for determining the PACKAGE_PATH variable in the CI workflow to ensure it correctly identifies the first available create-mcp-use-app package file, regardless of the operating system.
- Updated commands to use more reliable methods for file searching, improving consistency and robustness in the build process.

* chore(ci): update PACKAGE_PATH resolution to use realpath in CI workflow

- Modified the CI workflow to utilize `realpath` for resolving the PACKAGE_PATH variable, ensuring accurate file paths for the create-mcp-use-app package across different operating systems.
- This change enhances the reliability of package path resolution in both npm and yarn commands, improving the overall consistency of the build process.

* chore(ci): refine tarball path resolution in CI workflow

- Updated the CI workflow to improve the resolution of tarball paths for `mcp-use`, `mcp-use-cli`, and `mcp-use-inspector` packages by using `find` to ensure the first available package is correctly identified.
- This change enhances the reliability of package path resolution, ensuring accurate file paths are used during the build process.

* chore(ci): add .actrc configuration for local development

- Introduced a new `.actrc` file to configure the local development environment for CI workflows, specifying the use of a custom Ubuntu image and container architecture.
- Updated the CI workflow to replace workspace dependencies with file references in `package.json`, enhancing consistency across different environments.
- Adjusted links in documentation to ensure accurate navigation, including updates to security guides and logging resources.

* fix(docs): clean up formatting and update redirects in documentation

- Removed unnecessary blank lines in the documentation JSON file for improved readability.
- Updated the redirects section to ensure proper formatting and consistency in the structure.

* refactor(ci): enhance CI workflow for package management and path resolution (#638)

- Improved the CI workflow to ensure accurate resolution of package paths for `create-mcp-use-app`, `mcp-use`, and related packages, enhancing reliability during builds.
- Updated commands to utilize more robust methods for identifying package files, ensuring consistency across different environments.
- Streamlined the process for building and packing all necessary packages, improving overall dependency management and artifact handling.

* chore(typescript): version packages (canary)

* Chore/deps/fork (#640)

* chore(deps): update @modelcontextprotocol/sdk dependency and add new packages

- Removed the MCP SDK update workflow as it is no longer needed.
- Updated the @modelcontextprotocol/sdk dependency in multiple package.json files to point to the new GitHub repository.
- Added new dependencies: glob and js-yaml, with specified version ranges.
- Updated peer dependencies for express to support version 5.0.0.
- Cleaned up package-lock files to reflect the new dependency structure.

* chore(ci): optimize CI workflow for package path resolution and build process

- Enhanced the CI workflow to improve package path resolution, ensuring accurate identification of package files across different environments.
- Streamlined the build process for all necessary packages, improving reliability and consistency during builds.
- Updated commands to utilize more robust methods for file searching, enhancing overall dependency management.

* chore(typescript): version packages (canary)

* chore(typescript): update package references to mcp-use/modelcontextprotocol-sdk (#641)

- Changed all instances of @modelcontextprotocol/sdk to @mcp-use/modelcontextprotocol-sdk across various files.
- Updated package.json files to reflect the new package versioning and structure.
- Enhanced import paths in multiple components and utilities to ensure compatibility with the new SDK structure.
- Added new dependencies and updated existing ones in the pnpm-lock.yaml file for consistency.

* chore(typescript): version packages (canary)

* feat: Improve typescript tel (#642)

* feat: add telemetry event classes and interfaces for server and client interactions

- Introduced new telemetry event classes: `ServerRunEvent`, `ServerInitializeEvent`, `ServerToolCallEvent`, `ServerResourceCallEvent`, `ServerPromptCallEvent`, `ServerContextEvent`, `MCPClientInitEvent`, and `ConnectorInitEvent`.
- Added corresponding data interfaces for each event to enhance type safety and structure.
- Updated the `Telemetry` class to include methods for tracking these new events, improving the telemetry system's capabilities.
- Enhanced the `index.ts` file to export the new event classes and types for easier access throughout the library.

* feat(telemetry): add isEnabled check to telemetry methods

* fix: snake case properties

* feat(telemetry): add MCPServer telemetry interface and data extraction method

- Introduced the `MCPServerTelemetryInfo` interface to encapsulate necessary data for telemetry tracking from an MCPServer instance.
- Added the `createServerRunEventData` function to centralize data extraction from MCPServer-like objects, enhancing the telemetry layer's functionality.
- Updated the `Telemetry` class with a new method, `trackServerRunFromServer`, to track server run events directly using the new interface and extraction method.

* feat(telemetry): enhance telemetry tracking for MCPClient and connectors

- Integrated telemetry tracking for MCPClient initialization, connector initialization, and server events.
- Added methods to track server runs, tool calls, prompt calls, and resource calls, improving observability of client-server interactions.
- Updated the HttpConnector, StdioConnector, and BaseConnector classes to utilize the new tracking methods.
- Enhanced MCPServer to log server initialization and execution metrics, providing better insights into server performance.

* feat(telemetry): enhance resource tracking in server run events

- Updated the `ServerRunEventData` interface to include new properties for tracking resources: `appsSdkResources`, `mcpUiResources`, and `mcpAppsResources`, along with their respective counts.
- Refactored the `createServerRunEventData` function to map and filter resources based on MIME types, improving the granularity of telemetry data.
- Adjusted the `ServerRunEvent` class to serialize the new resource properties, enhancing the telemetry output for better observability.

* feat(versioning): automate version generation for telemetry

- Added a new script `generate-version.mjs` to automatically generate `src/telemetry/version.ts` with the current package version during the build process.
- Updated the `build` script in `package.json` to include the version generation step.
- Refactored `getPackageVersion` function to return the embedded version from the generated file, improving version management.

* tests for telemetry

* add changeset

* feat(telemetry): enhance runtime environment detection and user ID management

- Introduced a comprehensive runtime environment detection system, supporting Node.js, Bun, Deno, Cloudflare Workers, Edge, and browser environments.
- Added methods to determine storage capabilities for user ID persistence, including filesystem and localStorage options.
- Refactored user ID retrieval to accommodate different environments, ensuring session-based IDs are generated when persistent storage is unavailable.
- Enhanced telemetry event tracking by including runtime environment metadata in captured events, improving observability and debugging capabilities.

* feat(telemetry): add browser stubs for Node.js-only packages

- Introduced a Vite plugin to provide browser-compatible stubs for the `posthog-node` package, allowing it to be used in browser environments.
- Updated the Vite server configuration to exclude `posthog-node` from dependency optimization and mark it as external in SSR mode, ensuring proper handling in both development and production builds.
- Enhanced the overall compatibility of the telemetry system with browser environments by stubbing server-side functionality.

* refactor: standardize code formatting and improve readability

- Updated import statements to use consistent double quotes.
- Reformatted function parameters and object properties for better readability across multiple files.
- Enhanced the structure of telemetry-related code to improve maintainability and clarity.
- Removed unnecessary blank lines to streamline the codebase.

* feat(versioning): update version management and export functionality

- Added version information export to the mcp-use package, allowing access to the package version across various modules.
- Refactored the version generation script to output to a new location, ensuring consistency in version tracking.
- Updated multiple files to import and utilize the new versioning functions, enhancing the overall version management system.

* refactor(telemetry): remove unused ServerRunEventData import

- Eliminated the import of ServerRunEventData from telemetry.ts to clean up the code and remove unnecessary dependencies.

---------

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

* chore(typescript): version packages (canary)

* feat(ci): update CI workflow to use local tar files for dependencies

- Modified the CI workflow to create projects using local tar files instead of workspace dependencies.
- Removed the previous steps for replacing workspace dependencies in `package.json`, simplifying the process.
- Added a new helper function to validate and find required tar files in a specified directory, ensuring all necessary packages are present.
- Enhanced the project creation logic to support a new `--tar` option for specifying the directory containing tar files.

* feat: add recursive tar file search functionality

- Introduced a new helper function to recursively find `.tgz` files in a specified directory, enhancing the ability to locate required tar files.
- Updated the existing `findTarFiles` function to utilize the new recursive search, improving the validation and retrieval of tar files for project creation.
- Enhanced error messages to provide clearer feedback on found tar files during the process.

* refactor: clean up index.tsx and update CI workflow

- Removed unused functions for tar file handling from `index.tsx`, simplifying the codebase.
- Updated the CI workflow to ensure consistent packaging of the `mcp-use` package, enhancing the build process.
- Adjusted the project creation logic to streamline dependency management and improve clarity in the workflow.

* chore(ci): update E2E canary workflow permissions

- Added permissions for actions and contents in the E2E canary workflow to enhance security and control over workflow execution.

* refactor: enhance error handling display in OAuth callback (#644)

- Refactored the error display logic in the OAuth callback to use DOM manipulation for improved safety and clarity.
- Updated regex patterns in the OAuthHelper class to be more specific, enhancing the accuracy of authentication checks for various APIs.

* chore(typescript): version packages (canary)

* feat(chat): enhance tool integration in chat components (#643)

- Added `tools` prop to `ChatTab` for better tool management.
- Updated `MessageList` to accept `tools` and implemented a helper function to retrieve tool metadata.
- Enhanced `ToolResultRenderer` to utilize tool metadata for improved rendering and error handling, including debug logging for better traceability.

* chore(typescript): version packages (canary)

* refactor: update regex patterns in OAuthHelper for improved DNS safety

- Enhanced regex patterns in the OAuthHelper class to ensure DNS-safe domain matching, accommodating maximum label length restrictions for Google APIs, Atlassian, and Slack.
- Improved clarity in comments to reflect the changes made to the regex patterns.

* Fix/inspector/build (#645)

* chore(inspector): update prepublishOnly script for improved build process

- Modified the `prepublishOnly` script in the inspector package to first build the `mcp-use` package before executing the standard build, ensuring all dependencies are correctly prepared prior to publishing.

* chore: changeset

* chore(typescript): version packages (canary)

* chore(ci): add workflow_dispatch trigger to E2E canary workflow

- Introduced a manual trigger for the E2E canary workflow, allowing for on-demand execution alongside the existing workflow_run trigger.

* Update conformance workflows to use published action (#647)

* Update conformance workflows to use published action

- Replace inline conformance testing with mcp-use/mcp-conformance-action@v1
- Simplify conformance-comment workflow to use action's comment mode
- Maintains fork PR support via workflow_run pattern

* Trigger conformance tests with fixed action

* Trigger conformance with v1.0.2 (aggressive cleanup)

* Trigger conformance with v1.0.3 (simplified cleanup)

* Trigger conformance with v1.0.4 (detached spawn)

* Trigger conformance after updating comment workflow on main

* Trigger conformance with v1.0.5 (baseline comparison)

* Trigger conformance with v1.0.6 (old artifact format support)

* Potential fix for code scanning alert no. 45: Workflow does not contain permissions

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: Add browser tel to typescript  (#651)

* add posthog-js

* refactor(telemetry): enhance telemetry functionality 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.

* feat(telemetry): add ClientAddServerEvent and ClientRemoveServerEvent for server management

- Introduced ClientAddServerEvent and ClientRemoveServerEvent classes to track server addition and removal.
- Enhanced MCPClientInitEvent to include isBrowser property for better environment differentiation.
- Improved properties extraction for new event classes to facilitate server management tracking.

* feat(telemetry): unify telemetry exports and enhance backward compatibility

- Added unified telemetry exports for browser and Node.js environments, including Tel and setTelemetrySource.
- Introduced backward compatibility aliases for existing telemetry functionalities to ensure seamless integration for users transitioning to the new structure.

* feat(telemetry): integrate telemetry tracking in MCPClient methods

- Added telemetry tracking for server addition and removal in BaseMCPClient.
- Implemented client initialization tracking in BrowserMCPClient to capture configuration details and environment context.
- Enhanced error handling for telemetry tracking failures during client initialization.

* feat(telemetry): enhance MCP telemetry tracking in useMcp hook

- Integrated telemetry tracking for connection attempts, tool calls, and resource reads within the useMcp hook.
- Added success and failure tracking for connections, tool executions, and resource accesses to improve monitoring and diagnostics.

* chore(typescript): version packages (canary)

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Luigi Pederzani <luigipederzani@gmail.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2025-12-08 19:35:44 +01:00
Enrico Toniato 4fc04a9ffc Canary (#607)
* feat: add MCP Conformance Test Servers for Python and TypeScript (#605)

* chore(deps): bump express from 5.1.0 to 5.2.0 in /libraries/typescript (#602)

* chore(deps): bump express from 5.1.0 to 5.2.0 in /libraries/typescript

Bumps [express](https://github.com/expressjs/express) from 5.1.0 to 5.2.0.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/v5.1.0...v5.2.0)

---
updated-dependencies:
- dependency-name: express
  dependency-version: 5.2.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore: add changeset for dependabot updates

* Delete libraries/typescript/.changeset/dependabot-e19bd45.md

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

* chore: add changeset for dependabot updates

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com>

* feat: add MCP Conformance Test Servers for Python and TypeScript

- Introduced a new GitHub Actions workflow for running conformance tests on both Python and TypeScript servers.
- Implemented a Python conformance server that supports various MCP features and tools.
- Developed a TypeScript conformance server with similar functionality, including tools and resources.
- Added necessary configuration files for TypeScript server setup, including package.json and tsconfig.json.
- Updated pnpm-lock.yaml to include dependencies for the new conformance server.

This commit enhances the testing framework by providing dedicated servers for conformance testing, ensuring better validation of MCP features.

* feat: enhance conformance workflow with conditional inputs

- Added workflow_dispatch inputs to allow running only Python or TypeScript conformance tests.
- Updated job conditions to skip unnecessary tests based on the selected input.
- Modified the conformance summary job to ensure it does not run if cancelled.

This update improves flexibility in running conformance tests, enabling targeted testing based on user input.

* feat: add PR comment with conformance results and remove ext-apps

* feat: show individual test results as columns in PR comment

* feat: simplify conformance PR comment table

* feat: add conformance comparison with main and canary branches

- Fix test name parsing to remove ': X passed, Y failed' suffix
- Fetch baseline results from main and canary branches
- Show comparison columns (vs Main, vs Canary) with color-coded indicators
- Show +1/-1 on individual tests that changed from baseline
- Use 🟢 for improvements, 🔴 for regressions, ⚪ for no change, 🆕 for new

* feat: prevent test name line breaks and add MCP icon

- Use non-breaking hyphens (&#8209;) in test headers to prevent wrapping
- Replace microscope emoji with MCP SVG icon in PR comments

* fix: use picture element for MCP icon with dark/light mode support

* feat: display MCP icon inline with heading with gap

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* chore: enter canary prerelease mode

* chore(typescript): version packages (canary)

* Feature/mcp 924 implement tool elicitation support in typescript sdk tools (#606)

* chore(deps): bump express from 5.1.0 to 5.2.0 in /libraries/typescript (#602)

* chore(deps): bump express from 5.1.0 to 5.2.0 in /libraries/typescript

Bumps [express](https://github.com/expressjs/express) from 5.1.0 to 5.2.0.
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/v5.1.0...v5.2.0)

---
updated-dependencies:
- dependency-name: express
  dependency-version: 5.2.0
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore: add changeset for dependabot updates

* Delete libraries/typescript/.changeset/dependabot-e19bd45.md

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

* chore: add changeset for dependabot updates

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com>

* chore: enter canary prerelease mode

* feat(docs): add elicitation feature documentation and update client structure

- Introduced new documentation for the elicitation feature, detailing both form and URL modes for user input requests.
- Updated `docs.json` to include a new page for elicitation.
- Enhanced the `MCPClient` and related connectors to support elicitation callbacks, allowing servers to request additional user information.
- Implemented elicitation handling in various connectors (HTTP, Stdio) and updated the server context to support elicitation requests.
- Added examples for using elicitation in React components and TypeScript.

* feat: enhance elicitation feature documentation and server-side validation

- Updated documentation to clarify server-side validation with mcp-use when using Zod schemas.
- Added custom error types for elicitation validation in the mcp-use library.
- Improved MCPClient to support elicitation callbacks for better user interaction.
- Refactored elicitation ID generation to use UUID for uniqueness.
- Enhanced error handling in the server to throw specific validation errors.

* feat: add Zod dependency and implement elicitation tool in conformance server

- Updated .gitignore to exclude conformance test results.
- Added Zod as a dependency in the conformance package.
- Implemented a new elicitation tool in the conformance server, allowing for user input with validation using Zod schemas.
- Updated server feature list to include the new elicitation tool.

* feat: add elicitation tool with default values in conformance server

- Introduced a new elicitation tool that utilizes default values for various primitive types as per SEP-1034.
- Enhanced the server's ability to handle user input with validation using Zod schemas.
- Updated the server feature list to include the new elicitation tool.

* fix: resolve pre.json conflict with canary - accept newer versions

* chore: remove ELICITATION_IMPLEMENTATION.md and ext-apps from tracking

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* chore(typescript): version packages (canary)

* fix: update elicitation example server paths and enhance documentation (#608)

- Updated paths in documentation and examples to reflect the new `examples/server/elicitation/` structure, replacing the previous `examples/server/elicitation-test/`.
- Enhanced the elicitation feature documentation to clarify usage and examples.
- Removed deprecated example files related to the old elicitation test structure.

* chore(typescript): version packages (canary)

* chore(typescript): update package versions to patch for mcp-use and inspector

* Fix/server/json response (#609)

* feat: update dependencies and enhance server functionality

- Added new dependencies '@openai/apps-sdk-ui' and '@tanstack/react-query' to the starter template and test app.
- Updated the pnpm-lock.yaml to reflect the new dependencies and their versions.
- Modified mcp-server.ts to enable JSON response for SSE streaming.
- Refactored createExternalUrlResource, createRawHtmlResource, and createRemoteDomResource functions to return promises for better async handling.

* refactor: update create-mcp-use-app package to use React and Ink components

- Changed the build script to compile TypeScript files with JSX support.
- Replaced Inquirer with Ink components for interactive CLI prompts.
- Removed the old index.ts file, transitioning to a more modern React-based approach.
- Updated package dependencies to include React and Ink, ensuring compatibility with the new structure.
- Enhanced the TypeScript configuration to support JSX.

* chore(typescript): version packages (canary)

* chore(typescript): update mcp-use and inspector versions to minor for elicitation support

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-12-02 18:14:53 +01:00
pietrozullo 67041ca575 python/release-1.5.0 2025-12-01 16:44:20 +01:00
Pietro Zullo be9942a4d4 feat/python/server (#559)
* feat: server first implementation

* docs: docs for server and images

* chore: locked langchain dependencies in pyproject.toml (#321)

* python/release/1.3.13

* catch uvicorn logs && log session id

* fix debug logic

* docs: logging update

* fix: icon of elicitation

* fix installation paths for local clones

* docs: minor restructuring

* docs: reorganization, killed non existing pages

* docs: beta tag on server

* chore: example servers

* feat: inspector autopopulated and client only

* feat: enhance MCP logging system with customizable formats and improved middleware

* feat: implement weather alert and forecast tools in FastMCP example server

* mcp path configurable

* fix inspector

* export as FastMCP too

* chore: update fastmcp migration example

* lock inspector version

* type runner

* unhide docs and remove dangers

* migration diff

* docs and context example

* export context

* logging improvement

* pretty JSON RPC

* autoConnect url param in inspecotr

* move logging

* type check

* Server Router

* show response logs

* fallback tool name to function name in router registration

* compatibility export

* Introduced ty and prek as type checker and precommit engine respectively - moved ruff config in pyproject toml

* add ty check

* ty runs only on staged files

* ty configuration fix

* move startup info in logging

* remove bug from action

* update claude rules

* fix resource serialization

* comments on inspector errors

* abstracted runner transports

* remove redunant call for network

* fix ip getter

* add inspector mcp path

* response limit logging

* disable ty check in action

* moved transport type to types

* support sse

* show transport type in logs

* change default transport

* refactored tests to use mcp server

* removed fastmcp

* file restructuring

* test table

* sampling, elicitation, tool disabling enabling

* deprecte sse server side

* simplified report

* fix action

* remove sse deprecated test

* move tests files to allow for server integration tests

* docs

* reorg integration test files

* api-reference-doxs

* fix broken links

* telemetry

* remove feature useage from scarf
2025-12-01 14:12:16 +01:00
Enrico Toniato 2730902bd8 Canary (#565)
* Fix/inspector/scroll (#563)

* refactor: enhance layout structure in PromptsTab, ResourcesTab, and ToolsTab components

- Wrapped header and content sections in a flex container to improve layout consistency and overflow handling.
- Ensured that the UI remains responsive and visually organized across different tabs.

* chore: changeset

* feat: add enum input display in ToolInputForm component

- Introduced a new Select dropdown for enum fields, allowing users to select from predefined options.
- Implemented helper functions to resolve JSON schema references and normalize union types for better handling of input schemas.

* chore: enter canary prerelease mode

* chore(typescript): version packages (canary)

* Feat/server/oauth (#564)

* feat: Add OAuth examples and enhance authentication flow

- Introduced new examples for OAuth integration using Auth0, Supabase, and WorkOS in the mcp-use package.
- Added an OAuthCallback component to handle redirects after user authentication.
- Enhanced the App component to include routing for OAuth callbacks.
- Updated pnpm-lock.yaml and package.json to include the jose library for JWT handling.
- Improved context management for HTTP requests to support OAuth flows.
- Removed outdated notification example files to streamline the examples directory.

* feat: Enhance MCP connection management and add notification examples

- Added a `disconnect` method to the MCPConnection interface for better session management.
- Updated McpConnectionWrapper to include new connection options for improved user experience.
- Implemented connection cleanup logic in McpProvider to handle disconnections properly.
- Introduced a new example demonstrating customized notifications for connected clients using the MCP server.
- Added a WorkOS AuthKit OAuth example to showcase bearer token authentication and dynamic client registration.

* feat: Enhance authentication documentation and add notifications section

- Updated the TypeScript client authentication documentation to include new OAuth flow modes (Popup and Redirect).
- Added examples for manual authentication triggers and OAuth callback handling.
- Introduced a new notifications section in the server documentation with tips and examples for bidirectional notifications.
- Included additional tips for complete implementation examples in both notifications and tools documentation.

* lint & format

* fix: Address linting issues and format code for consistency

* chore(typescript): version packages (canary)

* Fix/canary/deps (#566)

* chore: clean up pnpm workspace and lock file by removing unused packages and examples

* chore: update dependencies and improve example scripts

- Updated zod and related dependencies to version 4.1.13 in pnpm-lock.yaml and package.json.
- Enhanced example scripts by adding notes for required environment variables and removing dotenv imports for clarity.
- Refactored code to use local utility functions for JSON schema conversion and UUID generation.
- Cleaned up unused dependencies in package.json for the mcp-use package.

* chore: update dependencies and improve package configurations

- Added `zod` version 4.1.13 to package.json and pnpm-lock.yaml.
- Removed unused dependencies from various package.json files in the create-mcp-use-app templates.
- Simplified install arguments in the getInstallArgs function for package managers.
- Enhanced error handling for optional dependencies in the McpUseProvider and connect-adapter files.
- Refactored display functions to dynamically import optional dependencies for improved performance and user experience.

* format & lint

* chore: changeset

* chore(typescript): version packages (canary)

* Fix/canary/deps (#567)

* chore: clean up pnpm workspace and lock file by removing unused packages and examples

* chore: update dependencies and improve example scripts

- Updated zod and related dependencies to version 4.1.13 in pnpm-lock.yaml and package.json.
- Enhanced example scripts by adding notes for required environment variables and removing dotenv imports for clarity.
- Refactored code to use local utility functions for JSON schema conversion and UUID generation.
- Cleaned up unused dependencies in package.json for the mcp-use package.

* chore: update dependencies and improve package configurations

- Added `zod` version 4.1.13 to package.json and pnpm-lock.yaml.
- Removed unused dependencies from various package.json files in the create-mcp-use-app templates.
- Simplified install arguments in the getInstallArgs function for package managers.
- Enhanced error handling for optional dependencies in the McpUseProvider and connect-adapter files.
- Refactored display functions to dynamically import optional dependencies for improved performance and user experience.

* format & lint

* chore: changeset

* chore: update TypeScript configuration and clean up project files

- Removed `.vercel/` from `.prettierignore` and `eslint.config.js` for consistency.
- Deleted unused `.trigger` file to streamline project structure.
- Adjusted `tsconfig.json` to maintain only necessary package paths.

* chore: update pnpm workspace and package configurations

- Added new example packages for mcp-use in the pnpm workspace, including client and server examples.
- Updated package.json for mcp-use to reflect the new version of @modelcontextprotocol/sdk.
- Enhanced McpUseProvider to dynamically load react-router-dom, improving error handling and user experience.
- Refactored connect-adapter and mcp-server to utilize createRequire for dynamic imports, ensuring compatibility with user project directories.
- Cleaned up pnpm-lock.yaml to include updated dependencies and improve overall project structure.

* refactor: clean up whitespace and formatting in McpUseProvider, connect-adapter, and mcp-server files

- Removed unnecessary blank lines to improve code readability.
- Standardized formatting for better consistency across the codebase.

* chore(typescript): version packages (canary)

* lint & format

* feat: add URL validation in connection components (#568)

- Implemented URL format validation in InspectorDashboard and ServerConnectionModal to ensure only valid protocols (http, https, ws, wss) are accepted.
- Added error handling with user feedback using toast notifications for invalid URL formats.
- Adjusted collapsedSize property in PromptsTab, ResourcesTab, and ToolsTab components for consistent UI behavior.

* chore(typescript): version packages (canary)

* fix(inspector): use terser for smaller build (#569)

* Enhance create-mcp-use-app e2e tests (#561)

* Add E2E tests for create-mcp-use-app with npm and yarn

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

* feat: Add E2E tests for multiple create-mcp-use-app templates

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

---------

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

* fix docs images

* fix(inspector): enable minification for smaller build

Use esbuild's built-in minifier (minify: true) instead of adding terser.
Results in same compression (8.7MB -> 4.9MB, 44% reduction) with faster builds.

* chore: changeset

* remove test_app

---------

Co-authored-by: Enrico Toniato <2827496+tonxxd@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>

* chore(typescript): version packages (canary)

* Feat/inspecto/combobox models (#570)

* feat(inspector): enhance ConfigurationDialog with model selection and password visibility toggle

- Added a combobox for model selection using a Popover and Command components for improved user experience.
- Implemented a button to toggle password visibility for the API key input field.
- Updated imports to include necessary UI components for the new features.

* fix(inspector): correct models and API keys display in inspector chat

* feat(inspector): add checkbox support and enhance Markdown rendering

- Introduced a new ListItem component to handle task list items with checkboxes in Markdown.
- Updated the MarkdownRenderer to support custom table components and improved code block handling.
- Added dependencies for @radix-ui/react-checkbox and updated package.json and pnpm-lock.yaml accordingly.
- Refined styles in ChatHeader and ChatInputArea for better layout consistency.

* chore(typescript): version packages (canary)

* refactor(create-mcp-use-app): remove --no-install flag from commands and update README for automatic dependency installation (#571)

* Potential fix for code scanning alert no. 32: Clear-text logging of sensitive information

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>

* Potential fix for code scanning alert no. 18: Workflow does not contain permissions

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/mcp use/update ai sdk (#573)

* chore(dependencies): update ai package version and add overrides for sugarss

- Updated ai package from version 4.3.19 to 5.0.104 in multiple package.json files.
- Added sugarss override to package.json files in apps-sdk, mcp-ui, and starter templates for compatibility.

* feat(ci): add typescript-deno-test workflow for Deno compatibility testing

- Introduced a new CI job to test Deno compatibility for the mcp-use package.
- Updated pnpm-lock.yaml and package.json files to reference the latest version of @modelcontextprotocol/sdk from a new URL.
- Ensured dependencies are installed and built correctly before running Deno tests.

* deno test

* fix(ci): update package command from npm to pnpm for Deno testing

* refactor(mcp-use): replace LangChainAdapter with createTextStreamResponse for AI SDK compatibility

- Updated multiple files to use createTextStreamResponse instead of LangChainAdapter for creating data stream responses.
- Enhanced README and example files to reflect the new usage pattern.
- Adjusted tests to verify compatibility with the new response handling method.

* tests: added deno tests

* fix(create-mcp-use-app): parse PORT environment variable to number

* tests: exclude deno from vitest

* chore(typescript): version packages (canary)

* feat(ci): add deployment markers for canary and main branches (#574)

- Introduced steps to create and upload deployment markers for both canary and main branches in the TypeScript release workflow.
- The markers indicate successful package publication and are retained for one day.

* refactor(mcp-use): update AI SDK integration and enhance Deno testing

- Replaced LangChainAdapter with createTextStreamResponse for improved AI SDK compatibility.
- Updated README and example files to reflect new usage patterns.
- Added Deno compatibility tests and adjusted CI workflow for dependency management.
- Fixed PORT environment variable parsing in create-mcp-use-app.

* feat(ci): enhance workflow security by validating source of automatic triggers

- Added a validation step to ensure that workflow runs triggered automatically are from the same repository, preventing potential security risks from forked repositories.
- Updated conditions for deployment markers to incorporate the new validation step, ensuring only valid runs proceed to deployment.

* Fix/cli/readme (#575)

* chore(cli): update package description for clarity and feature enhancement

* fix(ci): update Deno testing workflow to ensure proper dependency installation and execution

- Adjusted the CI workflow for Deno compatibility testing to ensure all dependencies are correctly installed before running tests.
- Updated commands to use pnpm for consistency across the workflow.

* chore(typescript): version packages (canary)

---------

Signed-off-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Daniel Starns <danielstarns@hotmail.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: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2025-11-30 21:26:37 +01:00
Enrico Toniato 266a445934 Canary (#524)
* chore: enter canary prerelease mode

* Improve search tool response structure (#508)

* Refactor search_tools to return metadata and results

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

* docs: update API documentation

* feat: enhance search_tools display and filtering capabilities

- Introduced a new function to format search_tools results as a tree structure, including metadata such as total tools and namespaces.
- Updated the display logic to handle both new and old formats of search_tools results for backward compatibility.
- Enhanced filtering in MCPClient and CodeExecutor to include server name in search criteria, improving tool discoverability.

* format

* docs: update code-mode documentation to reflect changes in search_tools response structure

- Modified examples to use the new response format from search_tools, which includes metadata and results.
- Enhanced clarity in code snippets by adding print statements for tool discovery results.
- Updated TypeScript and Python documentation to ensure consistency across both languages.

* refactor: clean up whitespace in display.py for improved readability

- Removed unnecessary blank lines throughout the _format_search_tools_as_tree function to enhance code clarity and maintainability.
- Ensured consistent formatting in the display logic for better visual structure.

* refactor: streamline line wrapping in display.py for improved readability

- Consolidated parameters in the text wrapping function to enhance code clarity and maintainability.

* feat: enhance search_tools metadata for improved context

- Updated search_tools to return additional metadata (total_tools, namespaces, result_count) alongside results, enhancing the context for model decision-making.

---------

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

* chore(typescript): version packages (canary)

* feat: Integrate official UI components in templates and enhance widget development experience (#517)

* feat: Add ecommerce widgets and OpenAI Apps SDK UI components

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

* feat: Update MCP app templates and resources

- Added new fruit images to the public directory for enhanced visual content.
- Removed outdated weather and ecommerce carousel components to streamline the codebase.
- Updated the product search result component to utilize new UI components and improved error handling.
- Modified package dependencies to include react-router and updated @openai/apps-sdk-ui version.
- Enhanced the .gitignore file to include .mcp-use for better project management.

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

* feat: Introduce new lockfile and update dependencies

- Added a new bun.lock file to manage package dependencies for the TypeScript project.
- Updated pnpm-lock.yaml to include new dependencies such as @openai/apps-sdk-ui and react-router.
- Enhanced the CLI tool to support aborting fetch requests and improved error handling in widget building.
- Replaced outdated image assets with PNG versions for better compatibility and removed unused JPG files.
- Introduced new ErrorBoundary and Image components to improve error handling and image loading in the MCP app.

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

* feat: Enhance Vite server configuration and update dependencies

- Added a new plugin to Vite for watching the resources directory, ensuring hot module replacement (HMR) works seamlessly when widget source files change.
- Updated pnpm-lock.yaml to include new dependencies such as @openai/apps-sdk-ui, react-router, and various development tools like @tailwindcss/vite and typescript.
- Improved the Vite server configuration to explicitly watch files outside the root directory, enhancing the development experience.

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

* feat: Implement carousel component for product search results

- Added a new CarouselItem component to enhance the visual presentation of fruit items in the product search results.
- Introduced dynamic pointer tracking for interactive hover effects on carousel items, improving user engagement.
- Updated styles for carousel items and their backgrounds to create a visually appealing blur effect.
- Refactored the ProductSearchResult component to utilize the new carousel structure and improve layout responsiveness.

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

* feat: Update ProductSearchResult and OpenAIComponentRenderer for theme support

- Added WidgetDebugger to the ProductSearchResult component for enhanced debugging capabilities.
- Updated the product search result text to reflect a new template and improved context for users.
- Enhanced OpenAIComponentRenderer to handle theme changes, ensuring the correct theme is applied when the iframe loads.
- Modified shared-utils to include theme information in WidgetData, allowing for better theme management across components.

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

* feat: Refactor ProductSearchResult component and enhance WidgetFullscreenWrapper

- Replaced ThemeProvider and BrowserRouter with McpUseProvider in the ProductSearchResult component for improved context management.
- Removed unused getBasename function to streamline routing logic.
- Updated WidgetFullscreenWrapper to support viewControls prop, allowing conditional rendering of fullscreen and picture-in-picture buttons.
- Enhanced overall structure and readability of the ProductSearchResult component.

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

* feat: Update dependencies and enhance component functionality

- Added `react-router-dom` as a dependency to support routing features.
- Updated `detect-libc` to version 2.1.2 for improved compatibility.
- Refactored various components for better readability and structure, including the `ProductSearchResult` and `OpenAIComponentRenderer`.
- Introduced new auto-sizing functionality in `McpUseProvider` to notify OpenAI about container height changes.
- Removed deprecated `WidgetDebugger` and `WidgetFullscreenWrapper` components to streamline the codebase.

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

* refactor: Enhance OpenAIComponentRenderer and ToolResultDisplay for performance and readability

- Memoized component to prevent unnecessary re-renders in OpenAIComponentRenderer.
- Introduced new state management for iframe height notifications and improved height handling logic.
- Refactored ToolResultDisplay to utilize memoization for args and result, optimizing rendering performance.
- Cleaned up unused state variables and streamlined event handling for better maintainability.

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

* refactor: Improve logging and code readability in various components

- Enhanced logging statements in OpenAIComponentRenderer, McpUseProvider, and WidgetControls for better debugging and clarity.
- Refactored memoization in ToolResultDisplay to improve performance and prevent unnecessary re-renders.
- Cleaned up code formatting for improved readability across multiple components.

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

* refactor: Update ProductSearchResult and shared routes for improved development experience

- Modified the ProductSearchResult component to change the FAQ question and enhance the autosize feature description.
- Simplified asset loading in shared routes to directly fetch from the dev server, improving development efficiency.
- Enhanced security headers in shared-utils to include dev server origins for better handling of HMR scripts and resource loading.

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

* feat: Integrate @tanstack/react-query and enhance fruits API in apps-sdk template

- Added @tanstack/react-query as a dependency to improve data fetching capabilities.
- Implemented a new API endpoint in the apps-sdk template to serve a list of fruits with their respective colors.
- Removed the outdated ProductSearchResult component to streamline the codebase and focus on the new API integration.

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

* refactor: Clean up code formatting and improve readability in product search result components

- Removed unnecessary blank lines in various TypeScript files to enhance code clarity.
- Simplified function parameters in CarouselItem component for better readability.
- Streamlined the Accordion and AccordionItem components by removing excess whitespace.

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

* change set

* chore: Remove bun.lock file to streamline dependency management

- Deleted the bun.lock file to eliminate potential conflicts and simplify the dependency resolution process in the project.

* feat: Update documentation and components for improved clarity and organization

- Added new pages for MCP UI resources and widget components in the documentation.
- Enhanced the migration guide to specify applicability for version 1.5.0 and later.
- Updated the ErrorBoundary component icon for better representation.
- Removed outdated template comparison section to streamline the templates documentation.

* fix: Correct indentation in documentation JSON for better readability

- Adjusted the indentation of the "apps-sdk-resources" entry in the documentation JSON to maintain consistent formatting.
- Removed unnecessary blank lines to enhance overall clarity in the documentation structure.

* chore: Update dependencies and clean up code for improved performance

- Updated react-router-dom to version 7.9.5 for enhanced functionality.
- Removed commented-out code in ProductSearchResult component to improve clarity.
- Cleaned up logging statements in OpenAIComponentRenderer for better debugging.
- Refactored height notification logic in McpUseProvider to optimize performance.
- Adjusted useWidget to avoid dependency issues with URL parameters.

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

* chore: Update dependencies and clean up code for improved performance

- Updated react-router-dom to version 7.9.5 for enhanced functionality.
- Removed commented-out code in ProductSearchResult component to improve clarity.
- Cleaned up logging statements in OpenAIComponentRenderer for better debugging.
- Refactored height notification logic in McpUseProvider to optimize performance.
- Adjusted useWidget to avoid dependency issues with URL parameters.

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

* refactor: Clean up code formatting and improve readability in OpenAIComponentRenderer and useWidget

- Adjusted formatting of variable declarations for better consistency and readability.
- Simplified the handleError function in OpenAIComponentRenderer for clarity.
- Ensured consistent indentation in useWidget for improved code structure.

---------

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

* chore(typescript): version packages (canary)

* feat: Add JSON-RPC message logging to Inspector tabs (MCP-536) (#519)

* feat: Add ecommerce widgets and OpenAI Apps SDK UI components

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

* feat: Update MCP app templates and resources

- Added new fruit images to the public directory for enhanced visual content.
- Removed outdated weather and ecommerce carousel components to streamline the codebase.
- Updated the product search result component to utilize new UI components and improved error handling.
- Modified package dependencies to include react-router and updated @openai/apps-sdk-ui version.
- Enhanced the .gitignore file to include .mcp-use for better project management.

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

* feat: Introduce new lockfile and update dependencies

- Added a new bun.lock file to manage package dependencies for the TypeScript project.
- Updated pnpm-lock.yaml to include new dependencies such as @openai/apps-sdk-ui and react-router.
- Enhanced the CLI tool to support aborting fetch requests and improved error handling in widget building.
- Replaced outdated image assets with PNG versions for better compatibility and removed unused JPG files.
- Introduced new ErrorBoundary and Image components to improve error handling and image loading in the MCP app.

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

* feat: Enhance Vite server configuration and update dependencies

- Added a new plugin to Vite for watching the resources directory, ensuring hot module replacement (HMR) works seamlessly when widget source files change.
- Updated pnpm-lock.yaml to include new dependencies such as @openai/apps-sdk-ui, react-router, and various development tools like @tailwindcss/vite and typescript.
- Improved the Vite server configuration to explicitly watch files outside the root directory, enhancing the development experience.

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

* feat: Implement carousel component for product search results

- Added a new CarouselItem component to enhance the visual presentation of fruit items in the product search results.
- Introduced dynamic pointer tracking for interactive hover effects on carousel items, improving user engagement.
- Updated styles for carousel items and their backgrounds to create a visually appealing blur effect.
- Refactored the ProductSearchResult component to utilize the new carousel structure and improve layout responsiveness.

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

* feat: Update ProductSearchResult and OpenAIComponentRenderer for theme support

- Added WidgetDebugger to the ProductSearchResult component for enhanced debugging capabilities.
- Updated the product search result text to reflect a new template and improved context for users.
- Enhanced OpenAIComponentRenderer to handle theme changes, ensuring the correct theme is applied when the iframe loads.
- Modified shared-utils to include theme information in WidgetData, allowing for better theme management across components.

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

* feat: Refactor ProductSearchResult component and enhance WidgetFullscreenWrapper

- Replaced ThemeProvider and BrowserRouter with McpUseProvider in the ProductSearchResult component for improved context management.
- Removed unused getBasename function to streamline routing logic.
- Updated WidgetFullscreenWrapper to support viewControls prop, allowing conditional rendering of fullscreen and picture-in-picture buttons.
- Enhanced overall structure and readability of the ProductSearchResult component.

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

* feat: Update dependencies and enhance component functionality

- Added `react-router-dom` as a dependency to support routing features.
- Updated `detect-libc` to version 2.1.2 for improved compatibility.
- Refactored various components for better readability and structure, including the `ProductSearchResult` and `OpenAIComponentRenderer`.
- Introduced new auto-sizing functionality in `McpUseProvider` to notify OpenAI about container height changes.
- Removed deprecated `WidgetDebugger` and `WidgetFullscreenWrapper` components to streamline the codebase.

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

* refactor: Enhance OpenAIComponentRenderer and ToolResultDisplay for performance and readability

- Memoized component to prevent unnecessary re-renders in OpenAIComponentRenderer.
- Introduced new state management for iframe height notifications and improved height handling logic.
- Refactored ToolResultDisplay to utilize memoization for args and result, optimizing rendering performance.
- Cleaned up unused state variables and streamlined event handling for better maintainability.

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

* refactor: Improve logging and code readability in various components

- Enhanced logging statements in OpenAIComponentRenderer, McpUseProvider, and WidgetControls for better debugging and clarity.
- Refactored memoization in ToolResultDisplay to improve performance and prevent unnecessary re-renders.
- Cleaned up code formatting for improved readability across multiple components.

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

* refactor: Update ProductSearchResult and shared routes for improved development experience

- Modified the ProductSearchResult component to change the FAQ question and enhance the autosize feature description.
- Simplified asset loading in shared routes to directly fetch from the dev server, improving development efficiency.
- Enhanced security headers in shared-utils to include dev server origins for better handling of HMR scripts and resource loading.

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

* feat: Integrate @tanstack/react-query and enhance fruits API in apps-sdk template

- Added @tanstack/react-query as a dependency to improve data fetching capabilities.
- Implemented a new API endpoint in the apps-sdk template to serve a list of fruits with their respective colors.
- Removed the outdated ProductSearchResult component to streamline the codebase and focus on the new API integration.

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

* refactor: Clean up code formatting and improve readability in product search result components

- Removed unnecessary blank lines in various TypeScript files to enhance code clarity.
- Simplified function parameters in CarouselItem component for better readability.
- Streamlined the Accordion and AccordionItem components by removing excess whitespace.

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

* feat: Integrate JsonRpcLoggerView into PromptsTab, ResourcesTab, and ToolsTab for enhanced logging

- Added JsonRpcLoggerView component to PromptsTab, ResourcesTab, and ToolsTab to facilitate RPC logging.
- Adjusted ResizablePanel default sizes for better layout consistency across tabs.
- Implemented keyboard shortcut handling in ToolExecutionPanel for executing tools with Cmd/Ctrl + Enter.

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

* format

* chore: changeset

* docs: add rpc docs

* chore: Remove bun.lock file and clean up pnpm-lock.yaml

- Deleted the bun.lock file to streamline dependency management and eliminate potential conflicts.
- Removed outdated dependencies from pnpm-lock.yaml, including entries for test_app and its associated packages, to simplify the lockfile and improve clarity.

---------

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

* chore(typescript): version packages (canary)

* docs: update API documentation

* docs: api update docs

* trigger release

* chore: Clean up pnpm-lock.yaml and remove bun.lock file for streamlined dependency management

* chore(typescript): version packages (canary)

* chore(inspector): update package.json with homepage, repository, and bugs information

---------

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>
2025-11-24 20:59:22 +01:00
Pietro Zullo fe27691947 feature: mcp 116 when the mcp use tries to call a tool with a wrong action (#520)
* fix typing annotation

* tool retry logic in agent

* removed retryable flag

* docs

* update docs
2025-11-24 17:56:23 +01:00
Enrico Toniato 33e4a6860e Canary (#496)
* chore: enter canary prerelease mode

* Feature/mcp 709 fix mobile view on inspector (#494)

* refactor: enhance UI responsiveness and layout across components

* fix format

* chore(typescript): version packages (canary)

* Fix/remove debugger from pip (#495)

* fix: update console visibility condition in OpenAIComponentRenderer

- Modified the condition for displaying the console to exclude the "pip" display mode, ensuring the console only appears in appropriate contexts.

* refactor: improve console visibility condition in OpenAIComponentRenderer

- Cleaned up the conditional rendering for the console to enhance readability while maintaining the same functionality. The console will only display in appropriate contexts based on the current display mode and origin.

* chore(typescript): version packages (canary)

* feat: docker file version

* feat: sync inspector to landing repo

* fix: exclude .git directory from rsync in sync-inspector workflow

* fix: update MIRROR_TOKEN in sync-inspector workflow to use INSPECTOR_MIRROR_TOKEN

* add icon to inspector

* refactor: simplify favicon service list in ServerIcon component

* fix: improve file filtering and prompt behavior in CLI commands (#499)

* chore(typescript): version packages (canary)

* Fix missing dev dependencies for mcp use app (#502)

* Feat/python/pretty display (#497)

* pretty display implementation

* docs update

* fix recusion limit configuration override in mcpagent (#500)

* feat: Add Vite and Tailwind CSS to app templates

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

* Update package.json

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

* Update package.json

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

* Update package.json

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

* Update index.ts

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

* Update index.ts

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

* Update package.json

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

* Add dev deps

---------

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: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: tonxipad <tonxipad@gmail.com>

* chore(typescript): version packages (canary)

* feat: introduce Code Mode with integration tests (#504)

- Add Code Mode functionality with code execution support
- Implement E2B and VM executors
- Add integration tests for stream events and code mode
- Update documentation and examples
- Add changeset for version tracking

* chore(typescript): version packages (canary)

* fix links

* fix: correct Markdown formatting for code display in pretty print function

---------

Signed-off-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Pietro Zullo <62951181+pietrozullo@users.noreply.github.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: tonxipad <tonxipad@gmail.com>
2025-11-21 12:07:28 +01:00
pietrozullo d010e2c58e release docs 2025-11-20 16:40:25 +01:00
Pietro Zullo 8d4cb4719b Feature/mcp 799 python client integration of code mode (#498)
* initial commit

* update to code mode

* Squash all commits: Add CLI deploy functionality, server tool inspector, and various improvements (#467)

* chore(release): exit prerelease mode and version packages (#473)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Docs/tunnel docs (#474)

* chore: add tunnelling docs

* chore: add tunnelling docs

* docs: enhance tunneling documentation with link to @mcp-use/tunnel package

* docs: update tunneling documentation with improved code examples and formatting

* feat: Add verify parameter to MCPClient and connectors (#478)

* feat: add verify parameter to MCPClient and connectors

- Introduced a new optional `verify` parameter in `MCPClient`, `HttpConnector`, and configuration functions to control SSL certificate verification.
- Updated relevant methods to utilize the `verify` parameter, ensuring consistent handling of SSL verification across the client and connectors.
- Enhanced the SSE and Streamable HTTP connection managers to accept a custom HTTPX client factory for improved flexibility in connection handling.

* fix: linting and docs

* fix: http connector test

* Update docs/python/api-reference/mcp_use_client_config.mdx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Pietro Zullo <62951181+pietrozullo@users.noreply.github.com>

* fix: docs

---------

Signed-off-by: Pietro Zullo <62951181+pietrozullo@users.noreply.github.com>
Co-authored-by: Pietro Zullo <62951181+pietrozullo@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Canary release (#476)

* Implement iframe log console for inspector (#475)

* Docs/tunnel docs (#474)

* chore: add tunnelling docs

* chore: add tunnelling docs

* docs: enhance tunneling documentation with link to @mcp-use/tunnel package

* docs: update tunneling documentation with improved code examples and formatting

* feat: Add iframe console logging and UI

Implement a system to capture and display console logs from iframes. This includes injecting a script into iframes to intercept console messages and a UI component to display them in the parent window.

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

* feat: Conditionally inject console interceptor for same-origin iframes

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

* refactor: update IframeConsole component for improved UI and styling

- Removed unused XIcon import.
- Adjusted LogLevelBadge styling for better visual consistency.
- Renamed "Iframe Console" to "Widget Console Logs" for clarity.
- Modified button styling for better alignment and spacing.

* feat: add HTMLIFrameElement and MessageEvent to ESLint config

- Updated ESLint configuration to include HTMLIFrameElement and MessageEvent as readonly types, enhancing type safety for iframe-related code.

* feat: implement auto-scroll functionality in IframeConsole component

- Added useRef and useEffect hooks to enable auto-scrolling to the bottom of the console when logs change or the console opens.
- Updated the console's container div to use the scrollContainerRef for managing scroll position.

* chore: lint & format

* chore: changeset

---------

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

* chore: enter canary prerelease mode

* chore(typescript): version packages (canary)

* Feat/consistent sub for tunnel (#480)

* Docs/tunnel docs (#474)

* chore: add tunnelling docs

* chore: add tunnelling docs

* docs: enhance tunneling documentation with link to @mcp-use/tunnel package

* docs: update tunneling documentation with improved code examples and formatting

* Refactor CLI tunnel functionality to support optional subdomain and save to manifest

- Updated `startTunnel` function to accept an optional subdomain parameter.
- Enhanced subdomain extraction from the tunnel URL and updated the manifest file with the subdomain.
- Cleaned up commented-out code related to tunnel handling in the CLI.
- Improved logging for tunnel establishment and subdomain saving.

* chore: changeset

* format

* chore(typescript): version packages (canary)

* Refactor tunnel argument handling in CLI to streamline subdomain flag usage and improve logging

* remove console log

* [typescript][server] Fix tools with async calls (#481)

* fix tools with async calls

* FORMAT

* chore(typescript): version packages (canary)

* fix/minor fix post canary (#482)

* fix server async call

* wrap all handle request calls in wait function

* changeset

* chore(typescript): version packages (canary)

* window.openai emulation and ChatGPT Integration debugging (#469)

* feat: Add WidgetFullscreenWrapper component

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

* Docs/tunnel docs (#474)

* chore: add tunnelling docs

* chore: add tunnelling docs

* docs: enhance tunneling documentation with link to @mcp-use/tunnel package

* docs: update tunneling documentation with improved code examples and formatting

* feat: Enhance OpenAIComponentRenderer with tool call handling and display mode management

- Implemented tool call handling with error management and response formatting for OpenAI API compatibility.
- Added support for follow-up messages and localStorage fallback for pending follow-ups.
- Introduced display mode management (inline, pip, fullscreen) with dynamic iframe resizing and a close button for fullscreen mode.
- Updated TypeScript configuration to include .tsx files for better component support.

* fix: maintain subdomain across builds

* remove console

* refactor: replace direct serverBaseUrl usage with getServerBaseUrl method for improved consistency

* refactor: enhance WidgetFullscreenWrapper with hoverable icon buttons for fullscreen and pip modes

* feat: implement dev widget proxy and asset handling for improved development experience

* refactor: update OpenAIComponentRenderer to handle global updates for display mode and theme, enhancing iframe communication

* feat: add WidgetDebugger export to enhance debugging capabilities in the React package

* chore: fix type

* format

* chore: changeset

* remove irrelevant content

* chore: add changeset for MCP-747-fix-apps-sdk-fullscreen-close-button-9e35

* refactor: improve tunnel shutdown handling and output suppression for better user experience

* format

* remove console log

---------

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

* chore(typescript): version packages (canary)

* Fix/settings button servers dropdown (#485)

* feat: Add server connection management in Layout and ServerDropdown components

- Introduced ServerConnectionModal for editing connection settings in the Layout component.
- Updated ServerDropdown to handle connection options and display selected server status.
- Enhanced MCPConnection interface to include transportType and proxyConfig for better connection management.
- Implemented connection update logic with success notifications.

* add gear also to home

* chore: changeset and format

* chore(typescript): version packages (canary)

* feat: Enhance ConnectionSettingsForm layout and add utility styles (#486)

- Updated ConnectionSettingsForm component to improve layout responsiveness with new utility classes.
- Added a new CSS utility for flex column and row layout.
- Cleaned up imports for better organization.

* chore(typescript): version packages (canary)

* Update libraries/typescript/packages/cli/CHANGELOG.md

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

* Update libraries/typescript/packages/cli/src/index.ts

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

* Update libraries/typescript/packages/cli/src/index.ts

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

* Update libraries/typescript/.changeset/clear-wombats-juggle.md

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

* Feature/mcp 743 tool argument autoformats and moves the cursor (#487)

* refactor(ToolsTab, ToolInputForm): enhance JSON handling for object/array types

- Updated ToolsTab to initialize object and array types as empty JSON strings to preserve formatting.
- Improved argument parsing in ToolsTab to handle JSON strings for object/array types before tool execution.
- Modified ToolInputForm to display objects/arrays as formatted JSON strings, ensuring user input is preserved.

* chore: changeset

* chore(typescript): version packages (canary)

* Fix/remove console button from chat (#488)

* remove mcp url console log

* feat(OpenAIComponentRenderer): add showConsole prop to control console visibility

* Feature/mcp 837 load list of models for providers (#489)

* remove mcp url console log

* Enhance ConfigurationDialog with model fetching and caching

- Added functionality to fetch models from OpenAI, Anthropic, and Google APIs based on the selected provider.
- Implemented caching for fetched models using localStorage to improve performance and reduce API calls.
- Updated the UI to display loading states and errors when fetching models.
- Refactored API key handling to support provider-specific storage in localStorage.
- Improved user experience by debouncing API calls and dynamically updating the model selection based on the provider.

* fix: reorder imports in useConfig.ts for better clarity

* chore(typescript): version packages (canary)

---------

Signed-off-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: tonxipad <tonxipad@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Pietro Zullo <62951181+pietrozullo@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* chore(release): exit prerelease mode and version packages (#490)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Update Dockerfile

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

* fix: x icon light mode

* docs: Improve typescript server docs (#491)

* fix: update installation commands and enhance quickstart documentation

- Changed `pnpm run dev` to `pnpm dev` in installation instructions across multiple files for consistency.
- Improved the quickstart guide by clarifying the MCP server framework's capabilities and updating the project structure details.
- Added a base URL configuration for the MCP server in the configuration documentation to ensure proper functionality of UI widgets.

* minor

* add fallback

---------

Signed-off-by: Luigi Pederzani <luigipederzani@gmail.com>

* Docs/inspector (#492)

* refactor: reorganize documentation structure for Inspector and Dev Tools

- Updated the docs.json file to consolidate Inspector and Tunneling pages under a new "Dev Tools" group.
- Removed redundant entries for Inspector and Tunneling from the documentation structure.
- Added a sidebar title for the Inspector page to enhance navigation.

* docs: enhance Inspector documentation and add new CLI usage guides

- Updated `docs.json` to include new pages for CLI usage, connection settings, keyboard shortcuts, command palette, integration, debugging ChatGPT apps, and development under the Inspector section.
- Expanded the Inspector documentation to cover new features, including CLI usage and detailed guides for keyboard shortcuts and integration.
- Improved the `self-hosting` documentation to reference the new CLI usage guide.
- Enhanced the `apps-sdk-resources` documentation with additional details on widget state and testing procedures using the Inspector.

* fix broken links

* chore: remove unuseful docs

* Feat/python/pretty display (#497)

* pretty display implementation

* docs update

* initial commit

* docs

* fix tests

* example streams and uses anthropic

* docs

* docs image

* fix type checking mock

* add rich to requirements

* enable pretty pritns in all examples

---------

Signed-off-by: Pietro Zullo <62951181+pietrozullo@users.noreply.github.com>
Signed-off-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com>
Signed-off-by: Luigi Pederzani <luigipederzani@gmail.com>
Co-authored-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Vincenzo Reina <vincenzoreinaa05@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: tonxipad <tonxipad@gmail.com>
Co-authored-by: Luigi Pederzani <luigipederzani@gmail.com>
2025-11-20 16:26:23 +01:00
Pietro Zullo bcbca53709 Feat/python/pretty display (#497)
* pretty display implementation

* docs update
2025-11-20 11:04:01 +01:00
Enrico Toniato a145cc7884 Docs/inspector (#492)
* refactor: reorganize documentation structure for Inspector and Dev Tools

- Updated the docs.json file to consolidate Inspector and Tunneling pages under a new "Dev Tools" group.
- Removed redundant entries for Inspector and Tunneling from the documentation structure.
- Added a sidebar title for the Inspector page to enhance navigation.

* docs: enhance Inspector documentation and add new CLI usage guides

- Updated `docs.json` to include new pages for CLI usage, connection settings, keyboard shortcuts, command palette, integration, debugging ChatGPT apps, and development under the Inspector section.
- Expanded the Inspector documentation to cover new features, including CLI usage and detailed guides for keyboard shortcuts and integration.
- Improved the `self-hosting` documentation to reference the new CLI usage guide.
- Enhanced the `apps-sdk-resources` documentation with additional details on widget state and testing procedures using the Inspector.

* fix broken links
2025-11-19 19:22:35 +01:00
Enrico Toniato 40693294d0 fix: x icon light mode 2025-11-19 16:38:48 +01:00
Enrico Toniato a88455343e Docs/tunnel docs (#474)
* chore: add tunnelling docs

* chore: add tunnelling docs

* docs: enhance tunneling documentation with link to @mcp-use/tunnel package

* docs: update tunneling documentation with improved code examples and formatting
2025-11-17 14:27:39 +01:00
Enrico Toniato 835d367b8f Squash all commits: Add CLI deploy functionality, server tool inspector, and various improvements (#467) 2025-11-17 11:45:14 +01:00
Enrico Toniato 26e11624bd chore: Merge canary prerelease changes to main (#454)
* feat: Migrate to Hono framework for edge runtime support (#449)

* feat: migrate mcp-use to Hono framework and update dependencies

- Replaced Express with Hono for the MCP server implementation.
- Added support for Hono middleware and context handling.
- Updated package dependencies, including @hono/node-server and hono.
- Enhanced logging middleware to work with Hono context.
- Adjusted server startup logic to accommodate Deno and Node.js environments.
- Updated TypeScript configurations and example server code for compatibility.
- Introduced runtime-aware file system and path helpers for better cross-environment support.

* chore: update mcp-use version to 1.2.5-dev.4 and reorganize optional dependencies

- Bump mcp-use version to 1.2.5-dev.4.
- Move '@tailwindcss/vite', '@vitejs/plugin-react', and 'vite' to optionalDependencies in package.json.
- Adjust imports in mcp-server.ts to use dynamic imports for optional dev dependencies.
- Add new getHandler method to McpServer class for better integration with external server frameworks.

* docs: add deployment guides for Supabase to README files

- Introduced a new section on deploying to Supabase Edge Functions in the main README and individual template READMEs (Starter, Apps SDK, MCP-UI).
- Each guide includes links to `DEPLOY_SUPABASE.md` for detailed deployment instructions covering production builds, entry point conversion, and troubleshooting.

* feat: add Connect and node-mocks-http as optional dependencies in mcp-use

- Introduced 'connect' and 'node-mocks-http' as optional dependencies in package.json.
- Updated tsup.config.ts to keep Connect middleware dependencies external.
- Refactored mcp-server.ts to utilize adaptConnectMiddleware for improved integration with Connect.
- Enhanced the pnpm-lock.yaml to reflect the new dependencies and their versions.

* fix: enhance request logging to prevent body stream consumption

- Updated the requestLogger function to clone the request before reading the body, ensuring that the original body stream remains available for subsequent handlers.
- This change specifically addresses POST requests to the /mcp endpoint, improving middleware compatibility.

* feat: enhance middleware adaptation for Hono framework

- Introduced utility functions to detect and adapt Express/Connect middleware for compatibility with Hono.
- Implemented `isExpressMiddleware` to identify middleware types based on parameter count and usage patterns.
- Added `adaptMiddleware` to automatically adapt middleware to Hono, ensuring seamless integration.
- Updated `McpServer` to handle Express middleware in the `use` method, allowing for dynamic adaptation during runtime.

* version will be changed by changeset

* refactor: remove outdated Supabase deployment guides and examples

- Deleted `DEPLOY_SUPABASE.md` files from various templates and the main project directory to streamline documentation.
- Updated README files to link to the new centralized Supabase deployment documentation.
- Removed example Supabase Edge Function code and related test scripts to reduce redundancy and improve clarity.

* feat: add deployment section for Supabase in documentation

- Introduced a new "Deployment" group in the documentation structure, linking to the `typescript/server/deployment-supabase` page.
- Updated the Supabase deployment guide in `deployment-supabase.mdx` to reflect changes in client usage and session management for both browser and Node.js environments.
- Removed outdated configuration examples to streamline the documentation and improve clarity.

* feat: enhance Supabase deployment documentation for MCP widgets

- Added a comprehensive guide for deploying MCP widgets with Supabase, detailing the bundling of widget HTML, hosting assets on Supabase Storage, and registering widgets using the Apps SDK format.
- Included step-by-step instructions for creating a public storage bucket, building widgets with the correct base URL, and configuring the Supabase function for static file bundling.
- Emphasized the hybrid approach for optimal performance and reliability, along with key points for successful widget deployment.

* feat: update MCP server documentation and code for automatic widget registration

- Revised the documentation for deploying MCP widgets with Supabase, emphasizing automatic registration and simplified configuration.
- Updated the MCP server code to support automatic UI widget registration from the bundled dist folder, enhancing usability and reducing manual setup.
- Improved CORS handling and clarified deployment steps, ensuring a smoother experience for users integrating with Supabase Edge Functions.

* warning

* docs: update Supabase deployment guide for MCP server

- Revised the deployment documentation for the MCP server on Supabase Edge Functions, clarifying prerequisites and setup steps.
- Enhanced instructions for adapting the MCP server to Deno, including automatic widget registration and CORS handling.
- Added details on serving widget assets from Supabase Storage and updated deployment commands to reflect best practices.
- Streamlined the guide for local development and deployment processes, ensuring a smoother user experience.

* chore: remove outdated changeset for mcp-use migration to Hono framework

- Deleted the changeset file documenting the migration of the mcp-use server from Express to Hono framework, which included runtime detection for Deno/Node.js, middleware adaptation, and updated dependencies.
- This cleanup reflects the completion of the migration process and the integration of edge runtime support.

* fix: update McpServer to handle async middleware adaptation

- Modified the `use` method in `McpServer` to return an async function, ensuring that middleware adaptation is awaited before proceeding.
- Enhanced error handling by removing the catch block, allowing for better management of middleware adaptation failures.
- This change improves the reliability of middleware registration in the Hono framework.

* docs: remove Supabase deployment sections from various README files

- Deleted the "Deploy to Supabase" sections from the README files in the create-mcp-use-app templates to streamline documentation.
- This change reflects the recent updates to the centralized Supabase deployment guide, ensuring consistency across documentation.

* docs: enhance Supabase deployment guide with complete example

- Added a note in the Supabase deployment documentation, providing a link to a complete working example in the repository.
- This addition aims to improve user experience by offering a practical reference for deploying the MCP server with Supabase.

* docs: enhance Supabase deployment guide with automated script and detailed instructions

- Added a new "Quick Deployment" section to the Supabase deployment documentation, introducing an automated script for deploying the MCP server in one command.
- Included detailed steps for using the script, prerequisites, and what the script accomplishes to improve user experience.
- Updated the README in the Supabase example to reflect the new deployment process and provide clear usage instructions.
- Streamlined the MCP server code to simplify the server startup process and improve CORS handling.

* feat: enhance MCP connection handling with server info and capabilities

- Added `serverInfo` and `capabilities` properties to the `MCPConnection` interface, allowing for better tracking of server details.
- Updated `McpConnectionWrapper` to utilize server-provided names and store server info in local storage when connections are established.
- Enhanced `useAutoConnect` to parse connection configurations from query parameters, supporting both URL strings and full config objects.
- Implemented caching of server info and capabilities in the `BaseConnector` class, improving data accessibility for connected components.
- Updated `useMcp` hook to manage and expose server info and capabilities, enhancing the overall user experience with detailed connection feedback.

* changeset

* fix docs

* format

* chore: enter canary prerelease mode

* chore(typescript): version packages (canary)

* Fix create mcp use app canary (#450)

* feat: migrate mcp-use to Hono framework and update dependencies

- Replaced Express with Hono for the MCP server implementation.
- Added support for Hono middleware and context handling.
- Updated package dependencies, including @hono/node-server and hono.
- Enhanced logging middleware to work with Hono context.
- Adjusted server startup logic to accommodate Deno and Node.js environments.
- Updated TypeScript configurations and example server code for compatibility.
- Introduced runtime-aware file system and path helpers for better cross-environment support.

* chore: update mcp-use version to 1.2.5-dev.4 and reorganize optional dependencies

- Bump mcp-use version to 1.2.5-dev.4.
- Move '@tailwindcss/vite', '@vitejs/plugin-react', and 'vite' to optionalDependencies in package.json.
- Adjust imports in mcp-server.ts to use dynamic imports for optional dev dependencies.
- Add new getHandler method to McpServer class for better integration with external server frameworks.

* docs: add deployment guides for Supabase to README files

- Introduced a new section on deploying to Supabase Edge Functions in the main README and individual template READMEs (Starter, Apps SDK, MCP-UI).
- Each guide includes links to `DEPLOY_SUPABASE.md` for detailed deployment instructions covering production builds, entry point conversion, and troubleshooting.

* feat: add Connect and node-mocks-http as optional dependencies in mcp-use

- Introduced 'connect' and 'node-mocks-http' as optional dependencies in package.json.
- Updated tsup.config.ts to keep Connect middleware dependencies external.
- Refactored mcp-server.ts to utilize adaptConnectMiddleware for improved integration with Connect.
- Enhanced the pnpm-lock.yaml to reflect the new dependencies and their versions.

* fix: enhance request logging to prevent body stream consumption

- Updated the requestLogger function to clone the request before reading the body, ensuring that the original body stream remains available for subsequent handlers.
- This change specifically addresses POST requests to the /mcp endpoint, improving middleware compatibility.

* feat: enhance middleware adaptation for Hono framework

- Introduced utility functions to detect and adapt Express/Connect middleware for compatibility with Hono.
- Implemented `isExpressMiddleware` to identify middleware types based on parameter count and usage patterns.
- Added `adaptMiddleware` to automatically adapt middleware to Hono, ensuring seamless integration.
- Updated `McpServer` to handle Express middleware in the `use` method, allowing for dynamic adaptation during runtime.

* version will be changed by changeset

* refactor: remove outdated Supabase deployment guides and examples

- Deleted `DEPLOY_SUPABASE.md` files from various templates and the main project directory to streamline documentation.
- Updated README files to link to the new centralized Supabase deployment documentation.
- Removed example Supabase Edge Function code and related test scripts to reduce redundancy and improve clarity.

* feat: add deployment section for Supabase in documentation

- Introduced a new "Deployment" group in the documentation structure, linking to the `typescript/server/deployment-supabase` page.
- Updated the Supabase deployment guide in `deployment-supabase.mdx` to reflect changes in client usage and session management for both browser and Node.js environments.
- Removed outdated configuration examples to streamline the documentation and improve clarity.

* feat: enhance Supabase deployment documentation for MCP widgets

- Added a comprehensive guide for deploying MCP widgets with Supabase, detailing the bundling of widget HTML, hosting assets on Supabase Storage, and registering widgets using the Apps SDK format.
- Included step-by-step instructions for creating a public storage bucket, building widgets with the correct base URL, and configuring the Supabase function for static file bundling.
- Emphasized the hybrid approach for optimal performance and reliability, along with key points for successful widget deployment.

* feat: update MCP server documentation and code for automatic widget registration

- Revised the documentation for deploying MCP widgets with Supabase, emphasizing automatic registration and simplified configuration.
- Updated the MCP server code to support automatic UI widget registration from the bundled dist folder, enhancing usability and reducing manual setup.
- Improved CORS handling and clarified deployment steps, ensuring a smoother experience for users integrating with Supabase Edge Functions.

* warning

* docs: update Supabase deployment guide for MCP server

- Revised the deployment documentation for the MCP server on Supabase Edge Functions, clarifying prerequisites and setup steps.
- Enhanced instructions for adapting the MCP server to Deno, including automatic widget registration and CORS handling.
- Added details on serving widget assets from Supabase Storage and updated deployment commands to reflect best practices.
- Streamlined the guide for local development and deployment processes, ensuring a smoother user experience.

* chore: remove outdated changeset for mcp-use migration to Hono framework

- Deleted the changeset file documenting the migration of the mcp-use server from Express to Hono framework, which included runtime detection for Deno/Node.js, middleware adaptation, and updated dependencies.
- This cleanup reflects the completion of the migration process and the integration of edge runtime support.

* fix: update McpServer to handle async middleware adaptation

- Modified the `use` method in `McpServer` to return an async function, ensuring that middleware adaptation is awaited before proceeding.
- Enhanced error handling by removing the catch block, allowing for better management of middleware adaptation failures.
- This change improves the reliability of middleware registration in the Hono framework.

* docs: remove Supabase deployment sections from various README files

- Deleted the "Deploy to Supabase" sections from the README files in the create-mcp-use-app templates to streamline documentation.
- This change reflects the recent updates to the centralized Supabase deployment guide, ensuring consistency across documentation.

* docs: enhance Supabase deployment guide with complete example

- Added a note in the Supabase deployment documentation, providing a link to a complete working example in the repository.
- This addition aims to improve user experience by offering a practical reference for deploying the MCP server with Supabase.

* docs: enhance Supabase deployment guide with automated script and detailed instructions

- Added a new "Quick Deployment" section to the Supabase deployment documentation, introducing an automated script for deploying the MCP server in one command.
- Included detailed steps for using the script, prerequisites, and what the script accomplishes to improve user experience.
- Updated the README in the Supabase example to reflect the new deployment process and provide clear usage instructions.
- Streamlined the MCP server code to simplify the server startup process and improve CORS handling.

* feat: enhance MCP connection handling with server info and capabilities

- Added `serverInfo` and `capabilities` properties to the `MCPConnection` interface, allowing for better tracking of server details.
- Updated `McpConnectionWrapper` to utilize server-provided names and store server info in local storage when connections are established.
- Enhanced `useAutoConnect` to parse connection configurations from query parameters, supporting both URL strings and full config objects.
- Implemented caching of server info and capabilities in the `BaseConnector` class, improving data accessibility for connected components.
- Updated `useMcp` hook to manage and expose server info and capabilities, enhancing the overall user experience with detailed connection feedback.

* changeset

* fix docs

* format

* fix: correct canary version replacement in create-mcp-use-app

- Updated the canary flag functionality to ensure proper replacement of package versions in published templates.
- Enhanced the logic to replace both `workspace:*` patterns and caret versions with "canary" versions for `mcp-use`, `@mcp-use/cli`, and `@mcp-use/inspector`.

* chore(typescript): version packages (canary)

* Fix server base url (#451)

* feat: migrate mcp-use to Hono framework and update dependencies

- Replaced Express with Hono for the MCP server implementation.
- Added support for Hono middleware and context handling.
- Updated package dependencies, including @hono/node-server and hono.
- Enhanced logging middleware to work with Hono context.
- Adjusted server startup logic to accommodate Deno and Node.js environments.
- Updated TypeScript configurations and example server code for compatibility.
- Introduced runtime-aware file system and path helpers for better cross-environment support.

* chore: update mcp-use version to 1.2.5-dev.4 and reorganize optional dependencies

- Bump mcp-use version to 1.2.5-dev.4.
- Move '@tailwindcss/vite', '@vitejs/plugin-react', and 'vite' to optionalDependencies in package.json.
- Adjust imports in mcp-server.ts to use dynamic imports for optional dev dependencies.
- Add new getHandler method to McpServer class for better integration with external server frameworks.

* docs: add deployment guides for Supabase to README files

- Introduced a new section on deploying to Supabase Edge Functions in the main README and individual template READMEs (Starter, Apps SDK, MCP-UI).
- Each guide includes links to `DEPLOY_SUPABASE.md` for detailed deployment instructions covering production builds, entry point conversion, and troubleshooting.

* feat: add Connect and node-mocks-http as optional dependencies in mcp-use

- Introduced 'connect' and 'node-mocks-http' as optional dependencies in package.json.
- Updated tsup.config.ts to keep Connect middleware dependencies external.
- Refactored mcp-server.ts to utilize adaptConnectMiddleware for improved integration with Connect.
- Enhanced the pnpm-lock.yaml to reflect the new dependencies and their versions.

* fix: enhance request logging to prevent body stream consumption

- Updated the requestLogger function to clone the request before reading the body, ensuring that the original body stream remains available for subsequent handlers.
- This change specifically addresses POST requests to the /mcp endpoint, improving middleware compatibility.

* feat: enhance middleware adaptation for Hono framework

- Introduced utility functions to detect and adapt Express/Connect middleware for compatibility with Hono.
- Implemented `isExpressMiddleware` to identify middleware types based on parameter count and usage patterns.
- Added `adaptMiddleware` to automatically adapt middleware to Hono, ensuring seamless integration.
- Updated `McpServer` to handle Express middleware in the `use` method, allowing for dynamic adaptation during runtime.

* version will be changed by changeset

* refactor: remove outdated Supabase deployment guides and examples

- Deleted `DEPLOY_SUPABASE.md` files from various templates and the main project directory to streamline documentation.
- Updated README files to link to the new centralized Supabase deployment documentation.
- Removed example Supabase Edge Function code and related test scripts to reduce redundancy and improve clarity.

* feat: add deployment section for Supabase in documentation

- Introduced a new "Deployment" group in the documentation structure, linking to the `typescript/server/deployment-supabase` page.
- Updated the Supabase deployment guide in `deployment-supabase.mdx` to reflect changes in client usage and session management for both browser and Node.js environments.
- Removed outdated configuration examples to streamline the documentation and improve clarity.

* feat: enhance Supabase deployment documentation for MCP widgets

- Added a comprehensive guide for deploying MCP widgets with Supabase, detailing the bundling of widget HTML, hosting assets on Supabase Storage, and registering widgets using the Apps SDK format.
- Included step-by-step instructions for creating a public storage bucket, building widgets with the correct base URL, and configuring the Supabase function for static file bundling.
- Emphasized the hybrid approach for optimal performance and reliability, along with key points for successful widget deployment.

* feat: update MCP server documentation and code for automatic widget registration

- Revised the documentation for deploying MCP widgets with Supabase, emphasizing automatic registration and simplified configuration.
- Updated the MCP server code to support automatic UI widget registration from the bundled dist folder, enhancing usability and reducing manual setup.
- Improved CORS handling and clarified deployment steps, ensuring a smoother experience for users integrating with Supabase Edge Functions.

* warning

* docs: update Supabase deployment guide for MCP server

- Revised the deployment documentation for the MCP server on Supabase Edge Functions, clarifying prerequisites and setup steps.
- Enhanced instructions for adapting the MCP server to Deno, including automatic widget registration and CORS handling.
- Added details on serving widget assets from Supabase Storage and updated deployment commands to reflect best practices.
- Streamlined the guide for local development and deployment processes, ensuring a smoother user experience.

* chore: remove outdated changeset for mcp-use migration to Hono framework

- Deleted the changeset file documenting the migration of the mcp-use server from Express to Hono framework, which included runtime detection for Deno/Node.js, middleware adaptation, and updated dependencies.
- This cleanup reflects the completion of the migration process and the integration of edge runtime support.

* fix: update McpServer to handle async middleware adaptation

- Modified the `use` method in `McpServer` to return an async function, ensuring that middleware adaptation is awaited before proceeding.
- Enhanced error handling by removing the catch block, allowing for better management of middleware adaptation failures.
- This change improves the reliability of middleware registration in the Hono framework.

* docs: remove Supabase deployment sections from various README files

- Deleted the "Deploy to Supabase" sections from the README files in the create-mcp-use-app templates to streamline documentation.
- This change reflects the recent updates to the centralized Supabase deployment guide, ensuring consistency across documentation.

* docs: enhance Supabase deployment guide with complete example

- Added a note in the Supabase deployment documentation, providing a link to a complete working example in the repository.
- This addition aims to improve user experience by offering a practical reference for deploying the MCP server with Supabase.

* docs: enhance Supabase deployment guide with automated script and detailed instructions

- Added a new "Quick Deployment" section to the Supabase deployment documentation, introducing an automated script for deploying the MCP server in one command.
- Included detailed steps for using the script, prerequisites, and what the script accomplishes to improve user experience.
- Updated the README in the Supabase example to reflect the new deployment process and provide clear usage instructions.
- Streamlined the MCP server code to simplify the server startup process and improve CORS handling.

* feat: enhance MCP connection handling with server info and capabilities

- Added `serverInfo` and `capabilities` properties to the `MCPConnection` interface, allowing for better tracking of server details.
- Updated `McpConnectionWrapper` to utilize server-provided names and store server info in local storage when connections are established.
- Enhanced `useAutoConnect` to parse connection configurations from query parameters, supporting both URL strings and full config objects.
- Implemented caching of server info and capabilities in the `BaseConnector` class, improving data accessibility for connected components.
- Updated `useMcp` hook to manage and expose server info and capabilities, enhancing the overall user experience with detailed connection feedback.

* changeset

* fix docs

* format

* fix: correct canary version replacement in create-mcp-use-app

- Updated the canary flag functionality to ensure proper replacement of package versions in published templates.
- Enhanced the logic to replace both `workspace:*` patterns and caret versions with "canary" versions for `mcp-use`, `@mcp-use/cli`, and `@mcp-use/inspector`.

* feat: add getServerBaseUrl method for improved server URL handling

- Introduced a new private method `getServerBaseUrl` to centralize the logic for constructing the server base URL with a fallback to host and port.
- Updated instances in the codebase to utilize this method, ensuring consistent URL generation for widget paths and script references.

* refactor: improve OpenAIComponentRenderer and ResourcesTab components

- Reorganized imports in OpenAIComponentRenderer for better readability.
- Enhanced CSP metadata extraction logic to check multiple sources for widget CSP.
- Updated URL handling for dev mode widgets, ensuring correct URL construction based on metadata.
- Added isCopied state to ResourcesTab for clipboard copy feedback.
- Improved ResourceResultDisplay to visually indicate copy status with a check icon.

* format

* chore(typescript): version packages (canary)

* fix: #446 (#453)

* fix: handle non-AIMessage instances in agent.run() output detection

Fixes #446 where agent.run() returned 'No output generated' even when
the agent produced valid output, due to messages not being AIMessage
instances after serialization/deserialization across module boundaries.

Changes:
- Add _isAIMessageLike() helper to detect assistant-like messages regardless of class
- Add _messageHasToolCalls() helper for safe tool_calls detection
- Support multiple message formats: type='ai', role='assistant', getType() methods
- Maintain 100% backwards compatibility with AIMessage instances

The fix handles version mismatches between @langchain/core packages and
different message formats across LangChain versions.

* refactor: enhance message type checks in MCPAgent

- Introduced new helper methods: _isHumanMessageLike() and _isToolMessageLike() to improve detection of message types.
- Updated _isAIMessageLike() to handle various message formats, ensuring compatibility with serialized objects.
- Added _getMessageContent() to extract content from both AIMessage instances and plain objects.
- Enhanced documentation for message handling methods with examples for clarity.

* refactor(tests): reorder imports in message_detection.test.ts

- Adjusted the order of imports for better readability and consistency.
- Ensured that the test file maintains clarity in its structure.

* format

---------

Co-authored-by: Salvatore KARRA <salvatore.karra@elca.ch>

* chore(typescript): version packages (canary)

* fix: improve message type detection and enhance compatibility

- Added new helper methods for detecting various message types, including _isHumanMessageLike() and _isToolMessageLike().
- Updated existing methods to ensure compatibility with different message formats and improve detection accuracy.
- Enhanced documentation for message handling methods to provide clearer examples and usage instructions.

* chore(typescript): version packages (canary)

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Salvatore KARRA <salvatore.karra@elca.ch>
2025-11-15 15:35:00 +01:00
Luigi Pederzani ceed51b3c3 chore(release): @mcp-use/inspector@0.4.11 + mcp-use@1.2.2 (#425)
* feat/use mcp uses mcp use (#411)

* feat(connectors): add OAuth provider support and capability-aware methods

- Add authProvider option to ConnectorInitOptions
- Thread authProvider through BrowserMCPClient → HttpConnector → SDK transport
- Add capabilitiesCache to BaseConnector for checking server capabilities
- Make listAllResources() and listPrompts() capability-aware
- Return empty arrays for unsupported features instead of throwing
- Preserve 401 errors in HttpConnector (don't wrap in generic message)
- Skip SSE fallback on 401 errors (both transports will fail)

This enables automatic OAuth with token refresh and Dynamic Client
Registration (DCR) when servers support it, while gracefully handling
servers that don't implement resources or prompts.

* feat(react): refactor useMcp to use BrowserMCPClient and accept LLM instances

BREAKING CHANGE: sendChatMessage now accepts LangChain model instance
instead of config object. Callers must create LLM instance themselves.

Before:
  mcp.sendChatMessage('hello', { provider: 'openai', model: 'gpt-4', apiKey: '...' })

After:
  const llm = new ChatOpenAI({ model: 'gpt-4', apiKey: '...' })
  mcp.sendChatMessage('hello', llm)

Changes:
- Replace official SDK Client with BrowserMCPClient for multi-server foundation
- Add sendChatMessage() method that creates MCPAgent with existing client
- Add clearChatHistory() method for conversation management
- Thread authProvider through to SDK transport for automatic OAuth
- Simplify 401 error handling (OAuth delegated to SDK)
- Add comprehensive JSDoc documentation to all methods
- Document all useEffect blocks with explanations
- Remove unused AUTH_QUICK_TIMEOUT constant
- Add missing listResources to return statement
- Change sendChatMessage parameter from config to BaseLanguageModelInterface

Benefits:
- Smaller bundle (~2KB reduction, LLM creation moved to caller)
- More flexible (supports any LangChain-compatible model)
- Shared connection across tools/resources/chat (87% faster)
- Conversation memory works (agent persists across messages)
- Better separation of concerns

* feat(inspector): integrate shared connection and LLM instance chat

- Update MCPConnection to use BaseLanguageModelInterface for sendChatMessage
- Move LLM creation from useMcp to useChatMessagesClientSide
- Support OpenAI, Anthropic, and Google models via dynamic imports
- Remove debug console.log statements
- Skip auto-switch for authentication errors (instant feedback)
- Chat now reuses existing MCP connection (no reconnection overhead)

Chat performance improvements:
- First message: ~900ms (down from 3.3s, 73% faster)
- Subsequent messages: <100ms (down from 3.3s, 97% faster)
- Conversation history preserved across messages

* docs: add technical blog posts on client architecture

- Add client-vs-sdk.mdx explaining multi-server value proposition
- Add client_side.mdx on client-side inspector architecture

Topics covered:
- Why mcp-use has its own client (multi-server orchestration)
- Session management and config file support
- OAuth integration and browser security model
- Client-side architecture benefits (privacy, performance, simplicity)
- AsyncLocalStorage for request context
- Real-world performance metrics

* fix(inspector): improve error messages in server-side chat

- Add detailed HTTP status codes to error messages
- Detect 401 errors and suggest checking Authorization header
- Better error context for debugging connection issues

* docs: add useMcp hook and blog posts to navigation

- Add typescript/client/usemcp to client documentation
- Add client_side and client-vs-sdk blog posts to navigation

* removed unused var

* nullable chat interface

* Update libraries/typescript/packages/mcp-use/src/react/useMcp.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Pietro Zullo <62951181+pietrozullo@users.noreply.github.com>

* refactor(react): extract maxSteps to constant and improve LLM comparison

- Extract DEFAULT_MAX_STEPS constant (10) to avoid magic number
- Add comment explaining LLM reference equality comparison
- Callers should use useMemo() to keep same LLM instance

* fix(agents): update langchain imports to use modular packages

- Change 'langchain' imports to '@langchain/core/messages' for message types
- Add @ts-ignore for legacy langchain imports pending full migration
- Fixes TypeScript compilation errors with langchain package

* fix(inspector): clean up placeholder methods and remove unused ref

- Use empty generator (yield* []) for disconnected sendChatMessage placeholder
- Remove unused toolsMetadataRef from useChatMessagesClientSide
- Keep sendChatMessage required (consistent with other methods)

* chore: update pnpm lockfile with test_app workspace

* revert: a9b697b HEAD@{3}: rebase (pick): fix(agents): update langchain imports to use modular packages

* posthog on docs

* updated action

* fix test scirpt

* agent tests moved into normal mcp-use test

* stub to make langchain1.0 compatible with the browser env

* fixed lockfile

* updated models to existing ones

* removed streamMessage from useMCP, moved it back to useClientSideMessage. Unfortunately langchain does not support browser environments anymore (not cleanly) so we cannot make the agent part of the browser side bundle, i.e. useMcp

* refactor: simplify readResource return values in BaseConnector and WebSocketConnector

Updated the readResource method in both BaseConnector and WebSocketConnector to return the full response object instead of a subset. Adjusted the useMcp hook to directly return the result from readResource, streamlining the data handling process.

* fix: when swtiching server the chat is refreshed

* fix app sdk ui rendering

* removed unused imports

* fix: improve server already running at port error message

---------

Signed-off-by: Pietro Zullo <62951181+pietrozullo@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Luigi Pederzani <luigipederzani@gmail.com>

* chore: enter canary prerelease mode

* feat: use mcp uses mcp use (#423)

* feat(connectors): add OAuth provider support and capability-aware methods

- Add authProvider option to ConnectorInitOptions
- Thread authProvider through BrowserMCPClient → HttpConnector → SDK transport
- Add capabilitiesCache to BaseConnector for checking server capabilities
- Make listAllResources() and listPrompts() capability-aware
- Return empty arrays for unsupported features instead of throwing
- Preserve 401 errors in HttpConnector (don't wrap in generic message)
- Skip SSE fallback on 401 errors (both transports will fail)

This enables automatic OAuth with token refresh and Dynamic Client
Registration (DCR) when servers support it, while gracefully handling
servers that don't implement resources or prompts.

* feat(react): refactor useMcp to use BrowserMCPClient and accept LLM instances

BREAKING CHANGE: sendChatMessage now accepts LangChain model instance
instead of config object. Callers must create LLM instance themselves.

Before:
  mcp.sendChatMessage('hello', { provider: 'openai', model: 'gpt-4', apiKey: '...' })

After:
  const llm = new ChatOpenAI({ model: 'gpt-4', apiKey: '...' })
  mcp.sendChatMessage('hello', llm)

Changes:
- Replace official SDK Client with BrowserMCPClient for multi-server foundation
- Add sendChatMessage() method that creates MCPAgent with existing client
- Add clearChatHistory() method for conversation management
- Thread authProvider through to SDK transport for automatic OAuth
- Simplify 401 error handling (OAuth delegated to SDK)
- Add comprehensive JSDoc documentation to all methods
- Document all useEffect blocks with explanations
- Remove unused AUTH_QUICK_TIMEOUT constant
- Add missing listResources to return statement
- Change sendChatMessage parameter from config to BaseLanguageModelInterface

Benefits:
- Smaller bundle (~2KB reduction, LLM creation moved to caller)
- More flexible (supports any LangChain-compatible model)
- Shared connection across tools/resources/chat (87% faster)
- Conversation memory works (agent persists across messages)
- Better separation of concerns

* feat(inspector): integrate shared connection and LLM instance chat

- Update MCPConnection to use BaseLanguageModelInterface for sendChatMessage
- Move LLM creation from useMcp to useChatMessagesClientSide
- Support OpenAI, Anthropic, and Google models via dynamic imports
- Remove debug console.log statements
- Skip auto-switch for authentication errors (instant feedback)
- Chat now reuses existing MCP connection (no reconnection overhead)

Chat performance improvements:
- First message: ~900ms (down from 3.3s, 73% faster)
- Subsequent messages: <100ms (down from 3.3s, 97% faster)
- Conversation history preserved across messages

* docs: add technical blog posts on client architecture

- Add client-vs-sdk.mdx explaining multi-server value proposition
- Add client_side.mdx on client-side inspector architecture

Topics covered:
- Why mcp-use has its own client (multi-server orchestration)
- Session management and config file support
- OAuth integration and browser security model
- Client-side architecture benefits (privacy, performance, simplicity)
- AsyncLocalStorage for request context
- Real-world performance metrics

* fix(inspector): improve error messages in server-side chat

- Add detailed HTTP status codes to error messages
- Detect 401 errors and suggest checking Authorization header
- Better error context for debugging connection issues

* docs: add useMcp hook and blog posts to navigation

- Add typescript/client/usemcp to client documentation
- Add client_side and client-vs-sdk blog posts to navigation

* removed unused var

* nullable chat interface

* Update libraries/typescript/packages/mcp-use/src/react/useMcp.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Pietro Zullo <62951181+pietrozullo@users.noreply.github.com>

* refactor(react): extract maxSteps to constant and improve LLM comparison

- Extract DEFAULT_MAX_STEPS constant (10) to avoid magic number
- Add comment explaining LLM reference equality comparison
- Callers should use useMemo() to keep same LLM instance

* fix(agents): update langchain imports to use modular packages

- Change 'langchain' imports to '@langchain/core/messages' for message types
- Add @ts-ignore for legacy langchain imports pending full migration
- Fixes TypeScript compilation errors with langchain package

* fix(inspector): clean up placeholder methods and remove unused ref

- Use empty generator (yield* []) for disconnected sendChatMessage placeholder
- Remove unused toolsMetadataRef from useChatMessagesClientSide
- Keep sendChatMessage required (consistent with other methods)

* chore: update pnpm lockfile with test_app workspace

* revert: a9b697b HEAD@{3}: rebase (pick): fix(agents): update langchain imports to use modular packages

* posthog on docs

* updated action

* fix test scirpt

* agent tests moved into normal mcp-use test

* stub to make langchain1.0 compatible with the browser env

* fixed lockfile

* updated models to existing ones

* removed streamMessage from useMCP, moved it back to useClientSideMessage. Unfortunately langchain does not support browser environments anymore (not cleanly) so we cannot make the agent part of the browser side bundle, i.e. useMcp

* refactor: simplify readResource return values in BaseConnector and WebSocketConnector

Updated the readResource method in both BaseConnector and WebSocketConnector to return the full response object instead of a subset. Adjusted the useMcp hook to directly return the result from readResource, streamlining the data handling process.

* fix: when swtiching server the chat is refreshed

* fix app sdk ui rendering

* removed unused imports

* fix: improve server already running at port error message

* changeset

---------

Signed-off-by: Pietro Zullo <62951181+pietrozullo@users.noreply.github.com>
Co-authored-by: pietrozullo <pietro.zullo@gmail.com>
Co-authored-by: Pietro Zullo <62951181+pietrozullo@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* chore(typescript): version packages (canary)

* chore: Prettier format + lint (#424)

* chore: enhance CI workflow with formatting check and update Prettier configuration

- Added a formatting check step to the CI workflow using `pnpm format:check`.
- Updated `.prettierignore` to include additional build output directories and markdown files.
- Modified `.prettierrc.json` to enforce semicolons.
- Integrated `eslint-config-prettier` into ESLint configuration to prevent conflicts with Prettier.
- Added `prettier` as a dependency in `package.json` and updated the lockfile.
- Removed obsolete ESLint configuration file for the inspector package.

* chore: run format

* changeset

* minor

* chore: configure prettier to exclude JSON files

* fix: "typescript/create-app-tests"
- Specified the shell type for the Test CLI Creation step to ensure consistent execution environment.

* chore(typescript): version packages (canary)

---------

Signed-off-by: Pietro Zullo <62951181+pietrozullo@users.noreply.github.com>
Co-authored-by: Pietro Zullo <62951181+pietrozullo@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: pietrozullo <pietro.zullo@gmail.com>
2025-11-04 12:53:40 +01:00
Vincenzo Reina 054084eedb Add langchain integration (#413) 2025-11-01 10:18:35 +01:00
Pietro Zullo dcfbe90d31 release/python/1.4.0 (#394)
* chore: update imports

* refactor(mcpagent): update agent creation logic and imports

- Replaced `create_tool_calling_agent` with `create_agent` for improved agent instantiation.
- Simplified the `_create_agent` method by removing the `AgentExecutor` and directly returning the created agent.
- Adjusted type annotations for `_agent_executor` to initialize as `None` instead of using a union type.

* feat(mcpagent): migrate to LangChain 1.0.0 and simplify agent methods

- Updated MCPAgent to utilize LangChain 1.0.0's `create_agent()` for improved agent instantiation.
- Introduced new methods `astream_simplified()` and `run_v2()` that leverage the built-in `astream()` for internal agent loop handling.
- Retained legacy methods `stream()` and `run()` for backward compatibility with manual execution.
- Enhanced documentation to reflect changes and provide clearer usage examples.

* feat(mcpagent): implement dynamic tool updates during agent execution

- Enhanced the MCPAgent to support dynamic tool updates when using server_manager mode.
- Implemented logic to check for tool changes before and during execution, allowing for immediate updates and safe restarts.
- Introduced a maximum restart limit to prevent infinite loops during tool updates.
- Updated documentation to reflect the new behavior and usage of dynamic tool management.

* refactor(mcpagent): clean up imports and streamline logging

- Removed unused imports and organized existing ones for better clarity in `mcpagent.py`.
- Simplified logging statements for consistency and improved readability.
- Enhanced the overall structure of the code by eliminating unnecessary whitespace.
- Updated unit tests to reflect changes in imports and ensure compatibility with the refactored code.

* feat(mcpagent): enhance agent execution with step tracking and middleware

- Introduced `ModelCallLimitMiddleware` to enforce a maximum number of model calls during agent execution.
- Updated the `_consume_and_return` method to return a tuple of the final result and the number of steps taken.
- Enhanced telemetry tracking to include steps taken and execution time for better performance insights.
- Simplified agent creation logic by integrating middleware directly into the `create_agent` function.
- Improved logging for agent execution details, including steps and tool usage.

* fix(mcpagent): add null check for node output messages extraction

- Updated the MCPAgent to include a null check for `node_output` before attempting to access the "messages" key, preventing potential errors during message extraction.

* minor

* feat(mcpagent): filter out ToolMessage from history

- Updated the MCPAgent to exclude ToolMessage instances from being added to the message history, ensuring that only relevant messages are recorded.
- This change helps maintain a cleaner history by avoiding intermediate tool execution details.

* fix(mcpagent): set max_steps assignment

* ruff

* docs

* e2e tests for agent

* key in tests

* fix manager test and split ci tests

* telemetry off for tests

* fix server manager test

* feat(mcpagent): delegate query streaming to remote agent in remote mode

- recreated functionality to the MCPAgent to yield results from a remote agent when operating in remote mode, enhancing the agent's capability to handle queries efficiently.

* fix: agent unit tests

* Print inputs

* rollback, wrong repo

* fix streaming output

* stricter streaming test

* pass observability callbacks

* release notes

* update old release pages

* pyproject version bump

* if you do not want to migrate from langchain classic

* fix tests mock

* Canary Release (#391)

* feat(mcp-server): enhance widget metadata handling and resource domain configuration (#388)

* feat(mcp-server): enhance widget metadata handling and resource domain configuration

- Updated widget title handling to prioritize metadata title over the default name.
- Improved resource domain configuration to support dynamic server base URLs and include wildcard domains for better flexibility.
- Enhanced apps SDK metadata integration by merging additional metadata from widget configurations.
- Refactored HTML template handling for improved clarity and maintainability.

* changeset

* chore: enter canary prerelease mode

* chore(typescript): version packages (canary)

* feat: Enhanced widget integration and tunnel support (#389)

* refactor: streamline widget HTML generation and enhance logging

- Simplified base URL handling in the CLI by removing conditional MCP_URL usage.
- Updated HTML content generation in inspector utilities to improve base tag injection logic.
- Enhanced logging for better debugging and insights into widget content generation.

* feat: add tunnel support to CLI for server exposure

- Introduced a new `--tunnel` option in the CLI to expose the server through a tunnel.
- Implemented `startTunnel` helper function to manage tunnel creation and URL retrieval.
- Enhanced server startup logic to utilize the tunnel URL when available, improving accessibility for remote connections.
- Updated logging to provide feedback on tunnel status and URLs during server initialization.

* feat(inspector): enhance tunnel URL handling and update dependencies

- Added support for preserving the tunnel URL in navigation across inspector components.
- Introduced a new `tunnelUrl` state in the Inspector context to manage tunnel URL across the application.
- Updated various components to utilize the tunnel URL, ensuring seamless integration with the new functionality.
- Added `@radix-ui/react-popover` as a dependency in package.json for improved UI interactions.
- Updated pnpm-lock.yaml to reflect changes in dependency versions, including zod.

* feat(mcp): enhance widget integration and server handling

- Updated the CLI to fetch the MCP server from the new `/mcp` endpoint instead of `/inspector`.
- Improved tunnel establishment logging to include the new `/mcp` path.
- Enhanced HTML generation in the MCP server to replace relative paths for widget scripts and styles with absolute URLs.
- Added a script to the HTML head for dynamic file retrieval based on the server base URL, improving widget loading efficiency.

* disable tunnel in dev for now (since vite does not build assets

* fix(inspector): improve header handling in registerInspectorRoutes

- Updated header processing to exclude 'accept-encoding' to prevent compression issues.
- Added explicit request for uncompressed responses by setting 'Accept-Encoding' to 'identity'.
- Enhanced response header forwarding by omitting compression-related headers to ensure accurate body state representation.

* chore(typescript): version packages (canary)

* Feat/create mcp use app/templates (#390)

* readmes

* readme addition changeset

* chore(typescript): version packages (canary)

* format docs

---------

Co-authored-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* release(typescript): @mcp-use/inspector 0.4.7 + mcp-use 1.1.8 + create-mcp-use-app 0.4.8 + @mcp-use/cli 2.1.20

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Merge commit from fork

* fix: format

* feat(mcpagent): migrate to LangChain 1.0.0 and simplify agent methods

- Updated MCPAgent to utilize LangChain 1.0.0's `create_agent()` for improved agent instantiation.
- Introduced new methods `astream_simplified()` and `run_v2()` that leverage the built-in `astream()` for internal agent loop handling.
- Retained legacy methods `stream()` and `run()` for backward compatibility with manual execution.
- Enhanced documentation to reflect changes and provide clearer usage examples.

* feat(mcpagent): implement dynamic tool updates during agent execution

- Enhanced the MCPAgent to support dynamic tool updates when using server_manager mode.
- Implemented logic to check for tool changes before and during execution, allowing for immediate updates and safe restarts.
- Introduced a maximum restart limit to prevent infinite loops during tool updates.
- Updated documentation to reflect the new behavior and usage of dynamic tool management.

* feat(mcpagent): enhance agent execution with step tracking and middleware

- Introduced `ModelCallLimitMiddleware` to enforce a maximum number of model calls during agent execution.
- Updated the `_consume_and_return` method to return a tuple of the final result and the number of steps taken.
- Enhanced telemetry tracking to include steps taken and execution time for better performance insights.
- Simplified agent creation logic by integrating middleware directly into the `create_agent` function.
- Improved logging for agent execution details, including steps and tool usage.

* minor

* ruff

* format

---------

Co-authored-by: Luigi Pederzani <luigipederzani@gmail.com>
Co-authored-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Vincenzo Reina <vincenzoreinaa05@gmail.com>
2025-10-27 14:50:51 +01:00
Pietro Zullo 80213e6af9 Canary Release (#391)
* feat(mcp-server): enhance widget metadata handling and resource domain configuration (#388)

* feat(mcp-server): enhance widget metadata handling and resource domain configuration

- Updated widget title handling to prioritize metadata title over the default name.
- Improved resource domain configuration to support dynamic server base URLs and include wildcard domains for better flexibility.
- Enhanced apps SDK metadata integration by merging additional metadata from widget configurations.
- Refactored HTML template handling for improved clarity and maintainability.

* changeset

* chore: enter canary prerelease mode

* chore(typescript): version packages (canary)

* feat: Enhanced widget integration and tunnel support (#389)

* refactor: streamline widget HTML generation and enhance logging

- Simplified base URL handling in the CLI by removing conditional MCP_URL usage.
- Updated HTML content generation in inspector utilities to improve base tag injection logic.
- Enhanced logging for better debugging and insights into widget content generation.

* feat: add tunnel support to CLI for server exposure

- Introduced a new `--tunnel` option in the CLI to expose the server through a tunnel.
- Implemented `startTunnel` helper function to manage tunnel creation and URL retrieval.
- Enhanced server startup logic to utilize the tunnel URL when available, improving accessibility for remote connections.
- Updated logging to provide feedback on tunnel status and URLs during server initialization.

* feat(inspector): enhance tunnel URL handling and update dependencies

- Added support for preserving the tunnel URL in navigation across inspector components.
- Introduced a new `tunnelUrl` state in the Inspector context to manage tunnel URL across the application.
- Updated various components to utilize the tunnel URL, ensuring seamless integration with the new functionality.
- Added `@radix-ui/react-popover` as a dependency in package.json for improved UI interactions.
- Updated pnpm-lock.yaml to reflect changes in dependency versions, including zod.

* feat(mcp): enhance widget integration and server handling

- Updated the CLI to fetch the MCP server from the new `/mcp` endpoint instead of `/inspector`.
- Improved tunnel establishment logging to include the new `/mcp` path.
- Enhanced HTML generation in the MCP server to replace relative paths for widget scripts and styles with absolute URLs.
- Added a script to the HTML head for dynamic file retrieval based on the server base URL, improving widget loading efficiency.

* disable tunnel in dev for now (since vite does not build assets

* fix(inspector): improve header handling in registerInspectorRoutes

- Updated header processing to exclude 'accept-encoding' to prevent compression issues.
- Added explicit request for uncompressed responses by setting 'Accept-Encoding' to 'identity'.
- Enhanced response header forwarding by omitting compression-related headers to ensure accurate body state representation.

* chore(typescript): version packages (canary)

* Feat/create mcp use app/templates (#390)

* readmes

* readme addition changeset

* chore(typescript): version packages (canary)

* format docs

---------

Co-authored-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2025-10-24 13:41:25 +02:00
Luigi Pederzani 3c87c42735 feat: Apps SDK widgets & Automatic Widget Registration (#383)
* chore: enter canary prerelease mode

* Allow develop of apps sdk experiences  (#371)

* chore: enter canary prerelease mode

* fix(chat): improve formatting and refactor inspector components (#357)

* chore(inspector): update dependencies and refactor components

- Updated pnpm-lock.yaml to reflect changes in dependency versions, including zod and added markdown-to-jsx.
- Refactored inspector components for improved code quality and consistency, including formatting adjustments and import organization.
- Enhanced TypeScript configuration by enabling composite builds for better module resolution.
- Cleaned up unused code and improved overall readability across various components.

* changeset

* chore: enter canary prerelease mode

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* feat: tests cmua (#356)

* feat: enhance create-mcp-use-app with package manager detection and commands

- Added functions to detect the package manager used and provide corresponding install and dev commands.
- Updated the CLI options to allow users to specify their preferred package manager (yarn, npm, pnpm).
- Introduced a new test command in package.json for CLI testing.
- Enhanced package installation logic to handle different package managers more gracefully.

* changeset

* fix test

* fix windows path

* fix: correct Windows path handling in create-mcp-use-app workflow

* fix: update yarn command syntax in create-mcp-use-app workflow for consistency

* chore(typescript): version packages (canary)

* feat: introduce new starter templates for MCP server + cleanup (#360)

* feat: introduce new starter and apps-sdk templates for MCP server

- Added a comprehensive starter template that includes tools, resources, and UI components for building MCP servers.
- Introduced an apps-sdk template demonstrating OpenAI Apps SDK integration with pizzaz reference widgets.
- Updated documentation to reflect new templates and quick start instructions.
- Refactored existing templates to streamline usage and improve clarity.
- Enhanced package.json scripts for testing and development workflows.

* add changeset

* fix: update pnpm-lock.yaml to correct template paths and remove unused dependencies

* fix: lint

* refactor: standardize quotes and update template names in GitHub Actions workflow

- Changed single quotes to double quotes for consistency in paths.
- Updated template names from 'ui', 'uiresource', 'apps_sdk' to 'starter', 'ui-resource', 'apps-sdk-demo' for clarity.
- Cleaned up whitespace in script sections for improved readability.

* refactor: update template options in workflow and clean up whitespace in TypeScript files

- Expanded the template options in the GitHub Actions workflow to include 'starter', 'ui-resource', and 'apps-sdk-demo'.
- Removed unnecessary whitespace in TypeScript files for improved readability and consistency.

* fix types

* fix(inspector): update callPrompt reference and add new methods to MCPConnection

- Changed the reference of callPrompt in LayoutContent to use getPrompt.
- Added listPrompts and getPrompt methods to the MCPConnection interface and their implementations in McpProvider, throwing errors when not connected.

* chore(typescript): version packages (canary)

* fix: prompts

* fix template

* chore(typescript): version packages (canary)

* feat(inspector): enhance PromptsTab with saved prompts functionality

- Added functionality to load and save prompts from localStorage.
- Introduced a new state for managing saved prompts and updated the UI to display them.
- Refactored prompt execution logic to accommodate saved prompts.
- Improved error handling and user feedback for prompt execution.
- Updated the server.ts to dynamically listen on a specified port from environment variables.

* Update khaki-baths-follow.md

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

* Update fine-cougars-change.md

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

* feat: vite hot reloading widget

* refactor: update tool naming conventions by removing 'ui_' prefix from widget tools

- Changed references from 'ui_[widget-name]' to '[widget-name]' across documentation and code.
- Updated examples and usage instructions to reflect the new naming scheme for better clarity and consistency.

* fix: update zod version and enhance widget manifest descriptions

- Updated zod dependency version from 4.1.12 to 3.25.76 in pnpm-lock.yaml.
- Enhanced widget manifest generation by including enum values and validation rules in the property descriptions.
- Modified schema extraction to support additional metadata inputs and improved handling of Zod schemas.

* chore: update pnpm-lock and workspace configuration for weather template

- Added new weather template to pnpm workspace.
- Updated pnpm-lock.yaml with dependencies for the weather template, including zod, express, and various @mcp-ui packages.
- Ensured compatibility with existing dependencies by aligning zod versions across multiple packages.

* refactor: streamline widget HTML generation and enhance logging

- Removed inline styles from the HTML template in build.ts for cleaner structure.
- Improved logging in OpenAIComponentRenderer to provide better insights into tool execution and data handling.
- Updated ToolResultRenderer to pass parsed results correctly.
- Enhanced useChatMessagesClientSide to extract tool arguments from various event data formats.
- Added new methods in shared-utils for handling external links and improved metadata handling in widget content generation.
- Updated McpServer to support dynamic widget registration with improved configuration options for host and base URL.

* Typescript/server/cors issue (#367)

* chore: enter canary prerelease mode

* fix(chat): improve formatting and refactor inspector components (#357)

* chore(inspector): update dependencies and refactor components

- Updated pnpm-lock.yaml to reflect changes in dependency versions, including zod and added markdown-to-jsx.
- Refactored inspector components for improved code quality and consistency, including formatting adjustments and import organization.
- Enhanced TypeScript configuration by enabling composite builds for better module resolution.
- Cleaned up unused code and improved overall readability across various components.

* changeset

* chore: enter canary prerelease mode

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* feat: tests cmua (#356)

* feat: enhance create-mcp-use-app with package manager detection and commands

- Added functions to detect the package manager used and provide corresponding install and dev commands.
- Updated the CLI options to allow users to specify their preferred package manager (yarn, npm, pnpm).
- Introduced a new test command in package.json for CLI testing.
- Enhanced package installation logic to handle different package managers more gracefully.

* changeset

* fix test

* fix windows path

* fix: correct Windows path handling in create-mcp-use-app workflow

* fix: update yarn command syntax in create-mcp-use-app workflow for consistency

* chore(typescript): version packages (canary)

* feat: introduce new starter templates for MCP server + cleanup (#360)

* feat: introduce new starter and apps-sdk templates for MCP server

- Added a comprehensive starter template that includes tools, resources, and UI components for building MCP servers.
- Introduced an apps-sdk template demonstrating OpenAI Apps SDK integration with pizzaz reference widgets.
- Updated documentation to reflect new templates and quick start instructions.
- Refactored existing templates to streamline usage and improve clarity.
- Enhanced package.json scripts for testing and development workflows.

* add changeset

* fix: update pnpm-lock.yaml to correct template paths and remove unused dependencies

* fix: lint

* refactor: standardize quotes and update template names in GitHub Actions workflow

- Changed single quotes to double quotes for consistency in paths.
- Updated template names from 'ui', 'uiresource', 'apps_sdk' to 'starter', 'ui-resource', 'apps-sdk-demo' for clarity.
- Cleaned up whitespace in script sections for improved readability.

* refactor: update template options in workflow and clean up whitespace in TypeScript files

- Expanded the template options in the GitHub Actions workflow to include 'starter', 'ui-resource', and 'apps-sdk-demo'.
- Removed unnecessary whitespace in TypeScript files for improved readability and consistency.

* fix types

* fix(inspector): update callPrompt reference and add new methods to MCPConnection

- Changed the reference of callPrompt in LayoutContent to use getPrompt.
- Added listPrompts and getPrompt methods to the MCPConnection interface and their implementations in McpProvider, throwing errors when not connected.

* chore(typescript): version packages (canary)

* fix: prompts

* fix template

* chore(typescript): version packages (canary)

* feat(inspector): enhance PromptsTab with saved prompts functionality

- Added functionality to load and save prompts from localStorage.
- Introduced a new state for managing saved prompts and updated the UI to display them.
- Refactored prompt execution logic to accommodate saved prompts.
- Improved error handling and user feedback for prompt execution.
- Updated the server.ts to dynamically listen on a specified port from environment variables.

* Update khaki-baths-follow.md

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

* Update fine-cougars-change.md

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

* fix cors issues

* changeset

* remove changeset

* changeset

---------

Signed-off-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com>
Co-authored-by: Luigi Pederzani <luigipederzani@gmail.com>

* chore: enter canary prerelease mode

* chore(typescript): version packages (canary)

* feat: add ph to inspector (#368)

* feat(inspector): enhance telemetry tracking and update dependencies

- Introduced new telemetry events for tracking inspector interactions, including server connections, tool executions, and resource reads.
- Added a new test_app with specified dependencies in pnpm-lock.yaml to support development.
- Updated inspector components to utilize the new telemetry system for better analytics and debugging.

* feat(inspector): enhance README with updated descriptions and usage instructions

* feat: add workflow step to sync main branch changes to canary

- Introduced a new job in the TypeScript release workflow to automatically merge updates from the main branch into the canary branch when publishing is triggered.
- Configured git settings and added commands to fetch, merge, and push changes to the canary branch, ensuring it stays up-to-date with the latest version updates from main.

* feat: add GitHub release creation step to TypeScript workflow

- Implemented a new step in the TypeScript release workflow to automatically create a GitHub release when publishing is triggered.
- The step fetches tags from the last commit, generates release notes from changelogs of published packages, and consolidates them into a single release.
- Ensures that the release title and notes are formatted correctly, enhancing the release process for better visibility and documentation.

* chore: add changeset for '@mcp-use/inspector' patch

* fix(inspector): add __INSPECTOR_VERSION__ to ESLint globals and clean up logger file

- Added __INSPECTOR_VERSION__ as a readonly global in the ESLint configuration for better version management.
- Removed unnecessary eslint-disable comment from the logger utility file to improve code clarity.

* chore(eslint): add __INSPECTOR_VERSION__ global for inspector package TypeScript files

- Introduced __INSPECTOR_VERSION__ as a readonly global in the ESLint configuration specifically for TypeScript files in the inspector package, enhancing version management.

* chore(typescript): version packages (canary)

* changeset

* chore(typescript): version packages (canary)

* fix deps

* server vite from express server

* refactor: clean up and enhance widget handling in MCP server

- Removed unused HTML template and entry content functions from build.ts.
- Updated runCommand function in index.ts to accept an optional environment parameter.
- Enhanced OpenAIComponentRenderer to utilize resource data and improved structured content extraction.
- Updated ToolResultDisplay to pass resource data correctly.
- Refactored MCP server to streamline widget serving and registration, including improved handling of widget metadata and HTML templates.
- Cleaned up commented-out code and improved overall readability across multiple files.

* chore: update dependencies and remove unused files

- Added esbuild dependency with version >=0.25.0 in package.json and pnpm-lock.yaml.
- Removed build.ts and schema-generator.ts files as they are no longer needed for widget handling.
- Refactored MCP server to streamline widget serving with a shared Vite server for improved performance.

* feat: enhance widget metadata extraction in MCP server

- Added functionality to extract and convert Zod schema to JSON schema for widget props.
- Improved error handling for loading widget metadata and schema conversion.
- Updated widget description handling to ensure accurate metadata representation.

* chore: remove python cli

* chore: generate_docs removes stale docs

* chore:docs: remove stale docs

* chore: docs: fix broken links

* release(typescript): @mcp-use/inspector 0.4.6 + mcp-use 1.1.6 + create-mcp-use-app 0.4.5 (#376)

* Typescript/server/cors issue (#367)

* chore: enter canary prerelease mode

* fix(chat): improve formatting and refactor inspector components (#357)

* chore(inspector): update dependencies and refactor components

- Updated pnpm-lock.yaml to reflect changes in dependency versions, including zod and added markdown-to-jsx.
- Refactored inspector components for improved code quality and consistency, including formatting adjustments and import organization.
- Enhanced TypeScript configuration by enabling composite builds for better module resolution.
- Cleaned up unused code and improved overall readability across various components.

* changeset

* chore: enter canary prerelease mode

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* feat: tests cmua (#356)

* feat: enhance create-mcp-use-app with package manager detection and commands

- Added functions to detect the package manager used and provide corresponding install and dev commands.
- Updated the CLI options to allow users to specify their preferred package manager (yarn, npm, pnpm).
- Introduced a new test command in package.json for CLI testing.
- Enhanced package installation logic to handle different package managers more gracefully.

* changeset

* fix test

* fix windows path

* fix: correct Windows path handling in create-mcp-use-app workflow

* fix: update yarn command syntax in create-mcp-use-app workflow for consistency

* chore(typescript): version packages (canary)

* feat: introduce new starter templates for MCP server + cleanup (#360)

* feat: introduce new starter and apps-sdk templates for MCP server

- Added a comprehensive starter template that includes tools, resources, and UI components for building MCP servers.
- Introduced an apps-sdk template demonstrating OpenAI Apps SDK integration with pizzaz reference widgets.
- Updated documentation to reflect new templates and quick start instructions.
- Refactored existing templates to streamline usage and improve clarity.
- Enhanced package.json scripts for testing and development workflows.

* add changeset

* fix: update pnpm-lock.yaml to correct template paths and remove unused dependencies

* fix: lint

* refactor: standardize quotes and update template names in GitHub Actions workflow

- Changed single quotes to double quotes for consistency in paths.
- Updated template names from 'ui', 'uiresource', 'apps_sdk' to 'starter', 'ui-resource', 'apps-sdk-demo' for clarity.
- Cleaned up whitespace in script sections for improved readability.

* refactor: update template options in workflow and clean up whitespace in TypeScript files

- Expanded the template options in the GitHub Actions workflow to include 'starter', 'ui-resource', and 'apps-sdk-demo'.
- Removed unnecessary whitespace in TypeScript files for improved readability and consistency.

* fix types

* fix(inspector): update callPrompt reference and add new methods to MCPConnection

- Changed the reference of callPrompt in LayoutContent to use getPrompt.
- Added listPrompts and getPrompt methods to the MCPConnection interface and their implementations in McpProvider, throwing errors when not connected.

* chore(typescript): version packages (canary)

* fix: prompts

* fix template

* chore(typescript): version packages (canary)

* feat(inspector): enhance PromptsTab with saved prompts functionality

- Added functionality to load and save prompts from localStorage.
- Introduced a new state for managing saved prompts and updated the UI to display them.
- Refactored prompt execution logic to accommodate saved prompts.
- Improved error handling and user feedback for prompt execution.
- Updated the server.ts to dynamically listen on a specified port from environment variables.

* Update khaki-baths-follow.md

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

* Update fine-cougars-change.md

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

* fix cors issues

* changeset

* remove changeset

* changeset

---------

Signed-off-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com>
Co-authored-by: Luigi Pederzani <luigipederzani@gmail.com>

* chore: enter canary prerelease mode

* chore(typescript): version packages (canary)

* feat: add ph to inspector (#368)

* feat(inspector): enhance telemetry tracking and update dependencies

- Introduced new telemetry events for tracking inspector interactions, including server connections, tool executions, and resource reads.
- Added a new test_app with specified dependencies in pnpm-lock.yaml to support development.
- Updated inspector components to utilize the new telemetry system for better analytics and debugging.

* feat(inspector): enhance README with updated descriptions and usage instructions

* feat: add workflow step to sync main branch changes to canary

- Introduced a new job in the TypeScript release workflow to automatically merge updates from the main branch into the canary branch when publishing is triggered.
- Configured git settings and added commands to fetch, merge, and push changes to the canary branch, ensuring it stays up-to-date with the latest version updates from main.

* feat: add GitHub release creation step to TypeScript workflow

- Implemented a new step in the TypeScript release workflow to automatically create a GitHub release when publishing is triggered.
- The step fetches tags from the last commit, generates release notes from changelogs of published packages, and consolidates them into a single release.
- Ensures that the release title and notes are formatted correctly, enhancing the release process for better visibility and documentation.

* chore: add changeset for '@mcp-use/inspector' patch

* fix(inspector): add __INSPECTOR_VERSION__ to ESLint globals and clean up logger file

- Added __INSPECTOR_VERSION__ as a readonly global in the ESLint configuration for better version management.
- Removed unnecessary eslint-disable comment from the logger utility file to improve code clarity.

* chore(eslint): add __INSPECTOR_VERSION__ global for inspector package TypeScript files

- Introduced __INSPECTOR_VERSION__ as a readonly global in the ESLint configuration specifically for TypeScript files in the inspector package, enhancing version management.

* chore(typescript): version packages (canary)

* changeset

* chore(typescript): version packages (canary)

* Fix/scarf (#369)

* feat(inspector): integrate Scarf telemetry with proxy endpoint

- Added support for Scarf telemetry in the inspector package, including a new proxy endpoint to handle telemetry events without CORS issues.
- Updated the pnpm-lock.yaml to include the @scarf/scarf dependency.
- Removed the stub for @scarf/scarf as it is no longer needed.
- Enhanced the telemetry implementation to forward events to the Scarf gateway from the server-side.

* feat(inspector): try to fix ph

* chore: add changeset for '@mcp-use/inspector' patch to fix Scarf integration

* chore(typescript): version packages (canary)

* fix(inspector): improve header handling in registerInspectorRoutes (#370)

* fix(inspector): improve header handling in registerInspectorRoutes

- Updated header processing to exclude 'accept-encoding' to prevent compression issues.
- Added explicit request for uncompressed responses by setting 'Accept-Encoding' to 'identity'.
- Enhanced response header forwarding by omitting compression-related headers to ensure accurate body state representation.

* Update libraries/typescript/packages/inspector/src/server/shared-routes.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Pietro Zullo <62951181+pietrozullo@users.noreply.github.com>

* changeset

---------

Signed-off-by: Pietro Zullo <62951181+pietrozullo@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* chore(typescript): version packages (canary)

* refactor(inspector): replace posthog-js with posthog-node and enhance telemetry logging (#372)

- Updated the telemetry implementation to use posthog-node for server-side event logging.
- Introduced a new proxy endpoint for forwarding telemetry events to PostHog.
- Removed the logger utility file and streamlined error handling in telemetry methods to ensure silent failures do not disrupt application flow.
- Added a new test_app with specified dependencies in pnpm-lock.yaml to support development.

* chore(typescript): version packages (canary)

* createapp: init git repository

* chore(typescript): version packages (canary)

* chore: push not pushed changeset (#373)

* chore(typescript): version packages (canary)

* chore: inspector server logging (#374)

* refactor(inspector): streamline logging middleware usage

- Removed global logger middleware from the main server file.
- Applied logger middleware specifically to proxy routes in shared-routes.ts for improved performance and clarity.
- Cleaned up error handling in the streaming response section for better readability.

* changeset

* chore(typescript): version packages (canary)

* fix logging (#375)

* refactor(inspector): apply logger middleware to proxy routes only

- Updated logger middleware usage to apply only to '/inspector/api/proxy/*' routes, enhancing performance and clarity in logging.

* changeset

* chore(typescript): version packages (canary)

* fix lint

---------

Signed-off-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com>
Signed-off-by: Pietro Zullo <62951181+pietrozullo@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: Enrico Toniato <2827496+tonxxd@users.noreply.github.com>
Co-authored-by: pietrozullo <pietro.zullo@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* chore(release): exit prerelease mode and version packages (#377)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* chore(release): reset canary branch to main and re-enter prerelease mode (#380)

- Removed the workflow path exclusion for typescript-release.yml.
- Updated the workflow to reset the canary branch to match the main branch instead of merging.
- Added steps to re-enter prerelease mode on the canary branch after the reset.
- Committed the changes to reflect the new prerelease state and force pushed to the canary branch.

* chore(release): simplify canary reset process in TypeScript workflow (#381)

- Updated the TypeScript release workflow to reset the canary branch to match the main branch without re-entering prerelease mode.
- Removed unnecessary steps related to prerelease mode, streamlining the workflow for better clarity and efficiency.

* feat: add new weather template to test_app scripts in TypeScript package

* feat: enhance OpenAIComponentRenderer and useWidget for improved URL parameter handling

- Updated OpenAIComponentRenderer to pass tool input and output as URL parameters for better widget integration.
- Refactored useWidget to extract parameters from the URL, allowing for dynamic tool input and output handling.
- Cleaned up code and improved readability across multiple files, ensuring better maintainability.

* feat: update pnpm-lock.yaml and package.json for mcp-use integration

- Added '@mcp-use/cli' as a dependency in pnpm-lock.yaml and package.json for improved CLI functionality.
- Updated the mcp-server to simplify the temporary directory path.
- Removed unnecessary peer dependencies and cleaned up the package.json for better clarity.

* feat: remove weather template files from create-mcp-use-app

- Deleted the weather template files including index.ts, package.json, README.md, tsconfig.json, and display-weather.tsx to streamline the project structure and remove unused components.

* docs wip

* change folder name

* add tsconfig

* fix build

* feat: update resource domains in mcp-server for enhanced widget integration

- Modified the resource_domains array to include wildcard domains for better flexibility in widget loading.
- Added support for dynamic server base URL to ensure proper resource access.

* docs: update installation and quickstart guides for mcp-use

- Enhanced the installation section to include `create-mcp-use-app` for easier project scaffolding.
- Updated the quickstart guide to reflect new project structure and setup instructions.
- Improved clarity on installing LangChain providers and setting up environment variables.
- Standardized references to `mcp-use` throughout the documentation.

* docs: reorganize UI Widgets section in documentation

- Added a new "Apps SDK" tag under the UI Widgets group for better categorization.
- Moved "mcp-ui-resources" and "apps-sdk-resources" pages into a new "References" group for improved structure and clarity.

* docs: update installation and widget documentation for mcp-use

- Revised the installation guide to emphasize the use of `create-mcp-use-app` for setting up new projects.
- Enhanced the UI Widgets section to clarify automatic widget registration and usage of the `useWidget` hook.
- Updated titles and descriptions for better consistency and clarity across documentation.
- Added a new image example for Apps SDK widgets to illustrate usage.
- Removed outdated content and improved overall structure for easier navigation.

* feat: improve templates

* refactor: update project templates and improve CLI tips

- Replaced outdated template names in package.json and pnpm-workspace.yaml.
- Added new "mcp-ui" and "apps-sdk" templates for better project scaffolding.
- Updated console tips in index.ts to reflect the new template names.

* docs: enhance template documentation with detailed features and examples

* chore: update project templates and dependencies

- Renamed template directories for consistency and clarity.
- Removed outdated dependencies and added new ones, including React, TailwindCSS, and Zod.
- Updated TypeScript configuration to include new paths and server file.
- Introduced a new CSS file for custom styles in the starter template.

* release(typescript): @mcp-use/inspector 0.4.6 + mcp-use 1.1.6 + create-mcp-use-app 0.4.5 (#376)

* Typescript/server/cors issue (#367)

* chore: enter canary prerelease mode

* fix(chat): improve formatting and refactor inspector components (#357)

* chore(inspector): update dependencies and refactor components

- Updated pnpm-lock.yaml to reflect changes in dependency versions, including zod and added markdown-to-jsx.
- Refactored inspector components for improved code quality and consistency, including formatting adjustments and import organization.
- Enhanced TypeScript configuration by enabling composite builds for better module resolution.
- Cleaned up unused code and improved overall readability across various components.

* changeset

* chore: enter canary prerelease mode

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* feat: tests cmua (#356)

* feat: enhance create-mcp-use-app with package manager detection and commands

- Added functions to detect the package manager used and provide corresponding install and dev commands.
- Updated the CLI options to allow users to specify their preferred package manager (yarn, npm, pnpm).
- Introduced a new test command in package.json for CLI testing.
- Enhanced package installation logic to handle different package managers more gracefully.

* changeset

* fix test

* fix windows path

* fix: correct Windows path handling in create-mcp-use-app workflow

* fix: update yarn command syntax in create-mcp-use-app workflow for consistency

* chore(typescript): version packages (canary)

* feat: introduce new starter templates for MCP server + cleanup (#360)

* feat: introduce new starter and apps-sdk templates for MCP server

- Added a comprehensive starter template that includes tools, resources, and UI components for building MCP servers.
- Introduced an apps-sdk template demonstrating OpenAI Apps SDK integration with pizzaz reference widgets.
- Updated documentation to reflect new templates and quick start instructions.
- Refactored existing templates to streamline usage and improve clarity.
- Enhanced package.json scripts for testing and development workflows.

* add changeset

* fix: update pnpm-lock.yaml to correct template paths and remove unused dependencies

* fix: lint

* refactor: standardize quotes and update template names in GitHub Actions workflow

- Changed single quotes to double quotes for consistency in paths.
- Updated template names from 'ui', 'uiresource', 'apps_sdk' to 'starter', 'ui-resource', 'apps-sdk-demo' for clarity.
- Cleaned up whitespace in script sections for improved readability.

* refactor: update template options in workflow and clean up whitespace in TypeScript files

- Expanded the template options in the GitHub Actions workflow to include 'starter', 'ui-resource', and 'apps-sdk-demo'.
- Removed unnecessary whitespace in TypeScript files for improved readability and consistency.

* fix types

* fix(inspector): update callPrompt reference and add new methods to MCPConnection

- Changed the reference of callPrompt in LayoutContent to use getPrompt.
- Added listPrompts and getPrompt methods to the MCPConnection interface and their implementations in McpProvider, throwing errors when not connected.

* chore(typescript): version packages (canary)

* fix: prompts

* fix template

* chore(typescript): version packages (canary)

* feat(inspector): enhance PromptsTab with saved prompts functionality

- Added functionality to load and save prompts from localStorage.
- Introduced a new state for managing saved prompts and updated the UI to display them.
- Refactored prompt execution logic to accommodate saved prompts.
- Improved error handling and user feedback for prompt execution.
- Updated the server.ts to dynamically listen on a specified port from environment variables.

* Update khaki-baths-follow.md

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

* Update fine-cougars-change.md

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

* fix cors issues

* changeset

* remove changeset

* changeset

---------

Signed-off-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com>
Co-authored-by: Luigi Pederzani <luigipederzani@gmail.com>

* chore: enter canary prerelease mode

* chore(typescript): version packages (canary)

* feat: add ph to inspector (#368)

* feat(inspector): enhance telemetry tracking and update dependencies

- Introduced new telemetry events for tracking inspector interactions, including server connections, tool executions, and resource reads.
- Added a new test_app with specified dependencies in pnpm-lock.yaml to support development.
- Updated inspector components to utilize the new telemetry system for better analytics and debugging.

* feat(inspector): enhance README with updated descriptions and usage instructions

* feat: add workflow step to sync main branch changes to canary

- Introduced a new job in the TypeScript release workflow to automatically merge updates from the main branch into the canary branch when publishing is triggered.
- Configured git settings and added commands to fetch, merge, and push changes to the canary branch, ensuring it stays up-to-date with the latest version updates from main.

* feat: add GitHub release creation step to TypeScript workflow

- Implemented a new step in the TypeScript release workflow to automatically create a GitHub release when publishing is triggered.
- The step fetches tags from the last commit, generates release notes from changelogs of published packages, and consolidates them into a single release.
- Ensures that the release title and notes are formatted correctly, enhancing the release process for better visibility and documentation.

* chore: add changeset for '@mcp-use/inspector' patch

* fix(inspector): add __INSPECTOR_VERSION__ to ESLint globals and clean up logger file

- Added __INSPECTOR_VERSION__ as a readonly global in the ESLint configuration for better version management.
- Removed unnecessary eslint-disable comment from the logger utility file to improve code clarity.

* chore(eslint): add __INSPECTOR_VERSION__ global for inspector package TypeScript files

- Introduced __INSPECTOR_VERSION__ as a readonly global in the ESLint configuration specifically for TypeScript files in the inspector package, enhancing version management.

* chore(typescript): version packages (canary)

* changeset

* chore(typescript): version packages (canary)

* Fix/scarf (#369)

* feat(inspector): integrate Scarf telemetry with proxy endpoint

- Added support for Scarf telemetry in the inspector package, including a new proxy endpoint to handle telemetry events without CORS issues.
- Updated the pnpm-lock.yaml to include the @scarf/scarf dependency.
- Removed the stub for @scarf/scarf as it is no longer needed.
- Enhanced the telemetry implementation to forward events to the Scarf gateway from the server-side.

* feat(inspector): try to fix ph

* chore: add changeset for '@mcp-use/inspector' patch to fix Scarf integration

* chore(typescript): version packages (canary)

* fix(inspector): improve header handling in registerInspectorRoutes (#370)

* fix(inspector): improve header handling in registerInspectorRoutes

- Updated header processing to exclude 'accept-encoding' to prevent compression issues.
- Added explicit request for uncompressed responses by setting 'Accept-Encoding' to 'identity'.
- Enhanced response header forwarding by omitting compression-related headers to ensure accurate body state representation.

* Update libraries/typescript/packages/inspector/src/server/shared-routes.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Pietro Zullo <62951181+pietrozullo@users.noreply.github.com>

* changeset

---------

Signed-off-by: Pietro Zullo <62951181+pietrozullo@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* chore(typescript): version packages (canary)

* refactor(inspector): replace posthog-js with posthog-node and enhance telemetry logging (#372)

- Updated the telemetry implementation to use posthog-node for server-side event logging.
- Introduced a new proxy endpoint for forwarding telemetry events to PostHog.
- Removed the logger utility file and streamlined error handling in telemetry methods to ensure silent failures do not disrupt application flow.
- Added a new test_app with specified dependencies in pnpm-lock.yaml to support development.

* chore(typescript): version packages (canary)

* createapp: init git repository

* chore(typescript): version packages (canary)

* chore: push not pushed changeset (#373)

* chore(typescript): version packages (canary)

* chore: inspector server logging (#374)

* refactor(inspector): streamline logging middleware usage

- Removed global logger middleware from the main server file.
- Applied logger middleware specifically to proxy routes in shared-routes.ts for improved performance and clarity.
- Cleaned up error handling in the streaming response section for better readability.

* changeset

* chore(typescript): version packages (canary)

* fix logging (#375)

* refactor(inspector): apply logger middleware to proxy routes only

- Updated logger middleware usage to apply only to '/inspector/api/proxy/*' routes, enhancing performance and clarity in logging.

* changeset

* chore(typescript): version packages (canary)

* fix lint

---------

Signed-off-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com>
Signed-off-by: Pietro Zullo <62951181+pietrozullo@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: Enrico Toniato <2827496+tonxxd@users.noreply.github.com>
Co-authored-by: pietrozullo <pietro.zullo@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* chore(release): exit prerelease mode and version packages (#377)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* chore: enter canary prerelease mode

* changeset

* release(typescript): @mcp-use/inspector 0.4.6 + mcp-use 1.1.6 + create-mcp-use-app 0.4.5 (#376)

* Typescript/server/cors issue (#367)

* chore: enter canary prerelease mode

* fix(chat): improve formatting and refactor inspector components (#357)

* chore(inspector): update dependencies and refactor components

- Updated pnpm-lock.yaml to reflect changes in dependency versions, including zod and added markdown-to-jsx.
- Refactored inspector components for improved code quality and consistency, including formatting adjustments and import organization.
- Enhanced TypeScript configuration by enabling composite builds for better module resolution.
- Cleaned up unused code and improved overall readability across various components.

* changeset

* chore: enter canary prerelease mode

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* feat: tests cmua (#356)

* feat: enhance create-mcp-use-app with package manager detection and commands

- Added functions to detect the package manager used and provide corresponding install and dev commands.
- Updated the CLI options to allow users to specify their preferred package manager (yarn, npm, pnpm).
- Introduced a new test command in package.json for CLI testing.
- Enhanced package installation logic to handle different package managers more gracefully.

* changeset

* fix test

* fix windows path

* fix: correct Windows path handling in create-mcp-use-app workflow

* fix: update yarn command syntax in create-mcp-use-app workflow for consistency

* chore(typescript): version packages (canary)

* feat: introduce new starter templates for MCP server + cleanup (#360)

* feat: introduce new starter and apps-sdk templates for MCP server

- Added a comprehensive starter template that includes tools, resources, and UI components for building MCP servers.
- Introduced an apps-sdk template demonstrating OpenAI Apps SDK integration with pizzaz reference widgets.
- Updated documentation to reflect new templates and quick start instructions.
- Refactored existing templates to streamline usage and improve clarity.
- Enhanced package.json scripts for testing and development workflows.

* add changeset

* fix: update pnpm-lock.yaml to correct template paths and remove unused dependencies

* fix: lint

* refactor: standardize quotes and update template names in GitHub Actions workflow

- Changed single quotes to double quotes for consistency in paths.
- Updated template names from 'ui', 'uiresource', 'apps_sdk' to 'starter', 'ui-resource', 'apps-sdk-demo' for clarity.
- Cleaned up whitespace in script sections for improved readability.

* refactor: update template options in workflow and clean up whitespace in TypeScript files

- Expanded the template options in the GitHub Actions workflow to include 'starter', 'ui-resource', and 'apps-sdk-demo'.
- Removed unnecessary whitespace in TypeScript files for improved readability and consistency.

* fix types

* fix(inspector): update callPrompt reference and add new methods to MCPConnection

- Changed the reference of callPrompt in LayoutContent to use getPrompt.
- Added listPrompts and getPrompt methods to the MCPConnection interface and their implementations in McpProvider, throwing errors when not connected.

* chore(typescript): version packages (canary)

* fix: prompts

* fix template

* chore(typescript): version packages (canary)

* feat(inspector): enhance PromptsTab with saved prompts functionality

- Added functionality to load and save prompts from localStorage.
- Introduced a new state for managing saved prompts and updated the UI to display them.
- Refactored prompt execution logic to accommodate saved prompts.
- Improved error handling and user feedback for prompt execution.
- Updated the server.ts to dynamically listen on a specified port from environment variables.

* Update khaki-baths-follow.md

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

* Update fine-cougars-change.md

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

* fix cors issues

* changeset

* remove changeset

* changeset

---------

Signed-off-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com>
Co-authored-by: Luigi Pederzani <luigipederzani@gmail.com>

* chore: enter canary prerelease mode

* chore(typescript): version packages (canary)

* feat: add ph to inspector (#368)

* feat(inspector): enhance telemetry tracking and update dependencies

- Introduced new telemetry events for tracking inspector interactions, including server connections, tool executions, and resource reads.
- Added a new test_app with specified dependencies in pnpm-lock.yaml to support development.
- Updated inspector components to utilize the new telemetry system for better analytics and debugging.

* feat(inspector): enhance README with updated descriptions and usage instructions

* feat: add workflow step to sync main branch changes to canary

- Introduced a new job in the TypeScript release workflow to automatically merge updates from the main branch into the canary branch when publishing is triggered.
- Configured git settings and added commands to fetch, merge, and push changes to the canary branch, ensuring it stays up-to-date with the latest version updates from main.

* feat: add GitHub release creation step to TypeScript workflow

- Implemented a new step in the TypeScript release workflow to automatically create a GitHub release when publishing is triggered.
- The step fetches tags from the last commit, generates release notes from changelogs of published packages, and consolidates them into a single release.
- Ensures that the release title and notes are formatted correctly, enhancing the release process for better visibility and documentation.

* chore: add changeset for '@mcp-use/inspector' patch

* fix(inspector): add __INSPECTOR_VERSION__ to ESLint globals and clean up logger file

- Added __INSPECTOR_VERSION__ as a readonly global in the ESLint configuration for better version management.
- Removed unnecessary eslint-disable comment from the logger utility file to improve code clarity.

* chore(eslint): add __INSPECTOR_VERSION__ global for inspector package TypeScript files

- Introduced __INSPECTOR_VERSION__ as a readonly global in the ESLint configuration specifically for TypeScript files in the inspector package, enhancing version management.

* chore(typescript): version packages (canary)

* changeset

* chore(typescript): version packages (canary)

* Fix/scarf (#369)

* feat(inspector): integrate Scarf telemetry with proxy endpoint

- Added support for Scarf telemetry in the inspector package, including a new proxy endpoint to handle telemetry events without CORS issues.
- Updated the pnpm-lock.yaml to include the @scarf/scarf dependency.
- Removed the stub for @scarf/scarf as it is no longer needed.
- Enhanced the telemetry implementation to forward events to the Scarf gateway from the server-side.

* feat(inspector): try to fix ph

* chore: add changeset for '@mcp-use/inspector' patch to fix Scarf integration

* chore(typescript): version packages (canary)

* fix(inspector): improve header handling in registerInspectorRoutes (#370)

* fix(inspector): improve header handling in registerInspectorRoutes

- Updated header processing to exclude 'accept-encoding' to prevent compression issues.
- Added explicit request for uncompressed responses by setting 'Accept-Encoding' to 'identity'.
- Enhanced response header forwarding by omitting compression-related headers to ensure accurate body state representation.

* Update libraries/typescript/packages/inspector/src/server/shared-routes.ts

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Pietro Zullo <62951181+pietrozullo@users.noreply.github.com>

* changeset

---------

Signed-off-by: Pietro Zullo <62951181+pietrozullo@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* chore(typescript): version packages (canary)

* refactor(inspector): replace posthog-js with posthog-node and enhance telemetry logging (#372)

- Updated the telemetry implementation to use posthog-node for server-side event logging.
- Introduced a new proxy endpoint for forwarding telemetry events to PostHog.
- Removed the logger utility file and streamlined error handling in telemetry methods to ensure silent failures do not disrupt application flow.
- Added a new test_app with specified dependencies in pnpm-lock.yaml to support development.

* chore(typescript): version packages (canary)

* createapp: init git repository

* chore(typescript): version packages (canary)

* chore: push not pushed changeset (#373)

* chore(typescript): version packages (canary)

* chore: inspector server logging (#374)

* refactor(inspector): streamline logging middleware usage

- Removed global logger middleware from the main server file.
- Applied logger middleware specifically to proxy routes in shared-routes.ts for improved performance and clarity.
- Cleaned up error handling in the streaming response section for better readability.

* changeset

* chore(typescript): version packages (canary)

* fix logging (#375)

* refactor(inspector): apply logger middleware to proxy routes only

- Updated logger middleware usage to apply only to '/inspector/api/proxy/*' routes, enhancing performance and clarity in logging.

* changeset

* chore(typescript): version packages (canary)

* fix lint

---------

Signed-off-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com>
Signed-off-by: Pietro Zullo <62951181+pietrozullo@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: Enrico Toniato <2827496+tonxxd@users.noreply.github.com>
Co-authored-by: pietrozullo <pietro.zullo@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* chore(release): exit prerelease mode and version packages (#377)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* fix: sync pre.json with canary to resolve merge conflicts

---------

Signed-off-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com>
Signed-off-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: Luigi Pederzani <luigipederzani@gmail.com>
Co-authored-by: Pietro Zullo <62951181+pietrozullo@users.noreply.github.com>
Co-authored-by: pietrozullo <pietro.zullo@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* chore(typescript): version packages (canary)

* fix: template + lint (#384)

* chore: update package.json files to include @mcp-use/cli and @mcp-use/inspector as devDependencies in apps-sdk, mcp-ui, and starter templates

* changeset

* fix lint

* fix broken link

* chore(typescript): version packages (canary)

* fix (#385)

* chore(typescript): version packages (canary)

---------

Signed-off-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com>
Signed-off-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: Enrico Toniato <2827496+tonxxd@users.noreply.github.com>
Co-authored-by: Pietro Zullo <62951181+pietrozullo@users.noreply.github.com>
Co-authored-by: pietrozullo <pietro.zullo@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-23 19:42:47 +02:00
pietrozullo 6aecf7c5a2 chore:docs: remove stale docs 2025-10-22 17:45:04 +02:00
pietrozullo 3d32fdec2d fix: docs formatting 2025-10-22 07:44:39 +02:00
Vincenzo Reina 7d3a3040a9 feat: Adapter integrations (#325)
* feat: openai, anthropic, google adapters

* feat: adapters examples and documentation

* feat: update imports

* fix: release drafter action

* docs: header change

* chore: locked langchain dependencies in pyproject.toml (#321)

* python/release/1.3.13

* feat: Update langchain adapter

* feat: Update MCPAgent

* feat: General fixes

* feat: Correct naming

* feat: Fix formatting

* feat: Add genai dependency

* feat: Fix documentation

* feat: Fix imports

* logo

* icons

* Update docs/python/integration/google.mdx

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Pietro Zullo <62951181+pietrozullo@users.noreply.github.com>

* feat: Critical bug fixes

* chore: local logos

* chore: moved icons

* fix: Lambda closure issue

* docs: Add steps

* docs: Fix documentation

* fix docs action

* fix attempt 2

* docs: update

* chore: google optional dependency

* chore: minor docs changes

* fix generate docs script

* fix: lint

* import guard in __init__ file

* ci: install google-genai in docs workflow

* chore: print diffs

* chore: fix action checkout ref

---------

Signed-off-by: Vincenzo Reina <vincenzoreinaa05@gmail.com>
Signed-off-by: Pietro Zullo <62951181+pietrozullo@users.noreply.github.com>
Co-authored-by: pietrozullo <pietro.zullo@gmail.com>
Co-authored-by: Pietro Zullo <62951181+pietrozullo@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-22 07:37:29 +02:00
Pietro Zullo 0106a76673 feat/typescript/hosted inspector & docs (#361)
* Instant deploy Dockerfile

* removed start.sh

* remove slop

* docs: inspector docs

* redirect in sidebar

* fix railway url

* better docker
2025-10-21 14:48:00 +02:00
pietrozullo 6730314d3c mcp 101 and X.com 2025-10-20 16:59:39 +02:00
pietrozullo f1791638ff navlinks 2025-10-20 15:43:51 +02:00
Pietro Zullo 1cae240ca2 feat/docs (#340)
* Check out feat/server/python branch with latest docs

* feat: structure v1

* feat: product navigation

* stubs

* emtpy pages

* feat: home page

* autogenerate docs updated

* side bar on home page with redirects

* theme adaptation of welcome cards

* cleanup logos

* cleanup

* WIP disclosure in Python Server

* feat: add initial documentation and images for MCP server framework

* feat: add TypeScript documentation for mcp agent and mcp client + remove typescript reference from python files

* fix: update sandbox documentation for Python and TypeScript clients

- Adjusted Python sandbox documentation for clarity in API key usage.
- Added a warning in TypeScript documentation indicating that sandbox execution is not yet supported, with a reference to the Python version for users needing this functionality.

* feat: enhance TypeScript SDK documentation with new icons and structured navigation

* fix

* feat: update getting started guide

* refactor: remove sandboxed execution section from TypeScript connection types documentation

- Deleted the Sandboxed Execution section, including installation instructions and characteristics.
- Updated the Choosing the Right Connection Type section to reflect the removal of sandboxed execution details.

* feat: add observability documentation for MCP agents

* feat: add comprehensive documentation for MCP server framework

* feat: expand TypeScript server documentation with new templates, prompts, and UI widgets sections

* fix

* color hover

* remove inspector

* feat: remove claude code review

* fix: broken links

---------

Co-authored-by: Luigi Pederzani <luigipederzani@gmail.com>
2025-10-20 14:35:55 +02:00
pietrozullo c5625de079 python/release/1.3.13 2025-10-18 15:38:13 +02:00
pietrozullo ebfa187570 docs: header change 2025-10-18 10:19:43 +02:00
Pietro Zullo 18f51eddb8 Feat: python/restructure (#318)
* move: session

* move: client

* move:config

* move: exceptions

* move: connectors -> client.connectors

* move: task_managers -> client.task_managers

* move: observability -> agents.observability

* move: middleware -> client.middleware

* move: managers -> agents.managers

* move: auth -> client.auth

* move: adapters -> agents.adapters

* test: bc test

* test: bc test

* chore: remove relative imports

* fix tests

* chore: update docs

* chore: deprecation warnings

* chore: fix dangerous non absolute import

* fix: remove legacy imports

* telemetry
2025-10-17 20:09:19 +02:00
Pietro Zullo c87f85385c chore: docs og image fix 2025-10-16 13:02:18 +00:00
Luigi Pederzani 3ff31be303 move docs 2025-10-15 19:23:46 +02:00