Skip to main content

Google Contacts MCP Server

Current version Downloads

Build status codecov

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.4

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.4
File Size Uploaded
google_contacts_mcp-1.0.4.tar.gz 89.2 kB Details

Built distribution (wheel)

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

Total release size: 98.0 kB

Release files / google_contacts_mcp-1.0.4.tar.gz

Download URL google_contacts_mcp-1.0.4.tar.gz
Size 89.2 kB
Tags Source
SHA-256 checksum
How to use checksums
bc9ad2c8fed648febded07522f60a34162f563f8ffbbb1f444bf41d67b490b9f
BLAKE2b-256 checksum
How to use checksums
7945833f1dcef75e636c532b02701ed3bcbe1e4765a1472e952fc0c5087341ac
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.4-py3-none-any.whl

Download URL google_contacts_mcp-1.0.4-py3-none-any.whl
Size 8.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
aa541bdc3441d00a45becb0f6b581cd7f84d2d978d690786f49a5640d1088f55
BLAKE2b-256 checksum
How to use checksums
aadd4487f7b2e2e3e2f9e67c7bc7e48ec997cef3d0532eca3b65aba35bcf1414
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

This release

1.0.4 This release

2 release files

1.0.3

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