Your Close CRM, Controlled by Agents.
Leads. Pipeline. Activities. Sequences. Tasks. 160+ commands. Every one doubles as an MCP tool.
Close CRM is built for speed — but your agents can’t touch it from a terminal.
So we built close-crm-cli — the missing CLI for agents on Close.

Why close-crm-cli Exists
Without close-crm-cli
- No official CLI — Close only offers a REST API and web UI
- Agents can’t log calls, create leads, or move deals without custom wrappers
- Manual CRM entry after every call, email, and meeting
- No MCP support — agents can’t call Close as a native tool
- Pipeline data and activity history locked in the dashboard
With close-crm-cli
- 160+ commands covering the full Close API surface
- Single API key, 3-tier resolution: flag → env var → config file
- Every command is also an MCP tool — plug into any AI agent
- JSON-first output — pipe to jq, save to files, feed to agents
- Advanced search with Close DSL — query any lead or contact field
When You Need This
Post-Call CRM Entry
Log the call, update lead status, create an opportunity, and schedule a follow-up — all from one agent prompt immediately after a call ends.
Pipeline Management
Move deals through stages, update opportunity values, and create tasks on verbal commits — your CRM stays current without manual entry.
Sequence Enrollment
Find leads matching criteria and batch-enroll them in outreach sequences. Subscribe by lead ID, manage subscriptions, and track progress.
Lead Research & Enrichment
Pull full lead records including contacts, activities, opportunities, and custom fields. Feed structured JSON to your enrichment pipeline.
Activity Reporting
Pull activity metrics, funnel reports, and per-rep performance data for any date range — analytics your agent can act on.
Smart View Queries
Create and query Smart Views to find leads matching complex criteria. Surface exactly the accounts your agent needs to act on.
Quick Start
1. Install
npm install -g close-crm-cli2. Get your API key
1. Log into Close CRM
2. Navigate to Settings → API Keys at app.close.com/settings/api
3. Generate and copy your API key
3. Authenticate
# Option A: environment variable (recommended for agents)
export CLOSE_API_KEY="your-api-key"
# Option B: login command (saves to ~/.close/config.json)
close login
# Option C: per-command flag
close leads list --api-key "your-api-key"4. Verify
close users me --pretty
# Returns your user profile
close leads list --pretty
# Lists your CRM leads as formatted JSON
close opportunities list --status active --pretty
# Lists open pipeline opportunitiesWhat close-crm-cli Gives Your Agent
Leads & Contacts
Create, update, search, and merge leads. Manage contacts within leads — emails, phones, and custom fields. Full relationship graph from one API key.
Pipeline & Opportunities
Create and move opportunities through pipeline stages. Manage pipelines, lead statuses, and opportunity statuses. Your agent closes deals without opening a browser.
Activity Logging
Log calls, notes, emails, SMS, and meetings directly on any lead. Pull the full unified activity stream. Every touchpoint captured without manual entry.
Tasks & Follow-ups
Create, assign, and bulk-update tasks. Schedule follow-ups with due dates and types. Your agent never drops the ball on a next step.
Sequences & Templates
Manage outreach sequences and subscribe leads to them. Create, render, and use email and SMS templates. Full outreach automation from the terminal.
MCP Server
Every command is exposed as an MCP tool. Claude, Cursor, OpenClaw, and any MCP client can call all 160+ commands natively — no wrappers, no custom code.
Agent Workflows
Real prompts agents use to manage Close CRM end-to-end.
Full Deal Creation from a Verbal Commit
Agent Prompt
“A prospect just said yes on a call. Create a lead for Acme Corp, add Jane Doe as a contact, log the call, create a $50k opportunity in the demo stage, and set a follow-up task for tomorrow.”
Agent builds the entire CRM record in one pass — lead, contact, call log, opportunity at the right stage, and a follow-up task — zero manual entry after the call.
close leads create --name "Acme Corp" --url "https://acme.com"Create the lead
close contacts create --lead-id $LEAD_ID --name "Jane Doe" --emails '[{"email":"jane@acme.com","type":"office"}]'Add contact
close calls create --lead-id $LEAD_ID --direction outbound --duration 1800 --note "Verbal commit on Q2 pilot"Log the call
close opportunities create --lead-id $LEAD_ID --value 50000 --status-id $DEMO_STAGE_IDCreate opportunity
close tasks create --lead-id $LEAD_ID --text "Send proposal" --type email --due-date "2026-03-14T09:00:00"Schedule follow-up
Morning Pipeline Review
Agent Prompt
“Show me all open opportunities in my pipeline, any overdue tasks from yesterday, and leads I haven't touched in 7+ days.”
Agent surfaces pipeline health, overdue actions, and stale leads — a complete morning briefing without opening Close.
close opportunities list --status active --prettyList all open pipeline opportunities
close tasks list --is_complete false --due-date-lte "2026-03-12" --prettyPull overdue tasks
close leads list --query "date_updated < 2026-03-06" --fields id,display_name,status_labelFind stale leads
close reports activity-metrics --date-range "this_week" --prettyPull activity metrics
Enroll Leads in Outreach Sequence
Agent Prompt
“Find all leads in "Potential" status that don't have an active sequence. Enroll them in the Q2 Enterprise Follow-up sequence.”
Agent searches for leads matching the criteria and mass-enrolls them in the target sequence — no manual clicking through lists.
close leads list --query "status_label:\"Potential\"" --fields id,display_nameFind Potential leads
close sequences list --prettyGet sequence IDs
close sequences subscribe --sequence-id $SEQ_ID --lead-id $LEAD_ID --sender-account-id $ACCTEnroll each lead
close sequences list-subscriptions --sequence-id $SEQ_IDVerify enrollments
Commands Reference
close leads list [--query <q>] [--limit <n>]List leads with optional search queryclose leads get <id>Get a single lead by IDclose leads create --name <name> [--url <url>]Create a new leadclose leads update <id> [--name] [--status-id]Update lead fieldsclose leads delete <id>Delete a leadclose leads merge --source-id <id> --destination-id <id>Merge two leadsclose leads search --query <json>Advanced search with Close DSLclose contacts list [--lead-id <id>]List contacts, optionally filtered by leadclose contacts get <id>Get a single contactclose contacts create --lead-id <id> --name <name>Create a contact on a leadclose contacts update <id>Update contact fieldsclose contacts delete <id>Delete a contactclose opportunities list [--status <active|won|lost>]List opportunities with status filterclose opportunities get <id>Get a single opportunityclose opportunities create --lead-id <id> --status-id <id> [--value <n>]Create an opportunityclose opportunities update <id> [--status-id] [--value] [--note]Move deal stage or update valueclose opportunities delete <id>Delete an opportunityclose tasks list [--is-complete <bool>] [--lead-id <id>]List tasks with filtersclose tasks get <id>Get a single taskclose tasks create --lead-id <id> --text <text> --due-date <iso>Create a task or follow-upclose tasks update <id>Update task fieldsclose tasks delete <id>Delete a taskclose tasks bulk-update --ids <list>Bulk-update multiple tasksclose calls create --lead-id <id> --direction <in|out> --duration <secs>Log a call activityclose notes create --lead-id <id> --note <text>Add a note to a leadclose emails create --lead-id <id> --subject <s> --body-text <t>Log an email activityclose sms create --lead-id <id> --text <text> --direction <in|out>Log an SMS activityclose activities list --lead-id <id>Pull unified activity stream for a leadclose sequences listList all sequencesclose sequences get <id>Get a single sequenceclose sequences create --name <name>Create a sequenceclose sequences update <id>Update sequence settingsclose sequences delete <id>Delete a sequenceclose sequences subscribe --sequence-id <id> --lead-id <id>Enroll a lead in a sequenceclose sequences list-subscriptions --sequence-id <id>List enrolled leadsclose reports activity-metrics --date-range <range>Activity metrics by rep and typeclose reports activity-report --date-range <range>Detailed activity breakdownclose reports funnel --date-range <range>Pipeline funnel analyticsclose webhooks listList all webhooksclose webhooks get <id>Get a single webhookclose webhooks create --url <url> --events <list>Create a webhook subscriptionclose webhooks update <id>Update webhook settingsclose webhooks delete <id>Delete a webhookMCP Server Setup
Every command is available as an MCP tool. Configure once and your agent has full Close CRM access.
{
"mcpServers": {
"close": {
"command": "npx",
"args": ["close-crm-cli", "mcp"],
"env": {
"CLOSE_API_KEY": "your-api-key"
}
}
}
}Sample MCP tools available (160+ total):
OpenClaw Agent Setup
Give any OpenClaw agent full Close CRM access. Install once, set the API key, and the agent manages your pipeline autonomously.
Architecture
Every API endpoint is a CommandDefinition — one source of truth powering both the CLI subcommand and the MCP tool.
src/ ├── core/ │ ├── types.ts # CommandDefinition, CloseClient interfaces │ ├── client.ts # HTTP Basic Auth, retry, rate limit (429 backoff) │ ├── auth.ts # 3-tier API key resolution │ ├── config.ts # ~/.close/config.json │ └── output.ts # JSON output + --fields filtering ├── commands/ │ ├── leads/ # list, get, create, update, delete, merge, search │ ├── contacts/ # list, get, create, update, delete │ ├── opportunities/ # list, get, create, update, delete │ ├── tasks/ # list, get, create, update, delete, bulk-update │ ├── calls/ # list, get, create, update, delete │ ├── notes/ # list, get, create, update, delete │ ├── emails/ # list, get, create, update, delete │ ├── sequences/ # list, get, create, update, delete, subscribe │ ├── reports/ # activity-metrics, activity-report, funnel │ ├── webhooks/ # list, get, create, update, delete │ └── ... (20 more groups) ├── mcp.ts # MCP server (auto-registers all 160+ commands) └── index.ts # CLI entry point
Same pattern as all TOFU CLIs
The CommandDefinition architecture is shared across instantly-cli, hubspot-cli, heyreach-cli, smartlead-cli, and more. One schema generates the Commander.js subcommand and the MCP tool — zero duplication.
Close API Specifics
HTTP Basic Auth with API key as username (auto-handled). Offset-based pagination via _limit/_skip. Auto-retry with exponential backoff on 429/5xx. Advanced search via Close DSL at /data/search/.
Ready to put your CRM on autopilot?
Install close-crm-cli, set your API key in 60 seconds, and your agent can log activities, move deals, enroll leads in sequences, and manage your entire Close pipeline autonomously.
Need agents running your full sales operation? We deploy and manage the full setup.