home / mcp / gmail mcp server

Gmail MCP Server

This read-only MCP Server allows you to connect to Gmail data from Claude Desktop through CData JDBC Drivers. For full CRUD support, check out the first managed MCP platform: CData Connect AI (https://www.cdata.com/ai/).

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "cdatasoftware-gmail-mcp-server-by-cdata": {
      "command": "java",
      "args": [
        "-jar",
        "CDataMCP-jar-with-dependencies.jar",
        "/PATH/TO/Salesforce.prp"
      ]
    }
  }
}

You can query live Gmail data through a read-only MCP server that wraps the CData JDBC Driver for Gmail. This lets large language models fetch up-to-date Gmail information in natural language without writing SQL. The server connects to Gmail as relational data and exposes it via an MCP interface, enabling safe, real-time data access.

How to use

You connect an MCP client (for example Claude Desktop) to the Gmail MCP server and ask questions about your Gmail data. The built-in tools handle data discovery and querying so you don’t need to craft SQL. You can ask questions like what calendar events you have today, or which Gmail labels contain certain messages, and the server will return the relevant results.

How to install

Prerequisites: you need Java installed on your machine to run the MCP server binary. You will also build or obtain the server JAR and the Gmail JDBC driver as described.

# 1) Build the MCP server project
maven
mvn clean install
# This produces the JAR: CDataMCP-jar-with-dependencies.jar

# 2) Obtain and license the Gmail JDBC Driver from CData
# Follow the driver download and license steps as provided by the driver provider
# 3) Create a Gmail JDBC connection properties file (gmail.prp) with required fields
# Example content (adjust paths to your environment):
Prefix=gmail
ServerName=CDataGmail
ServerVersion=1.0
DriverPath=/path/to/cdata.jdbc.gmail.jar
DriverClass=cdata.jdbc.gmail.GmailDriver
JdbcUrl=jdbc:gmail:InitiateOAuth=GETANDREFRESH;
Tables=
```} ,{

Additional sections

Running the server uses a local, standard Java command so it can be started on the same host as your MCP client. The server is designed to work with clients that run on the same machine.

Available tools

gmail_get_tables

Retrieves a list of tables (data sources) available from Gmail. The output is in CSV with headers on the first line.

gmail_get_columns

Retrieves a list of columns for a specified table. The output is in CSV with headers on the first line.

gmail_run_query

Executes a SQL SELECT query against Gmail data and returns the result set.