Thirty actions, one endpoint: an API layer with an MCP server

A dashboard I was building needed a full API layer behind it: data discovery, document management, a contact CRM, pipeline tracking, search history, CSV import and export, and AI scoring. A separate project needed a Python backend with PostgreSQL, Redis and OAuth.
The hard parts were the mix of simple reads and writes with compute-heavy model scoring, and external services that each had their own authentication, rate limits and failure modes.
What I built
- A single POST endpoint that dispatches more than 30 actions by type, with typed request and response schemas.
- Pipeline actions that run adapter search, deduplication, model scoring and persistence in order.
- Document and contact management, including CSV import with column mapping.
- A catalog of 96 sources with priority, tier and URL verification.
- A Model Context Protocol server with 7 read-only resources over stdio and HTTP, so AI agents can read platform data through a standard protocol.
- A Python backend run with Docker Compose: PostgreSQL, Redis and an API service with OAuth.
What came of it
Storage is split by purpose: GitHub for version-controlled persistence, Redis for caching, Blob storage for large payloads. Every model call goes through the Portkey gateway, which gives me failover, cost tracking and model routing in one place.


