KosmoKrator

communication

Google Contacts MCP Integration for LangChain

Connect Google Contacts to LangChain through the local KosmoKrator MCP gateway with scoped tools, credentials, and write policy.

7 functions 7 read 0 write OAuth browser flow auth

Connect Google Contacts to LangChain

Bridge LangChain agents to local KosmoKrator integration tools through MCP or headless CLI calls.

Use the MCP gateway when the agent should discover tools, or wrap kosmo integrations:call for fixed chains. The gateway is local, scoped to this integration, and starts with --write=deny so LangChain can inspect read-capable tools without receiving write access by default.

Google Contacts MCP Config for LangChain

Keep the gateway scoped to the integration and operation class needed by the chain.

{
  "mcpServers": {
    "kosmokrator-google_contacts": {
      "type": "stdio",
      "command": "kosmo",
      "args": [
        "mcp:serve",
        "--integration=google_contacts",
        "--write=deny"
      ]
    }
  }
}

Run the Gateway Manually

kosmokrator mcp:serve --integration=google_contacts --write=deny

Why Use KosmoKrator Here

Scoped tools

Expose only Google Contacts instead of a broad multi-service tool list.

Local credentials

Reuse credentials already configured for the KosmoKrator CLI and Lua runtime.

Write policy

Start read-only, then opt into ask or allow for trusted workspaces.

Google Contacts Tools Visible to LangChain

LangChain sees stable MCP tool names generated from the Google Contacts integration catalog.

MCP toolSource functionTypeDescription
integration__google_contacts__google_contacts_create google_contacts.google_contacts_create Read Create a new Google Contact with name, email, phone, company, title, address, and notes.
integration__google_contacts__google_contacts_delete google_contacts.google_contacts_delete Read Permanently delete a Google Contact by resource name.
integration__google_contacts__google_contacts_get google_contacts.google_contacts_get Read Get full details of a single Google Contact including notes, websites, and group memberships.
integration__google_contacts__google_contacts_list google_contacts.google_contacts_list Read List all Google Contacts sorted by first name with pagination.
integration__google_contacts__google_contacts_list_groups google_contacts.google_contacts_list_groups Read List all Google Contact groups/labels (e.g., Friends, Family, custom groups) with member counts.
integration__google_contacts__google_contacts_search_contacts google_contacts.google_contacts_search_contacts Read Fuzzy search Google Contacts by name, email, or phone. Matches partial strings (e.g., "john", "acme.com", "555"). Use this to look up contacts before sending emails with gmail_send.
integration__google_contacts__google_contacts_update google_contacts.google_contacts_update Read Update an existing Google Contact. Unspecified fields are preserved. Email, phone, and address are added alongside existing values; name, company, title, and notes are replaced.

Related Google Contacts Pages