To set up and use a HubSpot-provided connector, visit HubSpot’s Knowledge Base:
The three methods
Choose a method
For many use cases, HubSpot recommends starting with HubSpot’s built-in connectors, which use the remote MCP server behind the scenes without any additional code or terminal access. If you need more than a connector offers, use the questions below to find the right method.Need help deciding? Ask your agent to review this documentation and recommend a method.
- What are you trying to accomplish?
- Which client does your team use?
- How broad is the surface area you typically work in?
--dry-run before it applies them.
- Does it need to run without a person present?
Best practices
HubSpot’s connectors and agent tools are powerful and should be used with caution when accessing your company’s data. The practices below start with everyday habits and move toward account-level controls.- Be specific: write your prompts to be detailed and focused on the task at hand. Being specific about details like property names, filters, and asset titles will help to avoid mistakes.
- Start read-only: before asking an agent to make changes, ask it to provide a summary of what it finds. That way, you know if it’s looking in the right places or if it needs more direction.
- Ask for a plan first: have the agent describe what it will do before it acts, and provide approval only for the changes that make sense to you. Revising a plan before taking action can help to improve output and avoid surprises.
- Review every confirmation prompt: confirmation is crucial, particularly for updates that span many records and assets. This is especially true when your initial prompt covers multiple tasks.
- Use a test account: test accounts are useful for anything that’s hard to undo or that changes many records, or if you’re just looking to test things out. See account types.
- Control who has access: Super Admins manage app access in the account, including approving apps, choosing who can install them, and turning optional data permissions on or off. Learn more about managing access to apps.
- Standardize on context: share a project context file such as
CLAUDE.mdorAGENTS.md, plus skills, so agents behave consistently across your team. How you distribute these files and skills depends on the client you’re using. For example, you can store them in a shared repository or package them in a private plugin marketplace. For teams that use Claude, you can provision skills for your organization, depending on your plan. Learn more about agent context files and agent skills.
Examples
Draft a marketing email
Agents can also help streamline content creation, as long as you stay in control of what goes out. You might ask a chat agent, “Look at how last month’s newsletter performed, tell me what underperformed, and help me draft next month’s newsletter with improvements based on what you find.”- The agent reads last month’s newsletter and its analytics, such as opens, clicks, and unsubscribes, and compares them with your other recent emails.
- It reports what stood out, for example strong opens but few clicks, and suggests a likely reason.
- It writes a draft of next month’s newsletter in the chat, explains how the draft responds to its findings, and asks whether you want it to create the draft email in your account.
- You review the draft in the chat and ask for changes. When you’re happy with it, you tell the agent to create the email, and then you open it in HubSpot to edit it and decide whether to send it.
Bulk cleanup with a preview
Use the Agent CLI when a task touches many records and you want to see exactly what will change first.- The agent pipes the records to the update command with
--dry-run, for examplecat records.jsonl | hubspot objects update --type contacts --dry-run. Nothing changes. The output reports how many records would be affected, whether the change is reversible, and a digest to use when applying the change. - You review the summary.
- After you approve, the agent runs the same command with the digest and a confirmation value.
Use the remote MCP server and Agent CLI together
Some tasks need both: explore or prepare data with the remote MCP server, then complete a step it doesn’t support with an Agent CLI command. For example, the remote MCP server can’t read workflows or run bulk imports, but the Agent CLI can. To find which workflows reference a property, an agent can use the remote MCP server to look up the property and the CLIworkflows commands to read the workflows.
A short instruction about when to switch can help. For example, you can tell the agent to check the Agent CLI when the remote MCP server doesn’t support an action, either in your prompt, agent context file, or skill.