File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -796,6 +796,29 @@ async def main():
796796 tool_result = await session.call_tool(" echo" , {" message" : " hello" })
797797```
798798
799+ ## Configuring the HTTP client
800+
801+ It is possible to override the httpx client to customize for your needs.
802+
803+ * proxy
804+ * specific authentication needs mTLS and token
805+ * advanced configs supported by httpx
806+
807+ ``` python
808+ import httpx
809+ from mcp.client.streamable_http import streamablehttp_client
810+
811+ http_client = httpx.AsyncClient(
812+ base_url = " http://someserver" ,
813+ proxy = " http://proxy.local" ,
814+ headers = {
815+ " Content" : " application/json" ,
816+ " Accept" : " application/json,text/event-stream" ,
817+ },
818+ )
819+ streamable_client = stremablehttp_client(" /v1/mcp" , http_client = http_client)
820+ ```
821+
799822### MCP Primitives
800823
801824The MCP protocol defines three core primitives that servers can implement:
You can’t perform that action at this time.
0 commit comments