Accept Hugging Face bearer tokens

#1
by evalstate HF Staff - opened

Keep the OAuth proxy flow for interactive MCP clients, but wrap it in FastMCP MultiAuth so ordinary Hugging Face bearer tokens are also accepted.

This lets proxy/loaders that already have an HF_TOKEN perform initialize/tools/list against /mcp without completing the Space-local OAuth flow.

Also fixes remote auth metadata to advertise this Space as the protected resource while using huggingface.co as the authorization server.

Superseded by discussion #4, which contains the combined auth and proxy app upload fix.

evalstate changed pull request status to closed
evalstate changed pull request status to open

Reopening this auth-only PR. The proxy-side fix removes the need to expose the hashed FastMCP app backend action as a normal tool.

burtenshaw changed pull request status to merged

Sign up or log in to comment