mcp-server-llmling

by phil65
Verified

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

Integrations

  • Integrates with Codecov for tracking code coverage statistics and reporting.

  • Supports GitHub integration for repository management, tracking issues, pulls, stars and other GitHub project metrics.

  • Integrates with PyPI for package distribution and management information.

mcp-server-llmling

ドキュメントを読んでください!

LLMling サーバーマニュアル

概要

mcp-server-llmling は、LLM アプリケーションに YAML ベースの構成システムを提供する Machine Chat Protocol (MCP) のサーバーです。

バックエンドであるLLMLing は、LLMアプリケーション用のYAMLベースの設定システムを提供します。これにより、YAMLファイルで定義されたコンテンツを提供するカスタムMCPサーバーをセットアップできます。

  • 静的宣言: YAML で LLM の環境を定義します - コードは不要です
  • MCPプロトコル:標準化されたLLMインタラクションのためのマシンチャットプロトコル(MCP)上に構築されています
  • コンポーネントタイプ:
    • リソース: コンテンツ プロバイダー (ファイル、テキスト、CLI 出力など)
    • プロンプト: 引数付きのメッセージテンプレート
    • ツール: LLM から呼び出し可能な Python 関数

YAML 構成は、LLM に以下を提供する完全な環境を作成します。

  • リソース経由のコンテンツへのアクセス
  • 一貫したインタラクションのための構造化されたプロンプト
  • 機能を拡張するためのツール

主な特徴

1. リソース管理

  • さまざまな種類のリソースを読み込んで管理します。
    • テキストファイル( PathResource
    • 生のテキストコンテンツ ( TextResource )
    • CLIコマンド出力( CLIResource
    • Python ソースコード ( SourceResource )
    • Python 呼び出し可能な結果 ( CallableResource )
    • 画像 ( ImageResource )
  • リソース監視/ホットリロードのサポート
  • リソース処理パイプライン
  • URIベースのリソースアクセス

2. ツールシステム

  • Python関数をLLMツールとして登録して実行する
  • OpenAPIベースのツールのサポート
  • エントリポイントベースのツール検出
  • ツールの検証とパラメータのチェック
  • 構造化されたツール応答

3. 迅速な管理

  • テンプレートをサポートする静的プロンプト
  • Python関数からの動的プロンプト
  • ファイルベースのプロンプト
  • プロンプト引数の検証
  • プロンプト引数の補完提案

4. 複数の交通手段

  • stdioベースの通信(デフォルト)
  • ウェブクライアント向けのサーバー送信イベント(SSE)
  • カスタムトランスポート実装のサポート

使用法

Zedエディターを使用

LLMLing をコンテキスト サーバーとして設定しますsettings.jsonに以下を追加します。

{ "context_servers": { "llmling": { "command": { "env": {}, "label": "llmling", "path": "uvx", "args": [ "mcp-server-llmling", "start", "path/to/your/config.yml" ] }, "settings": {} } } }

クロード・デスクトップ

claude_desktop_config.jsonで LLMLing を設定します。

{ "mcpServers": { "llmling": { "command": "uvx", "args": [ "mcp-server-llmling", "start", "path/to/your/config.yml" ], "env": {} } } }

手動サーバー起動

コマンドラインから直接サーバーを起動します。

# Latest version uvx mcp-server-llmling@latest

1. プログラムによる使用

from llmling import RuntimeConfig from mcp_server_llmling import LLMLingServer async def main() -> None: async with RuntimeConfig.open(config) as runtime: server = LLMLingServer(runtime, enable_injection=True) await server.start() asyncio.run(main())

2. カスタムトランスポートの使用

from llmling import RuntimeConfig from mcp_server_llmling import LLMLingServer async def main() -> None: async with RuntimeConfig.open(config) as runtime: server = LLMLingServer( config, transport="sse", transport_options={ "host": "localhost", "port": 8000, "cors_origins": ["http://localhost:3000"] } ) await server.start() asyncio.run(main())

3. リソース構成

resources: python_code: type: path path: "./src/**/*.py" watch: enabled: true patterns: - "*.py" - "!**/__pycache__/**" api_docs: type: text content: | API Documentation ================ ...

4. ツールの設定

tools: analyze_code: import_path: "mymodule.tools.analyze_code" description: "Analyze Python code structure" toolsets: api: type: openapi spec: "https://api.example.com/openapi.json" namespace: "api"

サーバー構成

サーバーは、次のセクションを含む YAML ファイルを通じて構成されます。

global_settings: timeout: 30 max_retries: 3 log_level: "INFO" requirements: [] pip_index_url: null extra_paths: [] resources: # Resource definitions... tools: # Tool definitions... toolsets: # Toolset definitions... prompts: # Prompt definitions...

MCPプロトコル

サーバーは以下をサポートする MCP プロトコルを実装します。

  1. リソース操作
    • 利用可能なリソースを一覧表示する
    • リソースコンテンツを読む
    • リソースの変更に注意する
  2. ツール操作
    • 利用可能なツールの一覧
    • パラメータ付きツールを実行する
    • ツールスキーマを取得する
  3. 迅速な操作
    • 利用可能なプロンプトを一覧表示する
    • フォーマットされたプロンプトを取得する
    • プロンプト引数の補完を取得する
  4. 通知
    • リソースの変更
    • ツール/プロンプトリストの更新
    • 進捗状況の更新
    • ログメッセージ
-
security - not tested
A
license - permissive license
-
quality - not tested

LLM アプリケーションに YAML ベースの構成システムを提供する Machine Chat Protocol (MCP) のサーバー。これにより、ユーザーはコードを記述せずにリソース、ツール、プロンプトを定義できます。

  1. LLMling Server Manual
    1. Overview
    2. Key Features
    3. Usage
    4. Server Configuration
    5. MCP Protocol

Appeared in Searches

ID: 2mdjbbuzee