teadata-mcp is a Model Context Protocol server and ChatGPT-ready web app for
exploring Texas public school data. It wraps the teadata
data engine in a transport and UI layer that works well for ChatGPT apps, internal
assistants, and browser-based workflows.
The project is built around a simple idea: make Texas education data usable in conversational interfaces without sacrificing provenance, structure, or operator control.
- An MCP server with streamable HTTP, WebSocket, and legacy SSE transports
- A React frontend for ChatGPT-style exploration and inline tool workflows
- Tools for campus search, district detail, geospatial lookup, comparisons, and transfer insights
- Widget assets for map and boundary visualization inside supported clients
- SSO-aware deployment options for pairing a public assistant with a private website workflow
- Build a Texas school-data assistant for ChatGPT or another MCP-capable client
- Embed school search and boundary workflows in a browser-based assistant UI
- Support internal research or public-interest analysis with structured TEA data access
- Pair
teadata-appandteadata-mcpso the public website and assistant share the same data model
- Rich campus and district retrieval backed by
teadata - Fuzzy search across district names, campus names, and identifiers
- Geospatial tools for nearby campuses and boundary-driven analysis
- Side-by-side comparison flows for campuses and districts
- Transfer and mobility insights suitable for charts and narrative summaries
- Response shaping controls that keep large payloads usable in conversational clients
- Widget rendering for boundary and explorer workflows in compatible MCP surfaces
At a high level, the repository is split into three layers:
teadatadata access and domain logic- MCP/server transport and assistant middleware
- React frontend and widget assets for browser and ChatGPT experiences
.
├── src/teadata_mcp/
│ ├── logic.py # Domain logic built on teadata
│ ├── router.py # Tool definitions and request routing
│ ├── server.py # MCP server wiring
│ ├── sse_server.py # Starlette app / HTTP entrypoint
│ ├── assistant_auth.py # Shared-token assistant auth helpers
│ ├── assistant_middleware.py # Browser/API auth behavior
│ ├── tooling_guide.py # Prompt-to-tool guidance
│ └── widget_assets/ # Inline HTML widget assets
├── frontend/ # React application for the browser UI
├── tests/ # Router, logic, auth, and transport tests
├── run_dev.sh # Local development launcher
└── Dockerfile # Container deployment
./run_dev.shThis script:
- syncs Python dependencies with
uv - installs/builds frontend assets
- starts the application server
By default the service exposes:
http://localhost:<port>/mcpfor streamable HTTP MCPws://localhost:<port>/wsfor WebSocket MCPhttp://localhost:<port>/ssefor legacy SSE MCPhttp://localhost:<port>/for the browser UI
uv sync
uv run uvicorn teadata_mcp.sse_server:app --reload --port 8000cd frontend
npm install --legacy-peer-deps
npm run devRun the Python test suite with:
uv run pytestIf you are modifying the frontend or widget behavior, also build the frontend to confirm the static bundle still compiles cleanly.
The repository is structured to deploy cleanly to container-friendly platforms such as Render.
Important environment variables:
TEADATA_SNAPSHOT: path to a local snapshotTEADATA_SNAPSHOT_URL: remote snapshot URL when the bundled artifact is unavailableTEADATA_MAX_RESPONSE_BYTES: soft response-size cap for list-heavy resultsPORT: server port supplied by the platform
In production, build the frontend before starting the Python service so the
static_dist/ assets are available for browser traffic.
teadata-mcp can run as a companion assistant service for teadata-app.
Recommended pattern:
- keep a website-assistant deployment behind shared-signing-key SSO
- keep a separate public MCP deployment for ChatGPT or other external clients
This split lets you protect browser access for website users without forcing the same auth model onto non-browser MCP clients.
Set these on the Django application:
TEADATA_ASSISTANT_ENABLED=1TEADATA_ASSISTANT_URLTEADATA_ASSISTANT_SSO_SECRETTEADATA_ASSISTANT_COOKIE_DOMAINTEADATA_ASSISTANT_COOKIE_NAMETEADATA_ASSISTANT_SSO_TTL_SECONDS
Set these on the assistant service:
TEADATA_ASSISTANT_SSO_SECRETTEADATA_ASSISTANT_COOKIE_NAMETEADATA_ASSISTANT_LAUNCH_URLTEADATA_ASSISTANT_ENFORCE_SSOTEADATA_ASSISTANT_SSO_SKEW_SECONDSTEADATA_DEBUGorDEBUG
- browser UI requests redirect unauthenticated users to the configured launch URL
- API and MCP transport endpoints return
401when SSO enforcement is enabled - non-browser clients may supply a bearer token instead of a cookie
Texas school data gets large quickly, especially for map and boundary workflows. This repo includes several controls to keep responses useful inside assistant clients:
response_profileto choose map-only, list-only, or combined payloadscampus_meta_fields/meta_fieldsto request only the metrics you needcampus_list_formatto keep list payloads compact- pagination plus
next_tool_callguidance for follow-up requests - export resources for CSV/JSON retrieval when full result sets are too large
If you are designing prompts or integrating a client, use the tooling guide and follow-up calls rather than falling back to web search.
SAMPLE_QUERIES.md: example requests and assistant flowsPLAN.md: implementation roadmap / planning notesTODO.md: active task inventorysrc/teadata_mcp/tooling_guide.py: prompt-routing guidance
- The underlying data is public Texas education data.
- The service is designed to expose structured public information, not user-specific private records.
- If you enable SSO or bearer-token protection, secrets should live in environment variables or platform secret stores, never in committed config.
teadata: core Texas education data toolkitteadata-app: companion Django website and SSO launcher
Apache License 2.0. See LICENSE.