-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Expand file tree
/
Copy pathgdrive-mcp.py
More file actions
16 lines (13 loc) · 633 Bytes
/
gdrive-mcp.py
File metadata and controls
16 lines (13 loc) · 633 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
from praisonaiagents import Agent, MCP
import os
# Get the credentials path from environment
gdrive_credentials = os.getenv("GDRIVE_CREDENTIALS_PATH", "servers/gcp-oauth.keys.json")
# Use a single string command with Google Drive configuration
gdrive_agent = Agent(
instructions="""You are a helpful assistant that can interact with Google Drive.
Use the available tools when relevant to manage files and folders.""",
llm="gpt-4o-mini",
tools=MCP("npx -y @modelcontextprotocol/server-gdrive",
env={"GDRIVE_CREDENTIALS_PATH": gdrive_credentials})
)
gdrive_agent.start("List files in my Google Drive")