MA

Maton MCP Server: HubSpot and Salesforce Integrations

Connect HubSpot, Salesforce and other SaaS tools with the MCP server to sync data, automate workflows, and streamline integrations.

Overview

The Maton MCP (Model Context Protocol) Server is a lightweight service that standardizes access to external SaaS data (for example, HubSpot and Salesforce) for use by LLM-based agents and automation workflows. It implements a consistent “model context” interface so models and agents can fetch, search, and consume relevant CRM or customer data without embedding service-specific logic into the model prompts or runtime.

This server is useful when you need to surface CRM records, activities, files, or custom objects as context for reasoning, prompt construction, or tool execution. Instead of each agent integration learning multiple APIs, the MCP server exposes a small set of capabilities (ingest, retrieve, search, and subscribe) and provides connectors/adapters for HubSpot, Salesforce, and other SaaS tools.

Features

  • Connector adapters for HubSpot and Salesforce to map CRM data into model-friendly context
  • Standardized MCP endpoints to retrieve, search, and stream contextual content
  • Ingestion pipelines for contacts, deals, tickets, activities, and attachments
  • Search and retrieval (optionally backed by a vector store or text index)
  • Webhook receivers and sync schedulers to keep data up to date
  • Configurable authentication and per-connector credentials
  • Runs locally, in Docker, or on cloud infrastructure

Installation / Configuration

Clone the repository and run the server locally or with Docker. Below are example steps for both development and containerized deployments.

Clone repository

git clone https://github.com/maton-ai/agent-toolkit.git
cd agent-toolkit/modelcontextprotocol

Environment variables (example .env)

# Server
PORT=8080
MCP_LOG_LEVEL=info

# Storage / Indexing
STORAGE_PATH=./data
REDIS_URL=redis://localhost:6379
VECTOR_STORE_URL=http://localhost:6333

# HubSpot
HUBSPOT_API_KEY=your_hubspot_api_key
HUBSPOT_OAUTH_CLIENT_ID=your_client_id
HUBSPOT_OAUTH_CLIENT_SECRET=your_client_secret
HUBSPOT_REFRESH_TOKEN=your_refresh_token

# Salesforce
SALESFORCE_CLIENT_ID=your_sf_client_id
SALESFORCE_CLIENT_SECRET=your_sf_client_secret
SALESFORCE_USERNAME=your_sf_username
SALESFORCE_PASSWORD=your_sf_password
SALESFORCE_SECURITY_TOKEN=your_sf_security_token

Run locally (Node-based example)

# Install dependencies
npm install

# Start in development
npm run dev

Run with Docker Compose

# docker-compose.yml (example)
version: "3.8"
services:
  mcp-server:
    image: maton/mcp-server:latest
    ports:
      - "8080:8080"
    env_file:
      - .env
    volumes:
      - ./data:/app/data
  redis:
    image: redis:7-alpine
    ports:
      - "6379:6379"

Start the stack

docker compose up -d

Configuration file (connectors)

{
  "connectors": [
    {
      "id": "hubspot-main",
      "type": "hubspot",
      "settings": {
        "auth": "oauth",
        "clientId": "<HUBSPOT_OAUTH_CLIENT_ID>",
        "clientSecret": "<HUBSPOT_OAUTH_CLIENT_SECRET>",
        "refreshToken": "<HUBSPOT_REFRESH_TOKEN>"
      },
      "sync": {
        "objects": ["contacts", "deals", "tickets"],
        "schedule": "*/15 * * * *"
      }
    },
    {
      "id": "salesforce-main",
      "type": "salesforce",
      "settings": {
        "clientId": "<SALESFORCE_CLIENT_ID>",
        "clientSecret": "<SALESFORCE_CLIENT_SECRET>",
        "username": "<SALESFORCE_USERNAME>",
        "password": "<SALESFORCE_PASSWORD>",
        "securityToken": "<SALESFORCE_SECURITY_TOKEN>"
      },
      "sync": {
        "objects": ["Contact", "Opportunity", "Case"],
        "schedule": "*/30 * * * *"
      }
    }
  ]
}

Available Tools / Resources

The MCP server surfaces a few common resources and tools that agents can use:

  • Context retrieval endpoint: fetch object records and related notes/attachments
  • Search endpoint: full-text and vector similarity search over indexed CRM context
  • Ingest pipeline: connectors that synchronize source data to the MCP store
  • Webhooks: receive events from HubSpot/Salesforce to trigger incremental updates
  • Tool manifests: JSON descriptions that agents can use to call MCP capabilities

Example simple endpoints (conventional names)

  • GET /mcp/v1/context/:connector/:object/:id — fetch a single record
  • POST /mcp/v1/search — submit a search query with filters
  • POST /mcp/v1/sync/:connector — trigger a connector sync job
  • POST /mcp/v1/webhook/:connector — webhook receiver

(Refer to the server’s API reference in the repository for exact endpoint signatures and payload schemas.)

Use Cases

  1. Enrich LLM prompts with up-to-date CRM context

    • Use the search endpoint to retrieve the most relevant contacts, recent emails, and open deals, then inject that context into generation prompts so replies reference accurate customer state.
  2. Automated deal updates

    • When an LLM-based assistant drafts follow-up emails or next-step recommendations, the agent can call the MCP server to update the related Salesforce Opportunity or HubSpot Deal via the connector’s write API.
  3. Support triage and summarization

    • Ingest ticket threads and attachments into the MCP index. Agents can summarize a ticket history, suggest responses, or route cases based on similarity to past resolved issues.
  4. Cross-system orchestration

    • Use the MCP server as the canonical interface for agents that need to coordinate between HubSpot, Salesforce, and other services (e.g., populate a marketing list in HubSpot and create a record in Salesforce using the same context payloads).
  5. Vector search for knowledge augmentation

    • Index customer communications and attachment contents as vectors. Agents perform