Skip to content

Redundancy: CLIENT_ID and CLIENT_SECRET required despite being present in gcp-oauth.keys.json #10

@gwtaylor

Description

@gwtaylor

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.

mcp-gdrive/README.md

Lines 67 to 106 in 5a94bdc

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.
![Authentication Prompt](https://i.imgur.com/TbyV6Yq.png)
### 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"
}
}
}
}
```

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions