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/mcpAvailable 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
| Tool | What it does |
|---|---|
whoami | Return your user info and workspace |
search | Full-text search across CRM records and offerings (ChatGPT deep-research shape) |
fetch | Fetch a specific record by reference (incl. offering:<id>) |
search_records | Search contacts, leads, companies, or deals |
get_record | Get a single record by ID |
list_offerings | List the offering catalog (filter by type, category, active) |
get_offering | Get a single offering's full detail |
list_offering_categories | List catalog categories with offering counts |
list_tasks | List tasks (optionally filtered by status or assignee) |
pipeline_report | Summary of deal pipeline counts and values by stage |
list_campaigns | List email campaigns with status and schedule |
get_campaign | Get a campaign's full detail and delivery analytics |
list_sequences | List outreach sequences with step and enrollment counts |
get_sequence | Get a sequence's steps and enrollment stats |
Write tools
Write tools require explicit confirmation before executing.
| Tool | What it does |
|---|---|
create_record | Create a contact, lead, company, or deal |
update_record | Update fields on an existing record |
create_offering | Add an offering (product/service/subscription/contract) to the catalog |
update_offering | Update an existing offering |
log_communication | Log a call, email, or meeting on a contact's timeline |
convert_lead | Convert a lead to a contact (with optional deal) |
manage_task | Create, update, or complete a task |
add_note | Add a note to any record |
generate_brief | Generate an AI brief for a contact (engagement score + next action) |
send_email | Send or draft an email to a contact (supports \{\{firstName\}\}, \{\{company\}\} tokens) |
create_campaign | Create a DRAFT email campaign targeting a tag or a fixed contact list |
launch_campaign | Send or schedule a campaign (⚠️ sends real email) |
create_sequence | Create an outreach sequence with ordered EMAIL/TASK steps |
enroll_in_sequence | Enroll 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
- In ChatGPT, go to Settings → Apps & Connectors → Developer mode.
- Click Add connector and enter the URL:
https://agentlyleads.com/api/mcp. - ChatGPT will redirect you to sign in with your agentlyleads credentials and confirm consent.
- 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/mcpThen run /mcp inside Claude Code and follow the Authenticate prompt.
claude.ai
- Go to Settings → Connectors → Add custom connector.
- Enter the URL:
https://agentlyleads.com/api/mcp. - 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-resourceUser 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.tsThis 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).