diff --git a/docs/user-guide/concepts/tools/mcp-tools.md b/docs/user-guide/concepts/tools/mcp-tools.md index bee7975c..1bb89794 100644 --- a/docs/user-guide/concepts/tools/mcp-tools.md +++ b/docs/user-guide/concepts/tools/mcp-tools.md @@ -75,6 +75,22 @@ with streamable_http_mcp_client: agent = Agent(tools=tools) ``` +You can configure additional properties - like authentication and headers - when creating the `streamablehttp_client`. All configuration options from the [MCP Python SDK](https://github.com/modelcontextprotocol/python-sdk) are supported: + +```python +import os +from strands.tools.mcp.mcp_client import MCPClient +from mcp.client.streamable_http import streamablehttp_client + +github_http_mcp_client = MCPClient( + lambda: streamablehttp_client( + url="https://api.githubcopilot.com/mcp/", + # Get pat token from here: https://github.com/settings/personal-access-tokens + headers={"Authorization": f"Bearer {os.getenv('MCP_PAT')}"} + ) +) +``` + ### 3. Server-Sent Events (SSE) For HTTP-based MCP servers that use Server-Sent Events transport: