Skip to content

Conversation

@cecchi
Copy link

@cecchi cecchi commented Nov 24, 2025

This PR adds an auth param to the MCPServerHTTP class, which is passed through to the underlying mcp library.

Livekit supports providing a list of static headers to the MCP client which is useful for basic authentication schemes, but are often insufficient. In our case, our authentication tokens are short-lived and need to be refreshed periodically. Having a more flexible way to configure authentication makes this possible.

session = agents.AgentSession(
    mcp_servers=[
        mcp.MCPServerHTTP(
            url="https://foo.bar/mcp/",
            auth=RefreshingAccessTokenAuth(),
        )
    ],
)

@CLAassistant
Copy link

CLAassistant commented Nov 24, 2025

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants