Skip to content

Allow kwargs down in AsyncClient when instantiating sse or streamable… #734

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

rumperto
Copy link

@rumperto rumperto commented May 16, 2025

Adding support of AsynClient kwargs at the level of sse and streamable http client creation. That allows client implementations to set certain options, which are otherwise unreachable from outside the mcp code base (like max_redirects, verify, and others).

Motivation and Context

Please have a look into the thread at run-llama/llama_index#18752 (comment)

Initially, I tried to achieve a simple MCP server integration into my llama-index based agentic network and used to create a self-signed ssl certificate for local network testig. However, there is currently no option to get around the self-signed certification verification checks, so I had to monkeypatch the mcp code base in orer to set the 'verify' argument of the underlying AsyncClient. This PR extends the configuration options of the mcp clients and allows the developers to be more flexible.

How Has This Been Tested?

Yes. I have tested ths with a patch inside the llama-index code and your code base. No productional application, just local dev.

Breaking Changes

No

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • [] [Not needed] - I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant