MCPCLIHost

by vincent-pli

Not rated
GitHub

About

A CLI host that allows Large Language Models (LLMs) to interact with external tools using the Model Context Protocol (MCP).

Details

Author
vincent-pli
Categories
Developer Tools, AI

Setup

Install MCPCLIHost in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/vincent-pli/mcp-cli-host

Follow the installation instructions in the repository README, then restart your MCP client.

A CLI host application that enables Large Language Models (LLMs) to interact with external tools through the Model Context Protocol (MCP). Currently supports Openai, Azure Openai, Deepseek and Ollama models.

- Interactive conversations with multipe LLM models
- Support for multiple concurrent MCP servers
- Dynamic tool discovery and integration
- Configurable MCP server locations and arguments
- Configurable message history window for context management
- Monitor/trace error from server side
- Support Sampling, Roots, Elicitation, retrievling Resource, Prompts
- Support runtime exclude specific tool
- Show MCP server card when connected
- display image from tool call output

- [2025-11-26] Support display image from tool call output
- [2025-07-18] Support Streamable HTTP mcp server, OAuth process not support yet
- [2025-07-02] Support Elicitation
- [2025-06-27] Deal withPromptsin MCP server:Link
-
[2025-06-20] Deal withResourcesin MCP server:Link

export OPENAI_API_KEY='your-api-key'

By default for Openai thebase_urlis "https://api.openai.com/v1" For deepseek it's "https://api.deepseek.com", you can change it by--base-url

- Install Ollama fromhttps://ollama.ai
- Pull your desired model:

export AZURE_OPENAI_DEPLOYMENT='your-azure-deployment' export AZURE_OPENAI_API_KEY='your-azure-openai-api-key' export AZURE_OPENAI_API_VERSION='your-azure-openai-api-version' export AZURE_OPENAI_ENDPOINT='your-azure-openai-endpoint'
export GEMINI_API_KEY='your-gemini-api-token'

MCPCLIHost will automatically find configuration file at~/.mcp.json. You can also specify a custom location using the--configflag:

{ "mcpServers": { "sqlite": { "command": "uvx", "args": [ "mcp-server-sqlite", "--db-path", "/tmp/foo.db" ] }, "filesystem": { "command": "npx", "args": [ "-y", "@modelcontextprotocol/server-filesystem", "/tmp" ] } } }

- command: The command to run (e.g.,uvx,npx)
- args: Array of arguments for the command:

- For SQLite server:mcp-server-sqlitewith database path
- For filesystem server:@modelcontextprotocol/server-filesystemwith directory path

Remote mcp server(only support Streamable HTTP)

{ "mcpServers": { "github": { "url": "https://api.githubcopilot.com/mcp/", "headers": {"Authorization": "Bearer <your PAT>"} } } }

MCPCLIHost is a CLI tool that allows you to interact with various AI models through a unified interface. It supports various tools through MCP servers.

Models can be specified using the--model(-m) flag:

- Deepseek:deepseek:deepseek-chat
- OpenAI:openai:gpt-4
- Ollama models:ollama:modelname
- Azure Openai:azure:gpt-4-0613
- Gemini:gemini:gemini-2.5-flash

# Use Ollama with Qwen model mcpclihost -m ollama:qwen2.5:3b # Use Deepseek mcpclihost -m deepseek:deepseek-chat --sys-prompt 'You are a slightly playful assistant, please answer questions in a cute tone!'

- --config string: Config file location (default is $HOME/mcp.json)
- --debug: Enable debug logging
- --message-window int: Number of messages to keep in context (default: 10)
- -m, --model string: Model to use (format: provider:model) (default "anthropic:claude-3-5-sonnet-latest")
- --base-url string: Base URL for OpenAI API (defaults to api.openai.com)
- --roots string: MCP clients to expose filesystem “roots” to servers
- --sys-prompt string: System prompt

- /help: Show available commands
- /tools: List all available tools
- /exclude_tool tool_name: Exclude specific tool from the conversation
- /resources: List all available resources
- /get_resource: Get specific resources by uri, example: /get_resource resource_uri
- /prompts: List all available prompts
- /get_prompt: Get specific prompt by name, example: /get_prompt prompt_name
- /servers: List configured MCP servers
- /history: Display conversation history
- /quit: Exit at any time

MCPCliHost can work with any MCP-compliant server. For examples and reference implementations, see theMCP Servers Repository.

- In scenario ofSamplingandElicitation, when typing "Ctrl+c", the process will crash with something likeasyncio.exceptions.CancelledError, will be resolved later.

This project is licensed under the Apache 2.0 License - see theLICENSEfile for details.

This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.

Bring agent evaluations, observability, and synthetic test set generation directly into your IDE for free with Galileo's new MCP server

An MCP server to help AI assistants to answer questions and generate AccelByte Extend SDK code more effectively .

MCP server for AI Diagram Maker — generate beautiful software engineering diagrams directly inside Cursor, Claude Desktop, Claude Code, or any MCP-compatible AI agent

Official MCP server for Buildable AI-powered development platform. Enables AI assistants to manage tasks, track progress, get project context, and collaborate with humans on software projects.

What Shopify did for ecommerce, Chipp does for AI agents. Build, deploy, and monetize AI agents for your business — no engineering team required.

CodeVF MCP lets AI hand off problems to real engineers instantly, so your workflows don’t stall when models hit their limits.

Make your AI agent speak every language on the planet, using Lingo.dev Localization Engine.

Client implementation for Mastra, providing seamless integration with MCP-compatible AI models and tools.

Instead of direct calling MCP tools, mcpcode server transforms MCP tool calls into TypeScript programs, enabling smarter, lower-latency orchestration by LLMs.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.