YAICLI
YAICLI: A powerful command-line AI assistant with 25+ LLM providers. Features chat, command execution, quick queries, function calling, MCP support, and persistent history. Seamlessly integrates into workflows with smart environment detection.
What is YAICLI?
YAICLI is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to yaicli: a powerful command-line ai assistant with 25+ llm providers. features chat, command execution, quick queries, function calling, mcp support, and persistent history. seamlessly integrates into ...
YAICLI: A powerful command-line AI assistant with 25+ LLM providers. Features chat, command execution, quick queries, function calling, MCP support, and persistent history. Seamlessly integrates into workflows with smart environment detection.
This server falls under the Developer Tools category on MCPgee, the world's largest MCP server directory with 33,000+ servers.
Features
- YAICLI: A powerful command-line AI assistant with 25+ LLM pr
Use Cases
Maintainer
Works with
Installation
Manual Installation
npx yaicliConfiguration
Configuration Details
claude_desktop_config.json
Performance
Response Metrics
Resource Usage
How to Set Up and Use YAICLI
YAICLI is a powerful command-line AI assistant that brings large language model capabilities directly to your terminal, supporting 25+ providers including OpenAI, Anthropic, Gemini, Groq, Ollama, and any OpenAI-compatible endpoint. It offers three interaction modes — persistent chat, shell command generation and execution, and quick one-off queries — all with real-time streaming, syntax highlighting, and 500-entry persistent history. The MCP server capability (added in v0.7.0) allows YAICLI to act as a host that calls tools defined by connected MCP servers during conversations. Developers who live in the terminal use YAICLI to query AI, run generated shell commands safely, and pipe file content directly into prompts without leaving their workflow.
Prerequisites
- Python 3.10 or higher installed on your system
- An API key for at least one supported LLM provider (e.g., OpenAI, Anthropic, Groq, or Gemini)
- pip, pipx, or uv package manager for installation
- An MCP client (Claude Desktop, Claude Code, or any MCP-compatible host) if using YAICLI as an MCP server
Install YAICLI
Install YAICLI via pip, pipx, or uv. Use the [all] extra to include all optional provider dependencies, or install specific provider extras like anthropic, gemini, or ollama.
pip install yaicli
# or with all providers:
pip install 'yaicli[all]'
# or with specific providers:
pip install 'yaicli[anthropic,gemini,ollama]'Generate the default configuration file
Run the 'ai' command once to create the default configuration file at ~/.config/yaicli/config.ini. You can view the full template with ai --template.
ai --templateConfigure your API key and provider
Edit ~/.config/yaicli/config.ini to set your provider and API key. Key config options include PROVIDER (e.g., openai, claude, gemini), API_KEY, MODEL, and BASE_URL. Alternatively, set environment variables like YAI_PROVIDER, YAI_API_KEY, and YAI_MODEL.
# Example ~/.config/yaicli/config.ini entries:
# PROVIDER = openai
# API_KEY = sk-...
# MODEL = gpt-4o
# Or via environment variables:
export YAI_PROVIDER=openai
export YAI_API_KEY=sk-your-key-here
export YAI_MODEL=gpt-4oTest YAICLI with a quick query
Run a one-shot query to verify the installation. Use 'ai -e' for shell command generation mode, or 'ai -c' to enter interactive chat mode.
ai "What is the current directory structure?"
# Execute mode (generates shell commands):
ai -e "list all Python files modified in the last 7 days"
# Interactive chat mode:
ai -cConfigure YAICLI as an MCP server
Add YAICLI to your MCP client's configuration file. YAICLI exposes itself as an MCP server so other agents can call it as a tool. Use the 'ai mcp' subcommand to start the MCP server.
Add MCP server config to your client
Update your claude_desktop_config.json or equivalent MCP client config to register YAICLI. The server is launched via the 'ai' command with the 'mcp' subcommand.
{
"mcpServers": {
"yaicli": {
"command": "ai",
"args": ["mcp"],
"env": {
"YAI_PROVIDER": "openai",
"YAI_API_KEY": "sk-your-key-here",
"YAI_MODEL": "gpt-4o"
}
}
}
}YAICLI Examples
Client configuration
Register YAICLI in your MCP client configuration with your chosen provider and API key.
{
"mcpServers": {
"yaicli": {
"command": "ai",
"args": ["mcp"],
"env": {
"YAI_PROVIDER": "openai",
"YAI_API_KEY": "sk-your-key-here",
"YAI_MODEL": "gpt-4o",
"YAI_STREAM": "true",
"YAI_MAX_TOKENS": "2048"
}
}
}
}Prompts to try
Example prompts for using YAICLI in chat mode or quick query mode from the terminal.
- "Summarize the contents of this log file: $(cat app.log)"
- "Generate a shell command to find all files larger than 100MB and sort by size"
- "Explain what this Python function does and suggest optimizations"
- "Write a bash script that monitors CPU usage every 5 seconds and alerts when it exceeds 80%"Troubleshooting YAICLI
Command 'ai' not found after installation
If installed with pipx or uv tool install, ensure the tool binary directory is in your PATH. Run 'pipx ensurepath' or check 'uv tool dir' and add the bin subdirectory to your PATH in ~/.bashrc or ~/.zshrc.
API authentication errors or 401 responses
Double-check that YAI_API_KEY is set correctly and that YAI_PROVIDER matches the key's provider. For Anthropic, set PROVIDER=claude and use an sk-ant- prefixed key. For Azure OpenAI, use PROVIDER=openai_azure and set BASE_URL to your Azure endpoint.
MCP server mode not starting or tools not discovered
Ensure yaicli v0.7.0 or higher is installed by running 'pip show yaicli'. The MCP server requires the 'ai mcp' subcommand — verify the args field in your client config matches exactly. Check that required env vars YAI_PROVIDER and YAI_API_KEY are present in the env block.
Frequently Asked Questions about YAICLI
What is YAICLI?
YAICLI is a Model Context Protocol (MCP) server that yaicli: a powerful command-line ai assistant with 25+ llm providers. features chat, command execution, quick queries, function calling, mcp support, and persistent history. seamlessly integrates into workflows with smart environment detection. It connects AI assistants to external tools and data sources through a standardized interface.
How do I install YAICLI?
Follow the installation instructions on the YAICLI GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.
Which AI clients work with YAICLI?
YAICLI works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.
Is YAICLI free to use?
Yes, YAICLI is open source and available under the Apache-2.0 license. You can use it freely in both personal and commercial projects.
YAICLI Alternatives — Similar Developer Tools Servers
Looking for alternatives to YAICLI? Here are other popular developer tools servers you can use with Claude, Cursor, and VS Code.
Ecc
★ 188.2kThe agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.
Javaguide
★ 155.8kJava 面试 & 后端通用面试指南,覆盖计算机基础、数据库、分布式、高并发、系统设计与 AI 应用开发
Gemini CLI
★ 104.5kA secure MCP server that wraps the Google Gemini CLI, allowing clients to query Gemini models using local OAuth sessions without requiring an API key. It provides tools for model interaction and diagnostics with built-in protection against command in
Awesome MCP Servers
★ 87.3k⭐ Curated list of Model Context Protocol (MCP) servers - tools that extend Claude Desktop, Cursor, Windsurf, and other MCP clients with custom capabilities.
MCP Servers
★ 86.0kModel Context Protocol Servers
CC Switch
★ 77.5kA cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Gemini CLI & Hermes Agent. Only official website: ccswitch.io
Browse More Developer Tools MCP Servers
Explore all developer tools servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.
Set Up YAICLI in Your Editor
Choose your AI client for step-by-step setup instructions.
Quick Config Preview
Add this to your claude_desktop_config.json or .cursor/mcp.json
Ready to use YAICLI?
Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.