Back to Home
abhinema icon

LEANN-MCP-Setup

Verified Safe

by abhinema

Overview

A multimodal RAG system for semantic search across documents and images with incremental indexing and cross-platform deployment.

Installation

Run Command
python macos/inference/leann_mcp_server.py

Environment Variables

  • CUDA_VISIBLE_DEVICES
  • PYTORCH_CUDA_ALLOC_CONF
  • TRANSFORMERS_CACHE
  • HF_HOME
  • FORCE_FP16
  • OMP_NUM_THREADS
  • MKL_NUM_THREADS
  • PYTORCH_ENABLE_MPS_FALLBACK
  • FORCE_FLOAT32
  • LEANN_USE_FAKE_EMBEDDINGS
  • LEANN_INDEX_DIR
  • LEANN_PLATFORM
  • LEANN_MODE

Security Notes

The system utilizes subprocess calls for hardware detection and index transfer (rsync/scp/aws s3), which are controlled by the system's internal scripts and not directly exposed to untrusted user input via the API. Database interactions with SQLite (`chunk_store.py`) use parameterized queries, mitigating SQL injection. The FastAPI server (`leann_mcp_server.py`) listens on `0.0.0.0:8000` by default, which is common for development but requires network security (firewall, authentication) for production. The vision search endpoint handles file uploads, but its current implementation is a placeholder, so no actual content processing yet; future implementation will require robust validation (MIME type, size) to prevent vulnerabilities. The `config.yaml` explicitly notes the need for an API key authentication layer before production, showing awareness of security concerns.

Similar Servers

Stats

Interest Score0
Security Score7
Cost ClassLow
Avg Tokens30
Stars0
Forks0
Last Update2025-11-28

Tags

Multimodal RAGVector SearchIncremental IndexingFastAPIPrometheusCross-platform