Why I Went From REST APIs to MCPs to CLIs and ended up with Self-Improving AI

Eduards RuzgaAbout 5 min readSep 5, 2025Watch original
THE SUMMARYAI-generated

Key Concepts

  • Model Context Protocol (MCP): A standard for connecting AI models to tools, prompts, and resources.
  • REST APIs: Application Programming Interfaces designed for code consumption, often verbose and normalized.
  • Command Line Interfaces (CLIs): Text-based interfaces for interacting with systems, adhering to Unix philosophy (small, modular, composable).
  • File System AI: Utilizing the file system as a persistent memory and workspace for AI agents.
  • Desktop Commander: An MCP server providing a computer's file system and CLI access as tools to AI.
  • Amon Problem: The challenge of integrating tools with multiple AI clients and vice versa before MCP.
  • Unix Philosophy: Design principle emphasizing small, modular, and composable tools.

Model Context Protocols (MCPs)

  • Definition: MCPs are described as a "USBC standard for AIs," aiming to connect AIs to various tools. Developed by Anthropic, a competitor to OpenAI.
  • Ecosystem: MCPs define an ecosystem with servers (providing capabilities) and clients (AI agents).
  • Server-Side: Servers provide tools (functions/APIs), prompts, and resources (files) to AIs.
  • Client-Side: Clients use routes, sampling, and elicitation (less supported currently).
  • Novelty: While OpenAI's function calling (April 2023) and custom GPTs with actions (November 2023) offered similar tool integration, MCPs provide a comprehensive ecosystem standard.
  • Key Difference from OpenAI: OpenAI focused on the format of communication, while Anthropic defined the entire ecosystem, including open-source SDKs and client support.
  • Adoption: MCP adoption grew significantly, with support from Microsoft, OpenAI (limited), and Google.
  • Amon Problem Solution: MCPs solve the "Amon problem" by allowing clients to support the MCP protocol and access all MCP tools, and vice versa for tool providers.

REST APIs vs. MCPs

  • REST API Design: REST APIs are designed for code consumption (SDKs), resulting in verbose, normalized, and decoupled data formats.
  • REST API Incompatibility with LLMs: The verbosity and normalization of REST APIs make them difficult for LLMs to parse and utilize effectively.
  • Example: Git Chat Custom GPT: A custom GPT connecting to GitHub via REST API often fails due to the API's verbose responses, exceeding token limits and confusing the LLM.
  • MCP Design: MCPs are designed specifically for AI clients, allowing for conversational and contextual data formats.
  • MCP Limitations: MCPs are relatively new, and implementations may be incomplete, buggy, or lack full functionality.
  • Example: GitHub Official MCP: While the official GitHub MCP offers improvements over REST APIs, it may still lack certain functionalities, such as retrieving the actual diff content of a commit.

Command Line Interfaces (CLIs)

  • History and Characteristics: CLIs have a long history (since the 1960s) and are battle-tested, production-ready tools.
  • Unix Philosophy Adherence: CLIs typically adhere to the Unix philosophy, being small, modular, and composable.
  • Human and Machine Friendliness: CLIs are both human-readable and machine-friendly, allowing for easy integration with other CLIs and LLMs.
  • CLI Preference: The speaker found themselves preferring CLIs over MCPs for integrating AI with various systems due to their versatility, extendability, and customizability.
  • CLI Integration Process: The process involves finding a suitable CLI, integrating with it, and using it. If a CLI doesn't exist, creating one that wraps a REST API in a CLI-friendly manner.
  • Examples of CLI Usage: The speaker uses CLIs for various tasks, including interacting with 20 CRM, GitHub, Google BigQuery, Slack, Trello, and Tally.

File System AI and Persistent Memory Agents

  • Desktop Commander: An MCP server that provides the entire computer as a tool to AIs, including file system access and CLI execution.
  • Capabilities: Desktop Commander allows AIs to access the file system, search for files, read/write/edit files, start/interact with/terminate processes and terminals/CLIs.
  • Code Generation and Execution: AIs can write and execute code within the Desktop Commander environment, allowing for iterative improvement and local automation.
  • Example: GitHub Research with Desktop Commander: Using Desktop Commander and the GitHub CLI, Claude can perform the same GitHub research task that failed with the official GitHub MCP and Git Chat GPT, including retrieving the diff content of a commit.
  • Repeatable Task Automation: Desktop Commander enables the creation of persistent memory agents by allowing AIs to store and modify their own prompts, instructions, and context in the file system.
  • Self-Improving AI: By writing code to optimize CLI usage and storing instructions, the AI becomes self-improving, reducing tool calls, token consumption, and errors over time.
  • Workflow Optimization: The AI can create customized CLIs that use other CLIs for specific tasks, optimizing the workflow for regular knowledge work.
  • Example: Weekly AI Repo Research Agent: Claude is instructed to create a folder with instructions for performing weekly AI repo research, optimizing the process and storing the instructions for future use.

Conclusion

The presentation highlights the benefits of using CLIs as tools for AI, particularly when combined with file system access for persistent memory and self-improvement. While MCPs offer a standardized ecosystem for AI-tool interaction, CLIs provide a robust and versatile alternative, especially when wrapped and optimized by AI agents. Desktop Commander exemplifies this approach by providing AIs with access to the entire computer as a tool, enabling the creation of self-improving agents for repeatable knowledge work. The key takeaway is that combining file system AI with CLIs allows for the creation of powerful, customized, and efficient AI agents that can learn and improve over time.

AI summaries can miss context or contain errors. Check important details against the original video.

Go a little deeper.

Have a question about this video? Load its transcript to open the video chat.