CLI ToolsMay 14, 2026·2 min read

chatgpt-cli — Multi-Provider ChatGPT CLI + MCP

A fast ChatGPT CLI with threads/history and built-in MCP client support (tools + session handling); verified 922★, pushed 2026-05-09.

Agent ready

Safe staging for this asset

This asset is staged first. The copied prompt tells the agent to inspect the staged files and ask before activating scripts, MCP config, or global config.

Stage only · 17/100Policy: stage
Agent surface
Any MCP/CLI agent
Kind
CLI Tool
Install
Stage only
Trust
Trust: Established
Entrypoint
Asset
Safe staging command
npx -y tokrepo@latest install a932d048-cb1d-57f5-b14e-41deb8436741 --target codex

Stages files first; activation requires review of the staged README and plan.

Intro

A fast ChatGPT CLI with threads/history and built-in MCP client support (tools + session handling); verified 922★, pushed 2026-05-09.

Best for: Developers who want a terminal-first assistant that can call MCP tools and keep history

Works with: macOS/Linux/Windows binaries; uses OPENAI_API_KEY and can call MCP servers over HTTP(S) (per README)

Setup time: 6-12 minutes

Key facts (verified)

  • GitHub: 922 stars · 61 forks · pushed 2026-05-09.
  • License: MIT · owner avatar + repo URL verified via GitHub API.
  • README-backed entrypoint: chatgpt --help.

Main

  • Start with history: creating ~/.chatgpt-cli enables per-thread message history and a sliding context window (README).

  • Use MCP for tool-augmented questions: inject tool results into the thread first, then ask follow-ups while the context stays local to the CLI.

  • Let the CLI manage MCP sessions: README explains it auto-handles servers that require mcp-session-id headers.

  • Prefer direct-download binaries for CI or locked-down machines: README shows curl -L -o chatgpt ... && chmod +x one-liners by OS/arch.

Source-backed notes

  • README documents MCP flags (--mcp, --mcp-tool, --mcp-params) and that results are injected as [MCP: <tool-name>] ... messages.
  • README includes Homebrew installation plus direct-download commands for multiple platforms/architectures.
  • README says creating ~/.chatgpt-cli enables history tracking stored under ~/.chatgpt-cli/history/.

FAQ

  • Do I need an API key?: Yes — README instructs setting OPENAI_API_KEY before running the CLI.
  • How do I keep conversation history?: Create ~/.chatgpt-cli; the CLI stores thread history under ~/.chatgpt-cli/history/ (README).
  • Does MCP work with servers requiring a session header?: README says the CLI automatically manages mcp-session-id for HTTP(S) MCP servers.
🙏

Source & Thanks

Source: https://github.com/kardolus/chatgpt-cli > License: MIT > GitHub stars: 922 · forks: 61

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets