mcp-turboquant
Allows for the quantization of HuggingFace models into the GGUF format, making them compatible for local execution and deployment within the Ollama runtime.
mcp-turboquant
Self-contained Python MCP server for LLM quantization. Compress any HuggingFace model to GGUF, GPTQ, or AWQ format in a single tool call.
No external CLI required -- all quantization logic is embedded.
Install
pip install mcp-turboquantOr run directly with uvx:
uvx mcp-turboquantOptional backends
The info, check, and recommend tools work out of the box. For actual quantization, install the backend you need:
# GGUF (Ollama, llama.cpp, LM Studio)
pip install mcp-turboquant[gguf]
# GPTQ (vLLM, TGI)
pip install mcp-turboquant[gptq]
# AWQ (vLLM, TGI)
pip install mcp-turboquant[awq]
# Everything
pip install mcp-turboquant[all]Related MCP server: TurboQuant Tools
Configure
Claude Code
Add to ~/.claude/settings.json:
{
"mcpServers": {
"turboquant": {
"command": "mcp-turboquant"
}
}
}Or with uvx (no install needed):
{
"mcpServers": {
"turboquant": {
"command": "uvx",
"args": ["mcp-turboquant"]
}
}
}Claude Desktop
Add to claude_desktop_config.json:
{
"mcpServers": {
"turboquant": {
"command": "uvx",
"args": ["mcp-turboquant"]
}
}
}Tools
Tool | Description | Heavy deps? |
| Get model info from HuggingFace (params, size, architecture) | No |
| Check available quantization backends on the system | No |
| Hardware-aware recommendation for best format + bits | No |
| Quantize a model to GGUF/GPTQ/AWQ | Yes |
| Run perplexity evaluation on a quantized model | Yes |
| Push quantized model to HuggingFace Hub | No |
Examples
Once configured, ask Claude:
"Get info on meta-llama/Llama-3.1-8B-Instruct"
"What quantization format should I use for Mistral-7B on my machine?"
"Quantize meta-llama/Llama-3.1-8B to 4-bit GGUF"
"Check which quantization backends I have installed"
"Evaluate the perplexity of my quantized model at /path/to/model.gguf"
"Push my quantized model to myuser/model-GGUF on HuggingFace"
How it works
Claude / Agent <--> MCP Protocol (stdio) <--> mcp-turboquant (Python) <--> llama-cpp-python / auto-gptq / autoawqAll quantization logic runs in-process. No external CLI tools needed.
Run directly
# As a command
mcp-turboquant
# As a module
python -m mcp_turboquantLicense
MIT
Available Tools
6 toolscheckA
Check available quantization backends on this system.
Reports which quantization engines (GGUF/GPTQ/AWQ) are installed, whether PyTorch and transformers are available, GPU information (CUDA or Apple MPS), and system RAM.
No arguments required. Lightweight system check.
Returns: Dictionary of available backends and hardware info.
Inputs: no named parameters. Returns: object
evaluateA
Run perplexity evaluation on a quantized model.
Measures model quality after quantization using perplexity scoring. Lower perplexity = better quality. Includes a quality assessment (EXCELLENT/GOOD/FAIR/DEGRADED/POOR).
Args: model_path: Path to the quantized model file (GGUF) or directory (GPTQ/AWQ). format: Format of the quantized model. One of 'gguf', 'gptq', 'awq'. bits: Bit width used during quantization (for quality context).
Returns: Perplexity score, quality assessment, and evaluation metadata.
Inputs: model_path (required), format, bits. Returns: object
infoA
Get model info from HuggingFace — parameters, size, architecture.
Lightweight call using the HuggingFace API. No GPU or heavy dependencies required.
Args: model: HuggingFace model ID (e.g. 'meta-llama/Llama-3.1-8B-Instruct') or local path to a model directory.
Returns: Model metadata including architecture, parameter count, size, hidden dimensions, number of layers, vocabulary size, and context length.
Inputs: model (required). Returns: object
pushA
Push a quantized model to HuggingFace Hub.
Uploads all model files from the output directory to a HuggingFace repository. Generates a model card (README.md) with metadata. Requires HuggingFace authentication (huggingface-cli login or HF_TOKEN).
Args: repo_id: HuggingFace repository ID (e.g. 'username/model-GGUF-4bit'). model_dir: Local directory containing the quantized model files. model: Original model ID for the model card (optional). bits: Bit width used during quantization (for model card metadata).
Returns: Upload result with repository URL and file count.
Inputs: repo_id (required), model_dir (required), model, bits. Returns: object
quantizeA
Quantize a HuggingFace model to GGUF, GPTQ, or AWQ format.
This is a heavy operation that downloads and compresses the model. Requires appropriate backend dependencies to be installed.
Args: model: HuggingFace model ID (e.g. 'meta-llama/Llama-3.1-8B-Instruct') or local path to a model directory. format: Output format — gguf, gptq, or awq. Default: gguf. bits: Quantization bit width — 2, 3, 4, 5, or 8. Default: 4. output_dir: Directory to write output files. Default: temp directory. target: Deployment target. ollama/llamacpp/lmstudio force GGUF, vllm forces AWQ.
Returns: Quantization result with file paths, sizes, and compression ratios.
Inputs: model (required), format, bits, output_dir, +1 more. Returns: object
recommendA
Recommend best quantization format and bit width for a model.
Analyzes the model size and your hardware (GPU VRAM, Apple Silicon, system RAM) to suggest the optimal format (GGUF/GPTQ/AWQ) and bit width (2-8). Ranked recommendations with use-case explanations.
Args: model: HuggingFace model ID (e.g. 'meta-llama/Llama-3.1-8B-Instruct') or local path to a model directory.
Returns: Ranked recommendations with format, bits, reasoning, and use cases.
Inputs: model (required). Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool targets a distinct action in the quantization workflow: system check, model info, recommendation, quantization, evaluation, and upload. No overlap or ambiguity.
All tools use single imperative verbs (check, evaluate, info, push, quantize, recommend). 'Info' is a noun rather than verb, but the pattern is otherwise consistent and clear.
6 tools cover the entire quantization lifecycle without bloat or missing essentials. Each tool earns its place for a focused server purpose.
Covers system check, model info, recommendation, quantization, evaluation, and upload. Minor gap: no tool to list previously quantized models locally, but core workflow is complete.
Maintenance
Related MCP Connectors
MCP server for progressive tool usage at any scale (see https://klavis.ai)
QuLab MCP remote server (Streamable HTTP) for computational science and lab tools.
LLM cost optimization gateway, repo token-waste auditor & model arbitrage MCP server.
Related MCP Servers
AlicenseAqualityBmaintenanceUnified MCP server for managing local model runtimes (Ollama, LM Studio, etc.), enabling provider-agnostic discovery, lifecycle management, hardware-fit checks, and delegated inference.22118 npmCreative Commons Attribution Non Commercial No Derivatives 4.0 International- AlicenseNot gradedqualityCmaintenanceMCP server for compressing AI embeddings by 5-7x using TurboQuant (PolarQuant + QJL), with tools to compress, decompress, estimate savings, and embed+compress vectors.MIT
- AlicenseNot gradedqualityDmaintenanceConfigurable MCP server that lets you define LLM-powered tools via JSON, enabling easy integration of multiple models (GPT, Gemini, Claude, etc.) as MCP tools without writing Python code.6MIT
- AlicenseBqualityDmaintenanceLocal MCP server for token optimization, providing tools to compress code/JSON, optimize prompts, and manage placeholder-based content redaction and hydration to reduce LLM token usage.5ISC