Skip to content

Commit 048c968

Browse files
committed
Update readme
Signed-off-by: Fabio Yamate <[email protected]>
1 parent f4a00ee commit 048c968

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff 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 = streamablehttp_client("/v1/mcp", http_client=http_client)
820+
```
821+
799822
### MCP Primitives
800823

801824
The MCP protocol defines three core primitives that servers can implement:

0 commit comments

Comments
 (0)