* 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>
* Fix enum validation issue in jsonschema_to_pydantic
- Enhanced fix_schema method to automatically add 'type': 'string' to enum fields without explicit type
- This resolves validation errors when passing string values to enum fields in FastMCP tools
- Added comprehensive unit tests for enum handling scenarios
- Fix is backward compatible and preserves existing functionality
- Resolves issue where enum fields without explicit type caused Pydantic validation errors
* Fix linting issues
- Remove whitespace from blank lines
- Sort imports according to project standards
- All ruff checks now pass
* Apply ruff formatting to test file
- Format test_enum_handling.py according to project standards
- All formatting checks now pass
* Fix enum validation test to reflect actual jsonschema-pydantic behavior
- Replace test that expected strict enum validation with test that verifies valid values are accepted
- jsonschema-pydantic doesn't enforce strict enum validation as expected
- Focus on testing that our fix allows valid enum values to pass validation
- This addresses the test failure in CI
---------
Co-authored-by: Amrithesh Kakkoth <amritheshkakkoth@gmail.com>
* 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>
* improve logging
* import logging first
* make callback functions for observability + observability manager for mcp agent
* improve runner callbacks logic
* use laminar auto instrumentation + remove opentelemetry callbacks from laminar
* 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
* 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
* Adding logic to create sessions for selected servers
* Add empty line in the end
* Add empty line in the end
fixed lint issues and changed inline comment