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

This asset can be read and installed directly by agents

TokRepo exposes a universal CLI command, install contract, metadata JSON, adapter-aware plan, and raw content links so agents can judge fit, risk, and next actions.

Native · 94/100Policy: allow
Agent surface
Any MCP/CLI agent
Kind
Cli
Install
Brew|Curl
Trust
Trust: Established
Entrypoint
chatgpt --help
Universal CLI install command
npx tokrepo install a932d048-cb1d-57f5-b14e-41deb8436741
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