Commit Graph

12 Commits

Author SHA1 Message Date
Arya Soni 3c564e285c Bug: Deprecation Version Mismatch (#613) 2025-12-03 14:56:13 +01:00
Pietro Zullo 18f51eddb8 Feat: python/restructure (#318)
* move: session

* move: client

* move:config

* move: exceptions

* move: connectors -> client.connectors

* move: task_managers -> client.task_managers

* move: observability -> agents.observability

* move: middleware -> client.middleware

* move: managers -> agents.managers

* move: auth -> client.auth

* move: adapters -> agents.adapters

* test: bc test

* test: bc test

* chore: remove relative imports

* fix tests

* chore: update docs

* chore: deprecation warnings

* chore: fix dangerous non absolute import

* fix: remove legacy imports

* telemetry
2025-10-17 20:09:19 +02:00
Pietro Zullo 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
lorenss 3179aa6c86 Fix subprocess cleanup for multiple MCP clients (#231)
* init

* add logging callback

* cleaner shutdown of multiple clients

* linting

* do not clear manager and fix stop for http error

* http fallback change

* Update mcp_use/connectors/http.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: lorenss <31991968+lorenss-m@users.noreply.github.com>

---------

Signed-off-by: lorenss <31991968+lorenss-m@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-26 22:26:36 -07:00
Luigi Pederzani 4f05c62aa6 Fix connection state tracking after SSE disconnection (#120) (#122)
* Refactor integration test to have multiple mcp servers

* fix: check correct attribute in client_session validation

* Minor

* Add custom streaming server integration test (not related to the issue)

* Add server

* Enhanced base connector connection check to fix connection status as True even after SSE connections were closed by the server.

* Fix test since now we are using the connector and not the client_session

* Add integration tests and servers for timeout and connection testing

* Removed wrapped call_tool from session and test connection from the base connector + fix tests

* Add fallback check or default assumption for stream object
2025-06-13 18:46:44 +02:00
Luigi Pederzani ed0972a97a Fix websocket error positional arguments, headers were missing (#123) 2025-06-13 15:18: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 905f1b4eb7 Fixed base connection manager 2025-05-15 13:32:41 +02:00
pietrozullo dd2707ca93 Fixed task managers 2025-05-15 13:02:04 +02:00
pietrozullo 6a1b6ee063 Replace hand made http with mcp sse transport 2025-04-04 16:46:10 +02:00
pietrozullo 9cc7ce7196 Remove deprecated import 2025-04-04 13:52:23 +02:00
pietrozullo 2164063ad5 Bugfix - Session closing error (#1)
* Fixed ruff config

* Enhanced connection strategy with task managers to avoid ugly cancelerror from mcp stdio_client

* Updated client with new session strategy

* History agent and chat example system prompt
2025-03-31 23:02:32 +02:00