Skip to content

kh0pper/fed-gov-data-mcp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Federal Education Data MCP Server

An MCP (Model Context Protocol) server providing access to federal education data from NCES CCD, EdFacts, NCHE, and the U.S. Census Bureau. Built for AI-assisted education research and policy analysis.

Overview

Tools to search districts and schools, retrieve demographics and attendance data, access homeless-student counts, compare states on key metrics, and pull census-level demographic context. Used in production for Maestro Press research on Texas school finance and federal-funding equity.

Tools

District / school lookup

  • fed_search_districts - Search LEAs by name, state, or NCES ID
  • fed_search_schools - Search schools by name, state, or NCES ID

Demographics and outcomes

  • fed_get_demographics - Demographic breakdown for district or school
  • fed_get_chronic_absenteeism - Chronic absenteeism from EdFacts
  • fed_get_homeless_data - Homeless student data from NCHE
  • fed_get_census_demographics - Census Bureau ACS demographic data
  • fed_get_census_district_profile - District-level census profile

Comparison and discovery

  • fed_compare_states - Compare metrics across states
  • fed_list_states - List US states with FIPS codes and ESC region context
  • fed_get_available_years - Available school years by data source
  • fed_list_available_files - Downloadable data files
  • fed_download_dataset - Download and cache a specific dataset

Data Sources

Install

git clone https://github.com/kh0pper/fed-gov-data-mcp.git
cd fed-gov-data-mcp
uv sync

The Census Bureau API requires an API key. Set CENSUS_API_KEY in your environment or in your MCP client's env block.

Use as an MCP Server

Add to your MCP client configuration (e.g., Claude Code's ~/.claude/settings.json or a project .mcp.json):

{
  "mcpServers": {
    "fed-gov-data": {
      "command": "uv",
      "args": ["run", "--directory", "/path/to/fed-gov-data-mcp", "fed-gov-data-mcp"],
      "env": {
        "CENSUS_API_KEY": "your-census-api-key"
      }
    }
  }
}

Architecture

  • FastMCP for MCP protocol handling
  • SQLAlchemy (async) + aiosqlite for caching downloaded datasets
  • Pydantic for response schemas
  • pandas for data manipulation
  • research-integration library for citation logging (sister project)

License

MIT License. See LICENSE.

Status

Released alongside ongoing research at Maestro Press. The repo has a local-path dependency on a sister library (research-integration) that is not yet published; the MCP server runs locally as configured here, but direct pip install from a clean environment will fail until that dependency is hosted publicly. Source is available for reading, forking, and reference.

About

MCP server for federal education data — NCES Common Core of Data, EdFacts, NCHE homeless data, and U.S. Census Bureau ACS. District / school search, demographics, chronic absenteeism, multi-state comparison.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages