1. Conduid
  2. AI
  3. Local LLM MCP
MCP server · AI

Local LLM MCP

本地模型管家 MCP:管理 GGUF 模型与 llama-server —— 模型台账 / 显存估算 / 服务生命周期 / chat 代理(FastMCP)

34Low

Scored 21 days ago · breakdown

About Local LLM MCP

Local LLM MCP is an MCP server in the AI category: 本地模型管家 MCP:管理 GGUF 模型与 llama-server —— 模型台账 / 显存估算 / 服务生命周期 / chat 代理(FastMCP).

Install

From source
git clone https://github.com/sandraschi/local-llm-mcp

This server has no ConduID identity, so agent calls to it are not receipted. Pin the version you install and review the source before granting it credentials.

Tools (13)

llm_engine`status`, `start`, `stop`, `list_models`, `load_model`, `unload_model`

Parameters not published.

llm_finetuning`lora_load_adapter`, `lora_unload_adapter`, `lora_list_adapters`

Parameters not published.

llm_generation`generate_text`, `chat_completion`, `embed_text`, `stream_generate`

Parameters not published.

llm_google_cloud`generate_text`, `list_models`, `generate_content`, `embed_text`

Parameters not published.

llm_gpu`get_status`, `clear_memory`, `optimize`, `get_health`

Parameters not published.

llm_health`health_check`, `provider_check`, `shutdown`, `system_info`, `service_status`, `get_metrics`, `set_log_level`, `collect_metrics`, `list_tools`, `tool_help`, `search_tools`

Parameters not published.

llm_help`list_tools`, `get_tool_help`, `search_tools`, `get_tool_signature`

Parameters not published.

llm_huggingface`list_models`, `search_models`, `download_model`, `get_model_details`, `list_datasets`

Parameters not published.

llm_lmstudio`list_models`, `load_model`, `unload_model`, `eject_model`, `link_status`

Parameters not published.

llm_models`list_models`, `get_model_info`, `register_model`, `unregister_model`, `update_model`, `get_model_stats`

Parameters not published.

Show all 13 tools
llm_multimodal`analyze_image`, `generate_image`, `compare_images`

Parameters not published.

llm_ollama`list_models`, `pull_model`, `delete_model`, `load_model`, `unload_model`

Parameters not published.

llm_vllm`list_models`, `get_server_status`, `start_server`, `stop_server`, `get_config`, `update_config`

Parameters not published.

Ask AI

✦

Ask AI about Local LLM MCP

Powered by Claude · Grounded in docs

I know everything about Local LLM MCP. Ask me about installation, configuration, usage, or troubleshooting.

Security checks

  • ✓README presentThe repository ships documentation.

5 checks have not been run yet.

README

🚀 Local-LLM-MCP - FIXED & MODERNIZED

High-performance local LLM server with FastMCP 2.12+ and vLLM 1.0+ integration

FastMCP vLLM Python

🔥 What's New - CRITICAL FIXES APPLIED

✅ FIXED ISSUES (September 2025)

  • FastMCP 2.12+ Integration: Fixed broken server startup with proper transport handling
  • vLLM 1.0+ Support: Updated from ancient v0.2.0 to modern v1.0+ with 19x performance boost
  • Dependency Hell Resolved: Fixed pydantic version conflicts and outdated requirements
  • Structured Logging: Added JSON logging with rotation for production use
  • Error Isolation: Tool registration with error recovery prevents startup crashes
  • Configuration System: Complete YAML config with environment variable overrides

🚀 PERFORMANCE IMPROVEMENTS

  • vLLM V1 Engine: 19x faster than Ollama (793 TPS vs 41 TPS)
  • FlashAttention 3: Automatic optimization with FLASHINFER backend
  • Prefix Caching: Zero-overhead context reuse
  • Multimodal Ready: Vision model support for image analysis
  • Structured Output: JSON schema validation for reliable API responses

📦 Quick Start

Prerequisites

  • Python 3.10+
  • CUDA-capable GPU (recommended) or CPU fallback
  • 8GB+ RAM (16GB+ recommended for larger models)

Installation

# Clone the repository
git clone https://github.com/sandraschi/local-llm-mcp.git
cd local-llm-mcp

# Install dependencies (FIXED versions)
pip install -r requirements.txt

# Or install with development dependencies
pip install -e ".[dev]"

Basic Usage

# Start the MCP server
python -m llm_mcp.main

# Or use the CLI entry point
llm-mcp

Configuration

Create config.yaml in the project root:

server:
  name: "My Local LLM Server"
  log_level: "INFO"
  port: 8000

model:
  default_provider: "vllm"
  default_model: "microsoft/Phi-3.5-mini-instruct"
  model_cache_dir: "models"

vllm:
  use_v1_engine: true
  gpu_memory_utilization: 0.9
  tensor_parallel_size: 1
  enable_vision: true
  attention_backend: "FLASHINFER"
  enable_prefix_caching: true

Environment Variables

# vLLM 1.0+ optimization
export VLLM_USE_V1=1
export VLLM_ATTENTION_BACKEND=FLASHINFER
export VLLM_ENABLE_PREFIX_CACHING=1

# Server configuration
export LLM_MCP_DEFAULT_PROVIDER=vllm
export LLM_MCP_LOG_LEVEL=INFO

🛠️ Available Tools

Core Tools (Always Available)

  • Health Check: Server status and performance metrics
  • System Info: Hardware compatibility and resource usage
  • Model Management: Load/unload models with automatic optimization

vLLM 1.0+ Tools (High Performance)

  • Load Model: Initialize with V1 engine and FlashAttention 3
  • Text Generation: 19x faster inference with streaming support
  • Structured Output: JSON generation with schema validation
  • Performance Stats: Real-time throughput and usage metrics
  • Multimodal: Vision model support (experimental)

Training & Fine-tuning Tools

  • LoRA Training: Parameter-efficient fine-tuning
  • QLoRA: Quantized LoRA for memory efficiency
  • DoRA: Weight-decomposed low-rank adaptation
  • Unsloth: Ultra-fast fine-tuning optimization

Advanced Tools (Dependency-based)

  • Gradio Interface: Web UI for model interaction
  • Multimodal: Image and text processing
  • Monitoring: Resource usage and performance tracking

🚀 Performance Comparison

Provider Tokens/Second Memory Usage Setup Complexity Multimodal
vLLM 1.0+ (This) 793 TPS Optimized Simple ✅ Vision
Ollama 41 TPS High Very Simple ❌
LM Studio ~60 TPS Medium GUI-based Limited
OpenAI API ~100 TPS N/A (Cloud) API Key ✅ Full

19x faster than Ollama with local inference and no API costs!

🔧 Architecture

Provider System

┌─────────────────┐    ┌──────────────────┐    ┌─────────────────┐
│   MCP Client    │◄──►│   FastMCP 2.12+  │◄──►│  Tool Registry  │
│   (Claude etc)  │    │     Server        │    │  (Error Safe)   │
└─────────────────┘    └──────────────────┘    └─────────────────┘
                                │
                                ▼
                        ┌──────────────────┐
                        │  Provider Layer   │
                        └─────────┬────────┘
                                  │
        ┌─────────────────────────┼─────────────────────────┐
        │                         │                         │
        ▼                         ▼                         ▼
┌──────────────┐         ┌──────────────┐         ┌──────────────┐
│  vLLM 1.0+   │         │    Ollama     │         │   OpenAI     │
│ (793 TPS)    │         │  (41 TPS)     │         │   (Cloud)    │
│ FlashAtt 3   │         │   Simple      │         │  Full API    │
│ Multimodal   │         │   Local       │         │   Support    │
└──────────────┘         └──────────────┘         └──────────────┘

Key Components

  • FastMCP 2.12+: Modern MCP server with transport handling
  • vLLM V1 Engine: High-performance inference with FlashAttention 3
  • State Manager: Persistent sessions with cleanup and monitoring
  • Configuration: YAML + environment variables with validation
  • Error Isolation: Tool registration with recovery mechanisms

🧪 Development

Running Tests

# Install test dependencies
pip install -e ".[dev]"

# Run tests
pytest tests/

# Run with coverage
pytest --cov=llm_mcp tests/

Code Quality

# Format code
black src/ tests/
ruff check src/ tests/ --fix

# Type checking
mypy src/

Adding New Tools

  1. Create src/llm_mcp/tools/my_new_tools.py
  2. Implement register_my_new_tools(mcp) function
  3. Add to tools/__init__.py advanced_tools list
  4. Handle dependencies and error cases

🐛 Troubleshooting

Common Issues

Server won't start

# Check dependencies
python -c "from llm_mcp.tools import check_dependencies; print(check_dependencies())"

# Verify FastMCP version
pip show fastmcp  # Should be 2.12+

vLLM fails to load

# Check CUDA availability
python -c "import torch; print(torch.cuda.is_available())"

# Install CUDA-compatible PyTorch
pip install torch torchvision --index-url https://download.pytorch.org/whl/cu124

Memory issues

# Reduce GPU memory utilization in config.yaml
vllm:
  gpu_memory_utilization: 0.7  # Reduce from 0.9
  
# Or use CPU mode
export CUDA_VISIBLE_DEVICES=""

Debug Logging

# Enable debug logging
export LLM_MCP_LOG_LEVEL=DEBUG

# Check log files
tail -f logs/llm_mcp.log

📈 Monitoring

Performance Metrics

  • Tokens/second: Real-time throughput measurement
  • Memory usage: GPU/CPU memory tracking
  • Request latency: P50/P95/P99 latency metrics
  • Model utilization: Usage statistics per model

Health Checks

# Built-in health check tool
curl -X POST "http://localhost:8000" \
  -H "Content-Type: application/json" \
  -d '{"tool": "health_check"}'

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make changes with tests
  4. Ensure code quality (black, ruff, mypy)
  5. Submit pull request

📄 License

MIT License - see LICENSE file.

🙏 Acknowledgments

  • FastMCP: Modern MCP server framework
  • vLLM: High-performance LLM inference
  • Anthropic: MCP protocol specification
  • HuggingFace: Transformers and model ecosystem

Built for performance, reliability, and developer experience 🚀

This is a FIXED version (September 2025) that resolves all critical startup issues and modernizes the codebase for production use.

README copy captured when this server was indexed; it may lag the repository. The original is authoritative.

Questions

About Local LLM MCP

How do I install Local LLM MCP?

No package has been published for this server, so install it from source: clone the repository and follow its README.

Is Local LLM MCP safe to use with an AI agent?

Its trust score is 34 out of 100 (low). It passes 1 of the 1 static security checks run so far. It has no ConduID identity yet, so agent calls to it are not receipted.

Is Local LLM MCP still maintained?

Conduid hasn't recorded a commit date for this repository yet. Check the repository directly for recent activity.