Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions docs/user-guide/concepts/tools/mcp-tools.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down