Skip to content
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions mindsdb-mcp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ PARAMETERS = {
Make sure to choose `External` for `User Type`, and select the necessary scopes.
Make sure to save the changes.

- Now, create the OAuth client ID. Choose `Web application` for the `Application Type` and give it a name.
- Now, create the OAuth client ID. Choose `Web application` for the `Application Type` and give it a name. Sometimes it might not work straightforward and you need to setup a `Desktop application` instead.

- Add the following MindsDB URL to `Authorized redirect URIs`:

Expand All @@ -221,6 +221,13 @@ PARAMETERS = {
4. Download the JSON file:

- After creating your credentials, click the download button (an icon of an arrow pointing down) on the right side of your client ID. This will download a JSON file, so you will use the location to it in the `credentials_file` param.
- The JSON file can be placed into the container filesystem via [cat+EOF-pasting](https://stackoverflow.com/a/21549836) or via mounting it on container launch
```sh
docker run -it \
-v /Users/my.name/Downloads/downloaded_creds.json:/mindsdb/mindsdb/integrations/handlers/gmail_handler/client_secret.json \
-p 47334:47334 -p 47335:47335 \
mindsdb/mindsdb
```

5. Add user authentication:

Expand All @@ -235,9 +242,11 @@ Go to the MindsDB editor running locally at `127.0.0.1:47334` and run the follow
CREATE DATABASE mindsdb_gmail
WITH ENGINE = 'gmail',
PARAMETERS = {
"credentials_file": "path/to/credentials.json",
PARAMETERS = {
"credentials_file": "/mindsdb/mindsdb/integrations/handlers/gmail_handler/client_secret.json",
"scopes": ['https://.../gmail.compose', 'https://.../gmail.readonly']
};
};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Remove duplicate PARAMETERS block in SQL snippet.

The current snippet has two PARAMETERS = { lines and an extra closing brace, which is invalid SQL/JSON syntax. Consolidate into a single block:

-```SQL
-CREATE DATABASE mindsdb_gmail
-WITH ENGINE = 'gmail',
-PARAMETERS = {
-PARAMETERS = {
-  "credentials_file": "/mindsdb/mindsdb/integrations/handlers/gmail_handler/client_secret.json",
-  "scopes": ['https://.../gmail.compose', 'https://.../gmail.readonly']
-};
-};
-```
+```sql
+CREATE DATABASE mindsdb_gmail
+WITH ENGINE = 'gmail',
+PARAMETERS = {
+  "credentials_file": "/mindsdb/mindsdb/integrations/handlers/gmail_handler/client_secret.json",
+  "scopes": ['https://.../gmail.compose', 'https://.../gmail.readonly']
+};
+```
🤖 Prompt for AI Agents
In mindsdb-mcp/README.md around lines 245 to 249, the SQL snippet incorrectly
contains a duplicate PARAMETERS block and an extra closing brace, causing
invalid syntax. Remove the duplicate PARAMETERS = { line and the extra closing
brace so that there is only one PARAMETERS block enclosing the credentials_file
and scopes entries. Ensure the snippet starts with PARAMETERS = { and ends with
a single closing brace followed by a semicolon.

```

When prompted, sign in with the Google account you added to the `Test users` in your app and you are good to go.
Expand Down