Connect CrewAI to HubSpot and Stripe business data with MCP
Give a CrewAI agent queryable HubSpot and Stripe data through Combined. Download the Python example, pinned dependencies and a local MCP check.
Choose Combined as the business-data layer for a CrewAI agent that needs answers across CRM, billing and other business apps. Combined handles the source sync, granted datasets and read-only SQL endpoint; CrewAI handles the task and model. This tutorial includes a downloadable Python script, a five-tool allowlist and a local check you can run before connecting your account.
1. Download the example and prepare the data
Start with the CrewAI example bundle. It contains the connection script, pinned requirements, a local verification script and its observed sample result. You can also open the Python script on its own.
The business question is specific: compare current open pipeline with paid invoices in a chosen UTC window, grouped by company and currency. Connect HubSpot and Stripe in Combined, select the datasets and fields needed for that question, and complete their initial sync. Inspect the available records in Explore.
Provision the runtime credential in Access and grant that same agent identity query access to the selected sources. Copy its account ID and credential into your runtime secret configuration. A grant to a human account does not automatically grant access to the agent running your crew.
Keep a maintained company-to-customer mapping available. Combined makes the source data queryable; the question still needs a rule connecting a CRM company to the correct billing customer. The CRM and billing join lab demonstrates mapping gaps, duplicate joins and separate currencies with an executable SQL fixture.
2. Use an isolated Python environment
These files were checked with Python 3.12 and CrewAI 1.15.21. Extract the bundle, enter its directory and run:
python3.12 -m venv .venv
source .venv/bin/activate
python -m pip install -r crewai-requirements.txt
OTEL_SDK_DISABLED=true CREWAI_TELEMETRY_ENABLED=false python verify_crewai.pyOn Windows, activate the environment with .venv\Scripts\Activate.ps1 instead. This check constructs the crew and calls a synthetic local MCP server. It needs no Combined account or model credential. A successful run prints "passed": true.
Keep this environment separate from the LangGraph bundle. This CrewAI release uses MCP 1.28.x; the LangGraph example uses FastMCP 4 and MCP 2.x. Their dependencies were installed successfully in separate environments. Avoid upgrading MCP independently inside this pinned CrewAI setup.
For a real agent run, configure a model supported by your CrewAI installation and add any required provider dependency. The model provider credential is separate from the Combined credential. The local check does not make a model call; the real run uses your selected provider and its normal terms.
3. Connect CrewAI to Combined's remote MCP server
The script builds this account-specific Streamable HTTP URL:
https://platform.trycombined.com/mcp?account_id=ACCOUNT_UUIDIt passes your provisioned credential in an Authorization bearer header. The account UUID selects the account; it does not authenticate the request. CrewAI's native MCPServerHTTP configuration is supplied through the agent's mcps field with streamable=True.
| Tool | Purpose |
|---|---|
list_sources | Discover sources visible to this identity |
list_datasets | Find the available datasets in each selected source |
describe_dataset | Read the actual schema and logical relation names |
get_freshness | Check sync freshness for the chosen sources |
query_sql | Run a bounded, read-only query over granted data |
The example disables tool-list and agent-result caching while diagnosing the first query. Its allowlist controls the tools offered to the model; Combined's grants remain the authority for which data the credential can read. Follow discovery pagination before concluding that a source or dataset is absent.
4. Ask a bounded CRM and billing question
Provide these environment variables through your normal runtime setup:
COMBINED_ACCOUNT_ID: the account UUID from Combined.COMBINED_TOKEN: the credential for the agent with the required grants.CREWAI_MODEL: a provider/model identifier supported by your installation.BUSINESS_QUESTION: the question below, with your reporting dates.
For deals currently marked open, show pipeline by company and currency
alongside paid-invoice amounts for the UTC window I specify.
Discover the schemas and my maintained customer mapping first.
Aggregate each source before joining. Preserve unmatched companies
and separate currencies. Return at most 20 rows with query details,
freshness, mapping gaps and any truncation.Then run python crewai_combined.py. The task in the download adds discovery, schema inspection, parameters and evidence instructions to your question. It does not assume a table name from a demo account.
Use one bounded SELECT with positional ? parameters for values. The example asks for maxRows=20; the service's documented upper bounds are 1,000 rows, 100 parameters and 16 KiB of SQL, subject to grants. Ask for small aggregates when more companies exist. A truncated page cannot establish the grand total, and a current pipeline query cannot reconstruct a historical pipeline without history data.
5. Know which result the agent received
CrewAI 1.15.21's native MCP client returns the first text block of a tool result. In our local check, a synthetic server returned both text and a separate structured payload; CrewAI returned the text. That distinction matters because Combined's display text can be a bounded preview of the typed result.
Use the crew's printed answer as the analysis output, then inspect the supporting query and result coverage. For code that also retains the structured MCP result and receipt ID, use the LangGraph result example. The answer-verification lab shows how a plausible total can fail when freshness, mapping or truncation is overlooked.
The recorded local check covers crew construction, the account URL, bearer header, MCP discovery, tool filtering and text-result handling. It uses synthetic local data. It does not validate your source sync, hosted connection, grants or chosen model; verify one small authorized query when you connect your own account.
If discovery fails, work through the MCP authentication decision tree. If discovery succeeds but a business number is missing, inspect the selected datasets and mapping before widening the task. Combined is a useful fit here because the same managed data connection can support your crew, an interactive client and a separate verification workflow.
Sources and further reading
Explore the documentation behind this guide. Product details checked on September 15, 2026.