MCP CLI Chat
The Problem
Traditional chatbots feel disconnected from your actual work - they can talk about code, but they can't touch it. I wanted to build something different: an AI assistant that could actually manage your documents, read your files, and help you work with your filesystem through natural conversation.
What I Built
MCP CLI Chat is a command-line application that uses the Model Context Protocol to give an LLM real filesystem capabilities. You can reference documents with @mentions, use tab completion for file paths, and run slash commands like /summarise, /format, /rewrite, and /convert. The AI doesn't just talk about your files - it reads, understands, and transforms them.
Technical Implementation
The Model Context Protocol was the breakthrough here. Instead of bolting file access onto a chat interface, MCP provides a structured way for LLMs to discover and use tools. I implemented a custom MCP server that exposes filesystem operations as tools the model can call.
The permission system was critical - external file access needs explicit approval, preventing accidental modifications to sensitive files.
Building the tab completion system was more complex than expected. File paths need to be resolved in real-time as the user types, with intelligent filtering based on the current context. I used Python's pathlib for reliable cross-platform path handling.
Slash Commands
- /summarise - analyzes a document and creates a concise overview
- /format - applies consistent styling across multiple files
- /rewrite - takes rough notes and polishes them
- /convert - transforms documents between formats
Each command chains multiple MCP tool calls behind the scenes, making complex operations feel simple.
Key Takeaway
The Model Context Protocol represents a shift from chatbots that talk about work to AI assistants that do work. Building this taught me how to design tool interfaces that LLMs can use effectively - a skill that's becoming increasingly valuable.