Skip to main content
Glama
Census ACS MCP Server

Census ACS MCP Server

by bfs

Census ACS MCP Server

MCP server for querying Census American Community Survey data.

Supports two transport modes:

  • Stdio - Local CLI, for use with Claude Desktop

  • SSE - Remote HTTP server, for hosting and sharing with others

Prerequisites

  • Node.js 24+ (LTS)

  • DuckDB production databases from census_acs_duckdb_importer

Related MCP server: census-mcp-server

Installation

npm install
npm run build

Database Setup

Create a symlink to the database directory:

ln -s /path/to/census_acs_duckdb_importer/output db

The db/ directory should contain:

  • census_acs.production.json_summaries.db

  • census_acs.production.percentiles.db

Configuration

Environment variables:

Variable

Default

Description

CENSUS_ACS_TRANSPORT

stdio

Transport mode: stdio or sse

CENSUS_ACS_PORT

3000

HTTP port (SSE mode only)

CENSUS_ACS_DB_PATH

./db

Path to database directory

CENSUS_ACS_DB_MEMORY_LIMIT

4GB

DuckDB memory limit

CENSUS_ACS_DB_THREADS

4

DuckDB parallel threads

CENSUS_ACS_QUERY_TIMEOUT_MS

120000

Query timeout in milliseconds

Running the Server

Local Mode (Stdio)

For use with Claude Desktop or other local MCP clients:

npm run start

Remote Mode (SSE)

For hosting as an HTTP server:

CENSUS_ACS_TRANSPORT=sse npm run start

Or with a custom port:

CENSUS_ACS_TRANSPORT=sse CENSUS_ACS_PORT=8080 npm run start

The server will be available at http://localhost:3000/sse.

Client Configuration

Claude Desktop (Local/Stdio)

Add to ~/Library/Application Support/Claude/claude_desktop_config.json:

{
  "mcpServers": {
    "census-acs": {
      "command": "node",
      "args": ["/path/to/census_acs_mcp/dist/index.js"]
    }
  }
}

Remote SSE Server

Connect MCP clients to: http://your-server:3000/sse

Deployment (SSE Mode)

For remote hosting:

  1. Deploy to a server with the databases

  2. Set environment variables:

    export CENSUS_ACS_TRANSPORT=sse
    export CENSUS_ACS_PORT=3000
  3. Run the server: npm run start

  4. Users connect via the SSE endpoint URL

Available Tools

Location & Geography

  • lookup_location - Get census data for lat/lng coordinates

  • search_locations - Search for locations by name

  • list_geographies - List all geographies at a summary level (states, counties, etc.)

Data Query

  • rank_areas_by_metric - Rank areas by metric or computed rate (supports compound metrics)

  • get_area_summary - Get full summary for a geographic area

  • compare_areas - Compare two geographic areas

Discovery

  • list_topics - Browse available data categories

  • search_data - Search table metadata by keyword

  • describe_table - Get details about a specific ACS table

  • list_universes - List all data universes (populations)

  • list_population_groups - List available population group codes (race/ethnicity)

Exploration

  • get_interesting_facts - Find outlier statistics for an area

Documentation

Document

Description

docs/PROJECT_SUMMARY.md

Architecture overview, database schema, geographic levels, and population groups

docs/TOOL_DEFINITIONS.md

Detailed specifications for all tools, parameters, and return types

docs/IMPLEMENTATION_DETAILS.md

Technical implementation details, SQL patterns, and error handling

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      Not graded
      quality
      C
      maintenance
      A production-grade MCP server for querying U.S. Census Bureau data (ACS 5-Year and Decennial) with tools for geographic fuzzy matching, variable search, and batched data retrieval, backed by a PostgreSQL cache for performance.
      -
    • A
      license
      Not graded
      quality
      B
      maintenance
      MCP server to query U.S. Census Bureau data, variables, and geography through 7 tools supporting dataset discovery, variable search, geography resolution, and data queries with suppression code decoding.
      216 npm
      3
      Apache 2.0
    • A
      license
      Not graded
      quality
      C
      maintenance
      Provides access to official U.S. Census Bureau data, including decennial census, American Community Survey, economic census, population estimates, and housing characteristics, across geographic levels from nation to block group. Enables natural-language queries and direct tool calls for demographic and housing analysis.
      90 npm
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables querying US Census TIGERweb geographic layers such as tracts, blocks, districts, and places, with tools to list layers, run ArcGIS queries, and find every geography containing a given coordinate.
      69 npm
      MIT