mcp-llm

remote-capable server

The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.

Integrations

  • Allows access to LLMs hosted through Ollama via the LLM_MODEL_PROVIDER environment variable

  • Allows access to OpenAI models via the LLM_MODEL_PROVIDER environment variable and OPENAI_API_KEY

MCP LLM

LlamaIndexTS ライブラリを使用して LLM へのアクセスを提供する MCP サーバー。

特徴

この MCP サーバーは次のツールを提供します。

  • generate_code : 説明に基づいてコードを生成する
  • generate_code_to_file : コードを生成し、特定の行番号でファイルに直接書き込みます。
  • generate_documentation : コードのドキュメントを生成する
  • ask_question : LLMに質問する

インストール

Smithery経由でインストール

Smithery経由で Claude Desktop 用の LLM サーバーを自動的にインストールするには:

npx -y @smithery/cli install @sammcj/mcp-llm --client claude

ソースからの手動インストール

  1. リポジトリをクローンする
  2. 依存関係をインストールします:
npm install
  1. プロジェクトをビルドします。
npm run build
  1. MCP構成を更新する

サンプルスクリプトの使用

リポジトリには、MCP サーバーをプログラムで使用する方法を示すサンプル スクリプトが含まれています。

node examples/use-mcp-server.js

このスクリプトは MCP サーバーを起動し、curl コマンドを使用してサーバーにリクエストを送信します。

コードを生成する

{ "description": "Create a function that calculates the factorial of a number", "language": "JavaScript" }

ファイルにコードを生成

{ "description": "Create a function that calculates the factorial of a number", "language": "JavaScript", "filePath": "/path/to/factorial.js", "lineNumber": 10, "replaceLines": 0 }

generate_code_to_fileツールは、相対パスと絶対パスの両方をサポートします。相対パスを指定した場合、MCP サーバーの現在の作業ディレクトリを基準として解決されます。

ドキュメントを生成する

{ "code": "function factorial(n) {\n if (n <= 1) return 1;\n return n * factorial(n - 1);\n}", "language": "JavaScript", "format": "JSDoc" }

質問する

{ "question": "What is the difference between var, let, and const in JavaScript?", "context": "I'm a beginner learning JavaScript and confused about variable declarations." }

ライセンス

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

LLM に他の LLM へのアクセスを提供する MCP サーバー

  1. Features
    1. Installation
      1. Installing via Smithery
      2. Manual Install From Source
      3. Using the Example Script
    2. Examples
      1. Generate Code
      2. Generate Code to File
      3. Generate Documentation
      4. Ask Question
    3. License
      ID: i1gantlfrs