Get the FREE Ultimate OpenClaw Setup Guide →

agent-toolkit

Tools and agents for interacting with the Data Commons Knowledge Graph using the Model Context Protocol (MCP).

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio datacommonsorg-agent-toolkit python -m datacommons_mcp \
  --env DATACOMMONS_API_BASE_URL="Base URL for Data Commons API (default may be https://datacommons.org/api/data or as configured by the package)"

How to use

The Data Commons Agent Toolkit MCP server provides tools and sample agents for fetching public information from Data Commons. It ships with a set of sample agents that demonstrate common MCP workflows, such as querying for population, geography, and data statistics, and it exposes a server you can run locally or in your environment to exercise these agents. After launching, you can interact with the server’s endpoints to enumerate available agents, configure data sources, and execute agent workflows to retrieve Data Commons information in your preferred format.

To use the toolkit, install the Python package, start the MCP server, and then run or customize the sample agents provided in the repository. The server will expose endpoints for listing agents, executing agent requests, and streaming or returning results. If you have your own Data Commons setup or API access requirements, you can adapt the sample agents or write new ones to fetch the data you need and integrate them into your MCP workflow.

How to install

Prerequisites:

  • Python 3.8+ (or the version specified by the package documentation)
  • pip (or pipx)

Installation options:

  1. Install from PyPI (recommended):

    • pip install datacommons-mcp
    • This installs the MCP server package and its sample agents.
  2. Install in a virtual environment:

    • python -m venv venv
    • source venv/bin/activate # on Unix or venv\Scripts\activate.bat on Windows
    • pip install datacommons-mcp
  3. Run the MCP server (example):

    • python -m datacommons_mcp
  4. If you prefer to use pipx to keep CLI tools isolated:

    • pipx install datacommons-mcp
    • pipx run datacommons-mcp

Notes:

  • You may need to configure environment variables or CLI options as documented in the package docs for authentication or API access.
  • If you clone the repository, you can install from the local path instead of PyPI, e.g. pip install -e ./packages/datacommons-mcp.

Additional notes

Tips and common considerations:

  • Check the Data Commons API access requirements; some endpoints may require API keys or tokens depending on rate limits or access policies.
  • The toolkit includes sample agents; review them to understand common MCP patterns like agent configuration, data querying, and result formatting.
  • Environment variable DATACOMMONS_API_BASE_URL can be used to override the default API base URL if you’re pointing the server at a custom Data Commons instance.
  • If you need to run multiple MCP servers, you can define separate mcpServers entries in the mcp_config with distinct names and command configurations.
  • Ensure you have network access from the host to the Data Commons API endpoints you intend to query.
  • Consult the official docs at Data Commons MCP for details on agent capabilities, request schemas, and result formats.

Related MCP Servers

Sponsor this space

Reach thousands of developers