close-crm
Skill0 starsChanged 8 months agoCC0-1.0View on GitHub
Use when the user wants to read, create, update, search, or delete data in Close (Close.com) CRM — leads, contacts, opportunities, activities (calls, emails, SMS, notes, meetings), tasks, sequences, smart views, custom fields, templates, pipelines, reports. Triggers on phrases like "in Close", "log this call", "create a lead", "advance the opportunity", "search Close for X", "Close CRM". Covers two transports — the official Close MCP server (primary) and the REST API at api.close.com (escape hatch) — plus scope selection, account discovery, and common workflow patterns.
- Reads credentials
In this repository11 other files it gives its agents.
- attio-cliSkill
- context7Skill
- doc-reviewSkill
- gpt-image-1-5Skill
- imagemagickSkill
- markdown-converterSkill
- nano-banana-2Skill
- nano-banana-proSkill
- notion-apiSkill
- tavilySkill
- todoist-apiSkill
The file
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 3 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 35
If the key is not in the environment when REST calls are needed, ask the user (do not echo it back).
- Very specific: line 79
Always pipe through jq for inspection.
- Distinctive: line 85
Every Close org is configured differently — pipelines, lead statuses, opportunity statuses, custom fields, and users all have org-specific …
- Very specific: line 205
Always check has_more or cursor rather than assuming you got everything.
- Distinctive: line 245
Always ask the user before:
- Very specific: line 257
Discover before creating: Always fetch pipelines/statuses/users first.
- Very specific: line 262
Custom-field endpoint is singular: Use /custom_field/<lead|contact|opportunity|activity|shared>/.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Close CRM Skill
Talks to Close (close.com) — a CRM for inside sales — through two transports:
- Close MCP server (
https://mcp.close.com/mcp) — primary. Built and hosted by Close. ~50 tools covering leads/contacts/opportunities/activities/tasks/templates/pipelines/smart-views/reports plus aclose_product_knowledge_searchfor the docs. - Close REST API (
https://api.close.com/api/v1/) — escape hatch for anything the MCP server doesn't expose (bulk actions, webhooks, file uploads, exports, raw event log, custom-object types, scheduling links, send-as identities, advanced reporting).
Default to MCP tools. Drop to REST only when no MCP tool fits.
Authentication
Both transports use the same API key, generated in Settings → Developer → API Keys in the Close web UI. Keys look like api_….
Environment variable
Store the key in CLOSE_API_KEY:
export CLOSE_API_KEY="api_..."If the key is not in the environment when REST calls are needed, ask the user (do not echo it back).
Never log, echo, or paste the key
The key gives full org access. Use it only in the Close-API-Key MCP header or the REST Authorization: Basic header. Never print it in tool output, never write it to files inside the repo.
MCP setup (one-time)
Choose a scope:
| Scope | Allows | Use when |
mcp.read | reads, searches, fetches, aggregations | exploring a new account, dashboards |
mcp.write_safe | reads + create/update of leads, contacts, opportunities, tasks, templates, statuses, pipelines, smart views, sequences | most agent work — no destructive risk |
mcp.write_destructive | safe + delete of every above object | only when the user explicitly authorizes deletes |
Register the server (user scope, available in every project):
claude mcp add --scope user --transport http close \
https://mcp.close.com/mcp \
--header "Close-API-Key: $CLOSE_API_KEY" \
--header "Close-Scope: mcp.write_safe"Verify:
claude mcp get close # should show "Status: ✓ Connected"To change scope later, claude mcp remove close -s user and re-add. The MCP tool catalog Claude sees only refreshes at session start, so register before the session in which you want to use the tools.
For the full tool list grouped by scope, see references/mcp-tools.md.
REST setup
# Smoke-test
curl -s -u "$CLOSE_API_KEY:" https://api.close.com/api/v1/me/ | jq .emailHTTP Basic auth: API key as username, empty password. Note the trailing : — that's the empty password.
Always pipe through jq for inspection. JSON in, JSON out.
For the endpoint inventory, conventions, and worked examples, see references/rest-endpoints.md.
Discover the org first
Every Close org is configured differently — pipelines, lead statuses, opportunity statuses, custom fields, and users all have org-specific IDs. Before creating or updating anything, fetch the relevant config so you have real IDs to reference.
Via MCP (preferred): org_info, org_users, find_pipelines_and_opportunity_statuses, find_lead_statuses, find_lead_custom_fields, find_lead_smart_views.
Via REST:
B="https://api.close.com/api/v1"; K="$CLOSE_API_KEY:"
curl -s -u "$K" "$B/me/" | jq '{user:.email, org:.organizations[0].id}'
curl -s -u "$K" "$B/pipeline/" | jq '.data[] | {id, name, statuses: [.statuses[].label]}'
curl -s -u "$K" "$B/status/lead/" | jq '.data[] | {id, label}'
curl -s -u "$K" "$B/status/opportunity/" | jq '.data[] | {id, label, type}'
curl -s -u "$K" "$B/user/" | jq '.data[] | {id, email}'Cache the IDs you'll reuse during the session — pipelines and statuses change rarely.
Core workflows
Create a lead with one contact
curl -s -u "$K" "$B/lead/" -H 'Content-Type: application/json' -d '{
"name": "Acme Plumbing",
"url": "https://acme-plumbing.example.com",
"status_id": "stat_...",
"contacts": [{
"name": "Jane Owner",
"title": "Owner",
"emails": [{"type": "office", "email": "jane@acme-plumbing.example.com"}],
"phones": [{"type": "office", "phone": "+14165550100"}]
}],
"addresses": [{
"address_1": "123 Main St", "city": "Toronto",
"state": "ON", "country": "CA", "zipcode": "M5V 1A1"
}]
}' | jq '{id, name, display_name}'MCP equivalent: create_lead (then create_contact if you need additional contacts).
Search for leads
REST uses a structured _query POSTed to /data/search/:
curl -s -u "$K" "$B/data/search/" -H 'Content-Type: application/json' -d '{
"query": {
"type": "and",
"queries": [
{"type": "object_type", "object_type": "lead"},
{"type": "has_related", "this_object_type": "lead",
"related_object_type": "contact",
"related_query": {"type": "field_condition", "field": {"type": "regular_field", "object_type": "contact", "field_name": "email"},
"condition": {"type": "text", "mode": "full_words", "value": "acme"}}}
]
},
"_limit": 50, "_fields": {"lead": ["id", "display_name", "status_label"]}
}' | jqFor simple cases, prefer lead_search MCP tool or smart-view-based fetches via /saved_search/{id}/.
Log a call
curl -s -u "$K" "$B/activity/call/" -H 'Content-Type: application/json' -d '{
"lead_id": "lead_...", "contact_id": "cont_...",
"direction": "outbound", "status": "completed", "duration": 240,
"note_html": "<body><p>Discussed scope. Sending estimate.</p></body>",
"outcome_id": "outcome_..."
}' | jqMCP: no dedicated call-create tool — use REST.
Send/log an email
curl -s -u "$K" "$B/activity/email/" -H 'Content-Type: application/json' -d '{
"lead_id": "lead_...", "contact_id": "cont_...",
"direction": "outbound", "status": "outbox",
"subject": "Following up", "body_text": "Hi Jane, ...",
"to": ["jane@acme-plumbing.example.com"],
"sender": "Kirill <kirill@zerobooks.example>"
}' | jqstatus: "outbox" queues the email for sending via Close. Use status: "sent" to log an already-sent email without re-sending.
Advance an opportunity
curl -s -u "$K" "$B/opportunity/oppo_.../" -X PUT -H 'Content-Type: application/json' \
-d '{"status_id": "stat_..."}' | jqMCP: update_opportunity. The opportunity moves between pipeline columns automatically based on the new status's pipeline.
Create a task
curl -s -u "$K" "$B/task/" -H 'Content-Type: application/json' -d '{
"_type": "lead", "lead_id": "lead_...",
"assigned_to": "user_...", "text": "Send proposal",
"date": "2026-05-10", "is_complete": false
}' | jqMCP: create_task.
For deeper end-to-end workflows (SMS, meetings, sequences, bulk imports, smart-view exports), see references/rest-endpoints.md.
Pagination
Two styles, depending on endpoint:
- Offset/limit (most list endpoints):
?_skip=0&_limit=100. Response includeshas_moreboolean. Default_limitvaries, max is usually 100 for list endpoints and 200 for some. - Cursor (search, event log, exports): response includes
cursor(ordata.cursor); pass it back as?_cursor=…(or in the POST body for/data/search/). Do not increment a counter — always use the returned cursor.
Always check has_more or cursor rather than assuming you got everything.
Rate limits
Per endpoint group (e.g., GET /lead/ and POST /activity/email/ are separate buckets), per API key, with the org limit at 3× the per-key limit. Defaults are not published — read the response headers.
Modern header (RFC IETF):
RateLimit: limit=160; remaining=120; reset=8Legacy headers (still emitted): x-ratelimit-limit, x-ratelimit-remaining, x-ratelimit-reset.
On 429 Too Many Requests: read the Retry-After header (seconds) and sleep that long before the next call to that endpoint group. Do not retry a different endpoint group — its bucket is separate.
For long-running batches: parallelize across endpoint groups, serialize within one group, and back off exponentially on every 429.
Error shape
{"error": "The requested URL was not found on the server. ..."}Validation errors return 400 with {"error": "...", "field-errors": {"field_name": "..."}}. Always show the user the field-errors object — it pinpoints what to fix.
| HTTP | Meaning |
| 200 | OK |
| 201 | Created |
| 400 | Validation — see field-errors |
| 401 | Bad/missing API key |
| 403 | Key lacks permission for this resource |
| 404 | ID doesn't exist or wrong endpoint path |
| 409 | Optimistic concurrency conflict |
| 429 | Rate limited — honor Retry-After |
| 5xx | Transient — retry with backoff |
Confirm before destructive operations
Always ask the user before:
delete_lead,delete_opportunity,delete_contact,delete_address- Deleting templates, pipelines, statuses, smart views, custom fields
- Bulk delete, bulk edit, bulk email, bulk sequence-subscription
- Anything that changes opportunity status to
won/lost(irreversible in some downstream automations) - Anything that sends outbound (email with
status: "outbox", SMS, sequence enrollment)
For a tight group of related operations on the same object, a single confirmation suffices. Do not chain confirmations into a yes-once-yes-always pattern.
Best practices
- Discover before creating. Always fetch pipelines/statuses/users first; never hard-code IDs from another org.
- Use MCP first, REST second. MCP returns shaped, scoped data; REST is verbose.
- Log activities, don't only mutate state. Logging a call/email/note keeps the lead timeline rich for the user.
- Custom fields are scoped per object. A custom field defined on
leadcannot be set onopportunitydirectly — opportunities have their own custom-field namespace at/custom_field/opportunity/. - Smart views are saved searches — endpoint is
/saved_search/, not/smart_view/. - Custom-field endpoint is singular. Use
/custom_field/<lead|contact|opportunity|activity|shared>/. The plural/custom_fields/works only forlead,contact,activity(legacy alias) — opportunity and shared 404 there. - Phone numbers must be E.164 (
+14165550100), or Close drops them silently on lead create. - Activity creates take
lead_idplus optionalcontact_id— both are needed for proper attribution. outcome_idon calls/meetings drives reporting — fetch outcomes viafind_call_outcomes/find_meeting_outcomesbefore logging.- Sequences are workflows. New API name is
workflow; older docs say "sequence". Both work; MCP exposesfind_workflows/create_workflow. - Rich-text fields demand
<body>...</body>wrapping.note_html(anddescription_htmlon some objects) reject bare<p>...</p>with'HTML rich text fields in Close are expected to start with a "<body>" tag and end with "</body>"'. Wrap every rich-text payload in<body>...</body>. Emailbody_htmlis more forgiving but wrap it anyway for consistency. DELETE /lead/{id}/cascades. It removes the lead AND every contact, opportunity, task, and activity attached to it. Asking for confirmation is required even if the user already approved the parent operation.
References
references/mcp-tools.md— full MCP tool catalog grouped bymcp.read/mcp.write_safe/mcp.write_destructive, with one-line purpose for each toolreferences/rest-endpoints.md— REST endpoint inventory, URL conventions, the singular/plural custom-field gotcha, full activity-type list, search query DSL examples, export and event-log endpoints- Official docs: https://developer.close.com/
- MCP docs: https://help.close.com/docs/mcp-server
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

