Sign inSign up

portertech/lm-studio-mcp-server

By portertech

•Updated 8 months ago

Image
1

680

portertech/lm-studio-mcp-server repository overview

⁠LM Studio MCP Server

An MCP (Model Context Protocol) server that provides AI assistants with control over LM Studio models. Enables remote model management including listing, loading, and unloading models through the LM Studio API.

⁠Features

  • Health Check - Verify connectivity to LM Studio
  • List Models - View downloaded and loaded models
  • Load/Unload Models - Manage models in memory with configurable parameters
  • Get Model Info - Retrieve detailed information about loaded models

⁠Quick Start

# Pull the image
docker pull portertech/lm-studio-mcp-server:latest

# Run (connects to LM Studio on host machine)
docker run -i --rm portertech/lm-studio-mcp-server:latest

# Run with custom LM Studio host
docker run -i --rm \
  -e LMSTUDIO_HOST=192.168.1.100 \
  -e LMSTUDIO_PORT=1234 \
  portertech/lm-studio-mcp-server:latest

⁠Environment Variables

VariableDefaultDescription
LMSTUDIO_BASE_URLws://127.0.0.1:1234Full WebSocket URL for LM Studio
LMSTUDIO_HOST127.0.0.1LM Studio host (used if BASE_URL not set)
LMSTUDIO_PORT1234LM Studio port (used if BASE_URL not set)

⁠Claude Desktop Configuration

{
  "mcpServers": {
    "lmstudio": {
      "command": "docker",
      "args": [
        "run", "-i", "--rm",
        "-e", "LMSTUDIO_HOST=host.docker.internal",
        "-e", "LMSTUDIO_PORT=1234",
        "portertech/lm-studio-mcp-server:latest"
      ]
    }
  }
}

Note: Use LMSTUDIO_HOST=host.docker.internal on macOS/Windows to connect to LM Studio running on the host machine.

⁠Available Tools

ToolDescription
health_checkCheck connectivity to LM Studio
list_modelsList all downloaded models
list_loaded_modelsList models currently in memory
load_modelLoad a model with optional parameters
unload_modelRemove a model from memory
get_model_infoGet details about a loaded model

⁠Prerequisites

  • LM Studio running with the local server enabled

⁠License

ISC

Tag summary

Content type

Image

Digest

sha256:cb92b2dad…

Size

62 MB

Last updated

8 months ago

docker pull portertech/lm-studio-mcp-server