LEX — AI Legal Platform for Law Firms

AI-powered legal analysis platform for law firms and corporate counsel.

Features

Resources

Blog Articles

Technology

Built on AWS (EC2, Bedrock Claude AI, ALB, WAF, S3, ACM, KMS). PostgreSQL, Redis, Qdrant vector database. TypeScript, React, Node.js.

Start free — 50 credits on registration. Sign up

TECH 6 min

From Monolith to MCP: How Model Context Protocol Transformed Our Architecture

We started as a REST API with 10 endpoints. Now we have 70 MCP tools across 3 services with triple transport. MCP gave us what REST could not: a standard way for AI to discover and use tools on its own. AI becomes the client, not you.

From Monolith to MCP: How Model Context Protocol Transformed Our Architecture

REST API works great when the client is a human. When the client is AI, you need a different protocol.


Why REST Is Not Enough for AI

REST API works like this: a developer reads documentation, writes integration code, hardcodes endpoints. Works perfectly for web apps.

But when your "client" is an LLM that must decide on its own which tool to call:

What MCP Provides

Model Context Protocol is a standard by Anthropic for AI interaction with external tools.

Tool Discovery

GET /api/tools → full catalog with JSON Schema for every parameter

The AI receives a list of all 70 tools with descriptions, parameter types, constraints — and decides on its own what to call.

Standardized Schema

Every tool is described the same way:

Three Transports

stdio for local clients, HTTP for web, SSE for streaming — the same set of tools via any protocol.

Our Migration

Before: REST Monolith

After: MCP Architecture

The Key Mindset Shift

REST: you design an API for a developer who will write code.

MCP: you design an API for AI that will decide on its own when and what to call.

This changes everything — from naming to descriptions, from parameter structure to error format. AI needs clear descriptions, cost hints, examples — things that in REST live in documentation, but in MCP live right in the schema.

MCP is not a silver bullet. But for AI-first products, it is the best standard that exists today.