Skip to main content
Glama
mcp-server-lmstudio

mcp-server-lmstudio

by ibukichi-jp

mcp-server-lmstudio

LM Studio (ローカル LLM) を Model Context Protocol (MCP) 経由で呼び出すためのブリッジサーバーです。

Antigravity IDE、Claude Desktop、Cursor などの MCP 対応クライアントから、完全ローカルで動作する LM Studio のモデル(Qwen、Llama、DeepSeek 等)をツールとして利用できます。


主な特徴

  • 🚀 WSL2 自動対応: WSL2 と Windows ホスト間の仮想ネットワーク IP を自動検出し、通信エラーを防止します。

  • 🔄 モデル自動追従: LM Studio で現在ロードされているモデルを自動判別するため、モデルを変更しても設定の書き換えは不要です。

  • 🛡️ 安全・軽量: 秘密情報や API キーの管理は不要。完全ローカル環境で通信します。


Related MCP server: LM Studio MCP Bridge

提供するツール (Tools)

  1. ask_local_llm

    • ローカル LLM にプロンプトや質問を送信し、回答を取得します。

    • 引数: prompt (必須), system_prompt (任意), temperature (任意)

  2. list_local_models

    • LM Studio で現在ロード中・利用可能なモデル一覧を取得します。

  3. check_lm_studio_status

    • LM Studio の Local Server が起動・接続可能か確認します。


必要要件

  • Node.js: v18.0.0 以上

  • LM Studio: 最新版


インストール & セットアップ

1. リポジトリのクローンと依存関係のインストール

git clone https://github.com/ibukichi-jp/mcp-server-lmstudio.git
cd mcp-server-lmstudio
npm install

2. LM Studio 側の設定

  1. LM Studio を起動し、使用したいモデルをロードします。

  2. 左サイドバーの 「<-> (Developer / Local Server)」 を開きます。

  3. Serve on local network (0.0.0.0) または Enable CORS を有効にします。

  4. Start Server(ポート 1234)をクリックしてサーバーを起動します。

3. MCP クライアントへの登録

■ Antigravity IDE の場合

~/.gemini/config/mcp_config.json の mcpServers に追加します:

{
  "mcpServers": {
    "lm-studio": {
      "command": "node",
      "args": [
        "/path/to/mcp-server-lmstudio/index.mjs"
      ]
    }
  }
}

■ Claude Desktop の場合

claude_desktop_config.json に追加します:

{
  "mcpServers": {
    "lm-studio": {
      "command": "node",
      "args": [
        "/path/to/mcp-server-lmstudio/index.mjs"
      ]
    }
  }
}

ライセンス

MIT License

Available Tools

3 tools
ask_local_llmC

Send a prompt or coding question to the local LLM running in LM Studio.

Inputs: prompt (required), model, temperature, system_prompt.

check_lm_studio_statusB

Check if LM Studio local server is currently running and accessible.

Inputs: no named parameters.

list_local_modelsA

List currently loaded and available models in LM Studio.

Inputs: no named parameters.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.6/5.0

    Scored across 3 tools

    Disambiguation5/5

    Each tool targets a clearly distinct function: listing models, asking the LLM, and checking server status. There is no overlap or ambiguity between them.

    Naming Consistency5/5

    All names use snake_case with a consistent verb-first pattern (list_, ask_, check_). The minor variation in object wording reflects their distinct targets rather than inconsistent convention.

    Tool Count5/5

    Three tools are well-scoped for the narrow purpose of interacting with a local LM Studio server. Each tool earns its place and no tool feels redundant or missing at this scale.

    Completeness4/5

    Core operations for checking status, listing models, and querying the LLM are covered. Minor gaps exist, such as model load/unload or generation parameter control, but these are not essential for basic use.

    Maintenance

    ActivityNo data
    ResponsivenessSyncing

    Related MCP Connectors

    Related MCP Servers