mcp_census_server
1
The MCP Census Server is a robust solution designed to access US Census Bureau data using the Model Context Protocol (MCP). It features API key authentication, JSON-RPC interactions, and caching mechanisms, with both a server and client application configured for development and deployment.
MCP Census Server
A robust Model Context Protocol (MCP) server for accessing US Census Bureau data via JSON-RPC over HTTP.
Features
- JSON-RPC 2.0 (single and batch requests)
- Pydantic models for request/response validation
- Caching of Census API responses (TTL 5 minutes)
- Structured logging
- API key authentication
- Health check endpoint
- Interactive API docs (Swagger UI available)
Quickstart
- Clone the repository
- Copy the environment template and set your keys
- Install dependencies
- Start the server
- Send JSON-RPC requests with the required header to the server endpoint.
Development
- Tests: Use
pytest
- Formatting: Via
black .
- Imports: Sorted with
isort .
- Linting: Use
flake8 .
Documentation
- Detailed documentation in
docs/
- Publish via GitHub Pages from Settings
Client Application
Includes a Next.js-based MCP client to interact with this server.