HubSpot MCP serverand Python AI tasks
qbash hosts a HubSpot MCP server you can use in Claude, ChatGPT, Codex, Cursor, Grok Bot and Muse. Developers use qbash Tasks to write cloud-hosted Python functions that pair HubSpot with models such as Claude and GPT.
Add the qbash MCP
Use HubSpot from Claude Code, Codex, Cursor and other MCP clients. Connect HubSpot in qbash, and your agent can work with its data and build Tasks that call it.
claude mcp add --transport http qbash https://mcp.qbash.com/mcp
Then run /mcp in Claude Code and sign in with qbash.
- List contacts with cursor pagination
- Fetch a single contact by ID, or by email when id_property="email"
- Create a contact. Pass standard fields directly or use `properties` for custom fields
- Patch properties on an existing contact by ID
- Search contacts by free-text query or HubSpot filterGroups syntax
- List companies with cursor pagination
Write a HubSpot task in Python
A qbash Task is a Python function hosted in the cloud. Python is the runtime and defines the process, and built-in inline prompts run on leading models such as Claude, GPT, Gemini and Grok.
Run a Task on a schedule, from an HTTP request or when a connected app sends an event. Your agents and chat tools call it over MCP.
Each run is logged with its inputs and results, and you can turn data logging off for any Task. Every Task has version control, and each run is locked to the version it ran.
Triage deals without an owner
Search for deals with no assigned owner, then ask an inline prompt to order them for your sales operations review.
report = qbash.integrations.hubspot.search_deals(
filter_groups=[{"filters": [
{"propertyName": "hubspot_owner_id", "operator": "NOT_HAS_PROPERTY"},
]}],
properties="dealname,dealstage,amount,closedate", limit=50,
)
deals = report.get("deals", [])
if deals:
triage = qbash.ai.run_prompt(
slug="hubspot-unowned-deals",
variables={"deals": json.dumps(deals)},
)
qbash.output({"triage": triage, "more_available": bool(report.get("next_after"))})
else:
qbash.output("No unassigned deals were returned.")
Sample search_deals response
{
"status": "success",
"deals": [
{
"id": "501",
"properties": {
"dealname": "Example renewal",
"dealstage": "qualifiedtobuy",
"amount": "12500",
"closedate": null
}
}
],
"count": 1,
"total": 1,
"next_after": null
}
Custom MCP server
Build a custom MCP server with HubSpot
Create a hosted MCP server that combines HubSpot tools with your other connectors, Tasks and memory folders. You choose each tool it exposes, so a server can share HubSpot reads with write tools left off.
Share the server with your team, and each person adds it to the client they already use.
HubSpot MCP questions
Does HubSpot have an official MCP server?
Yes. HubSpot runs a remote MCP server for CRM data at mcp.hubspot.com. The qbash server can put HubSpot beside other connectors and Tasks behind one URL, and qbash decides which of your colleagues can connect.
Can the HubSpot MCP server change CRM records?
Yes. It can create and update contacts and deals, create companies, and add notes and tasks. HubSpot has no delete method in qbash, and you can disable the write tools on the server’s Package tab.
Guides that use HubSpot
Related CRM connectors
Build a HubSpot task
Write it in Python with AI steps, or describe it to your coding agent through the qbash MCP.