Skip to content

Commit e458968

Browse files
committed
Add authorization header handling in get_mcp_tools function
1 parent 2916319 commit e458968

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/utils/responses.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,10 @@ def _get_token_value(original: str, header: str) -> str | None:
422422
)
423423
continue
424424

425+
# Build Authorization header
426+
if headers.get("Authorization"):
427+
tool_def["authorization"] = headers.pop("Authorization")
428+
425429
if len(headers) > 0:
426430
# add headers to tool definition
427431
tool_def["headers"] = headers # type: ignore[index]

0 commit comments

Comments
 (0)