gdrive
A google drive mcp servers based on Python
claude mcp add --transport stdio hxie-pallas-gdrive-mcp-server python -m gdrive_mcp_server \ --env TOKENS_PATH="path/to/tokens.json" \ --env CREDENTIALS_PATH="path/to/credentials.json"
How to use
This MCP server provides a Google Drive interface over the MCP protocol, allowing clients to search for files, retrieve file metadata, and fetch file contents with OAuth authentication and token persistence. It supports both standard and HTTP transport modes, enabling you to interact with Drive through MCP clients or via HTTP when enabled. After starting, you can use the MCP commands defined by the server to query Drive resources and access file data using your authenticated session. The server relies on Google Drive API credentials and a stored token file to authorize API requests and persist access across sessions.
How to install
Prerequisites:
- Python 3.12 or higher
- pip available in your environment
- Google Drive API credentials (credentials.json)
Installation steps:
-
Create and activate a virtual environment: python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install the package in editable mode: pip install -e .
-
Prepare Google Drive credentials:
- In Google Cloud Console, enable the Drive API for your project
- Create OAuth 2.0 Client ID (Desktop app) and download credentials.json
- Place credentials.json at a known path, for example: /path/to/credentials.json
-
Configure and run authentication setup (first-run): python -m gdrive_mcp_server.auth_setup --credentials /path/to/credentials.json --token /path/to/tokens.json
-
Run the MCP server (standard mode): python -m gdrive_mcp_server
-
Optional HTTP mode (enable by adding --http): python -m gdrive_mcp_server --http
Additional notes
Tips and notes:
- Ensure credentials.json is secure and token file is writeable by the running process.
- The server supports HTTP transport if you need browser-friendly access; use the --http flag when starting.
- If you encounter OAuth token expiration, re-run the auth_setup or re-authenticate to refresh tokens.
- For Claude Desktop integration, point the command to your virtual environment's gdrive-mcp executable and provide the token path as shown in the README example.
- Development and testing dependencies can be installed with: pip install -e ".[dev]" if you are contributing to the project.
- If using a virtual environment, make sure to reference the correct python interpreter when starting the server.
Related MCP Servers
mcp-vegalite
MCP server from isaacwasserman/mcp-vegalite-server
github-chat
A Model Context Protocol (MCP) for analyzing and querying GitHub repositories using the GitHub Chat API.
nautex
MCP server for guiding Coding Agents via end-to-end requirements to implementation plan pipeline
pagerduty
PagerDuty's official local MCP (Model Context Protocol) server which provides tools to interact with your PagerDuty account directly from your MCP-enabled client.
futu-stock
mcp server for futuniuniu stock
mcp -boilerplate
Boilerplate using one of the 'better' ways to build MCP Servers. Written using FastMCP