MCP.so
ログイン

LLM Wrapper MCP Server

@matdev83

LLM Wrapper MCP Server について

Allow any MCP-capable LLM agent to communicate with or delegate tasks to any other LLM available through the OpenRouter.ai API.

基本情報

カテゴリ

AI とエージェント

ライセンス

MIT

ランタイム

python

トランスポート

stdio

公開者

matdev83

設定

以下の設定を使って、このサーバーを MCP 対応クライアントに追加してください。

{
  "mcpServers": {
    "llm-wrapper-mcp-server": {
      "command": "python",
      "args": [
        "-m",
        "venv",
        ".venv"
      ]
    }
  }
}

ツール

ツールは検出されませんでした

ツールは README から自動的に抽出されます。メンテナーは ## Tools という見出しの下に記載することで、このタブに反映できます。

概要

What is LLM Wrapper MCP Server?

LLM Wrapper MCP Server is a Model Context Protocol (MCP) STDIO server that allows any MCP-capable LLM agent to communicate with or delegate tasks to any other LLM available through the OpenRouter.ai API. It’s built for developers who need a standardized interface to integrate multiple LLM backends into their applications.

How to use LLM Wrapper MCP Server?

Install the package via pip install llm-wrapper-mcp-server, create a .env file with your OPENROUTER_API_KEY, then run the server with python -m llm_wrapper_mcp_server [OPTIONS] (e.g., --model your-org/your-model). The server communicates over stdin/stdout using JSON‑RPC messages and exposes an llm_call tool that accepts a prompt (required) and optionally a model override.

Key features of LLM Wrapper MCP Server

  • Implements the MCP specification for standardized LLM interactions.
  • STDIO‑based server handling LLM requests and responses.
  • Supports advanced tool calls and result processing via MCP.
  • Configurable API base URL and model (OpenRouter by default).
  • Designed for extensibility to integrate new LLM backends.
  • Integrates with llm-accounting for logging, rate limiting, and audit.

Use cases of LLM Wrapper MCP Server

  • Allow any MCP‑capable agent to delegate tasks to OpenRouter’s LLM models.
  • Monitor and audit remote LLM usage, inference costs, and query/response payloads.
  • Seamlessly swap or update LLM backends without changing agent code.
  • Run a local MCP bridge that logs all LLM calls for debugging or compliance.

FAQ from LLM Wrapper MCP Server

What does LLM Wrapper MCP Server do that a direct API call doesn’t?

It wraps the OpenRouter API into the MCP protocol, enabling any MCP‑compatible agent to use OpenRouter models through a standardized interface (stdin/stdout JSON‑RPC) and adds integrated logging/auditing via llm-accounting.

How do I configure the server?

You must set the OPENROUTER_API_KEY environment variable (in a .env file). The API base URL and model can be overridden via CLI arguments (e.g., --model or --llm-api-base-url) or environment variables.

Does the server open a network port?

No. It is an STDIO server that communicates exclusively via standard input and output; it does not open a network port for MCP communication.

What models can I use?

Any model available through OpenRouter.ai. The default model is perplexity/llama-3.1-sonar-small-128k-online, but you can specify any OpenRouter model via the --model CLI argument or per‑call in the llm_call tool’s arguments.

Is logging and auditing included?

Yes. The server integrates with llm-accounting for robust logging, rate limiting, and audit functionality, enabling monitoring of remote LLM usage, inference costs, and inspection of queries/responses.

コメント

「AI とエージェント」の他のコンテンツ