YAICLI

v1.0.0Developer Toolsstable

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.

chatgptclicommand-line-toolfunction-callfunction-calling
Share:
19
Stars
0
Downloads
0
Weekly
0/5

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

Multi-provider LLM command-line interface
Chat, command execution, and function calling
Persistent command history
belingud

Maintainer

LicenseApache-2.0
Languagepython
Versionv1.0.0
UpdatedMay 19, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx yaicli

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

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
1

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]'
2

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 --template
3

Configure 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-4o
4

Test 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 -c
5

Configure 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.

6

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.

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.

Quick Config Preview

{ "mcpServers": { "yaicli": { "command": "npx", "args": ["-y", "yaicli"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

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.

33,000+ ServersFree & Open SourceStep-by-Step Guides