agentpool icon indicating copy to clipboard operation
agentpool copied to clipboard

Persist auth on mcp config

Open Bleeky opened this issue 3 months ago • 0 comments

StreamableHTTPMCPServerConfig.auth.persist is ignored.

Config:

mcp_servers:
  - name: GitLab
    type: streamable-http
    url: https://gitlab.com/api/v4/mcp
    auth:
      oauth: true
      persist: keyring

AgentPool 2.9.18 creates the client with:

fastmcp.Client(..., auth="oauth")

rather than passing an OAuth instance with persistent token_storage.

FastMCP 3.4.7 therefore defaults to MemoryStore, producing:

Using in-memory token storage -- tokens will be lost when the client restarts.

As a result, OAuth authorization is required every time AgentPool/Zed restarts, despite persist: keyring.

MCPServerAuthSettings exposes persist, but MCPClient._get_client() and StreamableHTTPMCPServerConfig.to_pydantic_ai() don't consume it.

Bleeky avatar Aug 25 '26 21:08 Bleeky