Google Workspace CRM MCP Server

Local setup required. This server has to be cloned and prepared on your machine before you register it in Claude Code.
1

Set the server up locally

Run this once to clone and prepare the server before adding it to Claude Code.

Run in terminal
git clone https://github.com/aliomraniH/modern_CRM_MCP
cd modern_CRM_MCP
pip install -r requirements.txt
2

Register it in Claude Code

After the local setup is done, run this command to point Claude Code at the built server.

Run in terminal
claude mcp add -e "GOOGLE_CLIENT_ID=${GOOGLE_CLIENT_ID}" -e "GOOGLE_CLIENT_SECRET=${GOOGLE_CLIENT_SECRET}" -e "DATABASE_URL=${DATABASE_URL}" google-workspace-crm -- python "<FULL_PATH_TO_MODERN_CRM_MCP>/dist/index.js"

Replace <FULL_PATH_TO_MODERN_CRM_MCP>/dist/index.js with the actual folder you prepared in step 1.

Required:GOOGLE_CLIENT_IDGOOGLE_CLIENT_SECRETDATABASE_URL
README.md

A lightweight CRM by integrating Google Sheets, Gmail, and Google Docs.

Google Workspace CRM MCP Server

A Python MCP (Model Context Protocol) server that acts as a lightweight CRM by integrating Google Sheets (contact management & generic spreadsheet ops), Gmail (email communication), and Google Docs (document creation). Designed for hosting on Replit with Streamable HTTP transport, compatible with both Claude and ChatGPT as MCP clients.


Features

  • 30 MCP tools for full CRM + workspace workflow
  • Google Sheets: CRM contacts + generic read/write/append on any range, tab management, and new spreadsheet creation
  • Gmail integration via OAuth2 for sending, searching, reading emails, replying, and drafting (with SMTP and domain-wide delegation fallbacks)
  • Google Docs: Create new documents, append text, read document content
  • Agent Cache: Thread-safe in-memory cache with TTL expiration, LRU eviction, namespace support, and bulk operations for fast batch processing
  • OAuth2 MCP endpoint protection: Secure the /mcp endpoint with Client Credentials or Authorization Code + PKCE flow — compatible with Claude's Advanced Settings
  • Settings dashboard: Web-based UI for credential management, OAuth2 authorization, Google Sheets selection, and comprehensive testing
  • Streamable HTTP transport for remote hosting on Replit
  • Full audit logging: Every tool call is tracked through 5 stages (received, API call, Google validated, result delivered, delivery confirmed)
  • Comprehensive test suite: One-click tests for Service Account, MCP Tools, Gmail Send & Reply, Cache Pipeline, and CRM Contact Management — each writes results to a dedicated Google Sheet tab
  • Rate limiting & caching to stay within Google API quotas
  • PostgreSQL-backed credentials: All service account keys, OAuth tokens, and settings stored securely in the database — never in code or files

MCP Tools (30 total)

CRM Contact Management (8 tools)

Tool Description R/W
crm_list_contacts List all contacts with optional field filtering Read
crm_get_contact Get a single contact by email or row number Read
crm_add_contact Add a new contact to the CRM Write
crm_update_contact Update an existing contact's fields Write
crm_delete_contact Soft-delete a contact (moves to "Deleted" sheet) Destructive
crm_search_contacts Full-text search across all contact fields Read
crm_add_note Append a timestamped note to a contact Write
crm_get_contact_with_emails Get contact profile + recent email history Read

Google Sheets Operations (7 tools)

Tool Description R/W
sheets_read_range Read data from a specific A1 range Read
sheets_write_range Write a 2D array to a specific A1 range Write
sheets_append_rows Append rows to the end of a sheet tab Write
sheets_read_all Read all data from an entire sheet tab Read
sheets_list_tabs List all worksheet tabs with dimensions Read
sheets_create_tab Create a new worksheet tab with optional headers Write
sheets_delete_tab Delete a worksheet tab (permanent, requires confirm) Destructive

Google Workspace File Creation (4 tools)

Tool Description R/W
sheets_create_spreadsheet Create a brand new Google Sheets file Write
docs_create_document Create a new Google Doc with optional initial text Write
docs_append_text Append text to an existing Google Doc Write
docs_read_document Read the full text of a Google Doc Read

Email Communication (7 tools)

Tool Description R/W
gmail_send_email Send an email (plain text or HTML) Write
gmail_search_emails Search emails using Gmail query syntax Read
gmail_get_email Get full email content by message ID Read
gmail_send_reply Reply to an existing email thread Write
gmail_draft_email Create a draft email without sending Write
crm_log_email_to_contact Log an email interaction on a contact's record Write
crm_get_contact_with_emails Get contact profile + recent email history Read

Agent Cache (5 tools)

Tool Description R/W
cache_put Store a value in the agent cache with optional TTL and namespace Write
cache_get Retrieve a value from the cache Read
cache_list List cache keys, optionally filtered by namespace Read
cache_delete Delete a cache entry Write
cache_stats View cache statistics (entries, hits, misses, hit rate) Read

System & Audit (4 tools)

Tool Description R/W
system_health_check Test connectivity to all Google services Read
audit_get_logs Query the audit log (filter by tool, stage, errors) Read
audit_trace_request Get the

Tools (5)

crm_list_contactsList all contacts with optional field filtering
gmail_send_emailSend an email (plain text or HTML)
sheets_read_rangeRead data from a specific A1 range
docs_create_documentCreate a new Google Doc with optional initial text
cache_putStore a value in the agent cache with optional TTL and namespace

Environment Variables

GOOGLE_CLIENT_IDrequiredOAuth2 Client ID for Google API access
GOOGLE_CLIENT_SECRETrequiredOAuth2 Client Secret for Google API access
DATABASE_URLrequiredPostgreSQL connection string for storing credentials

Configuration

claude_desktop_config.json
{"mcpServers": {"google-workspace-crm": {"command": "python", "args": ["path/to/main.py"]}}}

Try it

List all contacts in my CRM and find the one with the email 'example@domain.com'.
Send a follow-up email to the contact 'John Doe' regarding our last meeting.
Create a new Google Doc titled 'Project Proposal' and add the summary of our recent email thread.
Read the data from the 'Leads' tab in my CRM spreadsheet and summarize the current status of all entries.
Search for all emails from 'client@company.com' and log the latest one as a note in their CRM profile.

Frequently Asked Questions

What are the key features of Google Workspace CRM?

30 specialized MCP tools for CRM and workspace automation. Full integration with Google Sheets, Gmail, and Google Docs. OAuth2 endpoint protection with PKCE flow support. Comprehensive audit logging for every tool call. PostgreSQL-backed secure credential management.

What can I use Google Workspace CRM for?

Automating contact management by syncing email interactions directly to Google Sheets.. Generating project documentation in Google Docs based on email thread summaries.. Managing sales pipelines by tracking email communication history alongside contact records.. Batch processing and caching workspace data to optimize Google API quota usage..

How do I install Google Workspace CRM?

Install Google Workspace CRM by running: git clone https://github.com/aliomraniH/modern_CRM_MCP && cd modern_CRM_MCP && pip install -r requirements.txt

What MCP clients work with Google Workspace CRM?

Google Workspace CRM works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep Google Workspace CRM docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare