跳过安装。2 分钟内即可运行。
在 cloud.anythingmcp.com 开始免费试用,一键添加 Google Contacts,然后将你的 AI 客户端(Claude、ChatGPT、Copilot 或 Cursor)指向生成的 MCP 端点。无需 Docker,无需 git clone,无需任何工程经验。
摘要
让你的 AI 使用 Google Contacts:搜索和读取包含电子邮件、电话、公司和地址的联系人,创建和更新联系人,整理标签,并找出你发过邮件却从未保存的人。支持个人 Google 账户和 Google Workspace。
试试这样问
Google Contacts 的示例提示
点击任意提示即可复制,然后粘贴到 Claude、ChatGPT、Cursor、Gemini、Copilot 或 OpenClaw 中,在该连接器上运行。
Claude 是 AI,可能会出错。请核对回答。
💡 无需安装? 直接使用 cloud.anythingmcp.com。 登录、点击 Connectors → Google Contacts、粘贴凭证、生成 MCP API key,即可完成。无 Docker、无
git clone、无本地服务器。
Google Contacts
让你的 AI 使用 Google Contacts:搜索和读取包含电子邮件、电话、公司和地址的联系人,创建和更新联系人,整理标签,并找出你发过邮件却从未保存的人。支持个人 Google 账户和 Google Workspace。
设置
- 打开 console.cloud.google.com,选择或创建一个项目,然后进入 APIs & Services → Library 启用 Google People API。
- 打开 APIs & Services → OAuth consent screen。如果你使用 Google Workspace,选择 Internal(最简单),否则选择 External。选择 External 时,请把发布状态设为 In production:应用处于 Testing 状态时,Google 会在 7 天后撤销它的刷新令牌,连接器每周都会停止工作。如果只供你自己的账户使用,可以直接跳过“unverified app”警告继续。
- 打开 APIs & Services → Credentials → Create credentials → OAuth client ID,应用类型选择 Web application,并添加已授权的重定向 URI
https://cloud.anythingmcp.com/api/mcp-oauth/callback。如果你自行托管 AnythingMCP,请改填https://your-anythingmcp-host/api/mcp-oauth/callback。 - 把客户端 ID 填入
GOOGLE_CLIENT_ID,把客户端密钥填入GOOGLE_CLIENT_SECRET,然后安装连接器。 - 在连接器页面点击 Authorize with Provider,用 AI 要使用其联系人的 Google 账户登录。刷新令牌会加密存储,访问令牌会自动续期。
一个 Google 客户端服务所有 Google 连接器:同一个 Cloud 项目和 OAuth 客户端可以服务所有 Google 连接器:Gmail、Google Calendar、Google Drive、Google Sheets、Google Docs、Google Slides、Google Forms、Google Contacts、Google Meet、Google Tasks、Search Console、Analytics 和 Ads。在该项目中启用每个 API,复用同一个客户端 ID 和密钥,并为每个连接器各授权一次。每个连接器只请求它自己需要的权限。
覆盖范围:你保存的 Google 联系人及其标签,以及 Google 为你发过邮件却从未保存的人自动记录的“其他联系人”。连接器以授权它的 Google 账户身份工作。不包括 Google Workspace 的公司目录。
搜索预热:Google 的联系人搜索基于缓存。AI 会在会话开始时用 google_contacts_warm_up_search 刷新一次缓存,等几秒钟后再搜索。搜索匹配姓名、电子邮件地址、电话号码和公司名称的开头部分,例如 ana 或 acme。如果几分钟前创建的联系人仍然搜不到,AI 会再预热一次,或者列出最近修改过的联系人。
添加和更新联系人:Google 不会阻止重复联系人,所以 AI 会先搜索再创建。更新会整体替换所指定的每个字段:要添加第二个电话号码,AI 会把现有号码和新号码一起发送。修改会逐条发送,可能需要几分钟才会出现在列表和搜索结果中。
标签和其他联系人:AI 可以创建标签,把联系人加入标签或从中移除;从标签中移除联系人不会删除联系人本身。“其他联系人”可以连同姓名、电子邮件地址和电话号码一起保存到你的联系人中。
权限:连接器请求 https://www.googleapis.com/auth/contacts(读取和编辑你的联系人和标签)和 https://www.googleapis.com/auth/contacts.other.readonly(读取“其他联系人”)。两者都是敏感 scope:在你自己的 Workspace 组织之外,应用通过验证之前 Google 会显示“unverified app”警告。如果只供你自己的账户使用,可以直接跳过继续。
只读设置:在连接器的 OAuth 设置中把 scope 改为 https://www.googleapis.com/auth/contacts.readonly https://www.googleapis.com/auth/contacts.other.readonly,重新授权,并停用 google_contacts_create_contact、google_contacts_update_contact、google_contacts_create_contact_group、google_contacts_modify_group_members 和 google_contacts_save_other_contact。如果不需要“其他联系人”,去掉第二个 scope,并停用 google_contacts_list_other_contacts、google_contacts_search_other_contacts 和 google_contacts_save_other_contact。
安装时默认关闭:google_contacts_delete_contact。API 无法恢复已删除的联系人,因此只有在需要 AI 删除联系人时才打开它。
修改需你确认:每次修改前,AI 都会向你展示联系人和要做的修改,并等待你确认。联系人会立即同步到你的手机和 Gmail。
常见错误:401 表示授权已过期或被撤销(同意屏幕处于 Testing 状态时,7 天后必然发生):请再次点击 Authorize with Provider。403 PERMISSION_DENIED 表示 scope 不允许这次调用,例如只读设置,或者缺少“其他联系人”的 scope;403“People API has not been used in project”表示 Cloud 项目中没有启用 Google People API。404 表示联系人 ID 错误,或者联系人已被删除。更新时出现 400 failedPrecondition 表示联系人在此期间已被修改:AI 会重新读取并重试。
连接器不读取 Google Workspace 目录,不上传联系人照片,也不合并重复联系人。
前提条件: GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET
本地安装连接器
curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d
打开 http://localhost:3000/connectors/store,选择 Google Contacts 并填入前提条件中列出的环境变量。
可用工具
| Tool | What it does |
|---|---|
google_contacts_list_contacts | List the user's saved Google Contacts with the fields asked for (names, emails, phones and organizations by default): resourceName, etag… |
google_contacts_get_contact | Read one contact in full: names, emails, phones, organizations, addresses, birthday, notes, websites, relations, events, group memberships… |
google_contacts_search_contacts | Search the user's saved contacts by the start of a name, nickname, email address, phone number or organization, e.g. "ana" or "acme" |
google_contacts_warm_up_search | Refresh the cache behind contact search with the empty request Google asks for, so the next search sees recent changes |
google_contacts_create_contact | Create a contact in the user's Google Contacts (My Contacts) |
google_contacts_update_contact | Change a contact. update_person_fields lists the fields to change, and each listed field is replaced as a whole: to add a second phone… |
google_contacts_delete_contact | Delete a contact from the user's Google Contacts; it disappears from their phone and Gmail too |
google_contacts_list_contact_groups | List the user's contact groups (labels) and the system groups: resourceName, name, formattedName, groupType (USER_CONTACT_GROUP or… |
google_contacts_get_contact_group | Read a contact group (label) with the resourceNames of its members (memberResourceNames), up to max_members |
google_contacts_create_contact_group | Create a contact group (label) with a name |
google_contacts_modify_group_members | Add contacts to a label or remove them from it (up to 1,000 together) |
google_contacts_list_other_contacts | List the user's "Other contacts": people Google saved automatically because the user emailed them, which are not in My Contacts |
google_contacts_search_other_contacts | Search the user's "Other contacts" (people they emailed but never saved) by the start of a name, email address or phone number |
google_contacts_save_other_contact | Save an "Other contact" into My Contacts, copying its name, email addresses and phone numbers |
示例提示
- “Ana García 的手机号是多少?她在哪家公司?”
- “把 Acme GmbH 的 Marco Rossi 加到我的联系人:[email protected],+49 761 1234567。”
- “找出 acme.example 域名下我发过邮件但没保存的人,把他们保存到我的联系人。”
- “创建一个“2026 展会”标签,把 Acme 和 Globex 的所有人都加进去。”
- “Lukas Weber 换了新手机号 +49 170 5551234,加到他的联系人里,旧号码也保留。”
下一步
这份指南对你有帮助吗?