mirror of
https://github.com/mcp-use/mcp-use.git
synced 2026-09-14 18:06:01 +08:00
codex/oauth-proxy-example-docs
267 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
59d44ba59a | update docs to reflect hono server rather than express (#1044) | ||
|
|
179e8003b7 |
Canary (#1045)
* feat(typescript): add everything-server example for compile-time type coverage of mcp-use APIs (#1040) * add everything-server example for compile-time type coverage of mcp-use APIs * add UseWidgetResult<Props> type annotation to validate useWidget() return type * add changeset * run format * move everything-typecheck to an independent workflow * chore: enter canary prerelease mode * chore(typescript): version packages (canary) * feat(inspector): enhance ToolsTab with bulk paste functionality and auto-fill dialog (#1043) * feat(inspector): enhance ToolsTab with bulk paste functionality and auto-fill dialog - Implemented bulk paste feature allowing users to paste JSON or JavaScript objects directly into input fields. - Added auto-fill dialog for confirming updates when pasted data would overwrite existing values, improving user experience. - Introduced utility functions for parsing pasted text and converting JavaScript object syntax to valid JSON. - Updated ToolInputForm and ToolExecutionPanel components to support new functionality and provide visual feedback for auto-filled fields. * feat(inspector): update ToolExecutionPanel to copy full tool definition fix(server): correctly convert nested inpout schema args for tools * chore(typescript): version packages (canary) * Fix/various (#1041) * refactor(inspector): improve MCPAppsRenderer loading logic and enhance useWidget for iframe handling (#1037) - Updated MCPAppsRenderer to replace `isReady` with `initCount` for better iframe loading state management, ensuring the spinner is hidden appropriately. - Enhanced loading logic to account for iframe initialization, improving user experience during rapid remounts. - Modified useWidget to handle transitional states in iframes without URL parameters, preventing premature rendering with empty props. * chore(typescript): version packages (canary) * feat(cli): add generate-types command for TypeScript type definitions - Introduced a new CLI command `generate-types` to generate TypeScript type definitions for tools, writing to `.mcp-use/tool-registry.d.ts`. - Added options for specifying the project directory and server entry file. - Implemented error handling for missing server files and type generation failures. - Updated `package.json` to include a post-install script that runs the `generate-types` command. - Modified `tsconfig.json` to include the generated type definitions in the TypeScript compilation process. * chore: remove outdated changeset files for inspector and mcp-use - Deleted changeset markdown files and pre.json related to previous enhancements in the inspector and mcp-use libraries to streamline the repository and eliminate deprecated entries. * chore: remove outdated changeset reference from pre.json - Deleted the "petite-rules-talk" changeset entry from pre.json to clean up the changeset list and maintain accuracy in the repository. --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * chore(typescript): version packages (canary) * chore(changelog): update changelogs for v0.21.0 and v0.20.1 releases - Added details for v0.21.0 including bulk paste functionality and tool definition enhancements. - Included v0.20.1 updates focusing on MCPApps and widget improvements. - Updated package versions for dependencies in both changelogs. --------- Co-authored-by: Joaquin Coromina <75667013+bjoaquinc@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> |
||
|
|
f4e2a70bd6 |
Canary (#1024)
* feat(typescript): add conformance client for client-side conformance testing (#1009) * feat(dns-rebinding): implement DNS rebinding protection and examples (#1001) - Added `allowedOrigins` configuration to the `MCPServer` for DNS rebinding protection, enabling host validation for specified origins. - Updated documentation to clarify the behavior of `allowedOrigins` in development and production environments. - Introduced a new example demonstrating DNS rebinding protection, including curl commands for testing. - Enhanced server methods and middleware to support the new host validation feature. - Refactored related documentation to improve clarity on middleware and configuration options. * chore: enter canary prerelease mode * feat(mcp): defer server callbacks to avoid render-phase updates (#1002) - Introduced a mechanism to collect callbacks for server state changes and defer their execution using `queueMicrotask`, preventing potential render-phase updates during state updates. - Updated the `McpClientProvider` to push `onServerAdded` and `onServerStateChange` callbacks into an array for deferred execution, enhancing performance and stability. * feat(inspector): enhance elicitation support with SEP-1330 enum schema variants (#1010) - Added detailed documentation for the Elicitation tab, outlining its features and supported schema patterns. - Implemented handling for various SEP-1330 enum schema variants in the client and server, including single-select and multi-select options. - Introduced new tests to validate the elicitation flow for all enum schema variants, ensuring correct rendering and submission behavior. - Updated examples and README files to reflect the new elicitation capabilities and SEP-1330 patterns. * feat(inspector): implement partial tool input handling for streaming arguments - Added support for partial tool input in the MCPAppsRenderer, allowing for real-time updates during LLM argument generation. - Enhanced MessageList and ToolResultRenderer components to accommodate new streaming states and partial arguments. - Updated useChatMessagesClientSide to handle streaming tool call arguments, improving user experience during interactions. - Introduced new types and state management in useWidget for tracking partial tool input and streaming status. * chore(typescript): version packages (canary) * feat(inspector): enhance tool argument handling with type coercion and schema resolution (#1013) - Introduced utility functions for coercing input values based on their expected types, improving the handling of boolean, array, and object parameters. - Updated ToolsTab and ToolInputForm components to utilize new schema utilities for resolving property types and extracting enum values. - Added a new server tool for validating argument typing, ensuring correct submission of typed values. - Enhanced end-to-end tests to verify the correct behavior of typed arguments in tool execution. * feat(docs): enhance documentation for streaming tool arguments and live previews - Updated guides and examples to include details on streaming tool arguments in widgets, enabling real-time updates during LLM interactions. - Added new sections in `useWidget` documentation to explain `partialToolInput` and `isStreaming` properties. - Included a new example demonstrating live previews while streaming tool arguments in the MCP Inspector and MCP Apps clients. * feat(typescript): add conformance client for client-side conformance testing Adds conformance-client.ts alongside the existing conformance server (no new packages — reuses the server's deps). - conformance-client.ts: handles initialize, tools_call, elicitation defaults, and sse-retry scenarios using MCPClient - run-conformance-client.sh: wrapper for the conformance runner - Updated CI workflow to run TS client conformance alongside Python client * fix(client): fix client oauth handling (#1015) * fix(docs): update links and references in documentation - Updated Discord link in SKILL.md to the new invite URL. - Corrected path for Apps SDK in examples/README.md to reflect the new directory structure. - Revised deployment instructions in cli/README.md for clarity on environment variable configuration. - Enhanced WorkOS OAuth example documentation with a link to the relevant settings screenshot. * refactor: update conformance workflow and documentation for TypeScript client - Adjusted paths in the conformance workflow to reflect the new directory structure for client features. - Enhanced documentation to clarify the configuration structure and options for the MCPClient, including root-level callbacks and examples. - Removed deprecated references and improved clarity in the elicitation and sampling sections. - Updated examples to demonstrate the new configuration options and usage patterns for the TypeScript client. * feat(client): enhance OAuth handling in conformance clients - Integrated automatic OAuth flow in TypeScript conformance clients (browser, node, and react). - Updated `headless-oauth-provider` to support token request preparation for authorization code exchange. - Modified `useMcp` to allow automatic triggering of OAuth authentication based on configuration. - Improved handling of authentication scenarios in the conformance test client. This update streamlines the authentication process, ensuring a smoother user experience during conformance testing. * feat(auth): add probeAuthParams for enhanced OAuth parameter handling - Introduced `probeAuthParams` to extract WWW-Authenticate parameters (scope, resource_metadata) from 401 responses. - Updated conformance clients (browser and node) to utilize `probeAuthParams` for improved OAuth flow. - Enhanced `useMcp` hook to support automatic probing of authentication parameters during the OAuth process. This update streamlines the authentication experience by ensuring necessary parameters are captured and utilized effectively. * feat(conformance): integrate pre-registration context in OAuth provider - Added `parseConformanceContext` function to extract pre-registration parameters from environment variables. - Updated conformance clients (browser, node, and react) to utilize the new context when creating the headless OAuth provider. - Enhanced `createHeadlessConformanceOAuthProvider` to accept an optional pre-registration context for improved OAuth handling. This update improves the flexibility and configurability of the OAuth flow in conformance testing scenarios. * feat(conformance): enhance OAuth flow for scope-step-up scenarios - Introduced `isScopeStepUpScenario` function to identify scenarios requiring special handling for OAuth authentication. - Updated conformance clients (browser, node, and react) to implement OAuth retry fetch for scope-step-up scenarios, ensuring the first token has limited scope. - Modified authentication logic to prevent pre-authentication in scope-step-up cases, allowing for proper token escalation. This update improves the OAuth handling in conformance testing, ensuring correct behavior during scope escalation scenarios. * feat(oauth): improve OAuth retry fetch and custom fetch support - Enhanced `createOAuthRetryFetch` to strip the `WWW-Authenticate` header, preventing unwanted auth flows during retries. - Added optional `fetch` property in `UseMcpOptions` to allow custom fetch functions for MCP HTTP requests, enabling better control over authentication logic. - Updated `useMcp` to pass the custom fetch function when provided, facilitating OAuth retry handling. This update enhances the flexibility and robustness of the OAuth flow in conformance testing scenarios. * chore: remove outdated changeset files for inspector and mcp-use - Deleted changeset files related to previous enhancements in the inspector and mcp-use libraries, including updates on argument handling and server callback deferral. - Cleared pre.json file and other changeset markdowns to streamline the repository and remove deprecated entries. --------- 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> * chore: enter canary prerelease mode * chore(typescript): version packages (canary) * feat(create-mcp-use-app): add optional skills and package dependency installation steps (#998) * add install steps for skills and dependencies * fix tests to point at starter instead of ui and skip user interactive prompting * update docs for create-mcp-use-app * run format and lint * add changeset * fix user message * switch from vercel skills package to manual download and copy of skills folder * remove unnecessary early return if presets are empty * update pnpm-lock.yaml to add tar and @types/tar dependencies, and include minipass version 4.2.8 * change skills installation prompt to (Y/n) instead of selecting agents. add telemetry event to vercel for every download. update tests and docs * move InstallTelemetryData interface above where its used * remove helper text --------- 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) * fix: correct mcp_apps MIME type & disable telemetry in tests (#1023) * fix: use correct MIME type for mcp_apps resource counting and disable telemetry in tests Replace hardcoded "text/html+mcp" with RESOURCE_MIME_TYPE from @modelcontextprotocol/ext-apps so mcp_apps_resources_number reports correctly. Add MCP_USE_ANONYMIZED_TELEMETRY=false to vitest configs to prevent telemetry during local test runs. * fix: disable telemetry in inspector e2e tests Set MCP_USE_ANONYMIZED_TELEMETRY=false in playwright.config.ts so the inspector's web server and test processes don't fire telemetry events. * chore: add changeset for MIME type fix and telemetry disable * chore(typescript): version packages (canary) * improvement(typescript): fix prompt method to use generic type inference for callback parameters (#1029) * test: trigger conformance badge update with new token Co-authored-by: Cursor <cursoragent@cursor.com> * test: trigger badge update with delay fix Co-authored-by: Cursor <cursoragent@cursor.com> * test: trigger badge update with delay fix Co-authored-by: Cursor <cursoragent@cursor.com> * improve type inference for prompt args in the callback fn * Remove test badge update fix comment Signed-off-by: Joaquin Coromina <75667013+bjoaquinc@users.noreply.github.com> * Remove comment from conformance.yml Remove comment about test badge update delay fix Signed-off-by: Joaquin Coromina <75667013+bjoaquinc@users.noreply.github.com> --------- Signed-off-by: Joaquin Coromina <75667013+bjoaquinc@users.noreply.github.com> Co-authored-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com> * fix(typescript): lint error when object() response helper added to mix() (#1025) * test: trigger conformance badge update with new token Co-authored-by: Cursor <cursoragent@cursor.com> * fix type issue when object() response helper is added in mix() --------- Co-authored-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com> * chore(typescript): version packages (canary) * feat(inspector): enhance ChatTab and related components with quick questions and followups (#997) * feat(inspector): enhance client package with new components and configuration options (#973) * feat(inspector): enhance client package with new components and configuration options - Added a new test_app configuration in pnpm-lock.yaml with updated dependencies for improved development. - Refactored build scripts in package.json to streamline client exports and ensure compatibility. - Introduced tsup.client.ts for better bundling configuration of client components. - Expanded the index.ts file to include new chat components and utility functions, enhancing the inspector's functionality. - Updated ChatTab and related components to support new props for better customization and control. - Added serverBaseUrl prop to various components to facilitate external API calls without relying on context. - Implemented new hooks and types for improved chat message handling and configuration management. - Introduced stubs for Node.js modules to ensure compatibility in browser environments. - Added rpc-log-bus for logging RPC events, enhancing debugging capabilities in server interactions. * feat(inspector): add new props for ChatTab, ChatHeader, and ChatLandingForm components - Introduced `clearButtonLabel`, `hideTitle`, and `hideModelBadge` props to enhance customization options for the ChatTab and ChatHeader components. - Updated the ChatLandingForm to conditionally render the model badge based on the new `hideModelBadge` prop. - Improved the display logic for the clear/new-chat button to utilize the `clearButtonLabel` prop, allowing for dynamic labeling. * feat(inspector): add hideServerUrl prop to ChatTab and ChatLandingForm components - Introduced `hideServerUrl` prop to both ChatTab and ChatLandingForm components, allowing for conditional rendering of the MCP server URL. - Updated documentation comments to reflect the new prop's functionality, enhancing customization options for users. * feat(hmr): enhance TypeScript support and registration synchronization - Updated the `tsImport` function to accept additional options for improved TypeScript handling, including cache busting and import callbacks. - Enhanced the `importServerModule` function to provide better warnings for module re-imports and instance management. - Refined the `syncRegistrationsFrom` method in `MCPServerClass` to return detailed change statistics for tools, prompts, and resources, improving change detection and logging. - Added debug logging for unchanged registrations to aid in troubleshooting during hot module reloading (HMR). - Wrapped handler functions with session context to maintain access to context features after HMR updates, ensuring consistent behavior. * feat(inspector): enhance tool change detection and metadata handling - Updated the `ToolsTab` component to include additional checks for changes in tool metadata, ensuring more accurate detection of updates. - Refined the handling of tool metadata during hot module reloading (HMR) to fully replace existing metadata instead of merging, improving consistency. - Added comprehensive E2E tests to validate tool handler logic changes after HMR, ensuring expected behavior for both text and widget outputs. - Adjusted the `McpClientProvider` to correctly pass metadata to tools, enhancing the overall functionality and user experience. * feat(inspector): enhance ChatTab and Layout components with new props and visibility controls - Added new props to `ChatTab` and `ChatHeader` for customizing the clear/new-chat button, including `clearButtonHideIcon`, `clearButtonHideShortcut`, and `clearButtonVariant`. - Updated `Layout` and `LayoutHeader` components to support single-tab mode and visibility of tabs based on the `embeddedConfig`, improving user experience in embedded scenarios. - Refactored tab rendering logic in `LayoutContent` to conditionally display tabs based on the `visibleTabs` configuration, enhancing flexibility for users. * feat(mcp): propagate widget resources to existing sessions - Added `propagateWidgetResourcesToSessions` method to `MCPServerClass` to ensure newly registered widget resources are available to existing sessions without requiring a reconnect. - Updated `uiResourceRegistration` to call the new method, allowing resource propagation regardless of tool registration status. - Enhanced logging for resource propagation to improve visibility during session updates. * fix(cli): increase chunk size warning limit for bundles * feat(inspector): add HMR regression test for widget resource propagation - Implemented a new E2E test to verify that dynamically added widget resources are correctly registered and propagated to existing sessions during hot module reloading (HMR). - Enhanced file utility functions to support writing and removing widget resource files, ensuring proper cleanup after tests. - Updated the MCPServerClass to track session references for resources, improving synchronization during HMR updates. * feat(logging): add conditional debug logging for widget operations - Introduced a `debugWidget` flag to control logging for widget-related operations in `shared-routes.ts`, `shared-utils.ts`, and `mount-mcp.ts`. - Enhanced logging statements to only execute when the `DEBUG` environment variable is set, improving performance and reducing noise in production logs. - Updated the `requestLogger` to skip logging for noisy GET requests, further optimizing log management. * chore(pnpm): remove test_app configuration and its dependencies from pnpm-lock.yaml * fix(inspector): update build configurations and improve type handling - Modified `package.json` to ensure proper declaration file generation during client exports. - Adjusted `tsconfig.client.json` to change the root directory and output directory for better organization. - Enhanced type handling in `McpUIRenderer.tsx` by using a more specific type for resource properties. - Updated `WidgetDebugContext.tsx` to define a `DeviceType` type for improved type safety. - Removed unused `rpc-log-bus` definitions to clean up the codebase. * feat(mcp): improve resource registration logic in MCPServerClass - Enhanced the resource registration process to skip adding resources that are already propagated to sessions, preventing duplicate registrations. - Updated logging to provide clearer feedback on resource addition and registration failures. - Refactored the handling of widget resource templates to ensure they are only registered if not already present in the session, improving efficiency and reducing potential errors. * feat(mcp): implement dynamic HMR port allocation for development servers - Added a function to find an available port for Hot Module Replacement (HMR), allowing multiple development servers to run concurrently without port conflicts. - Updated the Vite server configuration to use the dynamically allocated HMR port instead of a hardcoded value, enhancing flexibility in development environments. - Improved logging to reflect the dynamically chosen HMR port, ensuring better visibility during server setup. * fix(inspector): improve same-origin detection for widget iframes - Updated the logic for determining if the widget iframe is same-origin with the inspector page, enhancing console interception and debug controls. - Refactored the setting of `isSameOrigin` to use the new computed value, ensuring accurate cross-origin handling for both development and production environments. * fix(inspector): correct inspector API base URL handling - Updated the logic for determining the inspector API base URL to use relative URLs, ensuring that API calls target the correct origin of the inspector UI instead of the MCP server. - Removed the previous logic that derived the base from the MCP server URL, which caused issues when the server ran on a different port, improving cross-origin handling. * refactor(mcp-server): update syncRegistrationsFrom method to return detailed change summary - Modified the syncRegistrationsFrom method to return an object containing total changes and detailed counts for added, removed, and updated tools, prompts, and resources. - This enhancement improves the method's utility by providing comprehensive feedback on registration changes during synchronization. * fix(tests): enhance waitForHMR function to support no-change scenarios - Updated the waitForHMR function to accept an options parameter, allowing it to handle cases where no changes are detected during Hot Module Replacement (HMR). - Modified the integration test to utilize the new functionality, ensuring it can correctly resolve when no changes occur, improving test reliability. * feat(hmr-sync): add debug logging for HMR changes and improve resource key handling - Introduced a new function to check if debug logging is enabled, enhancing the visibility of changes during Hot Module Replacement (HMR). - Updated debug logging to conditionally display changes in configuration and handler, including previews of old and new handlers. - Refactored resource key handling in MCPServerClass to improve clarity and maintainability. * feat(hmr): implement widget re-addition test and enhance resource cleanup - Added a new test to verify that deleting and re-adding a widget resource correctly re-registers it for the same session during Hot Module Replacement (HMR). - Enhanced the MCPServerClass to ensure proper cleanup of resources from both session and root native server states, preventing registration conflicts when re-adding widgets. * feat(inspector): enhance ChatTab and related components with quick questions and followups - Added support for `chatQuickQuestions` and `chatFollowups` props in `ChatTab`, `ChatLandingForm`, and `ChatInputArea` components to improve user interaction. - Implemented functionality to handle quick question and followup selection, enhancing the chat experience. - Updated `InspectorContext` to include new configuration options for quick questions and followups. - Enhanced message handling and event posting for better integration with the chat system. * feat(inspector): enhance error handling and logging for MCP Apps and OpenAI components - Implemented error logging functionality in MCPAppsRenderer and OpenAIComponentRenderer to capture and post error messages and stack traces to the parent window. - Added global error and unhandled promise rejection listeners in shared-utils to emit runtime errors with detailed context. - Enhanced console error handling in mcp-apps route to serialize and send console errors to the parent window, improving debugging capabilities. * refactor(inspector): replace isReady state with initCount in MCPAppsRenderer - Updated the MCPAppsRenderer component to replace the `isReady` state with `initCount` for better tracking of initialization events. - Adjusted related useEffect hooks to utilize `initCount` for conditional logic, improving clarity and functionality in widget initialization and message handling. * feat(mcp): implement direct stdio connector handling in Node.js client - Added support for handling the stdio connector directly within the Node.js MCPClient, allowing for command and argument configuration. - Updated the loadConfigFile function to dynamically import the fs module, preventing unnecessary inclusion in browser bundles. - Enhanced error handling to ensure that the stdio connector is only utilized in the appropriate environment, improving compatibility and clarity. * feat(inspector): add log copying functionality to IframeConsole and enhance theme handling in OpenAIComponentRenderer - Implemented a new feature in IframeConsole to copy all logs to the clipboard, providing users with an easy way to access console logs. - Enhanced OpenAIComponentRenderer to manage widget readiness state and apply theme changes dynamically, improving user experience and visual consistency. - Updated ThemeProvider to synchronize theme application with Tailwind dark mode and OpenAI Apps SDK design tokens, ensuring a seamless theme transition. - Added a message signaling to the parent window when the widget is ready, enhancing communication between components. * test: trigger badge update with delay fix Co-authored-by: Cursor <cursoragent@cursor.com> * feat(inspector): enhance ToolsList component with metadata display and add MCP/OpenAI icons - Updated ListItem component to conditionally render metadata. - Enhanced ToolsList to include tool metadata with icons for MCP and OpenAI, utilizing tool detection logic. - Introduced McpIcon and OpenAIIcon components for better visual representation of tool types. * feat(inspector): improve loading state and UI feedback in OpenAIComponentRenderer - Replaced shimmer animation with a Spinner component for a more consistent loading experience. - Introduced a skeleton loading state that only displays on the initial load of the widget. - Updated ToolResultDisplay to adjust the order of view checks for better clarity. - Enhanced ToolsList to conditionally display parameter counts based on tool input schemas. * fix(vitest): add support for additional file extensions in Vitest configuration (#1031) * Fix README formatting for test badge update Fix formatting of the test badge update section in README. Signed-off-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com> * fix(ChatLandingForm): update button text color for better visibility in light and dark modes * fix(changesets): clean up and complete changeset documentation - Removed 3 changesets from PR #973 that were already in canary (lazy-animals-feel, slow-otters-lick, sour-hoops-arrive) - Updated six-groups-fry.md to include full description of OpenAI renderer improvements - Added chatty-owls-glow.md for quick questions/followups feature - Added brave-lions-sleep.md for error handling and logging enhancements - Added tough-dragons-wave.md for IframeConsole log copying and theme handling - Added tiny-trains-smile.md for ToolsList metadata and icons - Added happy-sharks-dance.md for stdio connector support All code changes in this branch are now properly documented with changesets. Co-authored-by: Cursor <cursoragent@cursor.com> * fix(mcp): normalize client info in stdio connector handling - Updated the MCPClient to use normalizeClientInfo for clientInfo when configuring the StdioConnector. - Removed dynamic require for StdioConnector, improving code clarity and maintainability. - Enhanced type definitions for stdioConfig to ensure better type safety and clarity in the configuration process. --------- Signed-off-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com> * refactor(inspector): update frame-ancestors policy for improved security handling (#1032) - Simplified the logic for setting the frame-ancestors policy in the getWidgetSecurityHeaders function. - Enhanced the handling of the FRAME_ANCESTORS environment variable to allow for backward compatibility while defaulting to allow all origins when unset. - Updated comments for clarity on the behavior of frame-ancestors in different scenarios. * chore(typescript): version packages (canary) * feat(readme): add client conformance badges for Python and TypeScript - Introduced new conformance badges for Python and TypeScript client packages in the README to enhance visibility of project status and compliance. * feat: add logLevel option and silent mode to suppress console logging (fix #986) (#995) * feat: add logLevel option and silent mode to suppress console logging (fix #986) Changes: - Add 'silent' log level to LogLevel type; shouldLog() returns false for all levels when silent - Add logLevel option to UseMcpOptions; takes precedence over the debug boolean - Route addLog() through per-instance Logger instead of raw console[level]() calls - Fix global clobber: each useMcp instance creates its own named logger via Logger.get() so multiple instances don't overwrite each other's log levels - Migrate all console.* calls to logger.* in: - react/useMcp.ts - client/browser.ts - connectors/base.ts - connectors/http.ts - Export LogLevel type from browser entry point The mcp.log state array is still always populated for programmatic access. * feat: migrate McpClientProvider console.* to logger and deprecate debug attr * fix(react): complete logLevel migration and add comprehensive tests Completes the migration to respect logLevel configuration across all React client components by routing remaining console.* calls through the Logger class. Changes: - Route rpc-logger console calls through Logger.get('RpcLogger') - Route ErrorBoundary console.error through Logger.get('ErrorBoundary') - Remove debug console.log in ThemeProvider - Fix inconsistent logging in useMcp (use addLog instead of direct instanceLogger) Tests: - Add comprehensive Logger configuration tests (13 tests) - Silent mode suppression - Log level filtering - Per-instance loggers - Format styles (minimal, detailed, emoji) - Logger.setDebug() behavior - Add useMcp hook logLevel tests (6 tests) - logLevel option behavior - Silent mode with log state preservation - logLevel vs debug prop precedence - Per-instance logger isolation All tests passing, build succeeds. Related: PR #995, Issue #986 Co-authored-by: Cursor <cursoragent@cursor.com> * fix(logging): enhance logging consistency and add tests for logLevel behavior - Improved logging consistency across React components by ensuring all console calls are routed through the Logger class. - Added comprehensive tests for Logger configuration, including log level filtering and silent mode behavior. - Updated useMcp hook tests to validate logLevel options and their interactions. All tests passing, build succeeds. --------- Signed-off-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com> Co-authored-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com> Co-authored-by: Cursor <cursoragent@cursor.com> * chore(typescript): version packages (canary) * fix error() return type to be compatible with tool callbacks that use outputSchema (#1033) * chore(typescript): version packages (canary) * feat(inspector): enhance MCPAppsRenderer and OpenAIComponentRenderer with loading states and spinner (#1034) - Updated MCPAppsRenderer to include a loading spinner during widget initialization, improving user feedback. - Introduced a new `isReady` state to manage the loading state effectively. - Enhanced OpenAIComponentRenderer to adjust display properties based on the new configuration for better responsiveness. - Added a maximum width for the Picture-in-Picture mode in MCP_APPS_CONFIG for improved layout control. - Refactored iframe loading handling to ensure proper state management and user experience during loading phases. * chore(typescript): version packages (canary) * feat(inspector): release v0.20.0 with chat enhancements and improved UX - Introduced support for `chatQuickQuestions` and `chatFollowups` in ChatTab components. - Enhanced loading states in MCPAppsRenderer with a new spinner and skeleton loading for widgets. - Added global error listeners and improved error logging in widget components. - New feature to copy all logs to clipboard and enhanced theme handling in OpenAIComponentRenderer. - Updated dependencies, including mcp-use to v1.19.0. - Various fixes for CSP frame ancestors and MIME type handling. --------- Signed-off-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com> Signed-off-by: Joaquin Coromina <75667013+bjoaquinc@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: Joaquin Coromina <75667013+bjoaquinc@users.noreply.github.com> Co-authored-by: Luigi Pederzani <luigipederzani@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com> Co-authored-by: Ashutosh Kumar Singh <161562995+Ashutosh0x@users.noreply.github.com> |
||
|
|
cfeb41e3ea |
docs(python): update LangChain examples to use 1.0+ API (#1022)
Replace deprecated AgentExecutor/create_tool_calling_agent with the modern create_agent/init_chat_model API, matching the existing LangChain integration page and examples. |
||
|
|
3334a67769 |
Canary (#1012)
* feat(dns-rebinding): implement DNS rebinding protection and examples (#1001) - Added `allowedOrigins` configuration to the `MCPServer` for DNS rebinding protection, enabling host validation for specified origins. - Updated documentation to clarify the behavior of `allowedOrigins` in development and production environments. - Introduced a new example demonstrating DNS rebinding protection, including curl commands for testing. - Enhanced server methods and middleware to support the new host validation feature. - Refactored related documentation to improve clarity on middleware and configuration options. * chore: enter canary prerelease mode * chore(typescript): version packages (canary) * fix(inspector): enhance readiness state management and tool output handling - Added a useEffect hook in OpenAIComponentRenderer to reset the readiness state when the widget URL changes, ensuring proper updates for new iframes. - Updated shared-utils to improve handling of tool output and response metadata, facilitating smoother transitions of widget states from pending to ready. * feat(mcp): defer server callbacks to avoid render-phase updates (#1002) - Introduced a mechanism to collect callbacks for server state changes and defer their execution using `queueMicrotask`, preventing potential render-phase updates during state updates. - Updated the `McpClientProvider` to push `onServerAdded` and `onServerStateChange` callbacks into an array for deferred execution, enhancing performance and stability. * chore(typescript): version packages (canary) * feat(inspector): enhance elicitation support with SEP-1330 enum schema variants (#1010) - Added detailed documentation for the Elicitation tab, outlining its features and supported schema patterns. - Implemented handling for various SEP-1330 enum schema variants in the client and server, including single-select and multi-select options. - Introduced new tests to validate the elicitation flow for all enum schema variants, ensuring correct rendering and submission behavior. - Updated examples and README files to reflect the new elicitation capabilities and SEP-1330 patterns. * chore(typescript): version packages (canary) * feat(inspector): implement partial tool input handling for streaming arguments - Added support for partial tool input in the MCPAppsRenderer, allowing for real-time updates during LLM argument generation. - Enhanced MessageList and ToolResultRenderer components to accommodate new streaming states and partial arguments. - Updated useChatMessagesClientSide to handle streaming tool call arguments, improving user experience during interactions. - Introduced new types and state management in useWidget for tracking partial tool input and streaming status. * chore(typescript): version packages (canary) * feat(inspector): enhance tool argument handling with type coercion and schema resolution (#1013) - Introduced utility functions for coercing input values based on their expected types, improving the handling of boolean, array, and object parameters. - Updated ToolsTab and ToolInputForm components to utilize new schema utilities for resolving property types and extracting enum values. - Added a new server tool for validating argument typing, ensuring correct submission of typed values. - Enhanced end-to-end tests to verify the correct behavior of typed arguments in tool execution. * chore(typescript): version packages (canary) * changelog * feat(docs): enhance documentation for streaming tool arguments and live previews - Updated guides and examples to include details on streaming tool arguments in widgets, enabling real-time updates during LLM interactions. - Added new sections in `useWidget` documentation to explain `partialToolInput` and `isStreaming` properties. - Included a new example demonstrating live previews while streaming tool arguments in the MCP Inspector and MCP Apps clients. --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> |
||
|
|
a9bc4db3ae |
feat(python): add protocol handlers for logging, completions, subscriptions, and DNS protection (#1004)
* feat(python): add protocol handlers for logging, completions, subscriptions, and DNS protection Server SDK changes: - logging/setLevel: stores client level, Context.log() filters by RFC 5424 severity - completion/complete: default empty handler, overridable via mcp.completion() - resources/subscribe + unsubscribe: tracks per-session subscriptions - notify_resource_updated(): broadcasts to all subscribed sessions via WeakSet - dns_rebinding_protection: explicit constructor parameter (default: False) - Capabilities patch for subscribe=True Middleware: - Added hooks: on_set_logging_level, on_subscribe_resource, on_unsubscribe_resource, on_complete Tests: - 9 unit tests for log level filtering (RFC 5424) - Updated DNS protection tests for explicit flag Docs: - logging.mdx: MCP protocol logging section with level filtering - resources.mdx: subscription section with example - middleware.mdx: new hooks documented Refs: - https://modelcontextprotocol.io/specification/2025-11-25/server/utilities/logging - https://modelcontextprotocol.io/specification/2025-11-25/server/resources#subscriptions * style: format adapter files for ruff 0.15 |
||
|
|
32b19dc51b |
Canary (#996)
* feat(inspector): enhance client package with new components and configuration options (#973) * feat(inspector): enhance client package with new components and configuration options - Added a new test_app configuration in pnpm-lock.yaml with updated dependencies for improved development. - Refactored build scripts in package.json to streamline client exports and ensure compatibility. - Introduced tsup.client.ts for better bundling configuration of client components. - Expanded the index.ts file to include new chat components and utility functions, enhancing the inspector's functionality. - Updated ChatTab and related components to support new props for better customization and control. - Added serverBaseUrl prop to various components to facilitate external API calls without relying on context. - Implemented new hooks and types for improved chat message handling and configuration management. - Introduced stubs for Node.js modules to ensure compatibility in browser environments. - Added rpc-log-bus for logging RPC events, enhancing debugging capabilities in server interactions. * feat(inspector): add new props for ChatTab, ChatHeader, and ChatLandingForm components - Introduced `clearButtonLabel`, `hideTitle`, and `hideModelBadge` props to enhance customization options for the ChatTab and ChatHeader components. - Updated the ChatLandingForm to conditionally render the model badge based on the new `hideModelBadge` prop. - Improved the display logic for the clear/new-chat button to utilize the `clearButtonLabel` prop, allowing for dynamic labeling. * feat(inspector): add hideServerUrl prop to ChatTab and ChatLandingForm components - Introduced `hideServerUrl` prop to both ChatTab and ChatLandingForm components, allowing for conditional rendering of the MCP server URL. - Updated documentation comments to reflect the new prop's functionality, enhancing customization options for users. * feat(hmr): enhance TypeScript support and registration synchronization - Updated the `tsImport` function to accept additional options for improved TypeScript handling, including cache busting and import callbacks. - Enhanced the `importServerModule` function to provide better warnings for module re-imports and instance management. - Refined the `syncRegistrationsFrom` method in `MCPServerClass` to return detailed change statistics for tools, prompts, and resources, improving change detection and logging. - Added debug logging for unchanged registrations to aid in troubleshooting during hot module reloading (HMR). - Wrapped handler functions with session context to maintain access to context features after HMR updates, ensuring consistent behavior. * feat(inspector): enhance tool change detection and metadata handling - Updated the `ToolsTab` component to include additional checks for changes in tool metadata, ensuring more accurate detection of updates. - Refined the handling of tool metadata during hot module reloading (HMR) to fully replace existing metadata instead of merging, improving consistency. - Added comprehensive E2E tests to validate tool handler logic changes after HMR, ensuring expected behavior for both text and widget outputs. - Adjusted the `McpClientProvider` to correctly pass metadata to tools, enhancing the overall functionality and user experience. * feat(inspector): enhance ChatTab and Layout components with new props and visibility controls - Added new props to `ChatTab` and `ChatHeader` for customizing the clear/new-chat button, including `clearButtonHideIcon`, `clearButtonHideShortcut`, and `clearButtonVariant`. - Updated `Layout` and `LayoutHeader` components to support single-tab mode and visibility of tabs based on the `embeddedConfig`, improving user experience in embedded scenarios. - Refactored tab rendering logic in `LayoutContent` to conditionally display tabs based on the `visibleTabs` configuration, enhancing flexibility for users. * feat(mcp): propagate widget resources to existing sessions - Added `propagateWidgetResourcesToSessions` method to `MCPServerClass` to ensure newly registered widget resources are available to existing sessions without requiring a reconnect. - Updated `uiResourceRegistration` to call the new method, allowing resource propagation regardless of tool registration status. - Enhanced logging for resource propagation to improve visibility during session updates. * fix(cli): increase chunk size warning limit for bundles * feat(inspector): add HMR regression test for widget resource propagation - Implemented a new E2E test to verify that dynamically added widget resources are correctly registered and propagated to existing sessions during hot module reloading (HMR). - Enhanced file utility functions to support writing and removing widget resource files, ensuring proper cleanup after tests. - Updated the MCPServerClass to track session references for resources, improving synchronization during HMR updates. * feat(logging): add conditional debug logging for widget operations - Introduced a `debugWidget` flag to control logging for widget-related operations in `shared-routes.ts`, `shared-utils.ts`, and `mount-mcp.ts`. - Enhanced logging statements to only execute when the `DEBUG` environment variable is set, improving performance and reducing noise in production logs. - Updated the `requestLogger` to skip logging for noisy GET requests, further optimizing log management. * chore(pnpm): remove test_app configuration and its dependencies from pnpm-lock.yaml * fix(inspector): update build configurations and improve type handling - Modified `package.json` to ensure proper declaration file generation during client exports. - Adjusted `tsconfig.client.json` to change the root directory and output directory for better organization. - Enhanced type handling in `McpUIRenderer.tsx` by using a more specific type for resource properties. - Updated `WidgetDebugContext.tsx` to define a `DeviceType` type for improved type safety. - Removed unused `rpc-log-bus` definitions to clean up the codebase. * feat(mcp): improve resource registration logic in MCPServerClass - Enhanced the resource registration process to skip adding resources that are already propagated to sessions, preventing duplicate registrations. - Updated logging to provide clearer feedback on resource addition and registration failures. - Refactored the handling of widget resource templates to ensure they are only registered if not already present in the session, improving efficiency and reducing potential errors. * feat(mcp): implement dynamic HMR port allocation for development servers - Added a function to find an available port for Hot Module Replacement (HMR), allowing multiple development servers to run concurrently without port conflicts. - Updated the Vite server configuration to use the dynamically allocated HMR port instead of a hardcoded value, enhancing flexibility in development environments. - Improved logging to reflect the dynamically chosen HMR port, ensuring better visibility during server setup. * fix(inspector): improve same-origin detection for widget iframes - Updated the logic for determining if the widget iframe is same-origin with the inspector page, enhancing console interception and debug controls. - Refactored the setting of `isSameOrigin` to use the new computed value, ensuring accurate cross-origin handling for both development and production environments. * fix(inspector): correct inspector API base URL handling - Updated the logic for determining the inspector API base URL to use relative URLs, ensuring that API calls target the correct origin of the inspector UI instead of the MCP server. - Removed the previous logic that derived the base from the MCP server URL, which caused issues when the server ran on a different port, improving cross-origin handling. * refactor(mcp-server): update syncRegistrationsFrom method to return detailed change summary - Modified the syncRegistrationsFrom method to return an object containing total changes and detailed counts for added, removed, and updated tools, prompts, and resources. - This enhancement improves the method's utility by providing comprehensive feedback on registration changes during synchronization. * fix(tests): enhance waitForHMR function to support no-change scenarios - Updated the waitForHMR function to accept an options parameter, allowing it to handle cases where no changes are detected during Hot Module Replacement (HMR). - Modified the integration test to utilize the new functionality, ensuring it can correctly resolve when no changes occur, improving test reliability. * feat(hmr-sync): add debug logging for HMR changes and improve resource key handling - Introduced a new function to check if debug logging is enabled, enhancing the visibility of changes during Hot Module Replacement (HMR). - Updated debug logging to conditionally display changes in configuration and handler, including previews of old and new handlers. - Refactored resource key handling in MCPServerClass to improve clarity and maintainability. * feat(hmr): implement widget re-addition test and enhance resource cleanup - Added a new test to verify that deleting and re-adding a widget resource correctly re-registers it for the same session during Hot Module Replacement (HMR). - Enhanced the MCPServerClass to ensure proper cleanup of resources from both session and root native server states, preventing registration conflicts when re-adding widgets. * chore: enter canary prerelease mode * chore(typescript): version packages (canary) * chore(inspector): update changelog for v0.18.9 and v1.17.4 - Added details for v0.18.9 focusing on log noise reduction and dependency alignment. - Included v1.17.4 updates addressing widget resource propagation and further log noise reduction. --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> |
||
|
|
af55041eac |
fix(inspector): reset readiness state on widget URL change and enhanc… (#991)
* fix(inspector): reset readiness state on widget URL change and enhance tool output handling (#990) - Added a useEffect hook in OpenAIComponentRenderer to reset the readiness state when the widget URL changes, ensuring proper re-triggering of updates for new iframes. - Updated shared-utils to handle tool output and response metadata updates, improving the transition of widget states from pending to ready. * chore: enter canary prerelease mode * chore(typescript): version packages (canary) * fix(inspector): enhance iframe global updates handling and cleanup (#992) - Introduced a new type `IframeGlobalUpdates` to manage iframe state updates more effectively. - Refactored the `updateIframeGlobals` function to queue updates until OpenAI globals are available, improving reliability. - Removed outdated comments and code related to tool output and response metadata handling in `shared-utils.ts`, streamlining the update process. - Added cleanup logic for animation frames to prevent memory leaks during component unmounting. * chore(typescript): version packages (canary) * chore(changelog): update changelog for v0.18.8, v0.18.7, v0.18.6, and v1.17.3 releases - Added details for v0.18.8 focusing on widget readiness and iframe global sync fixes. - Included v0.18.7 updates addressing chat conversion and error copy improvements. - Documented v0.18.6 for dependency updates. - Updated v1.17.3 to align TypeScript packages with inspector reliability enhancements. --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> |
||
|
|
3d787bab34 |
Canary (#970)
* feat(inspector): add environment variable for iframe embedding configuration (#965) * feat(inspector): add environment variable for iframe embedding configuration - Introduced `MCP_INSPECTOR_FRAME_ANCESTORS` environment variable to control which origins can embed the inspector widget in iframes, enhancing security and flexibility for both development and production environments. - Updated documentation to include usage examples and best practices for setting the variable, ensuring clarity for users embedding the inspector in their applications. - Refactored server routes and utilities to utilize the new environment variable for setting Content Security Policy (CSP) headers, improving security measures against unauthorized embedding. * feat(server): enhance tool and resource change handling - Added logic to ensure tool request handlers are registered on the SDK server, improving initialization for sessions with no tools. - Updated change detection for tools, prompts, resources, and templates to include removal events, ensuring accurate notifications for list changes. - Enhanced session server communication by sending updates when tools, prompts, resources, or templates are added or removed, improving responsiveness and user experience. * feat(server): pre-initialize request handlers for improved error handling - Added pre-initialization logic for tool, prompt, and resource request handlers on the SDK server to ensure they are available even when starting with zero registrations. - This change prevents -32601 "Method not found" errors on clients by ensuring that necessary handlers are set up during server initialization. * feat(inspector): implement localhost URL conversion for server-side fetches - Added a new utility function `toLocalhostUrl` to convert external proxy URLs to localhost for server-side fetches, ensuring correct content retrieval when running behind reverse proxies. - Updated the inspector's route handling to utilize the new function, improving reliability of widget content fetching. - Enhanced handling of asset URLs to ensure they are correctly rewritten for both external and localhost scenarios, addressing potential issues with proxy catch-all routes. - Configured Vite middleware to allow all hosts, facilitating smoother operation behind various reverse proxies. * feat(inspector): enhance widget URL handling and logging - Improved URL rewriting logic for widget assets to ensure correct resolution both locally and behind reverse proxies. - Added debug logging for fetching and processing widget HTML, aiding in troubleshooting and development. - Introduced a new global variable `__mcpServerUrl` for widgets to dynamically reference the server origin in API calls, enhancing flexibility. - Updated handling of asset paths to preserve query parameters, ensuring accurate resource fetching from the development server. * feat(server): enhance Vite HMR WebSocket support and MCP_URL handling - Updated MCP_URL assignment to only set if not provided by the user, allowing for external proxy configurations. - Implemented WebSocket proxy setup for Vite HMR, enabling hot module reloading through reverse proxies. - Added optional httpServer parameter in ServerConfig for Vite HMR WebSocket support. - Improved WebSocket upgrade request handling to ensure compatibility with various deployment scenarios. * feat(server): enhance HMR support for custom routes and widget management - Introduced a new `shouldRemove` predicate in the sync options to prevent the removal of specific items during HMR, protecting widget-registered tools. - Added a mutable `_customRoutes` registry in the MCP server to manage custom HTTP route handlers, enabling HMR for routes without re-registering. - Implemented a middleware to dispatch custom route handlers from the mutable map, ensuring compatibility with Hono's routing system. - Updated widget tool management to return a boolean indicating existence, allowing for fallback registration if tools are removed during HMR sync. - Enhanced resource directory handling in the widget mounting process to ensure directories are created dynamically for Vite file watching. * feat(inspector): enhance runtime configuration for inspector middleware - Added new configuration options to `mountInspector` for `devMode` and `sandboxOrigin`, allowing for improved handling of development environments and reverse proxy setups. - Updated `registerStaticRoutes` to inject runtime configuration into the HTML, enabling client-side components to access these settings. - Modified the inspector UI mounting process to utilize the new configuration options, enhancing flexibility and usability in various deployment scenarios. * fix(widget-handling): refine widget type determination logic - Updated widget type assignment to prioritize `appsSdk` when only `appsSdkMetadata` is present, ensuring accurate widget classification. - Enhanced metadata handling in widget registration to default to an empty object for `ui` when no metadata is available, improving robustness in widget rendering. * Enhance reverse proxy support and widget handling in inspector - Introduced `MCP_URL` environment variable to allow users to set an external proxy URL, ensuring correct widget asset URLs and HMR WebSocket connections. - Updated `mountInspector` configuration options to include `devMode` and `sandboxOrigin`, improving flexibility for development environments. - Added support for dynamic widget creation and improved HMR reliability, allowing for seamless integration behind reverse proxies. - Documented best practices for using `MCP_URL` and reverse proxy setups, ensuring clarity for users. * chore: enter canary prerelease mode * chore(typescript): version packages (canary) * feat(typescript): add completion support to resource templates and publish completion capabilities (#966) * add util for normalizing list callback completions for resource templates * add resource template completion and publish completion capabilites * add tests for toResourceTemplateCompleteCallbacks * add docs for resource templates completion * add changeset * update typescript conformance test server to include prompts and resource templates completion examples * revert default values for arg1 and arg2 and z.string().optional(), change to callback fn * run lint * chore(typescript): version packages (canary) * refactor(tests): remove serial mode configuration from E2E tests for UI widgets, chat, command palette, and setup * fix(inspector): update sandbox permissions for McpUIRenderer and MCPUIResource components (#974) - Removed 'allow-same-origin' and 'allow-popups-to-escape-sandbox' from sandbox permissions to enhance security and simplify iframe configurations. * chore(typescript): version packages (canary) * feat(inspector, typescript): release v0.18.5 and v1.17.0 with iframe embedding, reverse proxy support, and resource template completion - Introduced `MCP_INSPECTOR_FRAME_ANCESTORS` for iframe embedding control. - Enhanced `mountInspector` with `devMode` and `sandboxOrigin` options. - Added runtime config injection for improved deployment flexibility. - Improved server-side widget fetches and asset URL handling for reverse proxies. - Released v1.17.0 with resource template variable completion and custom route HMR support. - Updated dependencies to ensure compatibility with new features. * fix(tests): update hmr test prompts to use completable for default values --------- Co-authored-by: Joaquin Coromina <75667013+bjoaquinc@users.noreply.github.com> |
||
|
|
ac3e2166aa |
feat(inspector): add comprehensive E2E testing infrastructure and wid… (#957)
* feat(inspector): add comprehensive E2E testing infrastructure and widget lifecycle improvements (#936) * Fix/mcp-use/pending-state (#931) * feat(inspector): enhance widget support and lifecycle management - Updated MCPAppsRenderer and OpenAIComponentRenderer to handle tool output and metadata more effectively, allowing for immediate rendering of widgets even when results are pending. - Implemented pre-fetching of widget resources in ToolsTab to improve loading states and user experience. - Added utility functions for widget detection and pre-rendering capabilities based on tool metadata. - Enhanced MessageList and ToolResultRenderer to support immediate rendering of widget tools, improving responsiveness during tool execution. - Introduced a delayed weather tool in the example server to demonstrate widget lifecycle management. These changes address Issue #930, ensuring widgets can display loading states and update seamlessly upon tool completion. * fix(inspector): emulate pending state for widgets to align with ChatGPT behavior - Added logic to ensure that the pending state is accurately reflected for widgets, enhancing user experience during tool execution. - Removed unnecessary console logs and warnings in ToolResultRenderer for cleaner code and improved performance. * feat(server): add delayed weather tool to test widget lifecycle - Introduced a new tool, `get-weather-delayed`, which simulates a 5-second delay before returning weather data. This addition aims to test and demonstrate the widget lifecycle management, addressing Issue #930. - Updated documentation to include usage instructions for the new tool, enhancing the example server's functionality. * docs(inspector): update inspector references and enhance widget lifecycle testing documentation - Changed references from "MCP Inspector" to "mcp-use Inspector" for consistency. - Added detailed instructions for testing widget lifecycle, including `isPending` transitions and console log verification. - Updated links and sections to improve clarity and usability in the documentation. * feat(inspector): enhance server connection handling in Layout component (#932) * feat(inspector): enhance server connection handling in Layout component - Added logic to redirect to the autoConnect parameter if a server URL is provided but no matching connection exists. - Updated dependencies in the useEffect hook to include connections and navigate for improved functionality. * feat(inspector): add url-parameters to inspector documentation - Included "inspector/url-parameters" in the documentation index to enhance the inspector's reference materials. * chore: enter canary prerelease mode * chore(typescript): version packages (canary) * feat(inspector): add comprehensive E2E testing infrastructure This PR introduces a complete Playwright-based E2E testing suite for the inspector with enhanced testing capabilities across all major features. Major Changes: - Add Playwright E2E testing infrastructure with test fixtures and helpers - Implement comprehensive test coverage for: - Chat functionality and message handling - Connection management and authentication flows (OAuth, API key, custom headers) - HMR (Hot Module Reload) for tools, prompts, and resources - UI widgets and lifecycle states - Command palette and debugger tools - Add data-testid attributes across all UI components for reliable testing - Enhance ToolResultDisplay with widget props support - Add refresh functionality to inspector tabs with unique keys Testing Infrastructure: - New test helpers for connection, auth, and debugger tools - Test matrix for parameterized test scenarios - File utilities for test setup and cleanup - Mock servers for OAuth and custom authentication - Comprehensive E2E testing documentation Widget Examples: - Create widget examples for conformance testing (weather-display, status-card, etc.) - Add delayed weather tool to conformance server for lifecycle testing Breaking Changes: None * chore: update dependencies and enhance ToolsTab functionality - Updated various package versions in pnpm-lock.yaml for improved compatibility and performance. - Added new end-to-end testing scripts in inspector's package.json to facilitate Playwright testing. - Enhanced ToolsTab component to include a refresh feature, allowing for dynamic updates of tools with improved user experience. - Updated dependencies in mcp-use package.json for better stability and functionality. * fix(server): change default port from 3001 to 3000 for server startup * feat(inspector): implement E2E testing workflow and enhance component testing - Added a new GitHub Actions workflow for running Playwright E2E tests across multiple modes (mix, prod, builtin) to validate the Inspector package. - Updated Playwright configuration to improve timeout settings for CI environments and ensure reliable test execution. - Enhanced FullscreenNavbar and MCPAppsDebugControls components with data-testid attributes for better testability. - Refactored MCPAppsRenderer to support custom props and improved display mode handling. - Updated various components to include data-testid attributes for consistent testing practices. - Improved error handling and logging in sampling request display for better debugging during tests. - Adjusted test cases to accommodate longer execution times and ensure stability in E2E tests. * fix(server): refine port assignment logic for server startup - Updated the port assignment logic to ensure the correct default port is used based on command line arguments and development mode. This change clarifies the conditions under which the server will use port 3001 or 3000. * fix(inspector): enhance widget pending state emulation and improve rendering - Updated MCPAppsRenderer and OpenAIComponentRenderer for better handling of tool output and metadata, allowing immediate widget rendering during pending states. - Enhanced MessageList and ToolResultRenderer to support responsive rendering of widget tools. - Introduced a delayed weather tool example in the conformance server to demonstrate widget lifecycle management. - Updated documentation for inspector and widget lifecycle testing, including debugging guides for ChatGPT Apps. Addresses Issue #930. --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * chore(typescript): version packages (canary) * chore(typescript): update pnpm-lock.yaml and pre.json for package versions * chore(typescript): update package versions in pnpm-lock.yaml and package.json for improved compatibility (#958) * chore(typescript): version packages (canary) * chore(docs): streamline documentation structure and enhance CLI reference (#960) - Consolidated page entries in docs.json for improved readability. - Added comprehensive CLI reference documentation, detailing installation, commands, and usage examples for the @mcp-use/cli tool. - Updated changelog entries for Inspector and TypeScript to reflect recent enhancements and fixes. * chore(typescript): version packages (canary) * chore(docs): format pages in docs.json for improved readability - Reformatted the "pages" entries in docs.json to use a consistent multi-line structure for better clarity and maintainability. * chore(deps): upgrade @modelcontextprotocol/sdk to 1.26.0 (#961) - Updated SDK from ^1.25.3 to ^1.26.0 in mcp-use and inspector packages - Applied the same Zod 4 compatibility patch to SDK 1.26.0 - Patch fixes safeParse/safeParseAsync to use schema methods instead of top-level functions - Renamed patch file from version-specific to version-agnostic naming - Added changeset documenting the upgrade The SDK still requires the Zod 4 compatibility patch as the upstream fix has not been released yet. This is a drop-in replacement with no breaking changes. * chore(typescript): version packages (canary) --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> |
||
|
|
59030e972f |
chore(release): update changelog for v0.18.2 and v1.16.2
- Added changelog entries for Inspector v0.18.2, including fixes for widget behavior and URL handling. - Updated changelog for TypeScript v1.16.2, addressing widget pending state emulation and dependency updates. |
||
|
|
53ae49d153 |
Canary (#933)
* Fix/mcp-use/pending-state (#931) * feat(inspector): enhance widget support and lifecycle management - Updated MCPAppsRenderer and OpenAIComponentRenderer to handle tool output and metadata more effectively, allowing for immediate rendering of widgets even when results are pending. - Implemented pre-fetching of widget resources in ToolsTab to improve loading states and user experience. - Added utility functions for widget detection and pre-rendering capabilities based on tool metadata. - Enhanced MessageList and ToolResultRenderer to support immediate rendering of widget tools, improving responsiveness during tool execution. - Introduced a delayed weather tool in the example server to demonstrate widget lifecycle management. These changes address Issue #930, ensuring widgets can display loading states and update seamlessly upon tool completion. * fix(inspector): emulate pending state for widgets to align with ChatGPT behavior - Added logic to ensure that the pending state is accurately reflected for widgets, enhancing user experience during tool execution. - Removed unnecessary console logs and warnings in ToolResultRenderer for cleaner code and improved performance. * feat(server): add delayed weather tool to test widget lifecycle - Introduced a new tool, `get-weather-delayed`, which simulates a 5-second delay before returning weather data. This addition aims to test and demonstrate the widget lifecycle management, addressing Issue #930. - Updated documentation to include usage instructions for the new tool, enhancing the example server's functionality. * docs(inspector): update inspector references and enhance widget lifecycle testing documentation - Changed references from "MCP Inspector" to "mcp-use Inspector" for consistency. - Added detailed instructions for testing widget lifecycle, including `isPending` transitions and console log verification. - Updated links and sections to improve clarity and usability in the documentation. * feat(inspector): enhance server connection handling in Layout component (#932) * feat(inspector): enhance server connection handling in Layout component - Added logic to redirect to the autoConnect parameter if a server URL is provided but no matching connection exists. - Updated dependencies in the useEffect hook to include connections and navigate for improved functionality. * feat(inspector): add url-parameters to inspector documentation - Included "inspector/url-parameters" in the documentation index to enhance the inspector's reference materials. * chore: enter canary prerelease mode * chore(typescript): version packages (canary) --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> |
||
|
|
e0aead0f74 |
docs: backfill missing changelog entries for v1.15.0-v1.16.1
Backfilled documentation changelog entries for 6 missing TypeScript package versions (v1.15.0 through v1.16.1) and 6 missing Inspector versions (v0.17.0 through v0.18.1) that were already released to the main branch. |
||
|
|
32f2113124 |
Canary (#916)
* feat(inspector): add support for prompts (without args) to inspector chat (#884)
* add prompts support to inspector chat
* fix format
* add changeset for minor version bump
* refactor clearing prompts dropdown UI state
* refactor inspector documentation for improved readability and structure
- Enhanced formatting and layout for better clarity.
- Added new sections for using prompts in chat, including dropdown navigation and execution details.
- Updated various text blocks for consistency and readability throughout the document.
---------
Co-authored-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com>
* chore: enter canary prerelease mode
* chore(typescript): version packages (canary)
* feat(typescript): add completable() helper for prompt argument autocomplete (#899)
* add prompt argument completion support
* update docs to include completable()
* add changeset
* feat(completion): enhance prompt argument completion with language support
- Added `language` parameter to the review code prompt, allowing users to specify the programming language for code reviews.
- Introduced `completable` type and `CompletionContext` interface to support contextual completion suggestions in the completion helpers.
- Updated the `completable` function to handle callback context, improving dynamic completion capabilities.
- Enhanced unit tests to cover new functionality, including handling of null/undefined values and callback errors.
These changes improve the usability and flexibility of the prompt system, enabling more tailored code review experiences.
---------
Co-authored-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com>
* chore(typescript): version packages (canary)
* feat(inspector): add support for file attachments in chat messages (#912)
- Introduced functionality to handle image attachments in chat messages, allowing users to send and display images alongside text.
- Updated message handling to support multimodal content, including the conversion of messages with attachments to the LangChain format.
- Enhanced the user interface to display attachments in the chat, ensuring a seamless experience when sending and receiving messages with images.
- Implemented validation for file types and sizes to maintain performance and user experience.
These changes significantly improve the chat functionality, enabling richer interactions through multimedia support.
* chore(typescript): version packages (canary)
* feat(inspector, mcp-use): enhance request origin handling and security headers (#915)
- Introduced `getRequestOrigin` function to extract the request origin from headers, supporting proxy-aware configurations.
- Updated `getWidgetSecurityHeaders` to include the dynamic request origin in CSP configurations, enhancing security for widget connections.
- Modified `registerInspectorRoutes` to utilize the new request origin handling, ensuring proper security headers are set based on the request context.
- Refactored UI resource registration to enrich widget definitions with server origin for improved asset loading and API connectivity.
These changes improve the security and flexibility of widget interactions within the inspector and MCP applications.
* chore(typescript): version packages (canary)
* Revert "feat(inspector, mcp-use): enhance request origin handling and securit…" (#917)
This reverts commit
|
||
|
|
36e1ac012d | docs(python): document mcpclient constructor | ||
|
|
1dcba404b4 |
Feat/mcp apps 2 (#886) (#887)
* Feat/mcp apps 2 (#886) * feat(mcp-use): implement dual-protocol support for MCP Apps and ChatGPT widgets - Added support for the MCP Apps Extension (SEP-1865) in mcp-use, enabling widgets to function with both ChatGPT and MCP Apps-compatible clients. - Introduced a new `mcpApps` widget type, allowing unified widget definitions that automatically generate protocol-specific metadata. - Created protocol adapters for transforming widget definitions into formats compatible with both protocols. - Enhanced the server and client code to handle dual-protocol metadata generation and widget registration. - Updated documentation and examples to demonstrate the new functionality and usage patterns. This implementation improves compatibility and flexibility for developers creating widgets across different platforms. * feat(cli, mcp-use): implement Zod JIT compilation patching to prevent CSP violations - Added functionality to post-process JavaScript bundles and patch Zod's JIT compilation to avoid CSP eval violations in sandboxed iframes. - Introduced a new plugin in mcp-use to transform Zod's globalConfig, ensuring compatibility with strict CSP requirements. - Enhanced error handling for asset processing to gracefully manage missing directories. These changes improve security and compatibility for applications using Zod in restricted environments. * feat(inspector): add MCP Apps debugging support and UI Playground - Implemented comprehensive debugging capabilities for MCP Apps (SEP-1865) in the inspector, including a new `MCPAppsRenderer` for rendering widgets. - Introduced a `WidgetDebugContext` to manage widget state, CSP violations, and playground settings. - Added a UI Playground tab for testing widgets with device emulation, CSP mode switching, and traffic logs. - Enhanced existing components to support the new debugging features and integrated CSP violation tracking. - Updated package dependencies to include `@modelcontextprotocol/ext-apps@^0.4.1` for improved functionality. These changes enhance the developer experience by providing robust tools for testing and debugging MCP Apps alongside existing widgets. * feat(cli, inspector, mcp-use): enhance widget metadata and logging capabilities - Updated CLI to allow the server host to default to "0.0.0.0" for broader interface listening. - Enhanced `MCPAppsRenderer` to include a console logging handler for improved debugging of MCP logging notifications. - Refactored `WeatherDisplay` widget to utilize additional user agent and context information, improving display accuracy. - Introduced new properties in `useWidget` and `widget-types` for maximum width and timezone support, enhancing widget adaptability. - Improved server helper functions to normalize URLs and manage X-Frame-Options for cross-origin iframe embedding. These changes collectively enhance the developer experience by providing better logging, improved widget context handling, and more flexible server configurations. * feat(inspector): add MCP Apps support in ResourceResultDisplay - Integrated MCP Apps detection and rendering into the ResourceResultDisplay component. - Implemented logic to check for MCP Apps resources and display corresponding badges. - Enhanced the rendering flow to prioritize MCP Apps over other widget types, improving user experience and functionality. These changes enhance the inspector's capability to handle MCP Apps, aligning with ongoing development efforts for better widget integration. * feat(inspector): enhance inspector with new components and constants for MCP Apps - Updated `tsconfig.client.json` to include constants directory for better module resolution. - Refactored `LayoutContent` to improve the handling of prompt calls with enhanced argument processing. - Introduced `PopoverSelect` and `SafeAreaInsetsEditor` components for reusable UI elements in the inspector. - Added `debug-options` and `iframe` constants for improved configuration management. - Enhanced `MCPAppsDebugControls` and `MCPAppsRenderer` to utilize new constants and improve widget rendering. - Implemented dual-protocol support in various components to streamline widget integration. These changes collectively enhance the inspector's functionality and maintainability, aligning with ongoing development efforts for better widget integration. * feat(cli): normalize browser host for server connections - Introduced a `normalizeBrowserHost` function to convert "0.0.0.0" to "localhost" for browser connections, ensuring compatibility. - Updated CLI logging to reflect the normalized host for local connections, enhancing user experience. - Refactored MCP endpoint and inspector URL generation to utilize the normalized host. These changes improve the reliability of server connections from browsers and streamline the logging output in the CLI. * refactor(inspector): optimize playground handling in OpenAIComponentRenderer - Removed stale closure handling for playground settings by directly capturing the playground state at effect run time. - Enhanced logging to provide better visibility into the stored widget data and playground configuration. - Updated comments for clarity on the handling of dynamic updates to iframe globals without reloading the widget. These changes improve the efficiency and maintainability of the OpenAIComponentRenderer component. * refactor(inspector): remove unused SearchableSelect and UIPlaygroundTab components - Deleted the SearchableSelect component, which was not utilized in the codebase, streamlining the component library. - Removed the UIPlaygroundTab component, consolidating playground functionality and reducing code complexity. These changes enhance maintainability by eliminating redundant components from the inspector package. * refactor(docs): streamline documentation for dual-protocol widget support - Consolidated and clarified documentation across various guides to emphasize dual-protocol support for MCP Apps and ChatGPT Apps SDK. - Updated descriptions and examples to reflect the latest features and best practices for widget development. - Enhanced the inspector documentation to provide clearer instructions for debugging and testing widgets in both protocols. - Removed redundant content and improved organization for better user navigation. These changes improve the overall clarity and usability of the documentation, aiding developers in leveraging the dual-protocol capabilities effectively. * refactor(inspector): optimize MCPAppsRenderer and ToolResultDisplay components - Replaced useState with useRef for containerRef in MCPAppsRenderer to prevent unnecessary state updates during ref callback. - Updated effect dependencies in MCPAppsRenderer to remove unused variables, enhancing performance. - Memoized onSendFollowUp callback in ToolResultDisplay to prevent infinite re-render loops, improving efficiency. - Enhanced WidgetDebugProvider by using useMemo for context value to minimize re-renders and added a ref for accessing current state without causing updates. These changes collectively improve the performance and maintainability of the inspector components. * feat(mcp-use): add landing page generation for browser requests - Introduced a new `generateLandingPage` function to handle browser GET requests and serve a landing page. - Updated the `mountMcp` function to detect browser requests and return the generated landing page with appropriate headers. These changes enhance user experience by providing a dedicated landing page for browser users, improving accessibility and engagement. * refactor(docs): update documentation for dual-protocol widget migration - Enhanced documentation to clarify the migration process from `appsSdk` to `mcpApps`, emphasizing the new `metadata` format. - Added examples demonstrating the updated widget registration and metadata structure for both protocols. - Included a migration checklist and field mapping reference to assist developers in transitioning to the dual-protocol support. These changes improve the clarity and usability of the documentation, aiding developers in effectively leveraging the new features. * refactor(mcp-use): map console log levels to RFC 5424 standards - Introduced a mapping of JavaScript console log levels to RFC 5424 log levels for improved logging consistency. - Updated the logging notification helper to utilize the new mapping, ensuring standardized log level reporting. These changes enhance the clarity and reliability of logging within the MCP Apps Bridge, aligning with best practices for log management. * refactor(docs): update documentation for MCP Apps migration and dual-protocol support - Enhanced the documentation to clarify the migration process from `appsSdk` to `mcpApps`, including updates to the `metadata` format. - Added detailed examples and a migration checklist to assist developers in transitioning to the new dual-protocol support. - Improved the organization and clarity of the documentation, making it easier for developers to understand and implement the changes. These updates aim to facilitate a smoother migration experience and better utilization of the new features in the MCP Apps framework. * chore: enter canary prerelease mode * chore(typescript): version packages (canary) * refactor: update templates and documentation for MCP Apps support (#888) * refactor: update templates and documentation for MCP Apps support - Replaced references from `apps-sdk` to `mcp-apps` across various files, including CI workflows, documentation, and template configurations. - Removed the deprecated `creating-apps-sdk-server` documentation and updated links to the new `creating-mcp-apps-server` guide. - Enhanced the README and other documentation files to reflect the new `mcp-apps` template usage and features. - Updated CLI commands and package.json scripts to align with the new template naming conventions. - Improved clarity in documentation regarding the migration from `apps-sdk` to `mcp-apps`, ensuring a smoother transition for developers. These changes collectively enhance the developer experience by providing clearer guidance and updated resources for working with MCP Apps. * chore: update pnpm-lock.yaml for package version adjustments and path corrections - Renamed the path for `mcp-apps` in the lock file to reflect the new directory structure. - Updated package versions for `vite` and related dependencies from 7.3.0 to 7.3.1, ensuring compatibility with the latest features. - Adjusted the path for `mcp-use` dependencies to maintain consistency with the new structure. * chore(typescript): version packages (canary) * Docs/update/fic (#889) * refactor(docs): format documentation page entries for consistency - Updated the `docs.json` file to format the `pages` entries as arrays for better readability and consistency across different groups. - Ensured that all `pages` attributes are uniformly structured, enhancing the overall organization of the documentation. * refactor(docs): improve documentation for dual-protocol widget migration - Updated documentation to clarify the migration process from `appsSdk` to `mcpApps`, including the new `metadata` format. - Added detailed examples and a migration checklist to assist developers in transitioning to the dual-protocol support. - Enhanced organization and clarity of the documentation for better usability. * chore(typescript): version packages (canary) * refactor(product-search-result): update widget descriptions for MCP Apps consistency (#890) - Revised text in the ProductSearchResult widget to replace references from "OpenAI apps sdk" to "mcp-apps specification" for clarity. - Updated the template title from "Apps SDK Template" to "MCP-Apps Template" and adjusted the description to reflect the new naming conventions, enhancing consistency across the documentation and user experience. * chore(typescript): version packages (canary) * refactor(product-search-result): update widget configuration and impr… (#891) * refactor(product-search-result): update widget configuration and improve HTML injection for MCP Apps - Cleared the connectDomains in the product search result widget to enhance security. - Removed the title prop from the Accordion component to simplify its usage. - Preserved devServerBaseUrl during HTML injection in shared routes for better compatibility with MCP Apps. - Enhanced the logging notification system in the MCP Apps Bridge to handle serialization of console arguments, improving error handling and preventing DataCloneError. - Updated protocol helpers to ensure proper merging of UI metadata, maintaining resourceUri integrity. These changes collectively improve the configuration and functionality of widgets within the MCP Apps framework, enhancing security and usability. * refactor(ci): update template configurations for consistency across workflows - Replaced the `mcp-ui` template with `blank` in CI workflows to streamline template options. - Removed outdated logging tips related to the `mcp-ui` template in the create-mcp-use-app package, enhancing clarity for developers. These changes improve the consistency and clarity of template usage in the CI processes and documentation. * refactor(inspector): enhance MCP Apps debugging and widget integration - Improved the MCPAppsRenderer and ToolResultDisplay components for better performance and maintainability. - Streamlined the handling of widget state and logging within the inspector, enhancing debugging capabilities for MCP Apps. - Updated documentation to clarify the dual-protocol support and provide clearer instructions for developers. These changes collectively enhance the developer experience by optimizing component performance and improving the clarity of documentation for MCP Apps integration. * chore(typescript): version packages (canary) * chore(package): add lodash override to package.json templates * chore(typescript): version packages (canary) * feat(mount-mcp): add helper function to construct full URL with proxy headers - Introduced `getFullUrl` function to handle URL construction considering proxy headers, improving compatibility for production deployments. - Updated landing page generation to use the constructed full URL instead of the raw request URL, enhancing accuracy in response handling. * refactor(weather): simplify weather response in starter template - Updated the weather response in the starter template to return a static sunny message instead of fetching real-time data, streamlining the functionality for demonstration purposes. * chore(typescript): version packages (canary) --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> |
||
|
|
49926b7bbf | chore(docs): linking does not work in docs and results in 404 page. remove updates page from main navigation | ||
|
|
e463f68bf7 | fix(docs): update GitHub Issues link for telemetry documentation | ||
|
|
6f5b47b21d | chore(docs): fixes and logo update | ||
|
|
cd6408069f |
docs(python): revamp getting started pages to match TypeScript style
- Add welcome page with py_welcome.png image - Rewrite quickstart with Agent/Client/Server sections and mermaid diagram - Simplify installation page (single package, no separate sections) - Add updates symlink to changelog in getting-started - Remove configuration overview page, update broken links to specific pages - Update changelog title to "Updates" |
||
|
|
8326a667c1 |
Fix/inspector/header-dialog (#874) (#875)
* Fix/inspector/header-dialog (#874) * feat(inspector): enhance CustomHeadersEditor with focus management and title prop * feat(inspector): enhance widget security headers with frame domain support - Added `frame_domains` to the `widgetCSP` interface to specify allowed domains for iframe embeds. - Updated `getWidgetSecurityHeaders` function to include `frame_domains` in the Content Security Policy, ensuring compatibility with OpenAI specifications. - Enhanced CSP handling in `OpenAIComponentRenderer` to prioritize metadata from tool results and resources for improved security management. * refactor(inspector): standardize proxy configuration and enhance connection handling - Renamed `customHeaders` to `headers` in `InspectorDashboard` and `ServerConnectionModal` for consistency. - Removed unused state management for connecting servers in `InspectorDashboard`. - Improved server connection handling by introducing a `handleReconnect` function to manage reconnection attempts. - Updated UI elements to reflect connection states more accurately, including hover effects and error displays. - Enhanced error handling for unauthorized connections, providing clearer user feedback. These changes aim to streamline the connection management process and improve the overall user experience in the inspector interface. * feat(inspector): add state management for connecting servers in InspectorDashboard - Introduced a new state variable `_connectingServers` in the InspectorDashboard component to manage the connection status of servers. - This enhancement lays the groundwork for improved server connection handling and user feedback in the inspector interface. * chore: enter canary prerelease mode * chore(typescript): version packages (canary) * fix(cli): pass environment variables during redeployment (#837) * fix(cli): pass environment variables during redeployment Previously, when redeploying an existing deployment with `--env-file`, the environment variables were parsed and displayed in the CLI output but not actually sent to the backend API. Changes: - Add RedeploymentConfig interface to api.ts with env, buildCommand, startCommand, and port fields - Update redeployDeployment() to accept either a config object or file path (backward compatible) - Pass redeploymentConfig with env vars when calling redeployDeployment in deploy.ts - Add tests for redeployment with environment variables Note: The backend API endpoint (/deployments/{id}/redeploy) also needs to be updated to process these environment variables and pass them to the cloud provider. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * refactor(cli): update redeployment configuration to conditionally include port - Modified the redeployment configuration in deploy.ts to only include the port if it is explicitly provided, preventing the override of existing custom ports. - Cleaned up comments in api.ts for better clarity and consistency. This change enhances the flexibility of the redeployment process by allowing users to maintain their custom port settings. * chore(typescript): version packages (canary) * fix(docs): update sessionIdleTimeoutMs default value in documentation and code (#876) - Updated the default value of `sessionIdleTimeoutMs` from 5 minutes (300000 ms) to 1 day (86400000 ms) across various documentation files and code implementations. - Adjusted related comments and descriptions to reflect the new default session timeout duration for better clarity and consistency. * chore(typescript): version packages (canary) * Fix/server/default-widget-domain (#877) * chore(docs): update changelog for v0.16.2 and v0.16.1 releases - Added details for v0.16.2 including UI enhancements, widget security improvements, and connection handling updates. - Included v0.16.1 changes focusing on tool output display fixes and session timeout adjustments. - Updated dependency alignment for both versions. * docs: enhance Apps SDK metadata documentation and clarify defaults - Added details about default Apps SDK metadata values, including `openai/widgetDomain` and its requirement for app submission. - Updated the `creating-apps-sdk-server.mdx` file to clarify the automatic generation of metadata. - Included examples for customizing Apps SDK metadata in the `ui-widgets.mdx` file. * chore(typescript): version packages (canary) * feat(server): enhance favicon handling and public route setup (#880) - Introduced a new function `selectFaviconFromIcons` to automatically select a favicon based on priority from the provided icons array. - Updated the MCPServerClass to use the new favicon selection logic when initializing the server. - Added a `publicRoutesMode` property to track the setup state of public routes, allowing for conditional setup in development and production modes. - Modified widget mounting functions to respect the `publicRoutesMode` and prevent redundant route setups. - Ensured that public routes and favicon routes are only set up if not already configured, improving efficiency and clarity in route management. * chore(typescript): version packages (canary) --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: soltomm <146624575+soltomm@users.noreply.github.com> |
||
|
|
be5f4d7490 | python/release1.6.0 | ||
|
|
d789a92b4b |
feat(server): Bearer Token authentication for Python MCP server (#841)
* Fix DNS rebinding protection for cloud/proxy deployments
- Add host/port parameters to MCPServer.__init__() and pass to FastMCP
- Default host to "0.0.0.0" (cloud-friendly, disables DNS protection)
- "127.0.0.1" auto-enables DNS protection (handled by FastMCP)
- run() can override host/port, falls back to __init__ values
- Add comprehensive docstring to __init__() explaining parameters
- Update documentation
This fixes 421 Misdirected Request errors when running behind reverse
proxies (Cloudflare, nginx, etc.) where the Host header doesn't match
the auto-configured allowed_hosts for localhost.
* Fix DNS rebinding protection for cloud/proxy deployments
- Add host/port parameters to MCPServer.__init__() and pass to FastMCP
- Default host to "0.0.0.0" (cloud-friendly, disables DNS protection)
- "127.0.0.1" auto-enables DNS protection (handled by FastMCP)
- run() can override host/port and reconfigures DNS protection accordingly
- Rebuild app when host changes in run() to apply new security settings
- Add comprehensive docstring to __init__() explaining parameters
- Add unit tests for host/port configuration and run() overrides
- Update documentation
This fixes 421 Misdirected Request errors when running behind reverse
proxies (Cloudflare, nginx, etc.) where the Host header doesn't match
the auto-configured allowed_hosts for localhost.
* ruff lint
* Bump mcp minimum version to 1.23.0
Required for TransportSecuritySettings and DNS rebinding protection
auto-configuration feature that was added in v1.23.0.
* feat(server): add bearer token authentication for Python MCP server
Add HTTP-layer bearer token authentication that returns proper 401 responses.
- BearerAuthProvider: abstract base class with verify_token() method
- AccessToken: model with token, claims, and scopes fields
- AuthMiddleware: Starlette middleware returning HTTP 401 for invalid tokens
- get_access_token() / require_auth(): context helpers for tools
Usage:
```python
class MyAuth(BearerAuthProvider):
async def verify_token(self, token: str) -> AccessToken | None:
if token != "secret":
return None
return AccessToken(token=token, claims={"user": "alice"})
server = MCPServer(name="my-server", auth=MyAuth())
```
Closes #840
* autogenerate docs
* test(server): add unit and integration tests for bearer token auth
Unit tests:
- AccessToken model creation and serialization
- BearerAuthProvider abstract class and subclassing
- get_access_token/require_auth context helpers
- AuthMiddleware 401 responses, path exclusion, CORS
Integration tests:
- MCPClient connecting to bearer auth server with valid token
- Connection failure with invalid/missing token
- Tool access to user claims and scopes
* fix(server): address code review feedback for bearer auth
- Fix CORS security: allow_credentials=False with allow_origins=["*"]
- Remove dead try/except import for auth module
- Remove PII (email) from debug logs
- Add comment explaining broad exception handling in verify_token
- Add /openmcp.json to docs excluded paths list
- Remove set_access_token from public API (internal only)
- Create AuthenticationError instead of using ValueError
- Skip middleware tests on older httpx versions (TestClient compat)
* docs: update API documentation for auth module
* fix(server): address Copilot review feedback
- Fix bearer.mdx: require_auth raises AuthenticationError, not ValueError
- Fix API docs: claims and scopes are optional with defaults, not required
- Remove deprecated SSE transport from bearer_auth_server.py test server
* autogenerate docs
* fix(server): address renvins review feedback
- Improve bearer.mdx claims documentation with explanation and examples
- Remove unnecessary cast() for AuthMiddleware in server.py
- Refactor auth tests to use pytest fixtures for cleaner setup/teardown
* docs(auth): clarify that all MCP endpoints are automatically protected
- Add "What Gets Protected" section explaining automatic protection
- Clarify that get_access_token/require_auth are for accessing token data, not protection
- Update examples to show proper usage pattern
- Improve Note at bottom to be clearer
* fix(auth): prevent path prefix bypass in auth middleware
Security fix: Use exact path matching or segment-based prefix matching
instead of simple startswith() to prevent auth bypass attacks.
Before: /docs-secret would bypass auth because it starts with /docs
After: Only /docs and /docs/* bypass auth, /docs-secret requires auth
Added tests for path matching security edge cases.
* refactor(auth): update import paths for authentication components
- Changed import statements in multiple documentation files and source files to reflect the new structure, moving authentication-related imports to the `auth` submodule.
- Updated examples to ensure clarity and consistency in usage patterns for `BearerAuthProvider`, `AccessToken`, `get_access_token`, and `require_auth`.
|
||
|
|
fe72e7ed80 |
Canary (#849)
* feat: enhance MCP server configuration with project name, icons, and website URL support (#844) * feat: enhance MCP server configuration with project name, icons, and website URL support - Added support for dynamic project names in MCP server configurations by replacing placeholders in templates. - Introduced new fields for website URL and icons in the MCP server configuration, allowing for better branding and information display. - Updated various templates to include favicon and icon SVG files for improved visual representation. - Enhanced the inspector UI to display website URLs and icons associated with the server. * feat: enhance MCP server documentation with server metadata and configuration details - Added examples for server metadata including title, icons, and website URL in the MCPServer configuration. - Updated the `ServerConfig` interface to include new fields for better branding and information display. - Clarified the automatic configuration of metadata fields when using `create-mcp-use-app` for improved user experience. * chore: enter canary prerelease mode * chore(typescript): version packages (canary) * feat(inspector): add copy functionality for RPC messages in Prompts, Resources, and Tools tabs (#848) - Introduced a new "Copy" button to allow users to copy all RPC messages to the clipboard in the PromptsTab, ResourcesTab, and ToolsTab components. - Updated the JsonRpcLoggerView to include a button for copying individual message payloads. - Enhanced the user interface for better message management, including the addition of export functionality. * chore(typescript): version packages (canary) * Fix/widgets/hmr (#845) * feat(mcp-use): enhance widget tool management with HMR support - Added methods for adding, updating, and removing widget tools directly in active sessions to improve hot module replacement (HMR) functionality. - Updated the `uiResourceRegistration` to handle updates without re-registering tools, ensuring immediate visibility of changes. - Enhanced logging for better debugging during tool updates and resource management. - Updated dependencies in `pnpm-lock.yaml` and `package.json` for example projects to include new packages and versions. - Refactored `ToolsTab` component to clear selected tools when they are removed from the list. This commit improves the developer experience by streamlining widget tool management and enhancing the responsiveness of the MCP server during development. * feat(mcp-use): enhance tool and resource registration for Apps SDK widgets - Added functionality to register associated widget resources and templates during tool registration, ensuring they are queryable before notifications are sent. - Improved logging for resource and tool registration processes to aid in debugging. - Created a structured tool entry with additional fields for better management of tool states and updates. This update enhances the responsiveness and usability of the MCP server when handling widget tools and resources. * feat(mcp-use): improve widget tool registration and session management - Enhanced the registration process for widget tools to ensure better tracking and management of tool states. - Implemented new methods for managing widget tools within active sessions, improving the overall responsiveness of the MCP server. - Updated logging mechanisms to provide clearer insights during tool registration and session updates. This update aims to streamline the developer experience by optimizing widget tool management and enhancing session handling. * chore(pnpm-lock): update dependency versions and remove unused test_app section * fix(mcp-server): refine input schema handling and resource template registration - Updated input schema initialization to ensure it defaults to an empty object when no schema is provided, improving robustness. - Enhanced resource template registration by creating a new ResourceTemplate instance, ensuring proper handling of resource URIs. - Adjusted schema update checks to use 'in' operator for better clarity and reliability in determining schema presence. These changes aim to streamline the MCP server's handling of tool registration and input validation, enhancing overall stability and performance. * chore(typescript): version packages (canary) * chore: update dependencies and refactor ResizablePanelGroup usage (#846) * chore: update dependencies and refactor ResizablePanelGroup usage - Updated various dependencies in package.json files across multiple packages, including @types/node, @types/react, @typescript-eslint packages, and others. - Refactored ResizablePanelGroup components to use 'orientation' instead of 'direction' for better clarity in the inspector package. - Enhanced versioning for packages like esbuild, globby, and others to ensure compatibility and stability. * chore: clean up pnpm-lock.yaml by removing unused dependencies - Removed deprecated dependencies related to @ai-sdk packages and others from pnpm-lock.yaml to streamline the lock file and improve package management. - Updated snapshots to reflect the removal of these dependencies, ensuring consistency across the project. * fix(telemetry): update shutdown method for posthog-node compatibility - Changed the shutdown method in the telemetry client to return a Promise, aligning with posthog-node v5.22.0 requirements. - Ensured proper asynchronous handling to prevent test timeout issues during error scenarios. * refactor: update PromptsTab, ResourcesTab, and ToolsTab to use usePanelRef for panel management - Replaced useRef with usePanelRef in PromptsTab, ResourcesTab, and ToolsTab for improved panel handling. - Adjusted panel collapse and expand logic to accommodate new panel references. - Updated default sizes and minimum sizes for resizable panels to enhance layout consistency. - Refactored ResizablePanelGroup and ResizablePanel components to streamline usage and improve readability. * refactor(PromptsTab): replace promptParamsPanelRef with toolParamsPanelRef for improved panel management - Updated PromptsTab to utilize usePanelRef for toolParamsPanelRef, enhancing consistency in panel handling. - Adjusted collapse and expand logic to reflect the new reference, ensuring proper functionality of the UI components. * refactor: consolidate RPC message handling into a reusable RpcPanel component - Created a new RpcPanel component to manage JSON-RPC messages across PromptsTab, ResourcesTab, and ToolsTab. - Updated existing tabs to utilize the RpcPanel, simplifying the code and enhancing maintainability. - Ensured backward compatibility by checking both 'headers' and 'customHeaders' in relevant components. - Improved UI consistency and functionality for managing RPC messages, including clear and export actions. * feat(mcp-server): implement widget tool management with safety checks - Added methods for adding, updating, and removing widget tools in the MCPServerClass, ensuring tools can be managed dynamically. - Introduced safety checks to prevent prototype pollution when handling tool names. - Enhanced session management by ensuring tools and associated resources are immediately queryable across active sessions. - Updated notifications to inform clients of changes in tool and resource lists after modifications. * refactor(mcp-server): reorganize import statements for improved readability - Reformatted import statements in mcp-server.ts to enhance clarity and maintainability. - Grouped related imports together, ensuring a cleaner structure and easier navigation of dependencies. * chore(typescript): update @babel/parser and @babel/types to version 7.28.6 - Removed outdated versions of @babel/parser and @babel/types (7.28.5) from pnpm-lock.yaml. - Updated dependencies to ensure compatibility with the latest version (7.28.6) across relevant packages. * feat(tests): add timeout and disable retries for agent.streamEvents() test - Introduced a 5-second timeout to the agent.streamEvents() integration test to ensure faster failure on invalid API keys. - Disabled retries by setting maxRetries to 0, allowing for immediate feedback during test execution. --------- Signed-off-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com> * chore(typescript): version packages (canary) * refactor(widget-helpers): reorganize imports and enhance slugifyWidgetName function (#854) - Adjusted import statements for improved clarity and consistency. - Added input length validation to the slugifyWidgetName function to prevent ReDoS attacks by limiting the maximum length of the input string. - Refined the regex replacements in slugifyWidgetName for better readability and functionality. * chore(typescript): version packages (canary) * refactor(cli): streamline widget building process with parallel execution (#855) - Introduced a helper function to build individual widgets, improving code organization and readability. - Implemented parallel execution for building widgets, enhancing performance. - Filtered out failed builds to ensure only successful widget metadata is returned. * chore(typescript): version packages (canary) * docs(widget-lifecycle): add guidance on handling loading states in widgets (#856) - Updated documentation to emphasize the importance of checking the `isPending` state when rendering widgets. - Included examples demonstrating how to handle loading states effectively to prevent accessing undefined properties. - Enhanced clarity on the widget lifecycle, ensuring developers understand the rendering behavior before tool execution completes. * fix(inspector): resolve Anthropic tool_use.id required error (#857) Updates LangChain packages to fix the "messages.6.content.3.tool_use.id: Field required" error when using Anthropic provider in Inspector chat with tool calls. Changes: - Updated @langchain/anthropic to ^1.3.10 in inspector - Updated @langchain/core to ^1.1.15 in inspector - Added langchain ^1.2.10 as dependency in inspector - Updated peerDependencies in mcp-use package to match The latest @langchain/anthropic (1.3.10) includes proper tool_call ID generation, ensuring every tool_use block has a unique ID that matches Anthropic's API requirements. Fixes: MCP-1165 * chore(typescript): version packages (canary) * refactor(inspector): extract mcp prompts logic from PromptsTab to useMCPPrompts hook for reuse in ChatsTab (#852) * feat(mcp-use): add support for HEAD requests in mountMcp function (#858) * Update libraries/typescript/packages/mcp-use/src/react/widget-types.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Signed-off-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com> * Update libraries/typescript/packages/mcp-use/examples/server/ui/apps-sdk/resources/product-search-result/widget.tsx Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Signed-off-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com> * Update libraries/typescript/packages/create-mcp-use-app/src/templates/apps-sdk/resources/product-search-result/widget.tsx Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Signed-off-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com> * Update libraries/typescript/packages/inspector/src/client/components/ToolsTab.tsx Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Signed-off-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com> * chore(typescript): version packages (canary) * Fix/server/metadata (#859) * feat(mcp-server): add additional configuration options for MCP server - Added support for title, websiteUrl, and icons in the createMCPServer function to enhance server configuration capabilities. * docs(api-reference): deprecate autoCreateSessionOnInvalidId in ServerConfig - Marked the autoCreateSessionOnInvalidId property as deprecated, advising users to use sessionStore for persistent sessions in future versions. * chore(typescript): version packages (canary) * chore(docs): update changelogs for v0.16.0 and v1.14.0 releases - Added details for v0.16.0 focusing on RPC message management and LangChain fixes, including new features and enhancements. - Updated v1.14.0 changelog to highlight server metadata support and widget enhancements, along with bug fixes and dependency updates. * feat(cli): enhance CLI to display package versions during dev and build commands (#861) * chore(typescript): version packages (canary) * Feature/mcp-986-resources-tab-should-allow-setting-props (#865) * refactor(inspector): enhance JSONDisplay and ToolExecutionPanel components - Updated JSONDisplay to improve line wrapping and font size for better readability. - Modified ToolExecutionPanel to include a collapsible description section and integrated JSONDisplay for tool metadata visualization. - Adjusted styles and structure for improved user experience and accessibility. * feat(inspector): add custom properties support across components - Introduced `customProps` to `McpUIRenderer`, `OpenAIComponentRenderer`, and `ResourceResultDisplay` for enhanced flexibility in rendering. - Updated `ResourcesTab` and `LayoutContent` to utilize `mcpServerUrl` and pass additional props. - Enhanced `ResourceResultDisplay` with a `PropsSelect` component for dynamic prop configuration. - Improved overall component integration and data handling for better user experience. * feat(cli): add MCP_URL environment variable for server configuration - Introduced MCP_URL to the environment variables for the server, allowing for easier access to the server's URL. - Updated the process environment setup to include MCP_URL in both development and fallback scenarios. * feat(mcp-proxy): enhance error logging for proxy requests - Improved error handling in the MCP Proxy middleware to provide better context in logs. - Added specific handling for connection refused errors, logging them as warnings. - Included target URL in error responses for easier debugging of proxy request failures. * feat(inspector): enhance resource properties management and improve UI components - Added support for custom properties in resources, including a new `PropsSelect` component and `PropsConfigDialog` with AI suggestions. - Introduced `usePropsLLM` and `useResourceProps` hooks for better state management. - Enhanced `JSONDisplay`, `ToolExecutionPanel`, and `ResourceResultDisplay` for improved usability and readability. - Updated `McpUIRenderer` and `OpenAIComponentRenderer` to support dynamic properties. * refactor(inspector): remove default auto reconnect setting in App component - Removed the `defaultAutoReconnect` property from the App component configuration to streamline connection management. --------- Signed-off-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com> * chore(typescript): version packages (canary) * Update libraries/typescript/packages/inspector/src/client/hooks/useMCPPrompts.ts Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Signed-off-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com> * fix(cli): correct CLI message to accurately reflect package version display during dev and build commands * Remove unit tests for MCPServer host/port configuration from test_server_config.py * Add unit tests for MCPServer host/port configuration This commit introduces a new test suite for the MCPServer class, verifying default and custom host/port settings, DNS rebinding protection behavior, and the ability to override configurations during runtime. The tests ensure that the server's settings are correctly initialized and modified, enhancing the reliability of the MCPServer configuration. * Fix/inspector/unselect-prompt-if-removed (#866) * fix(cli): correct CLI message to accurately reflect package version display during dev and build commands * fix(inspector): handle prompt selection clearing when prompt no longer exists in the list * fix(inspector): improve handling of prompt selection clearing when prompts are removed from the list * chore(typescript): version packages (canary) * refactor(cli): enhance displayPackageVersions function to support project path resolution (#867) This update modifies the displayPackageVersions function to accept an optional projectPath parameter, allowing it to resolve package versions from a user's project node_modules for standalone installations. It also improves error handling by logging debug messages when packages are not found, aiding in troubleshooting. The CLI commands are updated to pass the projectPath when invoking this function. * chore(typescript): version packages (canary) * refactor(inspector): conditionally add temperature to llmOptions in usePropsLLM hook (#868) This update modifies the usePropsLLM hook to only include the temperature setting in llmOptions if it is explicitly configured in llmConfig. This change aims to prevent model-specific issues related to temperature settings, enhancing the flexibility and reliability of the configuration. * 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: Joaquin Coromina <75667013+bjoaquinc@users.noreply.github.com> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> |
||
|
|
21ca5d8013 |
fix(docs): update links in documentation for consistency and accuracy
- Corrected the MCP Specification link in the TypeScript client documentation. - Updated relative paths to the CONTRIBUTING.md file in Python and TypeScript README files. - Adjusted links in various README files to ensure they point to the correct resources, including examples and specifications. - Removed outdated deployment instructions from the Inspector package README. |
||
|
|
79d017bdc2 |
fix(python): DNS rebinding protection for cloud/proxy deployments (#825)
* Fix DNS rebinding protection for cloud/proxy deployments - Add host/port parameters to MCPServer.__init__() and pass to FastMCP - Default host to "0.0.0.0" (cloud-friendly, disables DNS protection) - "127.0.0.1" auto-enables DNS protection (handled by FastMCP) - run() can override host/port, falls back to __init__ values - Add comprehensive docstring to __init__() explaining parameters - Update documentation This fixes 421 Misdirected Request errors when running behind reverse proxies (Cloudflare, nginx, etc.) where the Host header doesn't match the auto-configured allowed_hosts for localhost. * Fix DNS rebinding protection for cloud/proxy deployments - Add host/port parameters to MCPServer.__init__() and pass to FastMCP - Default host to "0.0.0.0" (cloud-friendly, disables DNS protection) - "127.0.0.1" auto-enables DNS protection (handled by FastMCP) - run() can override host/port and reconfigures DNS protection accordingly - Rebuild app when host changes in run() to apply new security settings - Add comprehensive docstring to __init__() explaining parameters - Add unit tests for host/port configuration and run() overrides - Update documentation This fixes 421 Misdirected Request errors when running behind reverse proxies (Cloudflare, nginx, etc.) where the Host header doesn't match the auto-configured allowed_hosts for localhost. * ruff lint * Bump mcp minimum version to 1.23.0 Required for TransportSecuritySettings and DNS rebinding protection auto-configuration feature that was added in v1.23.0. |
||
|
|
b65d05d21e |
Fix/cli/github-deployment (#834) (#835)
* Fix/cli/github-deployment (#834) * refactor(auth): improve OAuth proxy URL handling and clarify connection URL logic (#831) - Changed `let` to `const` for `connectionUrl` to enforce immutability. - Enhanced logic for deriving `oauthProxyUrl` from the callback URL, including handling cases where the callback is at the root path. - Updated comments to clarify the distinction between `oauthProxyUrl` and `connectionUrl`, ensuring better understanding of their roles in the authentication flow. - Removed the clearing of OAuth storage before connecting to maintain valid tokens across sessions. * chore: enter canary prerelease mode * chore(typescript): version packages (canary) * feat(cli): add .gitignore and CLAUDE.md for CLI documentation - Introduced a .gitignore file to exclude .mcp-use from version control. - Added CLAUDE.md to provide comprehensive guidance on using the CLI, including development commands, architecture details, and deployment instructions. - Enhanced authentication flow in auth.ts with CSRF protection and improved error handling for GitHub integration in deploy.ts. --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * chore(typescript): version packages (canary) * docs: update changelog with new patch releases for inspector and typescript - Added entries for versions v0.15.3, v0.15.2, and v0.15.1 in the inspector changelog, detailing dependency updates, OAuth proxy URL handling improvements, and localStorage enhancements. - Included entries for versions v1.13.5, v1.13.4, and v1.13.3 in the typescript changelog, highlighting CLI documentation enhancements, OAuth proxy improvements, and telemetry updates. --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> |
||
|
|
5176e26589 |
docs: update installation instructions to include package installation commands
- Added `npm install`, `pnpm install`, and `yarn install` commands to the installation sections in multiple documentation files to ensure users install dependencies after scaffolding a new MCP server project. |
||
|
|
0144a315fd |
Canary (#815)
* chore(deps): bump hono from 4.11.1 to 4.11.4 in /libraries/typescript (#810) * chore(deps): bump hono from 4.11.1 to 4.11.4 in /libraries/typescript Bumps [hono](https://github.com/honojs/hono) from 4.11.1 to 4.11.4. - [Release notes](https://github.com/honojs/hono/releases) - [Commits](https://github.com/honojs/hono/compare/v4.11.1...v4.11.4) --- updated-dependencies: - dependency-name: hono dependency-version: 4.11.4 dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> * chore: add changeset for dependabot updates --------- Signed-off-by: dependabot[bot] <support@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> * feat(inspector): add stop functionality to inspector chat (#811) * add stop func to inspector chat * chore: apply formatting fixes and add changeset for stop functionality - Run prettier formatting on inspector files - Add changeset for stop functionality feature Co-authored-by: Joaquin Coromina <bjoaquinc@users.noreply.github.com> * fix(chat): handle cancellation of pending tool calls in MessageList and chat message hooks - Updated MessageList component to reflect tool invocation states: "error", "pending", and "result". - Implemented logic in useChatMessages and useChatMessagesClientSide hooks to mark pending tool calls as cancelled when the abort signal is triggered, updating the message state accordingly. --------- Co-authored-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com> Co-authored-by: Joaquin Coromina <bjoaquinc@users.noreply.github.com> * Feat/cli/improve devx (#808) * feat(cli): enhance login and deployment commands with improved error handling and user prompts - Updated the login command to handle errors gracefully, providing user feedback on login failures. - Modified the deployment command to prompt users for login if not authenticated, enhancing user experience. - Removed the `fromSource` option from the deployment command, streamlining the deployment process. - Added checks for uncommitted changes in the git repository before deployment, ensuring users are aware of their current state. - Updated various commands to consistently use `npx mcp-use login` for login instructions, improving clarity. * refactor(inspector, multi-server-example): streamline authentication UI and logic - Simplified the authentication button logic in InspectorDashboard, consolidating the rendering of the authentication state and removing redundant elements. - Updated the multi-server example to directly link to the authentication URL, enhancing user experience by eliminating unnecessary prompts and improving clarity in the authentication process. * fix(multi-server-example): update Supabase URL to use placeholder for project reference - Changed the Supabase server URL in the multi-server example to use a placeholder `{PROJECT_REF}` instead of a hardcoded project reference, enhancing flexibility and usability for developers using the example. * feat(cli): enhance login and deployment commands; refactor authentication UI - Improved error handling in the login command and added user prompts for better feedback. - Updated the deployment command to prompt for login if not authenticated and removed the `fromSource` option. - Added checks for uncommitted changes before deployment. - Streamlined the authentication UI in InspectorDashboard and updated the multi-server example to link directly to the authentication URL. * feat(ci): add caching for Deno dependencies in CI workflow - Implemented a caching mechanism for Deno dependencies in the TypeScript PR preview workflow to reduce download timeouts during tests. - Added retry logic for caching attempts to enhance reliability and ensure tests can proceed even if caching fails. * fix(ServerDropdown, ShimmerButton): update theme handling and styling adjustments - Refactored theme handling in ShimmerButton to use `theme` instead of `resolvedTheme`, ensuring consistent color application based on the current theme. - Made minor styling adjustments in ServerDropdown to enhance button appearance, maintaining responsiveness and visual clarity across themes. * feat(typescript): add type definitions for React and ReactDOM - Added `@types/react` and `@types/react-dom` to the TypeScript package dependencies to improve type support for React components, enhancing development experience and type safety. * refactor(ui): enhance component type definitions and forward refs - Updated Badge and Button components to use React.forwardRef for improved ref handling. - Enhanced Checkbox and Popover components with explicit type definitions for better type safety. - Refactored DropdownMenu components to include type annotations, ensuring consistency and clarity in usage. * chore: enter canary prerelease mode * chore(typescript): version packages (canary) * feat(logging): replace Winston with built-in SimpleConsoleLogger and enhance logging configuration - Removed the `winston` dependency, introducing a built-in logging system that works in both Node.js and browser environments. - Updated logging configuration in the server documentation to reflect the new logger's API and usage. - Enhanced RPC logging with new filtering capabilities and added migration guides for users transitioning from Winston. - Added `.gitignore` files to various templates to prevent unnecessary files from being included in version control. * feat(changelog): add release images for versions 1.12.0 to 1.1.0 - Included image frames for each release in the changelog, enhancing visual representation of updates from version 1.12.0 down to 1.1.0. - Each image corresponds to the respective release title and date, improving the overall presentation of the changelog. * feat(docs): update inspector and TypeScript changelogs with new features and enhancements - Added detailed release notes for versions 0.15.0 to 0.14.1 in the inspector changelog, highlighting new functionalities like chat stop capabilities and various enhancements. - Updated TypeScript changelog with entries for versions 1.13.2 to 1.12.1, including improvements in CLI commands, dependency updates, and security fixes. - Enhanced overall documentation clarity by including images for specific releases and restructuring content for better readability. * fix(docs): correct changelog formatting and enhance clarity (#817) - Fixed formatting issues in the TypeScript changelog by ensuring proper closing tags for update sections. - Improved overall readability and structure of the changelog entries for better user experience. * chore(typescript): version packages (canary) * refactor(docs): improve formatting of pages in documentation structure - Reformatted the pages array in the documentation JSON to enhance readability and maintain consistency across different sections. - Ensured that each page entry is on a new line for better clarity and easier future modifications. --------- Signed-off-by: dependabot[bot] <support@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: Joaquin Coromina <75667013+bjoaquinc@users.noreply.github.com> Co-authored-by: Joaquin Coromina <bjoaquinc@users.noreply.github.com> |
||
|
|
d8d319c940 |
fix(python/server): improve debug and pretty_print_jsonrpc behavior (#814)
* fix(python/server): improve debug and pretty_print_jsonrpc behavior - Make pretty_print_jsonrpc work independently of debug_level (previously required DEBUG=2 environment variable) - Rename run_debug to debug in server.run() for consistency - Make run(debug=True) override server's debug_level if it was 0 - Remove aggressive signal handlers that broke thread compatibility (uvicorn handles SIGINT/SIGTERM gracefully) - Update all documentation to use new debug parameter name * refactor(python/server): remove unused lupo_tool function from server_example.py * docs: update signals API reference after simplification * refactor: remove unused signals.py module uvicorn already handles SIGINT/SIGTERM gracefully, so custom signal handlers are unnecessary. Removed the signals.py file and all references to setup_signal_handlers(). * chore: remove analysis files |
||
|
|
4997674559 |
feat(python): Intercept MCP handshake with on_initialize middleware (#769)
* Wrap server session from MCP * Update server and middleware * Update middleware example * Fix formatting and linting * Update docs * Fix monkeypatch for tests * Update docs and remove comment * feat(python): add tests, docs, and docstrings for on_initialize middleware - Add 13 unit tests covering dispatch, chain order, rejection, and context enrichment - Rewrite middleware.mdx documentation with Mintlify components (Tabs, Tips, Cards) - Add comprehensive docstring to MiddlewareServerSession documenting single-server-per-process limitation - Add docs/CLAUDE.md with documentation improvement guidelines - Regenerate API documentation * docs: highlight typed context feature in middleware docs * example: add ClientCapabilitiesGuard demonstrating typed context * style: fix linting in middleware example * docs(examples): add comprehensive docstrings to middleware_example.py - Add module docstring explaining key concepts and middleware hooks - Document each middleware class with typed context details - Organize code with section headers (CONNECTION, REQUEST, TOOL-SPECIFIC) - Add ClientCapabilitiesGuard example showing typed context usage --------- Co-authored-by: pietrozullo <pietro.zullo@gmail.com> |
||
|
|
00d7599bfb |
fix(docs): update image links in changelog to use CDN URLs
Replaced local image paths with CDN links for releases 1.3.11, 1.3.12, 1.4.0, 1.4.1, 1.5.0, and 1.5.2 in the changelog files. |
||
|
|
bcdecd4921 |
fix(typescript): update documentation links to new domain for mcp-use… (#790)
* fix(typescript): update documentation links to new domain for mcp-use (#789) * fix: update documentation links to new domain for mcp-use - Replaced all instances of old documentation URLs (https://docs.mcp-use.com) with the new domain (https://mcp-use.com/docs) across various files, ensuring consistency and accuracy in references. * fix: update documentation links to new domain for mcp-use - Replaced all instances of old documentation URLs (https://docs.mcp-use.com) with the new domain (https://mcp-use.com/docs) across various files, ensuring consistency and accuracy in references. --------- Co-authored-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com> * chore: enter canary prerelease mode * Fix/oauth-flow-resource (#792) * feat(oauth): enhance proxy and metadata handling for OAuth flow - Added support for preserving the original host in the proxy configuration to facilitate OAuth resource URL rewriting. - Implemented logic to rewrite metadata URLs and resource parameters to ensure compatibility with the actual server URL during OAuth requests. - Updated the `BrowserOAuthClientProvider` to handle metadata discovery from the WWW-Authenticate header and fallback to standard paths if necessary. - Enhanced the `mountOAuthProxy` function to manage connection URLs and resource fields for improved SDK validation. This update improves the reliability of the OAuth flow and ensures proper handling of metadata and resource URLs in various scenarios. * feat(client): add clientInfo support for OAuth registration and server capabilities - Introduced a new `clientInfo` property in `McpClientProvider` and `McpServerWrapper` to allow for detailed client metadata, including name, version, website URL, and icons. - Enhanced the `App` component to provide specific client information for the inspector. - Updated the OAuth flow to utilize the new client information for improved registration and server capabilities. This update enhances the integration of client metadata into the OAuth process, improving user experience and server interactions. * feat(oauth): enhance token request handling in BrowserOAuthClientProvider - Added logic to rewrite the resource parameter in the body of token requests to ensure it points to the actual server URL. - Implemented error handling for the URL parameter rewriting process, improving robustness during OAuth interactions. - Enhanced logging to provide visibility into the resource parameter changes for better debugging. This update improves the accuracy of resource URL handling in the OAuth flow, ensuring compatibility with server requirements. * refactor(multi-server-example): remove unused server configuration - Eliminated the server configuration for "API Key Needed (Argile)" from the multi-server example, streamlining the code and reducing potential confusion. - Retained the configuration for "No API Key Needed (MCP Use)" to maintain example functionality. This change simplifies the example by focusing on the relevant server setup. * refactor(inspector): simplify server ID handling in Layout component - Removed unnecessary URL decoding for server ID retrieval, as `searchParams.get()` already handles this. - Streamlined the logic for updating the selected server ID and checking server connections, improving code clarity and maintainability. This change enhances the efficiency of server ID management in the Layout component. * feat(mcp-use): implement cached server metadata handling - Introduced `CachedServerMetadata` interface to store server metadata alongside configurations, including name, version, title, and icons. - Enhanced `LocalStorageProvider` and `MemoryStorageProvider` to support caching, retrieving, and removing server metadata. - Updated `McpClientProvider` to utilize cached metadata for initial server info and to save metadata on server updates. - Modified `useMcp` to initialize server info from cached metadata if available, improving user experience during server info fetching. This update enhances the efficiency of server metadata management, reducing unnecessary fetches and improving responsiveness. * feat(inspector): add logging middleware for API routes - Integrated logger middleware into the API routes to enable request and response logging, enhancing observability. - Updated the OAuth proxy configuration to enable logging for better tracking of API interactions. This update improves the debugging capabilities of the inspector by providing detailed logs for API requests. I don't understand why but this fixes the mounting of the proxy oauth apis in build vs dev, 4 hours wasted * fix(multi-server-example): update Supabase URL to use placeholder for project reference - Changed the Supabase server URL in the multi-server example to use a placeholder `{PROJECT_REF}` instead of a hardcoded project reference. This enhances flexibility and usability for developers using the example. This update improves the example's adaptability for different project configurations. * fix(oauth): add id field to initialize request in OAuth proxy - Updated the body of the minimal MCP request in the `mountOAuthProxy` function to include an `id` field, ensuring compliance with the JSON-RPC specification and improving request handling. This change enhances the functionality of the OAuth proxy by correctly formatting the initialization request. * feat(cli): add hot module reloading support and enhance server management (#791) * feat(cli): add hot module reloading support and enhance server management - Introduced a new option `--no-hmr` to disable hot module reloading, allowing users to opt for a full restart using `tsx watch`. - Implemented session management for registered tools, prompts, and resources to support hot reloading. - Enhanced server lifecycle management with cleanup functions for active sessions. - Improved error handling and logging during server startup and hot reload processes. - Added a new example tool for adding numbers in the basic server example. * docs: enhance Hot Module Reloading (HMR) documentation and server configuration - Updated documentation to clarify HMR functionality, including its benefits and how it allows for real-time updates without server restarts. - Added detailed CLI options for starting the development server with HMR, including the `--no-hmr` flag for fallback to `tsx watch`. - Improved explanations of what can be hot-reloaded and what requires a server restart, enhancing user understanding of the development process. * chore(typescript): version packages (canary) * feat(cli): enhance hot module reloading and server management (#794) * feat(cli): enhance hot module reloading and server management - Improved hot module reloading (HMR) support by allowing local `tsx` usage, falling back to `npx` if not found. - Updated server command execution to handle TypeScript imports more effectively. - Enhanced file watching capabilities to include `.ts` and `.tsx` files while ignoring unnecessary patterns. - Streamlined tool, prompt, and resource registration during HMR to directly inject into active sessions without removal, preserving existing configurations. - Added detailed logging for file changes and watcher readiness to improve developer experience. * feat(cli): add changeset for minor updates to hot module reloading and server management - Introduced enhancements to hot module reloading (HMR) with local `tsx` support and improved TypeScript import handling. - Enhanced file watching for `.ts` and `.tsx` files, optimizing developer experience with detailed logging for changes and watcher readiness. * refactor(cli, mcp-use): enhance error handling and improve tool registration - Updated the CLI to resolve the `tsx` binary path dynamically from `package.json`, improving compatibility and error messaging. - Enhanced error handling during tool, prompt, and resource registration in the MCP server, ensuring robust logging for failures. - Improved the favicon detection logic to normalize URLs and provide clearer debug messages when no non-default favicon is found. - Added manual handling of redirects in the MCP proxy to prevent ArrayBuffer detachment issues, ensuring reliable request forwarding. * chore(typescript): version packages (canary) * fix(favicon-detector): update subdomain level generation to exclude TLDs and ensure minimum two-part domains are returned * Fix/hmr/consistent order (#796) * fix: hmr * feat(hmr): enhance synchronization for tools, prompts, and resources - Implemented a generic synchronization mechanism for hot module replacement (HMR) that updates tools, prompts, and resources in active sessions without removal. - Added support for detecting changes in definitions, including renames and updates, ensuring seamless integration during HMR. - Improved logging for changes in registrations, enhancing developer visibility into updates during the HMR process. - Introduced a new file for HMR synchronization logic, centralizing the handling of updates across different primitive types. * fix(tests): update tsx binary path resolution and increase timeout for HMR tests - Modified the expectation in the tsx-resolution test to ensure the binary path resolves correctly to the node_modules directory. - Increased the timeout for HMR CLI integration tests to accommodate longer execution times, enhancing test reliability. * fix(tests): enhance HMR CLI integration tests with package.json setup and error handling - Added creation of a package.json file to enable module resolution during tests. - Implemented symlink creation for the mcp-use package in the test environment to ensure proper module loading. - Improved error handling in the test output by refining the data handlers for stdout and stderr streams, enhancing reliability in capturing error messages. * chore(typescript): version packages (canary) * fix(cli): update import path for getPackageVersion in client command (#800) * chore(typescript): version packages (canary) --------- 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> |
||
|
|
c990faf76b |
fix(python): add timeout mechanism to ConnectionManager.stop() (#726)
* fix(python): add timeout mechanism to ConnectionManager.stop() Add timeout parameter (default: 30s) to stop() method to prevent infinite hangs during application shutdown. Resolves issue #562. Changes: - Add timeout parameter to stop() with 30 second default - Wrap task wait with asyncio.wait_for() to enforce timeout - Wrap cleanup event wait with asyncio.wait_for() to enforce timeout - Force cleanup on timeout by clearing connection and setting done event - Add appropriate warning/error logging on timeout Tests: - Add 10 comprehensive unit tests for timeout scenarios - All 158 unit tests pass - Manual end-to-end testing verified This ensures graceful shutdown even when cleanup hangs in production. * updated with copilot suggested edits * ruff checks passed * Improve timeout handling in ConnectionManager.stop() - Move 'import time' to module level - Use CancelledError consistently (Python 3.11+ style) - Treat timeout <= 0 or None as infinite wait (no timeout) - Add elapsed time to timeout warning logs - Add tests for negative/zero/None timeout behavior Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * docs: update ConnectionManager.stop() API reference with timeout parameter --------- Co-authored-by: pietrozullo <pietro.zullo@gmail.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com> |
||
|
|
96cec626e5 |
chore(docs): update image links in changelog files to use CDN URLs
- Replaced local image paths with CDN links for releases 1.3.11, 1.3.12, 1.4.0, 1.4.1, 1.5.0, and 1.5.2 in the changelog files. - Updated the changelog entries to ensure consistent image sourcing and improve loading performance. |
||
|
|
6d04f70106 | release/python1.5.2 | ||
|
|
043931dad9 |
feat(docs): add Contributors component to changelog files
- Introduced a new Contributors component in the changelog files for releases 1.3.11, 1.3.12, 1.4.1, and 1.5.0 to acknowledge contributors in a consistent format. - Updated the changelog entries to include a list of contributors for each release, enhancing visibility and appreciation for their contributions. |
||
|
|
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. |
||
|
|
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> |
||
|
|
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> |
||
|
|
36d754820f | fix: remove links to redirect documentation in static files | ||
|
|
824ca31c9c | fix(docs): move local images to cdn links | ||
|
|
eb4befc2db | fix(docs): remove chat reference from docs | ||
|
|
2f89a3b7ea |
chore(deps): bump react-router from 7.10.1 to 7.12.0 in /libraries/ty… (#780)
* chore(deps): bump react-router from 7.10.1 to 7.12.0 in /libraries/typescript (#765) * chore(deps): bump react-router in /libraries/typescript Bumps [react-router](https://github.com/remix-run/react-router/tree/HEAD/packages/react-router) from 7.10.1 to 7.12.0. - [Release notes](https://github.com/remix-run/react-router/releases) - [Changelog](https://github.com/remix-run/react-router/blob/main/packages/react-router/CHANGELOG.md) - [Commits](https://github.com/remix-run/react-router/commits/react-router@7.12.0/packages/react-router) --- updated-dependencies: - dependency-name: react-router dependency-version: 7.12.0 dependency-type: direct:production ... * chore: add changeset for dependabot updates * chore: enter canary prerelease mode * chore(typescript): version packages (canary) * Fix/inspector/loop (#782) * feat(inspector): enhance auto-connect functionality and proxy handling - Added default auto proxy fallback configuration in the App component to streamline connection attempts. - Updated useAutoConnect hook to simplify connection logic by removing unnecessary state management and handling proxy fallback internally. - Improved error handling and user feedback during authentication processes in the multi-server example. - Enhanced OAuth flow management in the browser provider and callback handling to ensure better state management and user experience. These changes improve the overall reliability and usability of the connection process in the inspector. * feat(inspector): refactor connection handling and enhance theme toggling - Removed the temporary ConnectionTester component and integrated connection logic directly into the InspectorDashboard for improved clarity and performance. - Simplified connection management by consolidating state handling and removing unnecessary complexity. - Enhanced the theme toggling functionality with a dropdown menu for better user experience and accessibility. - Updated the LayoutHeader to support theme changes with visual transitions, improving the overall UI responsiveness. These changes streamline the connection process and enhance the user interface for theme management. * feat(inspector): enhance OAuth authentication flow and connection settings - Updated documentation to clarify the OAuth authentication process, emphasizing user-initiated actions and fallback options. - Refactored connection settings to default to manual authentication, requiring explicit user action to trigger OAuth. - Improved handling of auto-connection and proxy configurations across components, ensuring a consistent user experience. - Added comments and examples in the codebase to guide users on managing OAuth settings effectively. These changes improve the clarity and usability of the authentication process within the inspector. * fix(inspector): resolve OAuth flow looping issue by removing duplicate fallback logic - Added a changeset to document the patch for the inspector and mcp-use packages. - Refactored the useAutoConnect hook and other components to streamline connection handling and improve user experience. - Cleaned up code formatting and logging for better readability and maintainability. These changes enhance the reliability of the OAuth authentication process within the inspector. * fix: enhance OAuth flow and connection handling in inspector - Resolved OAuth flow looping issue by removing duplicate fallback logic in the useAutoConnect hook. - Simplified connection management and improved user experience through better state handling. - Enhanced auto-connect functionality and proxy handling, ensuring more reliable authentication processes. - Improved theme toggling with a dropdown menu for better accessibility and user interaction. - Updated OAuth flow management in the browser provider for better state management and error handling. * refactor(inspector): simplify URL protocol validation and connection error handling - Updated URL validation logic in InspectorDashboard and utility functions to only allow http and https protocols, enhancing clarity and security. - Modified error handling in the useAutoConnect hook to streamline connection failure notifications. - Improved example server configurations for better clarity and user experience in the multi-server example. These changes enhance the overall robustness and usability of the inspector's connection handling. * fix: improve URL availability checks in TypeScript PR preview workflow - Enhanced the script to check the availability of both PR and commit URLs on esm.sh, improving reliability in package readiness verification. - Adjusted retry logic to provide clearer output on the status of URL checks, including the number of attempts and readiness state. - Reduced the maximum retry count and increased the delay between attempts for better performance. These changes ensure that the workflow accurately waits for package availability before proceeding with tests. * chore(deps): update langchain and react-router dependencies in TypeScript packages (#781) - Bumped @langchain/core to version 1.1.8 and langchain to version 1.2.3. - Updated react-router and react-router-dom to version 7.12.0 across multiple packages. - Adjusted peer dependencies in cli, inspector, and mcp-use packages to reflect the new versions. * chore(typescript): version packages (canary) |
||
|
|
3c45e9dcc7 |
Change debug flag to run_debug in server example (#718)
* Change debug flag to run_debug in server example Signed-off-by: nktrk <nktrk@users.noreply.github.com> * Change additional debug flags to run_debug in server example setup Signed-off-by: nktrk <nktrk@users.noreply.github.com> * Update server documentation to replace 'debug' with 'run_debug' for consistency across examples --------- Signed-off-by: nktrk <nktrk@users.noreply.github.com> Co-authored-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com> |
||
|
|
198fffddc2 |
Canary (#777)
* feat(inspector): add reconnect functionality for failed connections (#768) * feat(inspector): add reconnect functionality for failed connections - Introduced a reconnect button in the InspectorDashboard for connections that fail, allowing users to attempt reconnection directly from the UI. - Enhanced the dropdown menu to include a reconnect option for failed connections, improving user experience and accessibility. - Updated HttpConnector to disable automatic reconnection, shifting the responsibility to higher-level logic for better control over connection management. * fix(http): enable automatic reconnection with maxRetries set to 2 - Updated the HttpConnector to allow automatic reconnection by setting maxRetries to 2, enhancing connection resilience. - This change shifts the reconnection logic back to the connector, improving overall connection management. * chore: enter canary prerelease mode * chore(typescript): version packages (canary) * Fix/client-info-clean (#776) * fix: client info and inspector improvements * chore: update package versions to 0.14.2-canary.0 and 1.12.2-canary.0 * chore: update changelogs for @mcp-use/inspector and mcp-use to include reconnect functionality and dependency updates * feat(inspector): add OAuth proxy middleware and update server routes - Introduced `mountOAuthProxy` to handle OAuth flows at the inspector's designated path. - Updated `registerInspectorRoutes` to include the new OAuth proxy middleware. - Refactored example client code to comment out unused server configurations for clarity. * refactor: reorganize imports and clean up code structure - Adjusted import statements in `shared-routes.ts` for better organization. - Updated example client code to replace hardcoded API key with a placeholder for security. - Cleaned up type exports in `index.ts` for consistency and clarity. * refactor: standardize import formatting in shared-routes.ts and index.ts - Reformatted import statements in `shared-routes.ts` and `index.ts` for consistency. - Ensured trailing commas are uniformly applied to type exports for improved readability. * fix: update server name in multi-server example for clarity - Changed server name from "Invalid API Key (MCP Use)" to "No API Key (MCP Use)" in the multi-server example for better accuracy and understanding. * chore(typescript): version packages (canary) * refactor: update clientInfo parameter formatting in documentation - Changed the formatting of the `clientInfo` parameter values in the client configuration documentation to use quotes for consistency and clarity. * fix: update example in MCPAgent documentation to use stream_events method (#778) - Changed the example code in the MCPAgent documentation to reflect the updated method name from `stream` to `stream_events`, ensuring accuracy and clarity in usage. * chore(typescript): version packages (canary) --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> |
||
|
|
4889c49821 | fix(python): update docs (#774) | ||
|
|
a9a9dcfde9 |
refactor(auth): update OAuth provider imports and configurations across documentation
- Replaced instances of `McpServer` with `MCPServer` and updated OAuth provider imports to use the new naming convention (e.g., `oauthAuth0Provider`, `oauthCustomProvider`, `oauthKeycloakProvider`, `oauthSupabaseProvider`, `oauthWorkOSProvider`). - Ensured consistent usage of the new provider functions in the basic and full configuration examples for various authentication providers in the documentation. - This change enhances clarity and aligns the documentation with the latest code structure. |
||
|
|
96ab98b8d2 |
Refactor imports in agent docs to use langchain_core module (#723)
Updated import statements to use langchain_core for any reference to prompts Signed-off-by: nktrk <nktrk@users.noreply.github.com> |
||
|
|
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> |