The README currently suggests that CLIENT_ID and CLIENT_SECRET must be provided both as environment variables and within the .env file:
Note your OAuth Client ID and Client Secret. They must be provided as environment variables along with your configuration directory.
However, the file gcp-oauth.keys.json, which is placed at the GDRIVE_CREDS_DIR path, already contains client_id and client_secret. Since this file is read, it seems redundant or potentially confusing to require them again in the environment.
Relevant locations in README:
- Step 9 in the setup instructions
- The example
mcpServers config block under “Usage with Desktop App”
Suggestion:
Clarify whether the environment variables are actually required, or update the README to indicate that setting GDRIVE_CREDS_DIR is sufficient and the server will extract client_id and client_secret from the JSON.
|
9. Note your OAuth Client ID and Client Secret. They must be provided as environment variables along with your configuration directory. |
|
10. You will also need to setup a .env file within the project with the following fields. You can find the Client ID and Client Secret in the Credentials section of the Google Cloud Console. |
|
|
|
``` |
|
GDRIVE_CREDS_DIR=/path/to/config/directory |
|
CLIENT_ID=<CLIENT_ID> |
|
CLIENT_SECRET=<CLIENT_SECRET> |
|
``` |
|
|
|
Make sure to build the server with either `npm run build` or `npm run watch`. |
|
|
|
### Authentication |
|
|
|
Next you will need to run `node ./dist/index.js` to trigger the authentication step |
|
|
|
You will be prompted to authenticate with your browser. You must authenticate with an account in the same organization as your Google Cloud project. |
|
|
|
Your OAuth token is saved in the directory specified by the `GDRIVE_CREDS_DIR` environment variable. |
|
|
|
 |
|
|
|
### Usage with Desktop App |
|
|
|
To integrate this server with the desktop app, add the following to your app's server configuration: |
|
|
|
```json |
|
{ |
|
"mcpServers": { |
|
"gdrive": { |
|
"command": "npx", |
|
"args": ["-y", "@isaacphi/mcp-gdrive"], |
|
"env": { |
|
"CLIENT_ID": "<CLIENT_ID>", |
|
"CLIENT_SECRET": "<CLIENT_SECRET>", |
|
"GDRIVE_CREDS_DIR": "/path/to/config/directory" |
|
} |
|
} |
|
} |
|
} |
|
``` |
The README currently suggests that
CLIENT_IDandCLIENT_SECRETmust be provided both as environment variables and within the.envfile:However, the file
gcp-oauth.keys.json, which is placed at theGDRIVE_CREDS_DIRpath, already containsclient_idandclient_secret. Since this file is read, it seems redundant or potentially confusing to require them again in the environment.Relevant locations in README:
mcpServersconfig block under “Usage with Desktop App”Suggestion:
Clarify whether the environment variables are actually required, or update the README to indicate that setting
GDRIVE_CREDS_DIRis sufficient and the server will extractclient_idandclient_secretfrom the JSON.mcp-gdrive/README.md
Lines 67 to 106 in 5a94bdc