Built a “Code Mode” HubSpot MCP for my org, modeled on cloudflare/mcp, then ran a pipeline review with Claude and asked for feedback vs the default HubSpot MCP:
>Roughly 3–5× fewer tokens and one round-trip instead of three. The bigger win isn't the token count — it's that filtering, pagination, and aggregation move out of the model's context and into deterministic JS.
Two tools: search the API spec, and execute JS in a sandbox against HubSpot. The trick is borrowed straight from Cloudflare’s Code Mode post — the token stays server-side and the agent only ever calls a hubspot.request(...) helper, so I can lock down endpoints and it can’t see the secret or hit anything outside HubSpot.
For HubSpot revops work, I use Claude Code with an API key and skills. It writes little python scripts for each request.
We rolled out Cowork in my company with the built in MCP connector and it is so much worse.
I thought the only solution was an OAuth token vending MCP but Cloudflare just released a Code Mode MCP and that is the future.