DistrictAPI — Claude Code MCP server: US school district data
Gives your agent US school district and school lookups: find the district for an address, pull profiles, list schools, search nearby.
claude mcp add districtapi-mcp -e DISTRICTAPI_KEY=<DISTRICTAPI_KEY> -- uvx districtapi-mcpWhat DistrictAPI does
Six tools come with the server. lookup_district_by_address resolves a US street address to its district, and get_district returns the full profile for an NCES LEA ID. Name-and-state search runs through search_districts. Schools are covered by get_district_schools, get_school (profile by NCES school ID) and find_schools_near_address for a radius search.
The package starts with uvx districtapi-mcp, so a local install is optional. An API key goes into DISTRICTAPI_KEY; districtapi.dev hands them out for free. Without the key the server has nothing to call the API with.
Configuration lives in your MCP client as a stdio command plus that environment variable. Listed clients include Claude, Codex, Cursor, GitHub Copilot, Windsurf, Cline, Zed and Gemini CLI. Keep the key in env rather than in command arguments, otherwise it lands in shell history.
What it helps with
- resolve which US school district covers a given address
- read a district or school profile by NCES ID
- pull every school inside a district
- find schools within a radius of an address
- search districts by name in a specific state
Example prompts for the agent
- Find schools near this address
- Show the district profile for this NCES LEA ID and list its schools
How to install DistrictAPI
Platform CLI
claude mcp add districtapi-mcp -e DISTRICTAPI_KEY=<DISTRICTAPI_KEY> -- uvx districtapi-mcpReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from districtapi-mcp <command>
Platform CLI
codex mcp add districtapi --env DISTRICTAPI_KEY=<DISTRICTAPI_KEY> -- uvx districtapi-mcpReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from districtapi-mcp <command>
Config file
{
"mcpServers": {
"districtapi": {
"command": "uvx",
"args": [
"districtapi-mcp"
],
"env": {
"DISTRICTAPI_KEY": "<DISTRICTAPI_KEY>"
}
}
}
}Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from districtapi-mcp <command>
Config file
{
"servers": {
"districtapi": {
"type": "stdio",
"command": "uvx",
"args": [
"districtapi-mcp"
],
"env": {
"DISTRICTAPI_KEY": "<DISTRICTAPI_KEY>"
}
}
}
}Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from districtapi-mcp <command>
Platform CLI
gemini mcp add -e DISTRICTAPI_KEY=<DISTRICTAPI_KEY> districtapi uvx districtapi-mcpReplace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from districtapi-mcp <command>
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about DistrictAPI
How do I install DistrictAPI in Claude Code?
Run claude mcp add districtapi-mcp -e DISTRICTAPI_KEY=<DISTRICTAPI_KEY> -- uvx districtapi-mcp with your own key filled in.
What does DistrictAPI do?
It exposes six tools that query a US school district and school API: address-to-district lookup, profiles by NCES ID, school lists and a nearby-school search.
What does the server need to run?
A DISTRICTAPI_KEY from districtapi.dev and uvx to launch the districtapi-mcp package.