Refresh token with HubSpot MCP Server (Beta)

Hi,

I was very happy to see the Remote MCP in my HubSpot account, and found that it was easy to set up. I’m building a custom MCP client (using the official Python SDK).
From https://mcp.hubspot.com/.well-known/oauth-authorization-server, the token endpoint is:

https://mcp.hubspot.com/oauth/v3/token

When requesting an access token with my MCP app client info, it works. And I keep the refresh token that was provided along with the access token.
But when I try to silently refresh the token, to avoid human interaction, requesting a new access token using the refresh token, it raises this error:

HTTP Error: 400 Client Error: Bad Request for url: https://mcp.hubspot.com/oauth/v3/token
Response Text: {"status":"BAD_REFRESH_TOKEN","message":"missing or invalid refresh token","correlationId":"..."}

So I checked the token validity using the introspect endpoint and it tells me it’s valid.

Then I tried to refresh the token, hitting two other endpoints, which worked:
https://api.hubapi.com/oauth/v1/token and https://mcp.hubspot.com/oauth/v3/token
It’d be nice to be able to use the same endpoint and rely on the server metadata endpoints.

Thanks for sharing your question @keurcien

I’m tagging a few community experts to help you find a solution here:
Hello there @Jonathan_Vaz @SteveHTM and @RubenBurdin what do you think? any suggestions here?

Would love to have your insights!

Thanks!

Hey there @keurcien

Just checking in to see if you managed to solve your issue?

I found a couple of Community threads that offer helpful context and workaround for your issue:

https://community.hubspot.com/t5/APIs-Integrations/Refresh-Token-issue/m-p/998279

https://community.hubspot.com/t5/APIs-Integrations/BAD-REFRESH-TOKEN-while-trying-to-refresh-token/m-p/369120

https://community.hubspot.com/t5/APIs-Integrations/OAuth-V2-Refresh-token-Error/m-p/256748

Please let me know if this helps!

Victor

Problem got fixed on HubSpot side, refresh token v3 endpoint works now!