Terminal-based Chat Client with MCP Server Integration
About
A terminal-based chat client that connects to an MCP server and integrates with OpenAI's API, including a weather service as an example of MCP functionality. It demonstrates how to build an extensible chat interface with tool execution.
Details
- Author
- alan-meigs
- Downloads
- 224
- Categories
- AI
Jump to
- Real‑time chat interface with OpenAI integration
- MCP server integration for extensible functionality
- Weather service with alerts and forecasts
- Asynchronous operation for better performance
- Proper error handling and resource cleanup
- Environment variable configuration for API keys
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
Terminal-based Chat Client with MCP Server IntegrationCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
Install UV, create a virtual environment, install required packages (httpx, mcp[cli], openai, python-dotenv), set your OpenAI API key in a .env file, start the weather server (python weather.py), then run the chat client (python client.py weather.py). Optionally configure the server in Cursor’s Agent mode via Settings or a .cursor/mcp.json file.
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"terminal-based chat client with mcp server integration": {
"MCP_EXP": {
"command": "uv",
"args": [
"init"
]
}
}
}
}
McpServers
{
"MCP_EXP": {
"command": "uv",
"args": [
"init"
]
}
}
Terminal-based Chat Client with MCP Server Integration
This project demonstrates how to build a terminal-based chat client interface that connects to an MCP server and integrates with OpenAI's API. It includes a simple weather service as an example of MCP functionality.
Prerequisites
- Python 3.8 or higher
- UV package manager (a fast, reliable Python package installer and resolver)
Installation
1. Install UV
UV is a modern Python package manager that offers significant performance improvements over traditional tools like pip. It's written in Rust and provides:
- Faster package installation
- Reliable dependency resolution
- Built-in virtual environment management
- Compatible with existing Python tooling
To install UV, run:
curl -LsSf https://astral.sh/uv/install.sh | sh
2. Project Setup
1. Initialize a new project:
uv init
2. Create and activate a virtual environment:
```bash
uv venv
source .venv/bin/activate # On Unix/macOS
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.
