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)
- Open the Google Cloud Console.
- Create a new project (e.g.
personal-contacts-mcp). - Enable the People API:
- Go to APIs & Services > Library.
- Search for Google People API and click Enable.
- 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.
- 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.
- 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.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| google_contacts_mcp-1.0.2.tar.gz | 89.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| google_contacts_mcp-1.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 98.1 kB
Release files / google_contacts_mcp-1.0.2.tar.gz
| Download URL | google_contacts_mcp-1.0.2.tar.gz |
|---|---|
| Size | 89.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
127ca5bde07296cd51db7d9c530b3b5cbd95ccbee1d491dfcc98221fd36609c6
|
|
BLAKE2b-256 checksum How to use checksums |
6c6fad4377241ce2fa558da17547a6e41be508d32283be54f6051f0b59ac3f12
|
| 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.2-py3-none-any.whl
| Download URL | google_contacts_mcp-1.0.2-py3-none-any.whl |
|---|---|
| Size | 8.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2c8ca545685ca5043011d0095d8348c8ebdbe1810c767418c763d3ccf61bc80a
|
|
BLAKE2b-256 checksum How to use checksums |
185436cb3aa1095f279fd20f971b4d9ef5eedbf6ac4a2da50792db61a343135c
|
| 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}
|