# DistrictAPI

> DistrictAPI is a freemium MCP server for analytics and data. US school district and school lookups by address, with enrollment and boundaries. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Freemium
- **Platforms:** self-hosted, CLI, API
- **Website:** https://districtapi.dev
- **Repository:** https://github.com/districtapi/districtapi-mcp
- **MCP Registry name:** dev.districtapi/districtapi-mcp
- **Categories:** analytics and data, education and exams
- **Listing updated:** 2026-11-15

## About

Give it a US street address and it returns the public school district serving that spot. The API behind it matches addresses against TIGER boundary polygons with PostGIS, and a district profile includes enrollment, demographics, per-pupil expenditure, revenue sources, locale type, schools and a GeoJSON boundary. Records are keyed by NCES district and school IDs, built on free federal data.

The server wraps the DistrictAPI REST service in six tools: district lookup by address, district profile, name or state search, a district's school list, a school profile and a search for schools near an address. It runs locally over stdio, started with `uvx districtapi-mcp`, and needs an API key in `DISTRICTAPI_KEY`.

The free tier gives 500 requests a month with no card, and paid tiers add email support and batch endpoints of 100 or 500 addresses. One account also works on the same vendor's library and public safety APIs. The MCP package is MIT licensed.

## Features

- **Address to district:** Finds the district serving a US street address.
- **District profile:** Returns enrollment, demographics, finance and school counts.
- **School search:** Lists schools in a district or within a radius of an address.
- **NCES identifiers:** All records use federal NCES IDs.
- **GeoJSON boundaries:** District boundaries are returned for use in mapping tools.
- **Free tier:** 500 requests a month with no card.

## Good for

- Find the school district for a home address
- Compare enrollment between districts
- List all schools in a district
- Find charter or public schools near an address
- Pull boundary polygons for a map

## Install

### Claude Code (Terminal)

```sh
claude mcp add districtapi-mcp --env DISTRICTAPI_KEY='<DISTRICTAPI_KEY>' -- uvx districtapi-mcp
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "districtapi-mcp": {
      "command": "uvx",
      "args": [
        "districtapi-mcp"
      ],
      "env": {
        "DISTRICTAPI_KEY": "<DISTRICTAPI_KEY>"
      }
    }
  }
}
```

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "districtapi-mcp": {
      "command": "uvx",
      "args": [
        "districtapi-mcp"
      ],
      "env": {
        "DISTRICTAPI_KEY": "<DISTRICTAPI_KEY>"
      }
    }
  }
}
```

### VS Code (.vscode/mcp.json)

```json
{
  "servers": {
    "districtapi-mcp": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "districtapi-mcp"
      ],
      "env": {
        "DISTRICTAPI_KEY": "<DISTRICTAPI_KEY>"
      }
    }
  }
}
```

### Windsurf (~/.codeium/windsurf/mcp_config.json)

```json
{
  "mcpServers": {
    "districtapi-mcp": {
      "command": "uvx",
      "args": [
        "districtapi-mcp"
      ],
      "env": {
        "DISTRICTAPI_KEY": "<DISTRICTAPI_KEY>"
      }
    }
  }
}
```

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "districtapi-mcp": {
      "command": "uvx",
      "args": [
        "districtapi-mcp"
      ],
      "env": {
        "DISTRICTAPI_KEY": "<DISTRICTAPI_KEY>"
      }
    }
  }
}
```

## Tools

- `lookup_district_by_address`: Find the district serving a US street address
- `get_district`: Get full district profile by NCES LEA ID
- `search_districts`: Search districts by name and/or state
- `get_district_schools`: List all schools in a district
- `get_school`: Get full school profile by NCES school ID
- `find_schools_near_address`: Find schools within a radius of an address

## FAQ

### Do I need an API key?

Yes. Set DISTRICTAPI_KEY from districtapi.dev; the free tier has 500 requests a month.

### How do I run it?

Use uvx districtapi-mcp, or pip install districtapi-mcp, in your MCP client's command setting.

### What licence is the package?

MIT.

### Where does the data come from?

The site says it is built on free federal data keyed by NCES IDs.

### Does it cover private schools?

The site describes US public school districts and schools only.

### Is DistrictAPI free?

DistrictAPI has a free plan, with paid plans for more usage or features.

### How do I add DistrictAPI to Claude Code?

Run this command in your terminal: claude mcp add districtapi-mcp --env DISTRICTAPI_KEY='<DISTRICTAPI_KEY>' -- uvx districtapi-mcp

### What are the best alternatives to DistrictAPI?

The closest alternatives to DistrictAPI are Agent-Native Analytics, Google Ads + Meta Ads + SEO/GEO MCP, Tapetide - Indian Stock Market MCP, World Monitor and CompanyData.

## Alternatives

- [Agent-Native Analytics](https://ai-powered.com/mcp/agent-native-analytics): Agent-Native Analytics is an open-source MCP server for analytics and data.
- [Google Ads + Meta Ads + SEO/GEO MCP](https://ai-powered.com/mcp/google-ads-meta-ads-seo-geo-mcp): Google Ads + Meta Ads + SEO/GEO MCP is a freemium MCP server for marketing and seo.
- [Tapetide - Indian Stock Market MCP](https://ai-powered.com/mcp/tapetide-indian-stock-market-mcp): Tapetide - Indian Stock Market MCP is a freemium MCP server for finance and payments.
- [World Monitor](https://ai-powered.com/mcp/world-monitor): World Monitor is a freemium MCP server for analytics and data.
- [CompanyData](https://ai-powered.com/mcp/companydata): CompanyData is a paid MCP server for analytics and data.
- [ChartAnt](https://ai-powered.com/mcp/chartant): ChartAnt is a freemium MCP server for design and media.
- [Quantivex Research](https://ai-powered.com/mcp/quantivex-research): Quantivex Research is a free MCP server for finance and payments.
- [Provyan](https://ai-powered.com/mcp/provyan): Provyan is a free MCP server for finance and payments.

---
Source: https://ai-powered.com/mcp/districtapi
