You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add support for custom DC in Gemini CLI extension (#656)
* remove references to dataclass objects
* Fix a copy-paste error.
* remove extra file
* Create placeholders for LLM pages
* rename to MCP
* complete rename
* remove old file
* Changes from Keyur
* Add target tag
* Rewording suggested by Keyur
* Remove extraneous text
* Fix a copy-paste error.
* Migrate MCP docs to docsite
* Restructuring
* Remove unused file
* Add TOCs etc.
* Update var formatting
* comments from Keyur
* another change from Keyur
* Update mcp/index.md
Co-authored-by: Christie Ellks <[email protected]>
* Changes from Christie
* Apply suggestion from @clincoln8
Co-authored-by: Christie Ellks <[email protected]>
* More changes from Christie
* Changes from Dan
* Link fixes
* Remove MCP inspector info
* Add more context to agent dev doc
* fix formatting
* Create placeholders for LLM pages
* merge
* Slight rewording based on comment from Christie
* Lots of restructuring
* More work on Gemini CLI extension
* More changes
* more changes
* more changes
* Update mcp/run_tools.md
Co-authored-by: Christie Ellks <[email protected]>
* implement suggestions from Christie
* Add some bullets to comparison section
* Fix update section
* rename "prompt" to "context"
* add mention of Gemini CLI extension for custom DC
* Update custom DC vars procedure
* Remove reference to .env file in extension run
---------
Co-authored-by: Christie Ellks <[email protected]>
@@ -24,10 +24,7 @@ We provide specific instructions for the following agents:
24
24
25
25
See [Use the Gemini CLI extension](#use-the-gemini-cli-extension) for this option.
26
26
27
-
<!-- TODO: write this Tip: If you would like to use this option with a Custom Data Commons instance, we recommend that you develop your own extension. See xxx for details. -->
28
-
29
27
-[Gemini CLI](https://geminicli.com/)
30
-
- Can be used for datacommons.org or a Custom Data Commons instance
31
28
- No additional downloads
32
29
- MCP server can be run locally or remotely
33
30
- You can create your own context file
@@ -37,7 +34,6 @@ We provide specific instructions for the following agents:
37
34
38
35
- A sample basic agent based on the Google [Agent Development Kit](https://google.github.io/adk-docs/)
39
36
- Best for interacting with a Web GUI
40
-
- Can be used for datacommons.org or a Custom Data Commons instance
41
37
- Can be customized to run other LLMs and prompts
42
38
- Downloads agent code locally
43
39
- Server may be run remotely
@@ -67,23 +63,30 @@ Other requirements for specific agents are given in their respective sections.
67
63
68
64
For basic usage against datacommons.org, set the required `DC_API_KEY` in your shell/startup script (e.g. `.bashrc`).
69
65
<pre>
70
-
export DC_API_KEY=<var>YOUR API KEY</var>
66
+
export DC_API_KEY="<var>YOUR API KEY</var>"
71
67
</pre>
72
68
73
69
### Custom Data Commons
74
70
75
-
If you're running a against a custom Data Commons instance, we recommend using a `.env` file, which the server locates automatically, to keep all the settings in one place. All supported options are documented in [packages/datacommons-mcp/.env.sample](https://github.com/datacommonsorg/agent-toolkit/blob/main/packages/datacommons-mcp/.env.sample).
71
+
To run against a Custom Data Commons instance, you must set additional variables. All supported options are documented in [packages/datacommons-mcp/.env.sample](https://github.com/datacommonsorg/agent-toolkit/blob/main/packages/datacommons-mcp/.env.sample).
72
+
73
+
The following variables are required:
74
+
- <code>export DC_API_KEY="<var>YOUR API KEY</var>"</code>
If you're using the Gemini CLI extension, just set these in your shell/startup script.
76
79
77
-
To set variables using a `.env` file:
80
+
If you're not using the extension, you may wish to use a `.env` file, which the server locates automatically, to keep all the settings in one place. To set all variables using a `.env` file:
78
81
79
-
1. From Github, download the file [`.env.sample`](https://github.com/datacommonsorg/agent-toolkit/blob/main/packages/datacommons-mcp/.env.sample) to the desired directory. Or, if you plan to run the sample agent, clone the repo <https://github.com/datacommonsorg/agent-toolkit/>.
82
+
1. From Github, download the file [`.env.sample`](https://github.com/datacommonsorg/agent-toolkit/blob/main/packages/datacommons-mcp/.env.sample) to the desired directory. Alternatively, if you plan to run the sample agent, clone the repo <https://github.com/datacommonsorg/agent-toolkit/>.
80
83
81
84
1. From the directory where you saved the sample file, copy it to a new file called `.env`. For example:
82
85
```bash
83
86
cd~/agent-toolkit/packages/datacommons-mcp
84
87
cp .env.sample .env
85
88
```
86
-
1. Set the following variables:
89
+
1. Set the following variables, without quotes:
87
90
-`DC_API_KEY`: Set to your Data Commons API key
88
91
-`DC_TYPE`: Set to `custom`.
89
92
-`CUSTOM_DC_URL`: Uncomment and set to the URL of your instance.
@@ -106,12 +109,14 @@ Open a new terminal and install the extension directly from GitHub:
The installation creates a local `.gemini/extensions/datacommons` directory with the required files.
113
+
109
114
> Note: If you have previously configured Gemini CLI to use the Data Commons MCP Server and want to use the extension instead, be sure to delete the `datacommons-mcp` section from the relevant `settings.json` file (e.g. `~/.gemini/settings.json`).
110
115
111
116
{:.no_toc}
112
117
### Run
113
118
114
-
1.From any directory, run `gemini`.
119
+
1.Run `gemini` from any directory.
115
120
1. To verify that the Data commons tools are running, enter `/mcp list`. You should see `datacommons-mcp` listed as `Ready`. If you don't, see the [Troubleshoot](#troubleshoot) section.
116
121
1. To verify that the extension is running, enter `/extensions list`. You should see `datacommons` listed as `active`.
0 commit comments