gptel is an LLM Emacs client and multi-backend AI integration system that allows users to interact with large language models directly inside the Emacs text editor. It serves as an AI-powered text refactoring tool and a context-aware prompt manager, providing a unified interface to connect with various AI providers, including local Ollama instances, AWS Bedrock, and Gemini.
The project distinguishes itself as a Model Context Protocol client, connecting to MCP servers to provide language models with external tools and data sources. It enables context-augmented prompting by aggregating text from buffers, files, and multimedia as supplementary knowledge for model requests.
The system covers a broad range of capabilities, including AI-assisted coding for rewriting and refactoring text within buffers, and AI conversation management for maintaining persistent, branched chat sessions. It also includes support for multi-modal input processing, tool-call dispatching for executing local shell commands or editor actions, and identity verification via OAuth 2.0 and device authorization flows.
The client tracks resource consumption through token usage monitoring and provides diagnostic tools for API request debugging.