Commit Graph

15 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
Vincenzo Reina 822b0b72fc feat: Middleware (#269)
* Middlware first commit
* Add context to middleware
- Add context to middleware with mcp types
- Update logging middleware with new implementation
- Add hooks for every type of action
* Update example and metrics
* Adapt tests to middleware
* Fix metrics and example
* Update docs and new add_middleware function
* Fix metrics property
* Fix on add_middleware function
* Fix formatting
* chore: nicer example
* chore: remove global exports for middleware
* chore: middleware blog

---------

Signed-off-by: Vincenzo Reina <vincenzoreinaa05@gmail.com>
Co-authored-by: pietrozullo <pietro.zullo@gmail.com>
2025-10-07 11:37:08 +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
Pietro Zullo 2a165e7379 feat: notification & logging (#223)
* Add message handler function

* Notification test

* feat: logging callback

* Separate logging tests

* Documentation

* Remove duplicate

* rename notidfication test

* Discovery - client reacts to tools,resources,prompts update notifications

* integration test

* unit tests

* Fix, remove asyncio task creation, if we do not cache the tools it is not necessary to refresh. I wonder if it caching them tools (etc) is any important for somebody

* Fix type names in the docs
2025-08-10 10:27:20 -07:00
Vincenzo Reina e0face5986 feat: Improve error handling (#215)
* Add error helper function

* Update error formatting for adapters

* Add custom args for error and add formatted in tools

* Add docs in error formatting and improve observability

* Fix and add more properties on adapters

* Fix on folder name, conflict with utils file

* Final fix for the utils problem

* Try to sort imports in correct order

* Add line at end of the error formatting file

* Fix with imports with ruff

* Fix also ruff formatting error
2025-08-07 12:50:14 -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
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
Pietro Zullo 7250b77c5b feat: Sampling (#170)
* Removed unused _setup_client

* Implement sampling in client and connectors

* Tests

* Nicer names in action

* Update previous tests

* Docstrings

* Fixed naming and created other primitives tests

* Supported features table

* docs
2025-07-12 15:00:34 -07:00
Pietro Zullo f13f9a8930 feat: remove client options for easier usage (#105)
* Remove clientoptions in favor of simpler, is sandbox argument and sandbox argument optional

* Tests and examples

* Remove tool from session

* Nice error message

* Update docs

* Update readme
2025-06-03 10:03:18 +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
pietrozullo 9c3578ef36 Correct arguments to http and ws connectors 2025-04-04 13:52:23 +02:00
pietrozullo a753b5bd70 Remove unused util 2025-04-02 17:32:21 +02:00
pietrozullo b024a17e61 Cleanup of legacy code 2025-03-30 10:55:16 +02:00
pietrozullo 94ede6f123 Rename 2025-03-29 17:21:52 +01:00