attio-agent-cli
v0.1.0
Published
Agent-native CLI + MCP server for the Attio CRM API. 76 commands across 14 groups, dual-mode: humans and AI agents.
Maintainers
Readme
attio-agent-cli
Agent-native CLI and MCP server for the Attio CRM API. 76 commands across 14 groups — works for humans in the terminal and AI agents via MCP.
npm install -g attio-agent-cliFeatures
- 76 commands covering the full Attio v2 API
- Dual mode — same commands work as CLI (
attio people list) and MCP tools (people_list) - Assert/Upsert — idempotent create-or-update for People, Companies, Deals, and any custom object
- JSON-first output — compact by default,
--prettyfor humans,--fieldsfor specific paths - 3-tier auth — flag → env var → config file
- Auto-retry — exponential backoff on 429 rate limits and 5xx errors
Authentication
# Option 1: Environment variable (recommended for agents)
export ATTIO_API_KEY=your_key_here
# Option 2: Login (stores to ~/.attio-agent-cli/config.json)
attio login --api-key your_key_here
# Verify
attio statusGenerate API keys in Attio: Settings → Developers → API Keys
MCP Server (AI Agents)
{
"mcpServers": {
"attio": {
"command": "npx",
"args": ["attio-agent-cli", "mcp"],
"env": {
"ATTIO_API_KEY": "your_key_here"
}
}
}
}Command Overview
| Group | Commands | Key Attio Concept |
|-------|----------|-------------------|
| people | list, get, create, update, delete, assert, entries, attribute-values | Upsert by email |
| companies | list, get, create, update, delete, assert, entries, attribute-values | Upsert by domain |
| deals | list, get, create, update, delete, assert, entries | Upsert by name |
| records | list, get, create, update, delete, assert, search, attribute-values | Generic — any object |
| lists | list, get, create, update, delete | Pipelines/views |
| entries | list, get, create, update, delete, assert, attribute-values | Records in lists |
| notes | list, get, create, update, delete | Activity logging |
| tasks | list, get, create, update, delete | Task management |
| objects | list, get, create, update | Schema management |
| attributes | list, get, create, update | 19 attribute types |
| webhooks | list, get, create, update, delete | 27 event types |
| workspace | members | Team roster |
| threads | get, resolve, comments, comment-create | Comments |
| meetings | list, get, create | Call logging (beta) |
Usage Examples
# List people
attio people list --pretty
# Upsert person by email (idempotent — preferred over create)
attio people assert \
--matching-attribute email_addresses \
--email [email protected] \
--first-name John --last-name Doe \
--job-title "VP Sales"
# Upsert company by domain
attio companies assert \
--matching-attribute domains \
--domain acme.com \
--name "Acme Corp" \
--industry SaaS
# Create a deal
attio deals create \
--name "Acme — Enterprise" \
--stage "Qualification" \
--value '{"currency_value":50000,"currency_code":"USD"}'
# Log a note on a record
attio notes create \
--parent-object companies \
--parent-record-id <company_id> \
--title "Discovery Call" \
--content "Budget confirmed. Timeline Q2." \
--format markdown
# Create a task
attio tasks create \
--content "Send proposal" \
--deadline 2026-04-15T17:00:00Z \
--linked-records '[{"target_object":"deals","target_record_id":"<deal_id>"}]'
# Filter records
attio people list \
--filter '{"filter":{"job_title":{"$contains":"VP"}}}' \
--limit 100
# Schema exploration
attio objects list --pretty
attio attributes list --object companies --pretty
attio workspace members --pretty
# Webhooks
attio webhooks create \
--target-url https://your-app.com/attio \
--events record.created,record.updated,note.created
# Generic records (custom objects)
attio records list --object my-custom-object
attio records assert --object projects \
--matching-attribute name \
--values '{"name":"Q2 Launch","status":"active"}'Output Options
attio people list # compact JSON (default)
attio people list --pretty # pretty-printed JSON
attio people list --quiet # no output (check exit code)
attio people list --fields data.id,data.values.email_addresses # field filterLinks
- Attio API Docs
- GitHub
- npm
- AGENTS.md — full agent reference
License
MIT
