This is an experimental MCP server for fetching public information from Data Commons.
This is experimental and subject to change.
- A Data Commons API key. You can get one from apikeys.datacommons.org.
uv
. You can find installation instructions at https://astral.sh/uv.
Run the server with uvx
:
stdio
DC_API_KEY=<your-key> uvx datacommons-mcp serve stdio
http
This will run the server with SSE on port 8080. You can access it at http://localhost:8080/sse
.
DC_API_KEY=<your-key> uvx datacommons-mcp serve http
Debugging
You can start the MCP inspector on port 6277. Look at the output for the pre-filled proxy auth token URL.
DC_API_KEY=<your-key> npx @modelcontextprotocol/inspector uvx datacommons-mcp serve stdio
IMPORTANT: Open the inspector via the pre-filled session token url which is printed to terminal on server startup.
- It should look like
http://localhost:6274/?MCP_PROXY_AUTH_TOKEN={session_token}
Then to connect to this MCP server, enter the following values in the inspector UI:
- Transport Type:
STDIO
- Command:
uvx
- Arguments:
datacommons-mcp serve stdio
Click Connect
You can use this MCP server with the Gemini CLI.
Edit your ~/.gemini/settings.json
file and add the following, replacing <your api key>
with your actual API key:
{
...
"mcpServers": {
"datacommons-mcp": {
"command": "uvx",
"args": [
"datacommons-mcp",
"serve",
"stdio"
],
"env": {
"DC_API_KEY": "<your api key>"
}
}
}
}