MCP Chat
MCP Chat
MCP Chat は、Anthropic API を通じて AI モデルとのインタラクティブなチャットを可能にするコマンドラインインターフェースアプリケーションです。このアプリケーションは、ドキュメントの取得、コマンドベースのプロンプト、および MCP (Model Control Protocol) アーキテクチャによる拡張可能なツール統合をサポートしています。
前提条件
Python 3.9+
Anthropic API キー
Related MCP server: MCP Chat
セットアップ
ステップ 1: 環境変数の設定
プロジェクトルートにある
.envファイルを作成または編集し、以下の変数が正しく設定されていることを確認します:
ANTHROPIC_API_KEY="" # Enter your Anthropic API secret keyステップ 2: 依存関係のインストール
オプション 1: uv を使用したセットアップ(推奨)
uv は高速な Python パッケージインストーラー兼リゾルバーです。
まだインストールされていない場合は、uv をインストールします:
pip install uv仮想環境を作成して有効化します:
uv venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate依存関係をインストールします:
uv pip install -e .プロジェクトを実行します
uv run main.pyオプション 2: uv を使用しないセットアップ
仮想環境を作成して有効化します:
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate依存関係をインストールします:
pip install anthropic python-dotenv prompt-toolkit "mcp[cli]==1.8.0"プロジェクトを実行します
python main.py使い方
基本的な対話
メッセージを入力して Enter キーを押すだけで、モデルとチャットできます。
ドキュメントの取得
@ 記号の後にドキュメント ID を続けると、クエリにドキュメントの内容を含めることができます:
> Tell me about @deposition.mdコマンド
/ プレフィックスを使用して、MCP サーバーで定義されたコマンドを実行します:
> /summarize deposition.mdコマンドは Tab キーを押すと自動補完されます。
開発
新しいドキュメントの追加
mcp_server.py ファイルを編集して、docs 辞書に新しいドキュメントを追加します。
MCP 機能の実装
MCP 機能を完全に実装するには:
mcp_server.pyの TODO を完了しますmcp_client.pyに不足している機能を実装します
リンターと型チェック
リンターや型チェックは実装されていません。
Maintenance
Related MCP Connectors
Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
- QuallaaOAuthcom.quallaa
Talk to your public-facing AI from any MCP client — Claude, ChatGPT, Cursor, Cline, Windsurf.
MCP server for AI dialogue using various LLM models via AceDataCloud
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA command-line interface application for interactive chat with AI models via the Anthropic API. It supports document retrieval, command-based prompts, and extensible tool integrations through the MCP architecture.-
- FlicenseAqualityDmaintenanceA command-line interface application enabling interactive chat with AI models via the Anthropic API. It supports document retrieval, command-based prompts, and extensible tool integrations through the MCP architecture.2-
- FlicenseNot gradedqualityDmaintenanceA command-line interface application that enables interactive chat with AI models via the Anthropic API, supporting document retrieval and command-based prompts through the MCP architecture.-
- FlicenseNot gradedqualityDmaintenanceA CLI chat application enabling interactive conversations with AI models via the Anthropic API, with document retrieval and command-based prompt support through the MCP architecture.-