mcp-cli

This repository offers a CLI tool for interacting with Model Context Provider servers, supporting OpenAI and Ollama, and featuring chat and interactive modes with conversation history and server-aware tools.

1,139
169

Model Context Provider CLI

This repository hosts a CLI tool for interacting with a Model Context Provider server, enabling users to send commands, query data, and manage resources.

Features

  • Protocol-level communication with the Model Context Provider.
  • Dynamic tool and resource exploration.
  • Supports OpenAI (gpt-4o-mini default) and Ollama (qwen2.5-coder default) providers and models.
  • Enhanced modular chat system with server-aware tools.
  • Rich command system with context-aware completions.
  • Conversation History: Tracks, filters, exports, and analyzes message logs.
  • Two operational modes: Chat (conversational with LLM) and Interactive (command-line with slash commands).

Prerequisites

  • Python 3.8+
  • Required dependencies (see Installation)
  • Ollama installed and running (if using Ollama).
  • OpenAI API key set in environment variables (if using OpenAI).

Installation

(Instructions for cloning the repository, installing UV, and synchronizing dependencies are provided.)

Command-line Arguments

(Details on using --server, --config-file, --provider, and --model arguments are provided.)

Chat Mode

(Details on using chat mode with examples, including specifying providers and models.)

Using Chat Mode

(Explanation of natural language interaction and tool usage.)

Conversation History

(Explanation of reviewing, analyzing, saving, and filtering conversation history with command examples.)

Tool History

(Explanation of tracking tool calls with command examples.)

Changing Provider and Model in Chat Mode

(Explanation of changing provider and model during a chat session with command examples.)

Chat Commands

(Lists available slash commands for general, tool, conversation, and other functions.)

Interactive Mode

(Details on using interactive mode with examples, including specifying providers and models.)

Interactive Commands

(Lists available slash commands for interactive mode.)

Using OpenAI Provider

(Instructions for setting the OPENAI_API_KEY environment variable.)

Project Structure

(Provides a directory structure overview.)

Contributing

(Encourages contributions via issues and pull requests.)

License

(Specifies the MIT License.)

Repository

CH
chrishayuk

chrishayuk/mcp-cli

Created

November 30, 2024

Updated

March 28, 2025

Language

Python

Category

Developer Tools