Dex Personal CRM
Dex is a personal CRM that helps users maintain and nurture their professional relationships. It tracks contacts, interaction history, reminders, and organizational structures (groups, tags, custom fields).
Setup — Detect Access Method
Check which access method is available, in this order:
- 1. MCP tools available? If
dex_search_contacts and other dex_* tools are in the tool list, use MCP tools directly. This is the preferred method — skip CLI setup entirely. - CLI installed? Check if
dex command exists (run which dex or dex auth status). If authenticated, use CLI commands. - Neither? Guide the user through setup.
First-Time Setup
Path A — Platform supports MCP (Claude Desktop, Cursor, VS Code, Gemini CLI, etc.):
If the user already has the Dex MCP server configured, or their platform can add MCP servers:
CODEBLOCK0
This auto-detects installed AI clients and configures the Dex MCP server for all of them. User authenticates via browser on first MCP connection.
Path B — Install CLI:
CODEBLOCK1
Works with npm, pnpm, and yarn. No postinstall scripts — the binary is bundled in a platform-specific package.
Keeping the CLI up to date:
The CLI auto-generates commands from the MCP server's tool schemas at build time. When tools are added or updated on the server, users need to update the CLI to get the new commands. If a user reports a missing command or parameter, suggest updating:
CODEBLOCK2
Path C — No Node.js:
Direct the user to follow the setup guide at https://getdex.com/docs/ai/mcp-server — it has client-specific instructions for Claude Desktop, Claude Code, Cursor, VS Code, and other MCP-capable clients.
Authentication
Triggered by /dex-login or on first use when not authenticated. Ask the user which method they prefer:
Option 1 — API Key:
- 1. User generates a key at Dex Settings > Integrations (requires Professional plan)
- For CLI: INLINECODE6
- Key is saved to
~/.dex/api-key (chmod 600)
Option 2 — Device Code Flow (works on remote/headless machines):
Drive this flow directly via HTTP — no browser needed on the machine:
- 1. Request a device code:
curl -s -X POST https://mcp.getdex.com/device/code -H "Content-Type: application/json"
Response: INLINECODE8
- 2. Show the user the
user_code and verification_uri. They open the URL on any device with a browser, log in to Dex, and enter the code.
- 3. Poll for approval every 5 seconds:
curl -s -X POST https://mcp.getdex.com/device/token \
-H "Content-Type: application/json" \
-d '{"device_code": "<device_code>"}'
-
{"error": "authorization_pending"} → keep polling
-
{"api_key": "dex_..."} → done, save the key
- 4. Save the API key:
mkdir -p ~/.dex && echo "<api_key>" > ~/.dex/api-key && chmod 600 ~/.dex/api-key
For CLI: INLINECODE13
For CI/automation with no human present, use the API key method with DEX_API_KEY environment variable.
Data Model
CODEBLOCK6
Using Tools
MCP Mode
Call dex_* tools directly. All tools accept and return JSON.
CLI Mode
Use the dex command. CLIHub generates subcommands from MCP tool names (replacing _ with -):
CODEBLOCK7
Use --output json for machine-readable output, --output text (default) for human-readable.
Run dex --help for all commands, or dex <command> --help for command-specific help.
See CLI Command Reference for the full mapping table of all 38 tools to CLI commands.
Core Workflows
1. Find a Contact
CODEBLOCK8
- - Search by name, email, company, or any keyword
- Use empty query to browse recent contacts (sorted by last interaction)
- Use
dex_list_contacts for bulk iteration (up to 500 per page, cursor-paginated) - Include
include_notes: true when user needs interaction history
2. Add a New Contact
CODEBLOCK9
- - Create with whatever info is available (no fields are strictly required)
- Immediately organize: add relevant tags and groups
- Set a follow-up reminder if the user just met this person
Bulk import (CSV, spreadsheet, list):
CODEBLOCK10
- - Use
dex_create_contact with the contacts array (up to 100 per call) for batch creation - Use the returned contact IDs to add them all to a group with INLINECODE27
- Use
dex_create_note with contact_ids to log a shared note across all imported contacts
3. Log an Interaction
CODEBLOCK11
- - Discover note types first with
dex_list_note_types to pick the right one (Meeting, Call, Coffee, Note, etc.) - Set
event_time to when the interaction happened, not when logging it - Keep notes concise but capture key details, action items, and personal context
- Use
contact_ids (plural) to link a single note to multiple contacts (e.g. a group meeting)
4. Set a Reminder
CODEBLOCK12
- - Always require
due_at_date (ISO format: "2026-03-15") - Use
text for the reminder description — there is no separate title field - Recurrence options:
weekly, biweekly, monthly, quarterly, biannually, INLINECODE40
5. Organize Contacts
Tags — flat labels for cross-cutting categories:
CODEBLOCK13
Groups — named collections with emoji and description:
CODEBLOCK14
Best practice: Use tags for attributes ("Investor", "Engineer", "Met at Conference X") and groups for relationship clusters ("Startup Advisors", "Book Club", "Acme Corp Team").
6. Manage Custom Fields
CODEBLOCK15
- - Three field types:
input (free text), autocomplete (dropdown with options), INLINECODE43 - Use
dex_set_custom_field_values to set values on multiple contacts at once - For autocomplete fields, provide
categories array with the allowed options
7. Meeting Prep
When a user says "I have a meeting with X":
- 1. Search for the contact
- Get full details with INLINECODE46
- Check recent reminders for pending items
- Summarize: last interaction, key notes, pending follow-ups, shared context
- See CRM Workflows for detailed meeting prep guidance
8. Merge Duplicates
CODEBLOCK16
- - First ID in each group becomes the primary — all other data merges into it
- Always confirm with the user before merging (destructive operation)
- Can merge multiple groups in a single call
Important Patterns
Pagination
List operations use cursor-based pagination:
- -
dex_list_contacts: default 100 per page, max 500 - INLINECODE48 : default 50 per page, max 200
- Other list tools: default 10 per page
- Check
has_more in response - Pass
next_cursor from previous response to get next page - Iterate until
has_more: false to get all results
Destructive Operations
Always confirm with the user before:
- - Deleting contacts (
dex_delete_contacts) - Merging contacts (
dex_merge_contacts) - Deleting tags, groups, notes, reminders, or custom fields
Response Truncation
Responses are capped at 25,000 characters. If truncated, the response preserves pagination metadata (next_cursor, has_more) so you can fetch the next page. Use smaller limit values if responses are being truncated.
Date Formats
- - All dates: ISO 8601 strings (e.g.,
"2026-03-15", "2026-03-15T14:30:00Z") - Birthdays: INLINECODE59
- Reminder due dates: INLINECODE60
Detailed References
- - Tool Reference — Complete parameter documentation for every tool, with examples
- CLI Command Reference — Full MCP tool → CLI command mapping table (only needed for CLI mode)
- CRM Workflows — Relationship management best practices, follow-up cadences, and strategies for being an effective CRM assistant
Dex 个人关系管理
Dex 是一款个人关系管理工具,帮助用户维护和培养职业人际关系。它追踪联系人、互动历史、提醒事项和组织结构(群组、标签、自定义字段)。
设置 — 检测访问方式
按以下顺序检查可用的访问方式:
- 1. MCP 工具可用? 如果 dexsearchcontacts 和其他 dex_* 工具在工具列表中,直接使用 MCP 工具。这是首选方式 — 完全跳过 CLI 设置。
- CLI 已安装? 检查 dex 命令是否存在(运行 which dex 或 dex auth status)。如果已认证,使用 CLI 命令。
- 两者都不可用? 引导用户完成设置。
首次设置
方式 A — 平台支持 MCP(Claude Desktop、Cursor、VS Code、Gemini CLI 等):
如果用户已配置 Dex MCP 服务器,或其平台可以添加 MCP 服务器:
bash
npx -y add-mcp https://mcp.getdex.com/mcp -y
这会自动检测已安装的 AI 客户端,并为所有客户端配置 Dex MCP 服务器。用户在首次 MCP 连接时通过浏览器进行认证。
方式 B — 安装 CLI:
bash
npm install -g @getdex/cli
支持 npm、pnpm 和 yarn。无安装后脚本 — 二进制文件已打包在平台特定包中。
保持 CLI 更新:
CLI 在构建时从 MCP 服务器的工具模式自动生成命令。当服务器上添加或更新工具时,用户需要更新 CLI 以获取新命令。如果用户报告缺少命令或参数,建议更新:
bash
npm install -g @getdex/cli@latest
方式 C — 无 Node.js:
引导用户访问 https://getdex.com/docs/ai/mcp-server 查看设置指南 — 该页面包含针对 Claude Desktop、Claude Code、Cursor、VS Code 和其他支持 MCP 客户端的特定说明。
认证
由 /dex-login 触发,或在首次使用且未认证时触发。询问用户偏好的方式:
选项 1 — API 密钥:
- 1. 用户在 Dex 设置 > 集成 生成密钥(需要专业版计划)
- 对于 CLI:dex auth --token dexyourkeyhere
- 密钥保存至 ~/.dex/api-key(chmod 600)
选项 2 — 设备码流程(适用于远程/无头机器):
直接通过 HTTP 驱动此流程 — 机器上无需浏览器:
- 1. 请求设备码:
bash
curl -s -X POST https://mcp.getdex.com/device/code -H Content-Type: application/json
响应:{ devicecode: ..., usercode: ABCD-EFGH, verificationuri: https://..., expiresin: 600, interval: 5 }
- 2. 向用户显示 usercode 和 verificationuri。用户在任意带浏览器的设备上打开 URL,登录 Dex 并输入代码。
- 3. 每 5 秒轮询审批状态:
bash
curl -s -X POST https://mcp.getdex.com/device/token \
-H Content-Type: application/json \
-d {device
code: code>}
- {error: authorization_pending} → 继续轮询
- {apikey: dex...} → 完成,保存密钥
- 4. 保存 API 密钥:
bash
mkdir -p ~/.dex && echo > ~/.dex/api-key && chmod 600 ~/.dex/api-key
对于 CLI:dex auth --token
对于无人参与的 CI/自动化场景,使用 API 密钥方法配合 DEXAPIKEY 环境变量。
数据模型
联系人
├── 邮箱、电话号码、社交资料
├── 公司、职位、生日、网站
├── 描述(关于此人的富文本笔记)
├── 标签(扁平标签:投资人、大学朋友)
├── 群组(带表情符号和描述的集合:🏢 Acme 团队)
├── 自定义字段(用户定义:输入框、下拉框、日期选择器)
├── 笔记/时间线(互动记录:会议、通话、咖啡)
├── 提醒(跟进任务,可选重复)
└── 星标 / 归档状态
使用工具
MCP 模式
直接调用 dex_* 工具。所有工具接受并返回 JSON。
CLI 模式
使用 dex 命令。CLIHub 从 MCP 工具名称生成子命令(将 _ 替换为 -):
bash
dex dex-search-contacts --query John
dex dex-list-contacts --limit 100
dex dex-create-contact --first-name Jane --last-name Doe
dex dex-list-tags
dex dex-create-reminder --text 跟进 --due-at-date 2026-03-15
使用 --output json 获取机器可读输出,--output text(默认)获取人类可读输出。
运行 dex --help 查看所有命令,或 dex --help 查看特定命令帮助。
参见 CLI 命令参考 获取全部 38 个工具到 CLI 命令的完整映射表。
核心工作流
1. 查找联系人
搜索 → 获取详情(如需可包含笔记)
- - 按姓名、邮箱、公司或任意关键词搜索
- 使用空查询浏览最近联系人(按最后互动时间排序)
- 使用 dexlistcontacts 进行批量迭代(每页最多 500 条,游标分页)
- 当用户需要互动历史时,包含 include_notes: true
2. 添加新联系人
创建联系人 → (可选)添加到群组 → 应用标签 → 设置提醒
- - 使用任何可用信息创建(无必填字段)
- 立即组织:添加相关标签和群组
- 如果用户刚认识此人,设置跟进提醒
批量导入(CSV、电子表格、列表):
批量创建联系人 → 添加到群组 → 为所有人创建笔记
- - 使用 dexcreatecontact 的 contacts 数组(每次调用最多 100 条)进行批量创建
- 使用返回的联系人 ID,通过 dexaddcontactstogroup 将其全部添加到群组
- 使用 dexcreatenote 的 contact_ids 为所有导入的联系人记录共享笔记
3. 记录互动
(可选)列出笔记类型 → 在联系人时间线上创建笔记
- - 首先使用 dexlistnotetypes 发现笔记类型,选择正确的类型(会议、通话、咖啡、笔记等)
- 将 event
time 设置为互动发生的时间,而非记录时间
笔记保持简洁,但捕捉关键细节、行动项和个人背景使用 contact_ids(复数)将单条笔记链接到多个联系人(例如群组会议)
4. 设置提醒
创建提醒 → (如适用,链接到联系人)
- - 始终需要 dueatdate(ISO 格式:2026-03-15)
- 使用 text 作为提醒描述 — 没有单独的标题字段
- 重复选项:weekly、biweekly、monthly、quarterly、biannually、yearly
5. 组织联系人
标签 — 用于跨领域分类的扁平标签:
创建标签 → 添加到联系人(批量)
群组 — 带表情符号和描述的命名集合:
创建群组 → 添加联系人(批量)
最佳实践:使用标签表示属性(投资人、工程师、在 X 会议认识),使用群组表示关系集群(创业顾问、读书会、Acme 公司团队)。
6. 管理自定义字段
列出字段 → 创建字段定义 → 批量设置联系人值
- - 三种字段类型:input(自由文本)、autocomplete(带选项的下拉框)、datepicker(日期选择器)
- 使用 dexsetcustomfieldvalues 一次性设置多个联系人的值
- 对于自动完成字段,提供包含允许选项的 categories 数组
7. 会议准备
当用户说我要和 X 开会时:
- 1. 搜索联系人
- 使用 include_notes: true 获取完整详情
- 检查最近的提醒,查找待办事项
- 总结:上次互动、关键笔记、待跟进事项、共享背景