Skip to main content

Google Contacts MCP Server

A clean, transparent, and secure Model Context Protocol (MCP) server for Google Contacts, built in Python using official Google and MCP SDKs.

Designed for AI assistants (Antigravity, Claude, Cursor, etc.) to securely query and manage contact details—such as phone numbers, physical addresses, birthdays, and organizations—without duplicating PII across personal notes and markdown vaults.


Features

  • Direct & Secure: Uses the official Google People API (google-api-python-client) and official MCP Python SDK (mcp).
  • No Third-Party Middlemen: No telemetry, no hosted cloud proxies, and no obscure packages. Credentials and tokens stay strictly local on your machine.
  • Tools Included:
    • auth_status: Check connection and token validity.
    • search_contacts: Search contacts by name, email, or phone.
    • get_contact: Fetch phone numbers, addresses, birthdays, emails, and notes for a contact.
    • list_contacts: Paginated listing of your contact network.
    • create_contact: Add new contacts directly to Google Contacts.
    • update_contact: Modify phone numbers, addresses, birthdays, or details.

1. Google Cloud Setup (One-Time)

  1. Open the Google Cloud Console.
  2. Create a new project (e.g. personal-contacts-mcp).
  3. Enable the People API:
    • Go to APIs & Services > Library.
    • Search for Google People API and click Enable.
  4. Configure the OAuth Consent Screen:
    • Go to APIs & Services > OAuth consent screen.
    • Choose External user type.
    • Fill in an App name (e.g. Contacts MCP) and your email address.
    • Under Audience > Test users, add your personal Google email address.
  5. Create OAuth Credentials:
    • Go to APIs & Services > Credentials.
    • Click Create Credentials > OAuth client ID.
    • Select Desktop app.
    • Name it (e.g. Contacts MCP Client) and click Create.
  6. Download Client Secrets:
    • Download the JSON credentials file.
    • Save it to ~/.config/google-contacts-mcp/credentials.json:
      mkdir -p ~/.config/google-contacts-mcp
      mv ~/Downloads/client_secret_*.json ~/.config/google-contacts-mcp/credentials.json
      chmod 600 ~/.config/google-contacts-mcp/credentials.json
      

2. Authentication

Run the one-time interactive OAuth login:

uv run --directory ~/src/google-contacts-mcp google-contacts-mcp --auth

A browser window will open asking you to sign in with your Google account and grant contact permissions. Once completed, your refresh token will be saved to ~/.config/google-contacts-mcp/token.json (with 0600 permissions).

Verify your authentication status anytime:

uv run --directory ~/src/google-contacts-mcp google-contacts-mcp --check

3. MCP Configuration

For Antigravity

Add the server to ~/.gemini/config/mcp_config.json:

{
  "mcpServers": {
    "google-contacts": {
      "command": "uv",
      "args": [
        "run",
        "--directory",
        "/home/justin/src/google-contacts-mcp",
        "google-contacts-mcp"
      ]
    }
  }
}

For Claude Desktop / Cursor

In your client's MCP configuration (claude_desktop_config.json):

{
  "mcpServers": {
    "google-contacts": {
      "command": "uv",
      "args": [
        "run",
        "--directory",
        "/home/justin/src/google-contacts-mcp",
        "google-contacts-mcp"
      ]
    }
  }
}

4. Environment Variables (Optional)

Variable Default Description
GOOGLE_CONTACTS_CONFIG_DIR ~/.config/google-contacts-mcp Base directory for credentials and tokens
GOOGLE_CONTACTS_CREDENTIALS <CONFIG_DIR>/credentials.json Path to Google OAuth client secret JSON
GOOGLE_CONTACTS_TOKEN <CONFIG_DIR>/token.json Path to saved token file

5. Development

Install dependencies locally with uv:

cd ~/src/google-contacts-mcp
uv sync

Run tests / linting:

uv run pytest

License

MIT

Release files for google-contacts-mcp 1.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for google-contacts-mcp 1.0.3
File Size Uploaded
google_contacts_mcp-1.0.3.tar.gz 89.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for google-contacts-mcp 1.0.3
File Interpreter ABI Platform
google_contacts_mcp-1.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 97.8 kB

Release files / google_contacts_mcp-1.0.3.tar.gz

Download URL google_contacts_mcp-1.0.3.tar.gz
Size 89.1 kB
Tags Source
SHA-256 checksum
How to use checksums
d7aacdac92ff72a2bfcebc678f0796a22468632d49193a3838ef7c0bd20e664c
BLAKE2b-256 checksum
How to use checksums
3c3392afbeb0cc93e8b7db280705664593c256158f0ac8f34ffd605a5a99d9d2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.20 {"installer":{"name":"uv","version":"0.12.20","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / google_contacts_mcp-1.0.3-py3-none-any.whl

Download URL google_contacts_mcp-1.0.3-py3-none-any.whl
Size 8.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bbe3f06d9f1996db4a440e378635e2817fb1fd0dcb2df771d22267396b7d7ac3
BLAKE2b-256 checksum
How to use checksums
9c0a226d69a2268dc029e216aab807cb750877722f967fa9819b820848b7f461
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.20 {"installer":{"name":"uv","version":"0.12.20","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

1.0.5

2 release files

1.0.4

2 release files

This release

1.0.3 This release

2 release files

1.0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page