agentlyleads docs
Connectors

MCP Connector

agentlyleads exposes a remote MCP (Model Context Protocol) server at /api/mcp. This lets AI assistants — including ChatGPT and Claude — connect to your CRM and interact with it through natural language.

The same endpoint works as a ChatGPT connector and a Claude custom connector (the same pattern used by HubSpot, Attio, and Notion).

How it works

The MCP server uses OAuth 2.1 to authenticate users. When you add the connector in ChatGPT or Claude, the assistant redirects you to sign in with your agentlyleads credentials. After consent, the assistant receives a token that scopes all tool calls to your workspace — it cannot access any other tenant's data.

The endpoint is at:

https://agentlyleads.com/api/mcp

Available tools

The connector exposes 28 tools organized into read and write categories. Alongside contacts, leads, companies, and deals, the assistant can read and manage your offerings (the product/service catalog), send email directly to contacts, create and launch campaigns, and build and enroll contacts into sequences.

Read tools

ToolWhat it does
whoamiReturn your user info and workspace
searchFull-text search across CRM records and offerings (ChatGPT deep-research shape)
fetchFetch a specific record by reference (incl. offering:<id>)
search_recordsSearch contacts, leads, companies, or deals
get_recordGet a single record by ID
list_offeringsList the offering catalog (filter by type, category, active)
get_offeringGet a single offering's full detail
list_offering_categoriesList catalog categories with offering counts
list_tasksList tasks (optionally filtered by status or assignee)
pipeline_reportSummary of deal pipeline counts and values by stage
list_campaignsList email campaigns with status and schedule
get_campaignGet a campaign's full detail and delivery analytics
list_sequencesList outreach sequences with step and enrollment counts
get_sequenceGet a sequence's steps and enrollment stats

Write tools

Write tools require explicit confirmation before executing.

ToolWhat it does
create_recordCreate a contact, lead, company, or deal
update_recordUpdate fields on an existing record
create_offeringAdd an offering (product/service/subscription/contract) to the catalog
update_offeringUpdate an existing offering
log_communicationLog a call, email, or meeting on a contact's timeline
convert_leadConvert a lead to a contact (with optional deal)
manage_taskCreate, update, or complete a task
add_noteAdd a note to any record
generate_briefGenerate an AI brief for a contact (engagement score + next action)
send_emailSend or draft an email to a contact (supports \{\{firstName\}\}, \{\{company\}\} tokens)
create_campaignCreate a DRAFT email campaign targeting a tag or a fixed contact list
launch_campaignSend or schedule a campaign (⚠️ sends real email)
create_sequenceCreate an outreach sequence with ordered EMAIL/TASK steps
enroll_in_sequenceEnroll contacts into a sequence so they start receiving its steps

There are no delete tools. The connector supports reading and writing, but destructive operations must be performed in the agentlyleads app.

Connect ChatGPT

  1. In ChatGPT, go to Settings → Apps & Connectors → Developer mode.
  2. Click Add connector and enter the URL: https://agentlyleads.com/api/mcp.
  3. ChatGPT will redirect you to sign in with your agentlyleads credentials and confirm consent.
  4. Once authorized, the CRM tools are available in every conversation.

Connect Claude

Claude Code (CLI)

claude mcp add --transport http agentlyleads https://agentlyleads.com/api/mcp

Then run /mcp inside Claude Code and follow the Authenticate prompt.

claude.ai

  1. Go to Settings → Connectors → Add custom connector.
  2. Enter the URL: https://agentlyleads.com/api/mcp.
  3. Sign in with your agentlyleads credentials and approve consent.

Switching accounts

When you connect, agentlyleads shows a short authorization screen. If you're already signed in to the connector, it reads "You're signed in as you@email.com" with two choices:

  • Continue as you@email.com — authorize this account.
  • Use a different account — sign out and log in as another account.

So to switch accounts, just disconnect in Claude / ChatGPT, click Connect again, and choose Use a different account on that screen.

Switching only affects the AI connector session; your normal agentlyleads app login is unaffected.

Verify the endpoint

Before connecting, confirm the endpoint is live:

# Should return 401 + WWW-Authenticate header
curl -i https://agentlyleads.com/api/mcp

# Should return JSON with authorization_server info
curl https://agentlyleads.com/.well-known/oauth-protected-resource

User provisioning

Connector sign-up is disabled — identities are provisioned from existing CRM users. If you add a new team member to agentlyleads and they need MCP access, run:

npx tsx scripts/sync-mcp-users.ts

This command is idempotent and safe to run at any time.

Tenancy and security

  • Every tool call is scoped to the authenticated user's workspace — the connector cannot access another tenant's data.
  • The token subject maps directly to an agentlyleads workspace, so no separate account is needed.
  • Users sign in with their existing CRM credentials (same password, same account).

On this page