
us-census-bureau-data-api-mcp
by uscensusbureau·★ 71·Score 46
MCP server connecting AI assistants with official U.S. Census Bureau statistics and data.
Overview
The U.S. Census Bureau Data API MCP server is a comprehensive implementation of the Model Context Protocol that provides AI assistants with access to official U.S. Census Bureau statistics. Built with TypeScript and the MCP SDK, it offers tools to fetch datasets, aggregate data, and resolve geographic information through the Census Data API. The server maintains a local PostgreSQL database for enhanced performance and search capabilities, while also supporting direct API calls. The project follows best practices with a clear architecture, comprehensive testing, and CI/CD workflows.
Try asking AI
After installing, here are 5 things you can ask your AI assistant:
When to choose this
Choose this MCP server when you need authoritative U.S. demographic and economic data in your AI applications, especially if you're already using Docker and want direct access to Census Bureau statistics without building custom integrations.
When NOT to choose this
Don't choose this if you need data for countries other than the U.S., or if you prefer a lightweight solution without Docker dependency. The server also requires a Census API key which requires registration with the Census Bureau.
Tools this server exposes
4 tools extracted from the READMElist-datasetsFetches metadata for all available datasets in the Census Bureau's API
fetch-dataset-geographyFetches available geography levels for filtering a given dataset
fetch-aggregate-dataFetches aggregate data from the Census Bureau's API with various filtering options
resolve-geography-fipsSearches Census Bureau geographies to find FIPS codes and parameters
Comparable tools
Installation
Installation Steps
- Clone the repository
- Get a Census Bureau Data API key from [https://api.census.gov/data/key_signup.html](https://api.census.gov/data/key_signup.html)
- Initialize the database:
``bash docker compose --profile prod run --rm census-mcp-db-init sh -c "npm run migrate:up && npm run seed" ``
- Configure your AI Assistant to use the MCP Server with the following configuration:
``json { "mcpServers": { "mcp-census-api": { "command": "bash", "args": [ "/Path/To/Server/us-census-bureau-data-api-mcp/scripts/mcp-connect.sh" ], "env": { "CENSUS_API_KEY": "YOUR_CENSUS_API_KEY" } } } } ``
- Start your AI Assistant
FAQ
- Do I need to set up a local database?
- Yes, a PostgreSQL database is initialized with Docker Compose to enhance performance and search capabilities. This is required during first-time setup.
- What data sources does this MCP server provide access to?
- The server primarily provides access to the Census Data API with some data cached in a local PostgreSQL database for better performance.
Compare us-census-bureau-data-api-mcp with
Last updated · Auto-generated from public README + GitHub signals.