Home

Awesome

Model Context Protocol CLI

This repository contains a protocol-level CLI designed to interact with a Model Context Protocol server. The client allows users to send commands, query data, and interact with various resources provided by the server.

Features

Prerequisites

Installation

  1. Clone the repository:
git clone https://github.com/chrishayuk/mcp-cli
cd mcp-cli
  1. Install UV:
pip install uv
  1. Resynchronize dependencies:
uv sync --reinstall

Usage

To start the client and interact with the SQLite server, run the following command:

uv run mcp-cli --server sqlite

Command-line Arguments

Examples

Run the client with the default OpenAI provider and model:

uv run mcp-cli --server sqlite

Run the client with a specific configuration and Ollama provider:

uv run mcp-cli --server sqlite --provider ollama --model llama3.2

Interactive Mode

The client supports interactive mode, allowing you to execute commands dynamically. Type help for a list of available commands or quit to exit the program.

Supported Commands

Chat Mode

To enter chat mode and interact with the server:

uv run mcp-cli --server sqlite

In chat mode, you can use tools and query the server interactively. The provider and model used are specified during startup and displayed as follows:

Entering chat mode using provider 'ollama' and model 'llama3.2'...

Using OpenAI Provider:

If you wish to use openai models, you should

Contributing

Contributions are welcome! Please open an issue or submit a pull request with your proposed changes.

License

This project is licensed under the MIT License.