Back to Home
jeremylem icon

mcp_server4j

Verified Safe

by jeremylem

Overview

Provides a local Java-based knowledge base for Retrieval-Augmented Generation (RAG), supporting hybrid keyword and vector search over multi-format documents via the Model Context Protocol (MCP).

Installation

Run Command
sh start_mcp.sh

Environment Variables

  • CHROMA_HOST
  • CHROMA_PORT
  • CHROMA_COLLECTION
  • SERVER_PORT
  • RETRIEVAL_BM25_WEIGHT
  • RETRIEVAL_VECTOR_WEIGHT
  • RETRIEVAL_CANDIDATE_POOL_SIZE
  • SPRING_PROFILES_ACTIVE

Security Notes

The code uses Lucene's QueryParser.escape() to sanitize search queries, mitigating potential query injection vulnerabilities. Network and collection configurations are externalized via environment variables with sensible defaults, avoiding hardcoded secrets. No dynamic code execution (e.g., eval equivalent) or obvious malicious patterns were identified. A basic health endpoint is provided for service monitoring.

Similar Servers

Stats

Interest Score0
Security Score9
Cost ClassLow
Avg Tokens640
Stars0
Forks0
Last Update2025-12-18

Tags

Knowledge BaseRAGHybrid SearchMCP ProtocolJavaVector DatabaseBM25