LLM Chat MCP server
llm-chat-mcp
Continue.dev の config.yaml で設定された LLM モデルと対話するための MCP サーバー。
機能
エージェントが設定済みのモデルを確認し、チャットリクエストを送信できる 4 つのツールを公開します:
llm_chat_list_models— 設定内のすべてのモデルを名前と ID とともに一覧表示しますllm_chat_get_model_params— 任意のモデルのパラメータ(temperature、topP など)を確認しますllm_chat_get_model_prompt— モデルに設定されたシステムプロンプトを読み取りますllm_chat_send_request— モデルとチャットし、必要に応じてパラメータを上書きしたり、ファイルからプロンプトを読み込んだりします
インストール
pip install -e .または、インストールせずにソースから直接実行できます。
CLI の使用方法
python -m llm_chat_mcp --default-model "GLM-5.2-FP8"
python -m llm_chat_mcp --config /path/to/config.yaml --default-model "ModelName"
python -m llm_chat_mcp --help引数 | 説明 | デフォルト |
| config.yaml へのパス |
|
| send_request のデフォルトモデル | (なし) |
| リクエストのタイムアウト(秒) |
|
| 相対出力ファイルパスを解決するためのベースディレクトリ | (プロセスカレントディレクトリ) |
| レスポンスが | (OS の一時ディレクトリ) |
設定
設定はリクエストごとに再読み込みされます — 再起動は不要です
認証には config.yaml の各モデルエントリの
apiKeyを使用しますモデルが指定されていない場合(CLI でもツール呼び出しでもない場合)、エラーが設定方法を示します
llm_chat_send_request のパラメータ
メインツールです。LLM にチャット完了リクエストを送信し、レスポンスを返します。
入力パラメータ
パラメータ | 型 | デフォルト | 説明 |
| str | (CLI デフォルト) | config.yaml のモデル名または ID |
| str | (なし) | 送信するプロンプトテキスト |
| list | (なし) | ファイル仕様のリスト(文字列パスまたは |
| bool |
| 各ファイル行の先頭に |
| str | (設定から) | システムメッセージを上書きします。 |
| float | (設定から) | サンプリングパラメータ |
| int/float | (設定から) | 生成パラメータ |
| dict | (なし) | API リクエストにマージされる追加のボディプロパティ |
| bool |
| レスポンスに推論/思考コンテンツを含めます |
| float | (CLI デフォルト) | リクエストごとのタイムアウトの上書き |
| str | (なし) | 完全なレスポンスをこのファイルに書き込みます(相対パスは |
| bool |
|
|
| int |
| インラインで返されるコンテンツの最大文字数。プレビューはファイルが書き込まれる場合のみ適用されます |
| int |
|
|
レスポンス構造
常に JSON として返されます:
{
"content": "<preview, full content, or empty>",
"truncated": true,
"metadata": {
"model_name": "...",
"model": "...",
"elapsed_seconds": 1.23,
"request_sent": {...},
"response_headers": {...},
"response_chars": 1234,
"output_file": "...",
"auto_output_file": "...",
"created_dirs": [...],
"appended_line_start": 201,
"appended_line_end": 250
}
}出力戦略
ツールはパラメータとレスポンスサイズに基づいて、次の 3 つの戦略のいずれかを選択します:
明示ファイル(
output_file_path設定時): 完全なレスポンスがファイルに書き込まれます。append=trueの場合、レスポンスは追記され、appended_line_start/appended_line_end(1 始まり、両端含む)が返されるため、呼び出し元はextract_linesで追記部分のみを読み取れます。自動ファイル(
output_file_pathなし、auto_file_threshold > 0、response_chars > threshold): 完全なレスポンスが--auto-output-dir(または OS の一時ディレクトリ)に自動生成されたファイルに書き込まれます。ファイル名形式:llm_output_<YYYYMMDD_HHMMSS>_<6-char-uuid>.jsonインラインのみ(ファイル書き込みなし): 完全なコンテンツが
contentフィールドに返されます。
インラインプレビュー
ファイルが書き込まれる場合(明示または自動)、content フィールドにはレスポンスのプレビューが含まれます:
inline_preview_chars > 0かつlen(content) > inline_preview_charsの場合: 末尾に[truncated, full response in <file_path>]を付けた切り詰めプレビュー。inline_preview_chars > 0かつlen(content) <= inline_preview_charsの場合: 完全なコンテンツ(プレビューに収まる)。inline_preview_chars == 0の場合:contentは空(ファイルに完全なレスポンスが含まれる)。
ファイルが書き込まれない場合、inline_preview_chars に関係なく完全なコンテンツがインラインで返されます。これによりデータ損失を防ぎます。
Continue.dev との統合
.continue/mcpServers/llm-chat.yaml に追加:
name: LLM Chat MCP server
version: 0.2.0
schema: v1
mcpServers:
- name: LLM Chat MCP server
command: python
args:
- "-m"
- "llm_chat_mcp"
- "--default-model"
- "GLM-5.2-FP8"
- "--timeout"
- "570"
- "--relative_paths_base"
- "/path/to/your/workspace"
- "--auto-output-dir"
- "/path/to/your/workspace/.continue/skills/large-tasks/tmp-outputs"
env:
PYTHONPATH: "/path/to/llm-chat-mcp"その後、Continue.dev をリロードします。
プロジェクト構造
llm-chat-mcp/
├── pyproject.toml # Dependencies: mcp, pyyaml, httpx
├── README.md # This file
├── llm_chat_mcp/
│ ├── __init__.py
│ ├── __main__.py # CLI entry point + tool registration
│ ├── config.py # Config loading, model resolution
│ └── api.py # API client, error handling
└── tests/
└── test_output_strategies.py # Tests for append, inline_preview, auto_fileテスト
python tests/test_output_strategies.pyテストは API 呼び出しをモックし、ファイル書き込みとレスポンス組み立てロジックを検証します。output_file_path、append、inline_preview_chars、auto_file_threshold のすべての組み合わせをカバーします。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
LLM chat, text summarization and AI image generation
Operate Linux, macOS and Windows from your LLM. Every action runs through an auditable allowlist.
Gateway between LLM agents and world data through eight tools and a bundled endpoint catalog.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/nikolay-martynov/mcp-llm-chat'
If you have feedback or need assistance with the MCP directory API, please join our Discord server