← Discover MCPs and Agents
l
MCPAI & MLGitHub
llm-cli
Command-line interface for querying large language models
Links
README
From the repo.
llm-cli
Command-line interface for querying large language models
table of contents
install
pip install llm-cli
usage
# basic query
llm-cli "explain recursion in python"
# specify model
llm-cli --model gpt-4 "write a haiku about debugging"
# streaming output
llm-cli --stream "tell me a story"
# read from stdin
cat input.txt | llm-cli --stdin
# save to file
llm-cli "generate test data" > output.json
# set temperature
llm-cli --temperature 0.2 "what is 2+2"
# multi-line input
llm-cli --multiline
> first line
> second line
> ^D
api
command-line options
| flag | description | default |
|---|---|---|
--model, -m | model to use | gpt-3.5-turbo |
--temperature, -t | sampling temperature (0.0-2.0) | 0.7 |
--max-tokens | maximum response length | 2048 |
--stream, -s | stream output token by token | false |
--stdin | read prompt from stdin | false |
--multiline | enable multi-line input mode | false |
--system | system prompt | null |
--api-key | api key (or use env var) | $LLM_API_KEY |
environment variables
export LLM_API_KEY="your-api-key"
export LLM_DEFAULT_MODEL="gpt-4"
export LLM_API_BASE="https://api.openai.com/v1"
configuration file
Create ~/.llm-cli/config.json:
{
"default_model": "gpt-3.5-turbo",
"temperature": 0.7,
"max_tokens": 2048,
"api_key": "your-api-key"
}
supported models
- OpenAI:
gpt-4,gpt-3.5-turbo - Anthropic:
claude-3-opus,claude-3-sonnet - Local:
ollama/llama2,ollama/mistral
contributing
prs welcome. open an issue first for big changes.
license
MIT
Collected info
- ★ 11 stars
- Language: Python
- Source updated: 5/20/2026
Config for your environment
Replace {MCP_ENDPOINT_URL} with this MCP’s endpoint URL (from its repo or docs above). No API key — you connect directly.
Tool
OS
Config file: ~/.cursor/mcp.json
{
"mcpServers": {
"mcp-server": {
"url": "{MCP_ENDPOINT_URL}"
}
}
}Paste into mcpServers in the config file. Restart Cursor after saving.
If this MCP is also published on mcpchannel.ai, you can subscribe from Browse and use the gateway config there instead.