
sammcj/mcp-llm
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
sammcj/mcp-llm は [https://github.com/sammcj/mcp-llm.] からインポートされた MCP サーバー候補です
概要
sammcj/mcp-llm は [https://github.com/sammcj/mcp-llm.] からインポートされた MCP サーバー候補です
概要(AI 翻訳)
LlamaIndexTS ライブラリを使用して LLM へのアクセスを提供する MCP サーバー。
##特徴
MCP サーバーでは、以下のツールを提供しています。
- [
generate_documentation: コードのドキュメントを生成する
インストール
##Smitheryでインストールする
Smitheryによって自動的にClaudeデスクトップのためのLMサーバーを取付けるため:
マニュアルはソースからインストールします
-
リポジトリのクローン化
-
依存関係を取付けて下さい:
-
プロジェクトのビルド:
4。 MCP設定を更新する
サンプルスクリプトを使用する
リポジトリには、プログラム的にMCPサーバーを使用する方法を示す例のスクリプトが含まれています。
このスクリプトは、MCP サーバーを起動し、curl コマンドを使用してリクエストを送信します。
例
生成コード
ファイルのコードを生成する
generate_code_to_file ツールは、相対パスと絶対ファイルパスの両方をサポートしています。 相対パスを指定すると、MCP サーバーの現在の作業ディレクトリに相対的に解決されます。
ドキュメントの生成
###質問
ライセンス
このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。
README
MCP LLM
An MCP server that provides access to LLMs using the LlamaIndexTS library.
Features
This MCP server provides the following tools:
generate_code: Generate code based on a descriptiongenerate_code_to_file: Generate code and write it directly to a file at a specific line numbergenerate_documentation: Generate documentation for codeask_question: Ask a question to the LLM
Installation
Installing via Smithery
To install LLM Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @sammcj/mcp-llm --client claude
Manual Install From Source
- Clone the repository
- Install dependencies:
npm install
- Build the project:
npm run build
- Update your MCP configuration
Using the Example Script
The repository includes an example script that demonstrates how to use the MCP server programmatically:
node examples/use-mcp-server.js
This script starts the MCP server and sends requests to it using curl commands.
Examples
Generate Code
{
"description": "Create a function that calculates the factorial of a number",
"language": "JavaScript"
}
Generate Code to File
{
"description": "Create a function that calculates the factorial of a number",
"language": "JavaScript",
"filePath": "/path/to/factorial.js",
"lineNumber": 10,
"replaceLines": 0
}
The generate_code_to_file tool supports both relative and absolute file paths. If a relative path is provided, it will be resolved relative to the current working directory of the MCP server.
Generate Documentation
{
"code": "function factorial(n) {\n if (n <= 1) return 1;\n return n * factorial(n - 1);\n}",
"language": "JavaScript",
"format": "JSDoc"
}
Ask Question
{
"question": "What is the difference between var, let, and const in JavaScript?",
"context": "I'm a beginner learning JavaScript and confused about variable declarations."
}
License
インストール
npx -y @smithery/cli install @sammcj/mcp-llm --client claude