This document outlines the design and architecture of the MCP Census Server. +
+ The server implements the Model Context Protocol (MCP) over HTTP using JSON-RPC 2.0. It is built with FastAPI for high performance and developer productivity. + Key components: +
/
accepts both single and batch requestsX-API-Key
header validated against SERVER_API_KEY
initialize
, tools/list
, tools/call
methodshttpx
client with timeout, retry, and TTL cache (via cachetools
)logging
/health
endpoint for liveness
+
+
.
├── app.py # FastAPI application entrypoint
├── requirements.txt # Dependencies
├── .env.example # Environment variable template
├── .gitignore
├── docs/
│ ├── architecture.md # This document
│ └── usage.md # Usage examples and patterns
├── tests/
│ └── test_app.py # Pytest suite
└── .github/
└── workflows/
└── ci.yml # CI configuration