Terminal-based Chat Client with MCP Server Integration
@alan-meigs
Terminal-based Chat Client with MCP Server Integration について
MCP Client and Server Experiments
基本情報
設定
以下の設定を使って、このサーバーを MCP 対応クライアントに追加してください。
{
"mcpServers": {
"MCP_EXP": {
"command": "uv",
"args": [
"init"
]
}
}
}ツール
ツールは検出されませんでした
ツールは README から自動的に抽出されます。メンテナーは ## Tools という見出しの下に記載することで、このタブに反映できます。
概要
What is Terminal-based Chat Client with MCP Server Integration?
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.
How to use Terminal-based Chat Client with MCP Server Integration?
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.
Key features of Terminal-based Chat Client with MCP Server Integration
- 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
Use cases of Terminal-based Chat Client with MCP Server Integration
- Chat with an AI assistant about general topics
- Ask for current weather conditions in a US state or city
- Retrieve active weather alerts for a given US state
- Get detailed weather forecasts by latitude and longitude
- Integrate the weather tools into Cursor’s Agent mode
FAQ from Terminal-based Chat Client with MCP Server Integration
What are the prerequisites to run the server?
Python 3.8 or higher and the UV package manager are required.
How do I get my OpenAI API key?
Create a .env file in the project root and add OPENAI_API_KEY=your_api_key_here.
Can I use this with Cursor?
Yes. The MCP server can be added in Cursor’s Agent mode (Composer) via Settings → Features → MCP, or by creating a .cursor/mcp.json file with the server command.
What transport does the MCP server use?
The server runs with transport="stdio" for communication with the chat client.
Where does weather data come from?
Weather data is retrieved from the National Weather Service API (api.weather.gov).
「AI とエージェント」の他のコンテンツ
Gemini MCP Server
aliargunMCP server implementation for Google's Gemini API
Unreal Engine Generative AI Support Plugin
prajwalshettydevUnreal Engine plugin for LLM/GenAI models & MCP UE5 server. OpenAI GPT-5, Deepseek R1, Claude Opus/Sonnet, Gemini 3, Grok 4, Alibaba Qwen, Kimi, ElevenLabs TTS, Inworld, OpenRouter, Groq, GLM, Ollama, Local, Meshy, Tripo, Hunyuan3D, Rodin, fal, Dashscope, Seedream. NPC AI, agenti
Model Context Protocol for Unreal Engine
chongdashuEnable AI assistant clients like Cursor, Windsurf and Claude Desktop to control Unreal Engine through natural language using the Model Context Protocol (MCP).
Just Prompt - A lightweight MCP server for LLM providers
dislerjust-prompt is an MCP server that provides a unified interface to top LLM providers (OpenAI, Anthropic, Google Gemini, Groq, DeepSeek, and Ollama)
LinkedIn MCP Server
stickerdanielOpen-source MCP server for LinkedIn. Give Claude and any MCP-compatible AI agent access to profiles, companies, jobs, and messages.
コメント