MCP vs API: Architecture Patterns for AI Agents and Applications