- Home
- MCP servers
- Google Drive
Google Drive
- python
7
GitHub Stars
python
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"hxie-pallas-gdrive-mcp-server": {
"command": "gdrive-mcp",
"args": []
}
}
}This MCP server plugs into Google Drive to let you search for files, retrieve file content and metadata, and manage authentication via OAuth. Run it locally or expose it over HTTP so you can interact with Drive data from your MCP clients and automation tooling.
How to use
You interact with this server through an MCP client. Start the server in either standard (stdio) mode or HTTP mode, then connect your client to the running process. Typical actions you can perform include: searching for Drive files, retrieving file contents, and fetching file metadata. If you configure HTTP transport, your client can reach the server via an HTTP endpoint; otherwise, you communicate through local IPC with the stdio transport.
How to install
Prerequisites: Python 3.12 or higher.
- Create a virtual environment and activate it.
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
- Install the package in editable mode.
pip install -e .
- Set up Google Drive API credentials. Create a project, enable the Drive API, and download the credentials file as credentials.json. Save it to a known path.
# This step assumes you already have credentials.json prepared at the chosen path
- Authenticate and configure token persistence using your credentials file.
python -m gdrive_mcp_server.auth_setup --credentials /path/to/your/credentials.json --token /path/to/your/tokens.json
- Start the MCP server in your preferred transport mode.
# Standard (stdio) mode
gdrive-mcp
# HTTP transport mode
gdrive-mcp --http
Additional configuration notes
You can also integrate with client automation tools that expect an MCP endpoint by configuring the server’s transport accordingly. If you plan to use Claude Desktop or similar tools, you can point them to the running server using the appropriate command and token paths.
Development
Development uses Python 3.12+, Google Drive API, MCP server framework, FastMCP for HTTP transport, and Rich for terminal formatting. Install development dependencies with the following command.
pip install -e ".[dev]"
Security and tokens
Tokens and credentials are stored according to your token persistence path. Keep credentials.json and tokens.json secure, and restrict access to the machine running the MCP server.
Available tools
search_files
Search for files in Google Drive and filter results by name, type, or metadata.
get_file_content
Retrieve the content of a Drive file and its metadata for display or processing.
authenticate
OAuth authentication flow with token persistence to authorize access to Drive data.
http_transport
Start and interact with the server over HTTP transport.
stdio_transport
Run the server in standard stdio transport for local IPC.