mirror of
https://github.com/mcp-use/mcp-use.git
synced 2026-09-14 18:06:01 +08:00
canary
4 Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
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> |
||
|
|
8d4cb4719b |
Feature/mcp 799 python client integration of code mode (#498)
* initial commit * update to code mode * Squash all commits: Add CLI deploy functionality, server tool inspector, and various improvements (#467) * chore(release): exit prerelease mode and version packages (#473) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Docs/tunnel docs (#474) * chore: add tunnelling docs * chore: add tunnelling docs * docs: enhance tunneling documentation with link to @mcp-use/tunnel package * docs: update tunneling documentation with improved code examples and formatting * feat: Add verify parameter to MCPClient and connectors (#478) * feat: add verify parameter to MCPClient and connectors - Introduced a new optional `verify` parameter in `MCPClient`, `HttpConnector`, and configuration functions to control SSL certificate verification. - Updated relevant methods to utilize the `verify` parameter, ensuring consistent handling of SSL verification across the client and connectors. - Enhanced the SSE and Streamable HTTP connection managers to accept a custom HTTPX client factory for improved flexibility in connection handling. * fix: linting and docs * fix: http connector test * Update docs/python/api-reference/mcp_use_client_config.mdx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Pietro Zullo <62951181+pietrozullo@users.noreply.github.com> * fix: docs --------- Signed-off-by: Pietro Zullo <62951181+pietrozullo@users.noreply.github.com> Co-authored-by: Pietro Zullo <62951181+pietrozullo@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Canary release (#476) * Implement iframe log console for inspector (#475) * Docs/tunnel docs (#474) * chore: add tunnelling docs * chore: add tunnelling docs * docs: enhance tunneling documentation with link to @mcp-use/tunnel package * docs: update tunneling documentation with improved code examples and formatting * feat: Add iframe console logging and UI Implement a system to capture and display console logs from iframes. This includes injecting a script into iframes to intercept console messages and a UI component to display them in the parent window. Co-authored-by: tonxipad <tonxipad@gmail.com> * feat: Conditionally inject console interceptor for same-origin iframes Co-authored-by: tonxipad <tonxipad@gmail.com> * refactor: update IframeConsole component for improved UI and styling - Removed unused XIcon import. - Adjusted LogLevelBadge styling for better visual consistency. - Renamed "Iframe Console" to "Widget Console Logs" for clarity. - Modified button styling for better alignment and spacing. * feat: add HTMLIFrameElement and MessageEvent to ESLint config - Updated ESLint configuration to include HTMLIFrameElement and MessageEvent as readonly types, enhancing type safety for iframe-related code. * feat: implement auto-scroll functionality in IframeConsole component - Added useRef and useEffect hooks to enable auto-scrolling to the bottom of the console when logs change or the console opens. - Updated the console's container div to use the scrollContainerRef for managing scroll position. * chore: lint & format * chore: changeset --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: tonxipad <tonxipad@gmail.com> * chore: enter canary prerelease mode * chore(typescript): version packages (canary) * Feat/consistent sub for tunnel (#480) * Docs/tunnel docs (#474) * chore: add tunnelling docs * chore: add tunnelling docs * docs: enhance tunneling documentation with link to @mcp-use/tunnel package * docs: update tunneling documentation with improved code examples and formatting * Refactor CLI tunnel functionality to support optional subdomain and save to manifest - Updated `startTunnel` function to accept an optional subdomain parameter. - Enhanced subdomain extraction from the tunnel URL and updated the manifest file with the subdomain. - Cleaned up commented-out code related to tunnel handling in the CLI. - Improved logging for tunnel establishment and subdomain saving. * chore: changeset * format * chore(typescript): version packages (canary) * Refactor tunnel argument handling in CLI to streamline subdomain flag usage and improve logging * remove console log * [typescript][server] Fix tools with async calls (#481) * fix tools with async calls * FORMAT * chore(typescript): version packages (canary) * fix/minor fix post canary (#482) * fix server async call * wrap all handle request calls in wait function * changeset * chore(typescript): version packages (canary) * window.openai emulation and ChatGPT Integration debugging (#469) * feat: Add WidgetFullscreenWrapper component Co-authored-by: tonxipad <tonxipad@gmail.com> * Docs/tunnel docs (#474) * chore: add tunnelling docs * chore: add tunnelling docs * docs: enhance tunneling documentation with link to @mcp-use/tunnel package * docs: update tunneling documentation with improved code examples and formatting * feat: Enhance OpenAIComponentRenderer with tool call handling and display mode management - Implemented tool call handling with error management and response formatting for OpenAI API compatibility. - Added support for follow-up messages and localStorage fallback for pending follow-ups. - Introduced display mode management (inline, pip, fullscreen) with dynamic iframe resizing and a close button for fullscreen mode. - Updated TypeScript configuration to include .tsx files for better component support. * fix: maintain subdomain across builds * remove console * refactor: replace direct serverBaseUrl usage with getServerBaseUrl method for improved consistency * refactor: enhance WidgetFullscreenWrapper with hoverable icon buttons for fullscreen and pip modes * feat: implement dev widget proxy and asset handling for improved development experience * refactor: update OpenAIComponentRenderer to handle global updates for display mode and theme, enhancing iframe communication * feat: add WidgetDebugger export to enhance debugging capabilities in the React package * chore: fix type * format * chore: changeset * remove irrelevant content * chore: add changeset for MCP-747-fix-apps-sdk-fullscreen-close-button-9e35 * refactor: improve tunnel shutdown handling and output suppression for better user experience * format * remove console log --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: tonxipad <tonxipad@gmail.com> * chore(typescript): version packages (canary) * Fix/settings button servers dropdown (#485) * feat: Add server connection management in Layout and ServerDropdown components - Introduced ServerConnectionModal for editing connection settings in the Layout component. - Updated ServerDropdown to handle connection options and display selected server status. - Enhanced MCPConnection interface to include transportType and proxyConfig for better connection management. - Implemented connection update logic with success notifications. * add gear also to home * chore: changeset and format * chore(typescript): version packages (canary) * feat: Enhance ConnectionSettingsForm layout and add utility styles (#486) - Updated ConnectionSettingsForm component to improve layout responsiveness with new utility classes. - Added a new CSS utility for flex column and row layout. - Cleaned up imports for better organization. * chore(typescript): version packages (canary) * Update libraries/typescript/packages/cli/CHANGELOG.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com> * Update libraries/typescript/packages/cli/src/index.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com> * Update libraries/typescript/packages/cli/src/index.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com> * Update libraries/typescript/.changeset/clear-wombats-juggle.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com> * Feature/mcp 743 tool argument autoformats and moves the cursor (#487) * refactor(ToolsTab, ToolInputForm): enhance JSON handling for object/array types - Updated ToolsTab to initialize object and array types as empty JSON strings to preserve formatting. - Improved argument parsing in ToolsTab to handle JSON strings for object/array types before tool execution. - Modified ToolInputForm to display objects/arrays as formatted JSON strings, ensuring user input is preserved. * chore: changeset * chore(typescript): version packages (canary) * Fix/remove console button from chat (#488) * remove mcp url console log * feat(OpenAIComponentRenderer): add showConsole prop to control console visibility * Feature/mcp 837 load list of models for providers (#489) * remove mcp url console log * Enhance ConfigurationDialog with model fetching and caching - Added functionality to fetch models from OpenAI, Anthropic, and Google APIs based on the selected provider. - Implemented caching for fetched models using localStorage to improve performance and reduce API calls. - Updated the UI to display loading states and errors when fetching models. - Refactored API key handling to support provider-specific storage in localStorage. - Improved user experience by debouncing API calls and dynamically updating the model selection based on the provider. * fix: reorder imports in useConfig.ts for better clarity * chore(typescript): version packages (canary) --------- Signed-off-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com> Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: tonxipad <tonxipad@gmail.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Pietro Zullo <62951181+pietrozullo@users.noreply.github.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * chore(release): exit prerelease mode and version packages (#490) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Update Dockerfile Signed-off-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com> * fix: x icon light mode * docs: Improve typescript server docs (#491) * fix: update installation commands and enhance quickstart documentation - Changed `pnpm run dev` to `pnpm dev` in installation instructions across multiple files for consistency. - Improved the quickstart guide by clarifying the MCP server framework's capabilities and updating the project structure details. - Added a base URL configuration for the MCP server in the configuration documentation to ensure proper functionality of UI widgets. * minor * add fallback --------- Signed-off-by: Luigi Pederzani <luigipederzani@gmail.com> * Docs/inspector (#492) * refactor: reorganize documentation structure for Inspector and Dev Tools - Updated the docs.json file to consolidate Inspector and Tunneling pages under a new "Dev Tools" group. - Removed redundant entries for Inspector and Tunneling from the documentation structure. - Added a sidebar title for the Inspector page to enhance navigation. * docs: enhance Inspector documentation and add new CLI usage guides - Updated `docs.json` to include new pages for CLI usage, connection settings, keyboard shortcuts, command palette, integration, debugging ChatGPT apps, and development under the Inspector section. - Expanded the Inspector documentation to cover new features, including CLI usage and detailed guides for keyboard shortcuts and integration. - Improved the `self-hosting` documentation to reference the new CLI usage guide. - Enhanced the `apps-sdk-resources` documentation with additional details on widget state and testing procedures using the Inspector. * fix broken links * chore: remove unuseful docs * Feat/python/pretty display (#497) * pretty display implementation * docs update * initial commit * docs * fix tests * example streams and uses anthropic * docs * docs image * fix type checking mock * add rich to requirements * enable pretty pritns in all examples --------- Signed-off-by: Pietro Zullo <62951181+pietrozullo@users.noreply.github.com> Signed-off-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com> Signed-off-by: Luigi Pederzani <luigipederzani@gmail.com> Co-authored-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Vincenzo Reina <vincenzoreinaa05@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: tonxipad <tonxipad@gmail.com> Co-authored-by: Luigi Pederzani <luigipederzani@gmail.com> |
||
|
|
619ef248b2 |
chore/python/update examples models (#402)
* Fix client_info property * Update LLM models across various examples to the latest versions - Changed model from "claude-3-5-sonnet-20240620" to "claude-sonnet-4-5" in airbnb_use.py, blender_use.py, and multi_server_example.py. - Updated model from "gpt-4o" to "gpt-5" in browser_use.py, chat_example.py, example_middleware.py, filesystem_use.py, http_example.py, limited_memory_chat.py, mcp_everything.py, sandbox_everything.py, simple_oauth_example.py, simple_server_manager_use.py, and structured_output.py. - Ensured consistency in LLM usage across all example scripts for improved performance and compatibility. --------- Co-authored-by: renvins <vincenzoreinaa05@gmail.com> |
||
|
|
86be45c2dd |
feat/authorization (#149)
* Auth 1.0 * Defualt to DCR * Fix client list server names * Fix oauth problems with no oauth servers, enhance documentation and comments * Add OAuth metadata provider and specific fixes - Remove auth field to reduce API verbosity - Add "auth" support for MCPClient's config - Add "oauth_provider" key to MCPClient's config to provide metadata - Fix no OAuth servers' errors * Relocate authentication doc * Fix ruff formatting as usual * Fix http connectors tests with oauth support * Fix test_config unit tests * Final fix for tests * Add integration for auth - Add auth server for testing - Add test for complete auth flow with mock on OAuth callback - Add test for custom client auth - Add test for bearer auth token * Add further test and update README - Add OAuth metadata provider (no discovery) - Update README with new auth badge * Format fixes * Remove redefined exception * Add auth test on GH action * Update docs with correct example * Apply suggestions from code review Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Pietro Zullo <62951181+pietrozullo@users.noreply.github.com> * Update mcp_use/auth/oauth.py Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Pietro Zullo <62951181+pietrozullo@users.noreply.github.com> * Add custom callback port feature - Add customizable port for callback - Remove dynamic port - Fix bug of registration before checking port * Add GitHub MCP support * Update docs * chore: highlight hack * chore: change wording in docs * Add authlib on project dependencies * Remove useless example * Fix formatting as usual --------- Signed-off-by: Vincenzo Reina <vincenzoreinaa05@gmail.com> Signed-off-by: Pietro Zullo <62951181+pietrozullo@users.noreply.github.com> Co-authored-by: renvins <vincenzoreinaa05@gmail.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> |