@sowonai/mcp-google-calendar
v0.3.2
Published
A Model Context Protocol (MCP) server for Google Calendar integration
Downloads
3
Readme
@sowonai/mcp-google-calendar
A Model Context Protocol (MCP) server for Google Calendar integration.
What is MCP?
MCP (Model Context Protocol) is an open protocol that allows AI assistants, such as Claude Desktop, to interact with external services and tools through a standardized interface. By running this server, you can connect your Google Calendar to Claude Desktop and manage your schedule using natural language commands.
Features
- List calendars (gcalendar_listCalendars)
- List events (gcalendar_listEvents)
- Create event (gcalendar_createEvent)
Installation and Configuration
To use this MCP server, you first need to generate a configuration snippet that you can add to your AI assistant's (e.g., Claude Desktop) settings. This process involves an initial authentication step to grant the necessary permissions.
- Obtain Credentials: Follow the steps in the "Creating a Google Cloud Project and Obtaining Credentials" section below to get your
credentials.jsonfile. - Run the Install Script: Execute the following command in your terminal, replacing
/path/to/credentials.jsonwith the actual path to your downloaded credentials file:
npx @sowonai/mcp-google-calendar --install --credentials /path/to/credentials.jsonMCP usage
Claude desktop config (claude_desktop_config.json)
The configuration generated by the --install script should be used here. A typical structure looks like this:
{
"mcpServers": {
"GoogleCalendar": {
"command": "npx",
"args": ["-y", "@sowonai/mcp-google-calendar"],
"env": {
"GOOGLE_CLIENT_ID": "YOUR_CLIENT_ID.apps.googleusercontent.com",
"GOOGLE_CLIENT_SECRET": "YOUR_CLIENT_SECRET",
"GOOGLE_REFRESH_TOKEN": "YOUR_REFRESH_TOKEN_FROM_INSTALL_STEP"
}
}
}
}Ensure the GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET, and GOOGLE_REFRESH_TOKEN in the env section are correctly populated from the output of the --install command.
SowonFlow Integration Example
You can utilize the Google Calendar MCP in a YAML-based workflow like this:
const workflow = new Workflow({
mainWorkflow: `
version: "agentflow/v1"
kind: "WorkflowSpec"
metadata:
name: "Google Calendar Assistant"
description: "Google calendar MCP usage example"
version: "0.1.0"
agents:
- id: "calendar_agent"
inline:
type: "agent"
model: "openai/gpt-4.1-mini"
system_prompt: |
You are calendar assistant.
Answer the user's questions using MCP tools. (MCP tools has prefix "mcp__")
<information>
Current time: '${new Date().toISOString()}'
</information>
mcp: ["mcp-google-calendar"]
nodes:
start:
type: "agent_task"
agent: "calendar_agent"
next: "end"
end:
type: "end"
`,
mcpServers: {
"mcp-google-calendar": {
"command": "npx",
"args": ["-y", "@sowonai/mcp-google-calendar"],
"env": {
"GOOGLE_CLIENT_ID": "YOUR_CLIENT_ID.apps.googleusercontent.com",
"GOOGLE_CLIENT_SECRET": "YOUR_CLIENT_SECRET",
"GOOGLE_REFRESH_TOKEN": "YOUR_REFRESH_TOKEN_FROM_INSTALL_STEP"
}
}
}
});
// Ask a question to the workflow
const result = await workflow.ask("Show me this week's schedule.");
console.log(result.content);This example defines an agent in the workflow that can answer schedule-related questions using the Google Calendar MCP server. SowonFlow is an AI-based workflow engine that interprets and executes workflows defined in YAML.
What is SowonFlow?
SowonFlow is a workflow product designed to conveniently utilize LLMs, featuring embedded workflows and lightweight workflows as its key characteristics. It can be used to create assistants available on Slack within the SowonAI service, and SowonFlow can also be embedded into your company's services. It can be utilized to create expert assistants that handle specific tasks on Slack.
Creating a Google Cloud Project and Obtaining Credentials
- Go to the Google Cloud Console.
- Create a new project or select an existing one.
- Enable the Google Calendar API for your project:
- Navigate to "APIs & Services" > "Library"
- Search for "Google Calendar API" and enable it
- Go to "APIs & Services" > "Credentials".
- Click "Create Credentials" > "OAuth client ID".
- Choose Web application as the application type.
- Enter a name for your client.
- If you select Web application, add the following to the list of authorized redirect URIs:
http://localhost:4100/code - Click "Create" and download the OAuth client JSON file.
- Rename the downloaded file to
credentials.json. You will need to provide the path to this file when running the--installcommand.
Warning:
Never commit yourcredentials.jsonto a public repository. This file contains sensitive client secret information. The refresh token obtained during the--installprocess should also be kept secure.
