Commit Graph

77 Commits

Author SHA1 Message Date
Pietro Zullo 3350560957 chore(python): release 1.7.1 (#2509) 2026-09-10 17:51:20 +02:00
Enrico Toniato 173b2d54a2 fix: make canary conformance release evidence explicit (#2205) 2026-08-09 12:58:06 +02:00
pietrozullo fc918e5bc7 python/release/1.7.0 2026-03-17 14:42:18 +01:00
Vincenzo Reina d344233c50 feat(python): add create-mcp-use CLI with rich UI and dependency install (#1097)
* Add uvx create-mcp-use command

* Update docs

* Add docs

* feat(python/cli): improve create-mcp-use with rich UI, dependency install, and telemetry

- Use rich for colored output, spinner, and panel for get-started instructions
- Add ASCII logo matching the TypeScript CLI
- Prompt user to install dependencies after scaffolding (detects uv/pip)
- Add --install and --no-install flags for non-interactive use
- Capture install output to keep terminal clean
- Add CreateMCPUseEvent telemetry to track CLI usage
- Fix starter template pyproject.toml hatch build config for installability

* feat(python/server): auto-retry next available port when default is in use

Add port availability checking before starting uvicorn. When the
requested port is occupied, the server automatically tries the next
port (up to 10 retries) instead of crashing.

Refs #1161

* fix(python/cli): fix linting errors in create-mcp-use CLI

* Revert "feat(python/server): auto-retry next available port when default is in use"

This reverts commit baf3d3233e.

* fix(python/cli): address PR review feedback

- Fix ruff format issues in cli.py
- Fix "Cli" → "CLI" in docs title
- Fix "a MCP" → "an MCP" grammar in quickstart

* docs(python): regenerate API docs for CLI module

* docs: update

---------

Co-authored-by: pietrozullo <pietro.zullo@gmail.com>
2026-03-06 12:25:19 +01:00
Pietro Zullo 5c0b35afd9 fix(python): replace deprecated streamablehttp_client with streamable_http_client (#1017)
* fix(python): replace deprecated streamablehttp_client with streamable_http_client

The MCP SDK deprecated streamablehttp_client (camelCase) in favor of
streamable_http_client (snake_case). The new API takes a pre-configured
httpx.AsyncClient instead of individual params.

Changes:
- Create httpx.AsyncClient with auth, headers, timeouts via factory
- Pass it to streamable_http_client(url, http_client=client)
- Manage httpx client lifecycle in _close_connection
- Default httpx_client_factory to create_mcp_http_client (no more None)

Closes MCP-1379

* fix: use logger.warning for cleanup errors (consistent with other connection managers)

* chore: bump mcp minimum version to 1.24.0 (streamable_http_client introduced)

* docs

* docs

* docs: fix memory address in generated docs (use None default instead of function reference)
2026-02-15 16:45:00 -08:00
pietrozullo be5f4d7490 python/release1.6.0 2026-01-22 12:58:01 +01:00
Pietro Zullo 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.
2026-01-19 15:32:58 +01:00
pietrozullo 6d04f70106 release/python1.5.2 2026-01-12 13:50:07 +01:00
pietrozullo 7193483261 release/python1.5.1 2025-12-15 15:40:07 +01:00
Pietro Zullo ebef017114 python/server/middleware&tel (#650)
* chore: add example server pretty print JSON RPC for transparency

* updated telemetry module

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

* server side tel:

* update API reference

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

* remove wrongly generate files

* properly typed middleware

* remove examples

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

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

* generate docs

* remove few events

* adapter tel

* adapter tel

* api ref docs update

* google adapter fix

* fix version

* fix event naming

* server example is streamable and echo tool fix

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

* api ref

* beta on middleware
2025-12-10 17:02:08 +01:00
pietrozullo 67041ca575 python/release-1.5.0 2025-12-01 16:44:20 +01:00
Pietro Zullo be9942a4d4 feat/python/server (#559)
* feat: server first implementation

* docs: docs for server and images

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

* python/release/1.3.13

* catch uvicorn logs && log session id

* fix debug logic

* docs: logging update

* fix: icon of elicitation

* fix installation paths for local clones

* docs: minor restructuring

* docs: reorganization, killed non existing pages

* docs: beta tag on server

* chore: example servers

* feat: inspector autopopulated and client only

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

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

* mcp path configurable

* fix inspector

* export as FastMCP too

* chore: update fastmcp migration example

* lock inspector version

* type runner

* unhide docs and remove dangers

* migration diff

* docs and context example

* export context

* logging improvement

* pretty JSON RPC

* autoConnect url param in inspecotr

* move logging

* type check

* Server Router

* show response logs

* fallback tool name to function name in router registration

* compatibility export

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

* add ty check

* ty runs only on staged files

* ty configuration fix

* move startup info in logging

* remove bug from action

* update claude rules

* fix resource serialization

* comments on inspector errors

* abstracted runner transports

* remove redunant call for network

* fix ip getter

* add inspector mcp path

* response limit logging

* disable ty check in action

* moved transport type to types

* support sse

* show transport type in logs

* change default transport

* refactored tests to use mcp server

* removed fastmcp

* file restructuring

* test table

* sampling, elicitation, tool disabling enabling

* deprecte sse server side

* simplified report

* fix action

* remove sse deprecated test

* move tests files to allow for server integration tests

* docs

* reorg integration test files

* api-reference-doxs

* fix broken links

* telemetry

* remove feature useage from scarf
2025-12-01 14:12:16 +01:00
Pietro Zullo 9e592b4071 chore(python): dependencies (#531)
* removed useless anyio and aiohttp dependency

* version matrix in unit tests

* change test names

* fix weird import from langchain

* new deps

* bump fastembed minimal

* bump uvicorn, remove unused config for pytest

* add pre commit to dev deps

* remove transitive deps starlette and uvicorn

* test fix
2025-11-25 19:19:14 +01:00
pietrozullo 616b3840bd python/release/1.4.1 2025-11-20 16:28:41 +01:00
Pietro Zullo 8d4cb4719b Feature/mcp 799 python client integration of code mode (#498)
* initial commit

* update to code mode

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

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

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

* Docs/tunnel docs (#474)

* chore: add tunnelling docs

* chore: add tunnelling docs

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

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

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

* feat: add verify parameter to MCPClient and connectors

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

* fix: linting and docs

* fix: http connector test

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

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

* fix: docs

---------

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

* Canary release (#476)

* Implement iframe log console for inspector (#475)

* Docs/tunnel docs (#474)

* chore: add tunnelling docs

* chore: add tunnelling docs

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

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

* feat: Add iframe console logging and UI

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

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

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

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

* refactor: update IframeConsole component for improved UI and styling

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

* feat: add HTMLIFrameElement and MessageEvent to ESLint config

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

* feat: implement auto-scroll functionality in IframeConsole component

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

* chore: lint & format

* chore: changeset

---------

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

* chore: enter canary prerelease mode

* chore(typescript): version packages (canary)

* Feat/consistent sub for tunnel (#480)

* Docs/tunnel docs (#474)

* chore: add tunnelling docs

* chore: add tunnelling docs

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

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

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

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

* chore: changeset

* format

* chore(typescript): version packages (canary)

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

* remove console log

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

* fix tools with async calls

* FORMAT

* chore(typescript): version packages (canary)

* fix/minor fix post canary (#482)

* fix server async call

* wrap all handle request calls in wait function

* changeset

* chore(typescript): version packages (canary)

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

* feat: Add WidgetFullscreenWrapper component

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

* Docs/tunnel docs (#474)

* chore: add tunnelling docs

* chore: add tunnelling docs

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

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

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

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

* fix: maintain subdomain across builds

* remove console

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

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

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

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

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

* chore: fix type

* format

* chore: changeset

* remove irrelevant content

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

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

* format

* remove console log

---------

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

* chore(typescript): version packages (canary)

* Fix/settings button servers dropdown (#485)

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

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

* add gear also to home

* chore: changeset and format

* chore(typescript): version packages (canary)

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

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

* chore(typescript): version packages (canary)

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

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

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

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

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

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

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

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

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

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

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

* chore: changeset

* chore(typescript): version packages (canary)

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

* remove mcp url console log

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

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

* remove mcp url console log

* Enhance ConfigurationDialog with model fetching and caching

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

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

* chore(typescript): version packages (canary)

---------

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

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

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

* Update Dockerfile

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

* fix: x icon light mode

* docs: Improve typescript server docs (#491)

* fix: update installation commands and enhance quickstart documentation

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

* minor

* add fallback

---------

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

* Docs/inspector (#492)

* refactor: reorganize documentation structure for Inspector and Dev Tools

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

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

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

* fix broken links

* chore: remove unuseful docs

* Feat/python/pretty display (#497)

* pretty display implementation

* docs update

* initial commit

* docs

* fix tests

* example streams and uses anthropic

* docs

* docs image

* fix type checking mock

* add rich to requirements

* enable pretty pritns in all examples

---------

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

* refactor(mcpagent): update agent creation logic and imports

- Replaced `create_tool_calling_agent` with `create_agent` for improved agent instantiation.
- Simplified the `_create_agent` method by removing the `AgentExecutor` and directly returning the created agent.
- Adjusted type annotations for `_agent_executor` to initialize as `None` instead of using a union type.

* feat(mcpagent): migrate to LangChain 1.0.0 and simplify agent methods

- Updated MCPAgent to utilize LangChain 1.0.0's `create_agent()` for improved agent instantiation.
- Introduced new methods `astream_simplified()` and `run_v2()` that leverage the built-in `astream()` for internal agent loop handling.
- Retained legacy methods `stream()` and `run()` for backward compatibility with manual execution.
- Enhanced documentation to reflect changes and provide clearer usage examples.

* feat(mcpagent): implement dynamic tool updates during agent execution

- Enhanced the MCPAgent to support dynamic tool updates when using server_manager mode.
- Implemented logic to check for tool changes before and during execution, allowing for immediate updates and safe restarts.
- Introduced a maximum restart limit to prevent infinite loops during tool updates.
- Updated documentation to reflect the new behavior and usage of dynamic tool management.

* refactor(mcpagent): clean up imports and streamline logging

- Removed unused imports and organized existing ones for better clarity in `mcpagent.py`.
- Simplified logging statements for consistency and improved readability.
- Enhanced the overall structure of the code by eliminating unnecessary whitespace.
- Updated unit tests to reflect changes in imports and ensure compatibility with the refactored code.

* feat(mcpagent): enhance agent execution with step tracking and middleware

- Introduced `ModelCallLimitMiddleware` to enforce a maximum number of model calls during agent execution.
- Updated the `_consume_and_return` method to return a tuple of the final result and the number of steps taken.
- Enhanced telemetry tracking to include steps taken and execution time for better performance insights.
- Simplified agent creation logic by integrating middleware directly into the `create_agent` function.
- Improved logging for agent execution details, including steps and tool usage.

* fix(mcpagent): add null check for node output messages extraction

- Updated the MCPAgent to include a null check for `node_output` before attempting to access the "messages" key, preventing potential errors during message extraction.

* minor

* feat(mcpagent): filter out ToolMessage from history

- Updated the MCPAgent to exclude ToolMessage instances from being added to the message history, ensuring that only relevant messages are recorded.
- This change helps maintain a cleaner history by avoiding intermediate tool execution details.

* fix(mcpagent): set max_steps assignment

* ruff

* docs

* e2e tests for agent

* key in tests

* fix manager test and split ci tests

* telemetry off for tests

* fix server manager test

* feat(mcpagent): delegate query streaming to remote agent in remote mode

- recreated functionality to the MCPAgent to yield results from a remote agent when operating in remote mode, enhancing the agent's capability to handle queries efficiently.

* fix: agent unit tests

* Print inputs

* rollback, wrong repo

* fix streaming output

* stricter streaming test

* pass observability callbacks

* release notes

* update old release pages

* pyproject version bump

* if you do not want to migrate from langchain classic

* fix tests mock

* Canary Release (#391)

* feat(mcp-server): enhance widget metadata handling and resource domain configuration (#388)

* feat(mcp-server): enhance widget metadata handling and resource domain configuration

- Updated widget title handling to prioritize metadata title over the default name.
- Improved resource domain configuration to support dynamic server base URLs and include wildcard domains for better flexibility.
- Enhanced apps SDK metadata integration by merging additional metadata from widget configurations.
- Refactored HTML template handling for improved clarity and maintainability.

* changeset

* chore: enter canary prerelease mode

* chore(typescript): version packages (canary)

* feat: Enhanced widget integration and tunnel support (#389)

* refactor: streamline widget HTML generation and enhance logging

- Simplified base URL handling in the CLI by removing conditional MCP_URL usage.
- Updated HTML content generation in inspector utilities to improve base tag injection logic.
- Enhanced logging for better debugging and insights into widget content generation.

* feat: add tunnel support to CLI for server exposure

- Introduced a new `--tunnel` option in the CLI to expose the server through a tunnel.
- Implemented `startTunnel` helper function to manage tunnel creation and URL retrieval.
- Enhanced server startup logic to utilize the tunnel URL when available, improving accessibility for remote connections.
- Updated logging to provide feedback on tunnel status and URLs during server initialization.

* feat(inspector): enhance tunnel URL handling and update dependencies

- Added support for preserving the tunnel URL in navigation across inspector components.
- Introduced a new `tunnelUrl` state in the Inspector context to manage tunnel URL across the application.
- Updated various components to utilize the tunnel URL, ensuring seamless integration with the new functionality.
- Added `@radix-ui/react-popover` as a dependency in package.json for improved UI interactions.
- Updated pnpm-lock.yaml to reflect changes in dependency versions, including zod.

* feat(mcp): enhance widget integration and server handling

- Updated the CLI to fetch the MCP server from the new `/mcp` endpoint instead of `/inspector`.
- Improved tunnel establishment logging to include the new `/mcp` path.
- Enhanced HTML generation in the MCP server to replace relative paths for widget scripts and styles with absolute URLs.
- Added a script to the HTML head for dynamic file retrieval based on the server base URL, improving widget loading efficiency.

* disable tunnel in dev for now (since vite does not build assets

* fix(inspector): improve header handling in registerInspectorRoutes

- Updated header processing to exclude 'accept-encoding' to prevent compression issues.
- Added explicit request for uncompressed responses by setting 'Accept-Encoding' to 'identity'.
- Enhanced response header forwarding by omitting compression-related headers to ensure accurate body state representation.

* chore(typescript): version packages (canary)

* Feat/create mcp use app/templates (#390)

* readmes

* readme addition changeset

* chore(typescript): version packages (canary)

* format docs

---------

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

* release(typescript): @mcp-use/inspector 0.4.7 + mcp-use 1.1.8 + create-mcp-use-app 0.4.8 + @mcp-use/cli 2.1.20

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

* Merge commit from fork

* fix: format

* feat(mcpagent): migrate to LangChain 1.0.0 and simplify agent methods

- Updated MCPAgent to utilize LangChain 1.0.0's `create_agent()` for improved agent instantiation.
- Introduced new methods `astream_simplified()` and `run_v2()` that leverage the built-in `astream()` for internal agent loop handling.
- Retained legacy methods `stream()` and `run()` for backward compatibility with manual execution.
- Enhanced documentation to reflect changes and provide clearer usage examples.

* feat(mcpagent): implement dynamic tool updates during agent execution

- Enhanced the MCPAgent to support dynamic tool updates when using server_manager mode.
- Implemented logic to check for tool changes before and during execution, allowing for immediate updates and safe restarts.
- Introduced a maximum restart limit to prevent infinite loops during tool updates.
- Updated documentation to reflect the new behavior and usage of dynamic tool management.

* feat(mcpagent): enhance agent execution with step tracking and middleware

- Introduced `ModelCallLimitMiddleware` to enforce a maximum number of model calls during agent execution.
- Updated the `_consume_and_return` method to return a tuple of the final result and the number of steps taken.
- Enhanced telemetry tracking to include steps taken and execution time for better performance insights.
- Simplified agent creation logic by integrating middleware directly into the `create_agent` function.
- Improved logging for agent execution details, including steps and tool usage.

* minor

* ruff

* format

---------

Co-authored-by: Luigi Pederzani <luigipederzani@gmail.com>
Co-authored-by: Enrico Toniato <2827496+tonxxd@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Vincenzo Reina <vincenzoreinaa05@gmail.com>
2025-10-27 14:50:51 +01:00
Luigi Pederzani f08e870e09 feat: Upgrade to Langchain 1.0.0 (#393)
* chore: update imports

* refactor(mcpagent): update agent creation logic and imports

- Replaced `create_tool_calling_agent` with `create_agent` for improved agent instantiation.
- Simplified the `_create_agent` method by removing the `AgentExecutor` and directly returning the created agent.
- Adjusted type annotations for `_agent_executor` to initialize as `None` instead of using a union type.

* feat(mcpagent): migrate to LangChain 1.0.0 and simplify agent methods

- Updated MCPAgent to utilize LangChain 1.0.0's `create_agent()` for improved agent instantiation.
- Introduced new methods `astream_simplified()` and `run_v2()` that leverage the built-in `astream()` for internal agent loop handling.
- Retained legacy methods `stream()` and `run()` for backward compatibility with manual execution.
- Enhanced documentation to reflect changes and provide clearer usage examples.

* feat(mcpagent): implement dynamic tool updates during agent execution

- Enhanced the MCPAgent to support dynamic tool updates when using server_manager mode.
- Implemented logic to check for tool changes before and during execution, allowing for immediate updates and safe restarts.
- Introduced a maximum restart limit to prevent infinite loops during tool updates.
- Updated documentation to reflect the new behavior and usage of dynamic tool management.

* refactor(mcpagent): clean up imports and streamline logging

- Removed unused imports and organized existing ones for better clarity in `mcpagent.py`.
- Simplified logging statements for consistency and improved readability.
- Enhanced the overall structure of the code by eliminating unnecessary whitespace.
- Updated unit tests to reflect changes in imports and ensure compatibility with the refactored code.

* feat(mcpagent): enhance agent execution with step tracking and middleware

- Introduced `ModelCallLimitMiddleware` to enforce a maximum number of model calls during agent execution.
- Updated the `_consume_and_return` method to return a tuple of the final result and the number of steps taken.
- Enhanced telemetry tracking to include steps taken and execution time for better performance insights.
- Simplified agent creation logic by integrating middleware directly into the `create_agent` function.
- Improved logging for agent execution details, including steps and tool usage.

* fix(mcpagent): add null check for node output messages extraction

- Updated the MCPAgent to include a null check for `node_output` before attempting to access the "messages" key, preventing potential errors during message extraction.

* minor

* feat(mcpagent): filter out ToolMessage from history

- Updated the MCPAgent to exclude ToolMessage instances from being added to the message history, ensuring that only relevant messages are recorded.
- This change helps maintain a cleaner history by avoiding intermediate tool execution details.

* fix(mcpagent): set max_steps assignment

* ruff

* docs

* e2e tests for agent

* key in tests

* fix manager test and split ci tests

* telemetry off for tests

* fix server manager test

* feat(mcpagent): delegate query streaming to remote agent in remote mode

- recreated functionality to the MCPAgent to yield results from a remote agent when operating in remote mode, enhancing the agent's capability to handle queries efficiently.

* fix: agent unit tests

* Print inputs

* rollback, wrong repo

* fix streaming output

* stricter streaming test

* pass observability callbacks

* fix tests mock

---------

Co-authored-by: pietrozullo <pietro.zullo@gmail.com>
2025-10-27 14:26:01 +01:00
pietrozullo c5625de079 python/release/1.3.13 2025-10-18 15:38:13 +02:00
Pietro Zullo c755739142 chore: locked langchain dependencies in pyproject.toml (#321) 2025-10-18 15:24:43 +02:00
Luigi Pederzani 5653304297 update authors 2025-10-15 18:27:25 +02:00
pietrozullo e6dcfbecbf release1.3.12 2025-10-14 14:37:16 +02:00
Pietro Zullo 9c048aac56 fix: use executable to run test server for shared deps (#298)
* fix: use executable to run test server for shared deps

* fix: locked pydantic version that was conflicting with fastmcp
2025-10-09 14:33:28 +02:00
pietrozullo ff7b7ade0e release1.3.11 2025-09-29 10:37:09 +02:00
Pietro Zullo 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>
2025-09-11 16:01:14 -07:00
pietrozullo d4ba66d8ef fix: bump websocket minimum version 2025-09-08 10:35:05 -07:00
pietrozullo 693ab172b2 release1.3.10 2025-08-18 10:43:26 -07:00
Pietro Zullo 1d40f3f9cd feat: starter CLI (#235)
* cliv1

* fix: prevent dashes in project name
2025-08-17 14:01:33 -07:00
pietrozullo 7bac97e60e release1.3.9 2025-08-10 11:50:37 -07:00
pietrozullo fc693b54f1 release1.3.8 2025-08-03 18:02:39 -07:00
qwtsc 9d4f1a92d4 fix: add timeout config in http connector (#185)
* fix: add timeout config

* feat: bump up mcp sdk version to support http connector timeout args
2025-07-23 14:15:57 -07:00
pietrozullo 42061e8f0a release 1.3.7 2025-07-19 17:12:58 -07:00
Pietro Zullo 1736e31388 Feat: elicitation (#175)
* Elicitation Client Implementation

* Elicitation test

* Elicitation Documentation

* Docs elictiation fn params

* Bump fastmcp

* Add elicitation to constructors of client

* fix tests
2025-07-17 23:59:38 -07:00
pietrozullo e0a96dccfc release1.3.6 2025-07-06 21:50:25 -07:00
pietrozullo bb86cdd986 release1.3.5 2025-07-06 20:57:23 -07:00
pietrozullo 40fdd6074b release1.3.4 2025-07-06 18:30:41 -07:00
Pietro Zullo ebea299d1a Remove unused deps (#155) 2025-07-03 20:16:56 -07:00
pietrozullo d9c431a24a release/1.3.3 2025-06-23 12:54:34 -07:00
pietrozullo ac8a6a4102 release/1.3.2-bis 2025-06-23 11:54:19 -07:00
pietrozullo 73e67db3be rollback 2025-06-23 11:53:56 -07:00
pietrozullo a9fb28cd3b Lock fastmcp version to 2.8 2025-06-23 11:50:04 -07:00
pietrozullo 44e1c007e1 FastAPI to dev deps 2025-06-23 11:03:55 -07:00
pietrozullo 8bd143f6c6 release/1.3.2 2025-06-23 09:48:24 -07:00
pietrozullo 459cf44a83 Fix anthropic and openai deps in pyproject 2025-06-18 15:48:27 +02:00
Luigi Pederzani 8aa2861202 feat: Add Scarf telemetry alongside existing PostHog analytics (#134)
* Add scarf telemetry and download tracking

* Remove unused function

---------

Co-authored-by: Pietro Zullo <62951181+pietrozullo@users.noreply.github.com>
2025-06-18 09:45:34 +02:00
pietrozullo b246285283 release1.3.1 2025-06-16 10:24:19 +02:00
Pietro Zullo cb7c2bcbd6 Feat/telemetry (#124)
* Telemetry base

* Fix debug level

* Singleton pattern in utils for metric server

* Added public identifier to transports

* Update telemetry

* Add telemetry to mcpagent

* telemetry docs
2025-06-13 21:12:34 +02:00
pietrozullo ca52ec96f9 Bump mcp version 2025-06-09 18:21:41 +02:00
leonpham-mbh 59b640ff37 feat: streamable http support (#106)
* Extend HTTP connector to support newer streamable http transport

* Fix timeout since they should be timedelta objects

* Refactor http connector to use streamable http by default

This will fallback to SSE if there are any issues with the test
ping send.

* Added transport integration tests

* Fail fast removed

* add fastmcp deps

* system install

* Fixed tests

* Remove python 3.12 from tests

---------

Co-authored-by: pietrozullo <pietro.zullo@gmail.com>
2025-06-04 22:13:03 +02:00
pietrozullo 5cc7c6d666 release1.3.0 2025-05-27 18:08:53 +02:00
Luigi Pederzani e8e958c565 Feature: Support for running MCP servers in a sandboxed cloud environment using E2B (#97)
* Add E2B optional dependency for sandboxed mcp servers

* Add types for sandbox options

* Add util to check if stdio server config

* Ignore B017

* Add sandbox connector to run MCP servers on e2b sandbox

* Add client options to set sandbox and sandbox options + use sandbox connector

* Add sandbox connector test + fix

* Add sandboxed stdio server example

* Add docs

* Set logger info

* Set debug in example

* Add install new optional dep
2025-05-19 14:50:38 +02:00