Back to the catalog

datacommons

Query public datasets from Data Commons using natural language, and ground AI responses from any tools using authoritative data.

Open source Open in the app JSON README (API)

About

Query public datasets from Data Commons using natural language, and ground AI responses from any tools using authoritative data.

Details

Kind
Plugins
Topic
Government & public data
Publisher
gemini-cli-extensions
Origin
gemini
Category
ferramentas
Version
1.1.6
Stars
36
Forks
5
Last push
2026-02-04T19:56:39Z
Repository state
ativo
License
Apache-2.0
Added
2026-08-30 14:13:39
Updated
2026-08-30 14:13:39
Origin id
gemini-cli-extensions/datacommons

README

# Data Commons Extension for Gemini CLI

This is a Gemini CLI extension that allows you to query public datasets from [Data Commons](https://datacommons.org/) using natural language, and to ground AI responses from any any other tools in authoritative data, to reduce hallucinations.

This page provides basic instructions for installing and running the extension. For complete information on using Data Commons with Gemini CLI, please see the [Data Commons documentation](https://docs.datacommons.org/mcp).

## Prerequisites

Before using this extension, you will need:

-  [Gemini CLI](https://geminicli.com/docs/get-started/) installed.
-   A free Data Commons API key. To obtain an API key, go to https://apikeys.datacommons.org and request a key for the api.datacommons.org domain.

## Installation

1. Set your Data Commons API key as an environment variable in your shell or startup script (e.g. `.bashrc`):
   ```
   export DC_API_KEY=<YOUR_API_KEY>
   ```
1. Install the extension directly from GitHub:
   ```sh
   gemini extensions install https://github.com/gemini-cli-extensions/datacommons
   ```
> Note: If you have previously configured Gemini CLI to use the Data Commons MCP Server in a `settings.json` file (e.g. `~/.gemini/settings.json`) and want to use the extension instead, be sure to delete the `datacommons-mcp` section from the file.

## Usage

1. Run `gemini`. 
1. To verify that the Data Commons tools are running, enter `/mcp list`. You should see the `datacommons-mcp` tools listed as "ready". If you don't, try running in [debug mode](#troubleshooting) to get diagnostic information.
1. Ask questions about statistical data in natural language. 

### Examples

*   "What is the population of California?"
*   "Show me the median income in Santa Clara County."
*   "Compare the GDP of Japan and Germany."
*   "Poverty indicators for India"

## How it works

This extension uses the [Data Commons MCP Server](https://github.com/datacommonsorg/agent-toolkit/tree/main/packages/datacommons-mcp) to translate natural language queries into Data Commons API calls.

The extension also provides a context file (`DATACOMMONS.md`) that gives the Gemini agent instructions on how to handle user queries and tool responses.

## Troubleshooting

You can diagnose common errors, such as invalid API keys, by using the debug flag:
```
gemini -d
```

## Uninstall

To uninstall the extension, run:
```
gemini extensions uninstall datacommons
```

More