The Model Context Protocol in LLM Agent Architectures: The Clean Agent Architecture Pattern
Kalle Kulonen · Tampere University Institutional Repository (Tampere University) · 2026
Large language models (LLMs) serve as the foundation for general-purpose AI agents that can adapt to a broad range of tasks and domains given only natural-language instructions. These agents leverage external resources and tools to overcome the typical limitations of static language models. They can, for instance, use APIs and databases or perform web searches to obtain up-to-date information about their environment and execute complex, domain-specific tasks. Using an analytical framework derived from the Tool-Learning Workflow (TLW), this thesis shows that current tool-augmented agent designs are characterized by ad hoc architectures tightly coupled to specific environments, which limits their portability and reuse. In November 2024, Anthropic introduced the Model Context Protocol (MCP), an open standard for connecting LLM-based applications to external tools via a unified interface. This thesis investigates how MCP supports modular, extensible agent architectures. Using a design-science research approach and inspired by Clean Architecture principles, it develops the Clean Agent Architecture (CAA), an architectural pattern that separates stable agent workflow logic from volatile tool and integration concerns. The pattern enables domain-agnostic agents that can adapt to diverse application domains with minimal reconfiguration by plugging in external capability packages—Expert Plug-ins that encapsulate domain- or task-specific expertise—via MCP or other standardized interfaces. The pattern is evaluated using TLW-based qualitative criteria and requirement-coverage assessment in a scripted walkthrough scenario. In the absence of a full implementation, CAA is presented as an early-stage architectural proposal, together with a preliminary research agenda for its empirical validation and further development.