Llama Hot Swap

by oussama-kh

237 downloads
Not rated
GitHub

About

MCP server for hot-swapping llama.cpp models in Claude Code - launchctl (macOS) + systemd (Linux)

Details

Author
oussama-kh
Downloads
237
Categories
Developer Tools, AI, Other

- Hot-swap llama.cpp models without context loss
- Supports macOS (launchctl) and Linux (systemd)
- Mapped mode and directory mode for model discovery
- Create new model service configs from within Claude Code
- Works with any llama.cpp‑compatible model (GGUF)

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name Llama Hot Swap
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Install with pip install mcp-llama-swap or run directly with uvx mcp-llama-swap. Configure the MCP server in ~/.claude.json with the LLAMA_SWAP_CONFIG environment variable pointing to a config.json that maps model aliases to service files. Then inside Claude Code use commands like “list models” and “swap to planner” or “swap to coder”.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "llama hot swap": {
            "mcp-llama-swap": {
                "command": "uvx",
                "args": [
                    "mcp-llama-swap"
                ]
            }
        }
    }
}

McpServers

{
    "mcp-llama-swap": {
        "command": "uvx",
        "args": [
            "mcp-llama-swap"
        ]
    }
}

mcp-llama-swap

PyPI version
License
Python 3.10+

Hot-swap llama.cpp models inside a running Claude Code session. No context loss. One command.

> Plan with a reasoning model. Implement with a coding model. Same session, same context, zero manual overhead.

Supports macOS (launchctl) and Linux (systemd).

<!-- TODO: Replace with actual recording
demo
-->

Why

Running local LLMs means choosing between a strong reasoning model and a fast coding model. You can't load both on a single machine. Manually swapping models kills your conversation context and flow.

mcp-llama-swap solves this by giving Claude Code a tool to swap the model behind llama-server via your system's service manager (launchctl on macOS, systemd on Linux), while preserving the full conversation history client-side.

Quick Start

Install

```bash

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.