Built static-analysis tools and an MCP server that gave AI coding agents full codebase understanding — cutting task completion time by 4.7x on a 500k+ LOC legacy system.
The MILO5 enterprise portal (HR, finance, logistics, warehouse) is a large-scale Angular + .NET monolith serving 12 000 users. AI coding agents struggled with the codebase — they spent most of their time navigating files and guessing at architecture rather than solving problems. Additionally, the RAG chatbot's action data (see Action-Tree project) lacked backend context such as permissions, validations and service dependencies.
I designed and built three tools that extract structured intelligence from both the frontend and backend, then serve it to AI agents via the Model Context Protocol:
| Component | Purpose | Key Tech |
|---|---|---|
| Frontend Code Intelligence | Parses Angular templates, NgRx state management and API proxies to trace UI click → store dispatch → effect → backend call | TypeScript · ts-morph · Angular Compiler |
| Backend Code Intelligence | Analyzes controllers, services, authorization attributes, DB schema, enums and data-scoping rules via Roslyn | C# · .NET · Roslyn · SQL Server |
| MILO5 MCP Server | Exposes 6 tools (trace API flow, trace UI action, module context, reverse UI lookup, DB schema, read-only SQL queries) over MCP | Python · MCP SDK · rapidfuzz · Docker |
Designed the full code-intelligence architecture; built the TypeScript frontend analyzer (6 extractors + trace builder), the C# backend analyzer (Roslyn-based controller, auth, schema, enum and scoping analysis) and the Python MCP server; defined the 5-task evaluation benchmark from real commit history; measured before/after performance; integrated extracted business logic into the RAG chatbot's action data.
| Challenge | Mitigation & Result |
|---|---|
| Tracing UI events end-to-end through Angular + NgRx + API proxy layers | Built a TraceBuilder that indexes and links template events → component methods → dispatched actions → effects → API calls |
Extracting authorization from custom attributes (MiloAuthorize, role/permission combos) |
Roslyn semantic analysis with attribute-specific parsers → complete permission map per endpoint |
| Ensuring safe database access for AI agents | Read-only SQL enforcement, pattern-based injection prevention, TOP 1000 row limit |
| Fuzzy endpoint lookup across 9 modules with hundreds of controllers | rapidfuzz string matching (70 % threshold) on controller/action names → reliable tool results |
┌─────────────────────────────────────────────────────┐
│ AI Coding Agent │
│ (Claude Code / Cursor) │
└──────────────────────┬──────────────────────────────┘
│ MCP Protocol
┌──────────────────────▼──────────────────────────────┐
│ MILO5 MCP Server │
│ trace_api_flow · trace_ui_action · module_context │
│ find_ui_for_endpoint · db_schema · query_database │
└──────┬───────────────────────────────────┬──────────┘
│ │
┌──────▼──────────┐ ┌─────────▼─────────┐
│ analysis.json │ │ schema_context.json│
│ (per module) │ │ (DB metadata) │
│ │ │ │
│ frontend- │ │ tables · columns │
│ analysis.json │ │ FKs · enums │
│ (per module) │ │ scoping rules │
└──────▲──────────┘ └─────────▲─────────┘
│ │
┌──────┴──────────┐ ┌─────────┴─────────┐
│ Frontend Code │ │ Backend Code │
│ Intelligence │ │ Intelligence │
│ (TypeScript) │ │ (C# / Roslyn) │
└─────────────────┘ └───────────────────┘