Data Commons MCP Server
This is a Model Context Protocol (MCP) server for fetching public statistical data from Data Commons instances.
Data Commons is an open knowledge repository that provides a unified view across multiple public data sets and statistics. This server allows any MCP-enabled agent or client to query the Data Commons knowledge graph.
Features
- MCP-Compliant: Implements the Model Context Protocol for seamless agent integration.
- Data Commons Access: Fetches public statistics and data from the base datacommons.org knowledge graph.
- Custom Instance Support: Can be configured to work with Custom Data Commons instances.
- Flexible Serving: Runs over both streamable HTTP and stdio.
Quickstart
Prerequisites
- You must have a Data Commons API key; create one at apikeys.datacommons.org.
- Install
uvby following the official installation instructions.
Configuration
Set the following required environment variable in your shell:
export DC_API_KEY=<your API key>
Start the server
Run the server from your command line in one of two modes:
Streamable HTTP
This runs the server with Streamable HTTP.
# Runs on default port 8080
uvx datacommons-mcp serve http [--port <PORT>]
The server will be available at http://localhost:<port>/mcp.
stdio
This transport mode is intended for local integrations and is programmatically configured within a client (like Gemini CLI settings) to communicate over stdio.
uvx datacommons-mcp serve stdio
Clients
You can use any MCP-enabled agent or client to connect to your running server. For example, see the Data Commons MCP documentation for guides on connecting:
Or see your preferred client's documentation for how to configure it, using the commands listed above.
Advanced Configuration
Using MCP Tools with a Custom Data Commons
Follow the Guide for using MCP Tools with Custom Data Commons to set additional environment variables required for custom configuration.
Release files for datacommons-mcp 1.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| datacommons_mcp-1.4.0.tar.gz | 39.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| datacommons_mcp-1.4.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 84.0 kB
Release files / datacommons_mcp-1.4.0.tar.gz
| Download URL | datacommons_mcp-1.4.0.tar.gz |
|---|---|
| Size | 39.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8901b97c915c636497264b8d92f3f64980eeea0ab37e5621ba5472095f412afc
|
|
BLAKE2b-256 checksum How to use checksums |
6fcf348a970d58a946e021b5fc2084bf5e29839dd1eca8555f53694b5d8ceff0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.9 {"installer":{"name":"uv","version":"0.12.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / datacommons_mcp-1.4.0-py3-none-any.whl
| Download URL | datacommons_mcp-1.4.0-py3-none-any.whl |
|---|---|
| Size | 45.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3eed493d6626b4ef3565439e2d02ca6b075eb1d91e0cf155d9828e9564e12dc1
|
|
BLAKE2b-256 checksum How to use checksums |
c7f1264cf398a52e926fa721bb2df0300f8ed9c6851fc1a623d8904daa5942fd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.9 {"installer":{"name":"uv","version":"0.12.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|