- Explore MCP Servers
- mcp_gmail_calender
Mcp Gmail Calender
What is Mcp Gmail Calender
The Langchain MCP Agent is a project that integrates various Multi-tool Coordination Protocol (MCP) servers, specifically focusing on a custom Gmail MCP server and a Google Calendar MCP server, along with additional utilities like math and search tools within the Langchain framework.
Use cases
The agent can be utilized for managing and automating tasks related to email and calendar functionalities, allowing users to send emails, schedule meetings, and perform calculations seamlessly through interactive commands. It can be especially useful for users looking to streamline their productivity and automate repetitive tasks using natural language queries.
How to use
To use the Langchain MCP Agent, clone the repository, install the necessary dependencies, and set up the environment variables in a .env file. Configure the MCP servers accordingly, authenticate with Gmail and Google Calendar, and then run the Langchain agent using a provided command. Users can interact with the agent through a terminal interface to execute various tasks.
Key features
Key features of the Langchain MCP Agent include integration with multiple MCP servers, support for Gmail and Google Calendar functionality, utility tools for mathematics and search, and the ability to trace agent interactions with LangSmith for better insights and debugging.
Where to use
The Langchain MCP Agent can be effectively used in personal productivity environments, including individual users looking to manage their emails and calendars, as well as teams that require automated scheduling and communication tools. It is suited for applications where automation and coordination between multiple tools are essential.
Overview
What is Mcp Gmail Calender
The Langchain MCP Agent is a project that integrates various Multi-tool Coordination Protocol (MCP) servers, specifically focusing on a custom Gmail MCP server and a Google Calendar MCP server, along with additional utilities like math and search tools within the Langchain framework.
Use cases
The agent can be utilized for managing and automating tasks related to email and calendar functionalities, allowing users to send emails, schedule meetings, and perform calculations seamlessly through interactive commands. It can be especially useful for users looking to streamline their productivity and automate repetitive tasks using natural language queries.
How to use
To use the Langchain MCP Agent, clone the repository, install the necessary dependencies, and set up the environment variables in a .env file. Configure the MCP servers accordingly, authenticate with Gmail and Google Calendar, and then run the Langchain agent using a provided command. Users can interact with the agent through a terminal interface to execute various tasks.
Key features
Key features of the Langchain MCP Agent include integration with multiple MCP servers, support for Gmail and Google Calendar functionality, utility tools for mathematics and search, and the ability to trace agent interactions with LangSmith for better insights and debugging.
Where to use
The Langchain MCP Agent can be effectively used in personal productivity environments, including individual users looking to manage their emails and calendars, as well as teams that require automated scheduling and communication tools. It is suited for applications where automation and coordination between multiple tools are essential.
Content
Langchain MCP Agent
This project demonstrates a Langchain agent integrated with multiple MCP (Multi-tool Coordination Protocol) servers, including a custom Gmail MCP server, a Google Calendar MCP server, and other utility tools like math and search.
Setup and Running Locally
To run this project on your local system using uv
, follow these steps:
-
Clone the repository:
git clone https://github.com/harshdabhi/mcp_gmail_calender.git cd mcp_gmail_calender
-
Install
uv
:If you don’t have
uv
installed, you can install it using pip:pip install uv
Or, if you prefer a standalone executable, follow the instructions on the official
uv
documentation. -
Install Python Dependencies:
Ensure you have all the necessary Python packages installed. From the project root, run:
uv pip install -r requirements.txt
-
Set up Environment Variables (.env file):
Create a
.env
file in the root of your project and add yourGROQ_API_KEY
:GROQ_API_KEY=your_groq_api_key
Replace
your_groq_api_key
with your actual Groq API key. -
Configure MCP Servers:
The project uses a
mcp_config/mcp_servers_file.json
to configure the MCP servers. Ensure this file is correctly set up with the paths to your local MCP server implementations. -
Gmail MCP Server Setup:
For detailed instructions on how to enable and authenticate the Gmail MCP server, refer to its documentation:
https://glama.ai/mcp/servers/@GongRzhe/Gmail-MCP-ServerA common step involves moving your
gcp-oauth.keys.json
to~/.gmail-mcp/
and running annpx
command for authentication:mkdir -p ~/.gmail-mcp/ mv <path_to_your_gcp-oauth.keys.json> ~/.gmail-mcp/ npx @gongrzhe/server-gmail-autoauth-mcp auth
Note: You need Node.js and npm installed for
npx
to work. If you encounternpx: command not found
, please install Node.js and npm (e.g., usingbrew install node
on macOS). -
Google Calendar MCP Server Setup:
For detailed instructions on how to enable and use the Google Calendar MCP server, refer to its documentation:
https://glama.ai/mcp/servers/@cablate/mcp-google-calendarSimilar to Gmail, you might need to set up authentication and ensure
GOOGLE_CALENDAR_ID
,GOOGLE_TIME_ZONE
, andGOOGLE_CREDENTIALS_PATH
are correctly configured, preferably via environment variables in your.env
file. -
Run the Langchain Agent:
Once all dependencies are installed and configurations are in place, you can run the Langchain agent:
python server/langchain_server
This will start an interactive chat in your terminal. Type your queries, and the agent will respond using the configured MCP tools. Type
exit
orquit
to end the session.
LangSmith Tracing
This project is configured to use LangSmith for tracing agent interactions. To enable tracing, ensure you have the following environment variables set in your .env
file:
LANGCHAIN_TRACING_V2=true LANGCHAIN_API_KEY=your_langsmith_api_key LANGCHAIN_PROJECT=your_project_name # Optional: Replace with your desired project name
Replace your_langsmith_api_key
with your actual LangSmith API key.
After setting these variables, run the agent as described in step 8 of the “Setup and Running Locally” section. Your traces will automatically appear in your LangSmith account.