πŸ“‡ MCP Google Contacts Server

by RayanZaki

33 stars
428 downloads
Not rated
GitHub

About

MCP Google Contacts Server is a Machine Conversation Protocol (MCP) server that provides Google Contacts functionality, allowing AI assistants to manage contacts, search your organization's directory, and interact with Google Workspace.

Details

Author
RayanZaki
GitHub stars
33
Downloads
428
Categories
Other

- List, search, create, update, and delete Google Contacts
- Search Google Workspace directory for users
- View "Other Contacts" (people you've interacted with)
- Access Google Workspace users in your organization
- Supports stdio and HTTP transport protocols
- Configurable via command-line arguments and environment variables

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name πŸ“‡ MCP Google Contacts Server
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Install the Python package from source (pip install . after cloning and renaming the source directory), authenticate with Google (using a credentials.json file or environment variables), and run the server with mcp-google-contacts or python src/main.py. Integrate with MCP clients by adding its configuration to your MCP settings.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "\ud83d\udcc7 mcp google contacts server": {
            "mcp-google-contacts-server": {
                "command": "uv",
                "args": [
                    "venv"
                ]
            }
        }
    }
}

McpServers

{
    "mcp-google-contacts-server": {
        "command": "uv",
        "args": [
            "venv"
        ]
    }
}

πŸ“‡ MCP Google Contacts Server

A Machine Conversation Protocol (MCP) server that provides Google Contacts functionality, allowing AI assistants to manage contacts, search your organization's directory, and interact with Google Workspace. Much updated from its original by Gemini AI in Gemini CLI.

✨ Features

- List and search Google Contacts
- Create, update, and delete contacts
- Search Google Workspace directory
- View "Other Contacts" (people you've interacted with but haven't added)
- Access Google Workspace users in your organization

πŸš€ Installation

πŸ“‹ Prerequisites

- Python 3.12 or higher
- Google account with contacts access
- Google Cloud project with People API enabled
- OAuth 2.0 credentials for Google API access

πŸ“¦ Installation from Source

To install the mcp-google-contacts-server as a Python package:

1. Clone the repository:

    git clone https://github.com/rayanzaki/mcp-google-contacts-server.git
cd mcp-google-contacts-server

2. Rename the source directory:
The package expects the source code to be in a directory named mcp_google_contacts_server.

    mv src mcp_google_contacts_server

3. Install the package:
This will install the package and its dependencies, making the mcp-google-contacts command available in your PATH.

    pip install .

Note: If you encounter import errors after installation, ensure that relative imports within the source files (main.py, tools.py, google_contacts_service.py, formatters.py, config.py) are updated to use absolute imports (e.g., from mcp_google_contacts_server.module_name import ...). This is typically handled automatically by pip install . but can sometimes require manual adjustment if the package structure is unusual.

πŸ”‘ Authentication Setup

The server requires Google API credentials to access your contacts. You have several options:

πŸ” Option 1: Using a credentials.json file

1. Create a Google Cloud project and enable the People API
2. Create OAuth 2.0 credentials (Desktop application type)
3. Download the credentials.json file
4. Place it in one of these locations:
- The root directory of this project
- Your home directory (~/google-contacts-credentials.json)
- Specify its location with the --credentials-file argument

πŸ” Option 2: Using environment variables

Set the following environment variables:
- GOOGLE_CLIENT_ID: Your Google OAuth client ID
- GOOGLE_CLIENT_SECRET: Your Google OAuth client secret
- GOOGLE_REFRESH_TOKEN: A valid refresh token for your account

Note: If your existing environment variables for Google OAuth client ID and client secret have different names (e.g., GOOGLE_OAUTH_CLIENT_ID), you can alias them in your .env file (e.g., GOOGLE_CLIENT_ID=$GOOGLE_OAUTH_CLIENT_ID) to ensure the server picks them up correctly.
Use e.g. export GOOGLE_CLIENT_ID=$GOOGLE_OAUTH_CLIENT_ID && export GOOGLE_CLIENT_SECRET=$GOOGLE_OAUTH_CLIENT_SECRET in command line before: mcp-google-contacts :

env | grep GOOGLE
export GOOGLE_CLIENT_ID=$GOOGLE_OAUTH_CLIENT_ID && export GOOGLE_CLIENT_SECRET=$GOOGLE_OAUTH_CLIENT_SECRET
env | grep GOOGLE
mcp-google-contacts
{authentication evocation should happen here)

πŸš€ Initial Authorization (Recommended)

For the initial authorization flow to obtain your GOOGLE_REFRESH_TOKEN, it is recommended to run the mcp-google-contacts command directly in your terminal (outside of any MCP client that might obscure the interactive browser prompts).

Example:

mcp-google-contacts

Follow the instructions in your terminal and browser to complete the authentication. Once the GOOGLE_REFRESH_TOKEN is displayed, you can set it as an environment variable for non-interactive use.

πŸ› οΈ Usage

πŸƒβ€β™‚οΈ Basic Startup

```bash
python src/main.py

No reviews yet β€” be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.