Skip to main content

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

  1. You must have a Data Commons API key; create one at apikeys.datacommons.org.
  2. Install uv by 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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

datacommons_mcp-1.3.0.tar.gz (208.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

datacommons_mcp-1.3.0-py3-none-any.whl (209.8 kB view details)

Uploaded Python 3

File details

Details for the file datacommons_mcp-1.3.0.tar.gz.

File metadata

  • Download URL: datacommons_mcp-1.3.0.tar.gz
  • Upload date:
  • Size: 208.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.33 {"installer":{"name":"uv","version":"0.11.33","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}

File hashes

Hashes for datacommons_mcp-1.3.0.tar.gz
Algorithm Hash digest
SHA256 cd642e40fb1be728ca64d516c80ac86eb263b02d5959e5dcdd5e61a8f01b5ef0
MD5 805ec72f72d96b4478f6df538aff28c4
BLAKE2b-256 228f4b326c6ef2b69c48d979118b5b3b36dc25e936f79e4b5474c901a3b831e3

See more details on using hashes here.

File details

Details for the file datacommons_mcp-1.3.0-py3-none-any.whl.

File metadata

  • Download URL: datacommons_mcp-1.3.0-py3-none-any.whl
  • Upload date:
  • Size: 209.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.33 {"installer":{"name":"uv","version":"0.11.33","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}

File hashes

Hashes for datacommons_mcp-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0881ba393686b8a40482a89074ca41a9c432ea5fe16d1a4c0a0eab0df9ef5123
MD5 f660578063a9f9169feed4c7f40fe177
BLAKE2b-256 edbb9e4674c9e77b8bc2aa1cd35525836dd8f52e1b90bef64cbe1460c3fab185

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page