API Server & MCP Protocol Axum server design for document extraction endpoints, middleware, async processing, and Model Context Protocol integration for AI agents Kreuzberg API Architecture Location : , Kreuzberg provides a dual REST API + MCP server built with Axum + Tokio. Server Setup & Configuration Location : Server initialization pattern: Create (holds + ), build Axum with all REST + MCP routes, apply middleware layers (body limits, CORS, tracing), serve via . Key middleware layers applied in order: - + -- configurable via env vars - -- restrict in production via - -- request/response l…