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

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

Built distribution (wheel)

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

Total release size: 98.0 kB

Release files / google_contacts_mcp-1.0.5.tar.gz

Download URL google_contacts_mcp-1.0.5.tar.gz
Size 89.2 kB
Tags Source
SHA-256 checksum
How to use checksums
0686533d72f19cd80cc05304bae2dfb0c25078f487cc046008ceb60ce219b0c1
BLAKE2b-256 checksum
How to use checksums
d7b332084bc48687616617d4fed44cec346c3b56ad685a6c675aa8df957a3d9c
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.5-py3-none-any.whl

Download URL google_contacts_mcp-1.0.5-py3-none-any.whl
Size 8.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
728b2790a8f800ab694bdb9fef20241458160f264f94c90155cad69d7baf4ee5
BLAKE2b-256 checksum
How to use checksums
8da7c174e8ae7d1eeed7a7cbefd80909689367a4b54cd9d578180bf21bfd83fd
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

This release

1.0.5 This release

2 release files

1.0.4

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