One-liner bug breaking MCP integrations on legacy HubSpot contacts
Hey HubSpot Devs,
Just uncovered a nasty bug breaking Model Context Protocol (MCP) integrations for HubSpot—especially when running through Claude Desktop.
Error: TypeError: Cannot read properties of undefined (reading 'properties') This happens when trying to access contact.data.properties.email in production.
Context:
Only appears with legacy or incomplete contact records.
Everything works fine in dev, but blows up with real production data.
Problem code: const email = contact.data.properties.email // breaks on legacy objects
Quick fix: const email = contact?.data?.properties?.email // supports missing data
Impact: This bug is killing MCP workflows for anyone with legacy data. Hundreds of developers are probably running into it without realizing it’s a simple fix.
Screenshot attached for reference.
Anyone else seeing this with HubSpot MCP integrations? Have you noticed similar edge cases in other tools?
Please comment below if you’re experiencing this—let’s put some community priority behind solving it! 🚨
One-liner bug breaking MCP integrations on legacy HubSpot contacts
Hi @jpsanchez and thank you so much for your detailed report and for sharing the exact workaround with the HubSpot Community, this is incredibly helpful for our developer community!
I appreciate your proactive approach to flagging this MCP integration issue, especially for those working with legacy contact records ❤️
One-liner bug breaking MCP integrations on legacy HubSpot contacts
Thanks, Bérangère.
Genuinely appreciate the warm reply, but I think we both know what happens when dev bugs get tossed into the feedback dungeon.
I didn't post this because I wanted a ticket. I posted so every developer getting steamrolled by "undefined" errors when classic contacts blow up their MCP integrationsees it's not them—it's the "damm" code.
I’m not here for gold stars or smiley emojis. I’m here because this bug stopped our CI/CD pipeline cold on a Friday with 2 execs on the zoom.
I fixed it. Documented it. Shared the workaround.
Crazy idea: What if HubSpot’s own integration examples started with “how to handle production weirdness in legacy data”? How many hours—weeks—would that give us all back?
No shade to you personally (corporate gotta corporate), but “send it to feedback” is why developers quietly build theirown tools and ship real fixes—like I just did.
If anyone else hits this, DM me or check out my repo.
Because I don’t file tickets. I kill bugs—publicly.
Thank you sincerely for sharing your experience and workarounds here. I deeply appreciate your candor and the time you’ve taken to document not just the bug, but also your solution for others who may encounter the same issue.
I’ve taken your comments to heart and am flagging these specific pain points to our product and documentation teams, so your input isn’t just going into a “feedback dungeon,” but is being surfaced with context and urgency.
Could you please share a link to the original source where you found the code (or where the bug appears)? I’d like to review it and share it with our internal team. Thank you!
Thanks again for your openness and solution-orientation in the community.
If you have further insights, ideas, or even direct suggestions for our docs, I’m all ears, and happy to make sure they’re heard internally.
Have a great day! Bérangère
Loop Marketing is a new four-stage approach that combines AI efficiency and human authenticity to drive growth.