SM

sammcj/mcp-llm

Developer tools

このページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る

83 stars 14 forks 品質 58 トレンド 1MIT

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サーバーを取付けるため:

マニュアルはソースからインストールします

  1. リポジトリのクローン化

  2. 依存関係を取付けて下さい:

  3. プロジェクトのビルド:

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 description
  • generate_code_to_file: Generate code and write it directly to a file at a specific line number
  • generate_documentation: Generate documentation for code
  • ask_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

  1. Clone the repository
  2. Install dependencies:
npm install
  1. Build the project:
npm run build
  1. 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

GitHub で README 全文を見る

インストール

npx -y @smithery/cli install @sammcj/mcp-llm --client claude
MCP 初心者?mcpskill.org のガイドから始めましょう →