Skip to main content
Glama

Google-Workspace-MCP-Server

MIT License
15
mcp_client.py870 B
import os import asyncio from dotenv import load_dotenv from langchain_openai import ChatOpenAI from mcp_use import MCPAgent, MCPClient async def main(): load_dotenv() config = { "mcpServers": { "gsuite": { "command": "python", "args": [f"{os.getenv("MCP_SERVER_ABS_PATH")}"], } } } client = MCPClient.from_dict(config) llm = ChatOpenAI(model="gpt-4o") # Create agent with the client agent = MCPAgent(llm=llm, client=client, max_steps=30) result = await agent.run( """ Create a Google Calendar Event based on the content of the last mail being sent to my inbox. If you cannot create an event, create a sort of "reminder event" in order to remind me to check that email. """, ) print(f"\nResult: {result}") if __name__ == "__main__": asyncio.run(main())

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/giuseppe-coco/Google-Workspace-MCP-Server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server