MM

mjochum64/mcp-solr-search

Developer tools

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

10 stars 5 forks 품질 58 트렌드 18

MCP-Server for Apache Solr

개요

This project implements a Model Context Protocol (MCP) server that provides document search capabilities through Apache Solr. It allows Large Language Models to search and retrieve documents from Solr collections using the MCP standard. - MCP Resources for searching Solr documents - MCP Tools for advanced search and document retrieval - support for data exploration and aggregation - support to show where search terms appear in results - Asynchronous communication with Solr using httpx - Type-safe interfaces with Pydantic models - Authentication support (JWT) - Comprehensive test suite - Docker-based Solr development environment - edismax Multi-Field Search & OAuth Auto-Refresh. Includes automatic OAuth token management and improved search results. Fully compliant with MCP Spec 2025-06-18. See CHANGELOG.md for details on all changes. The Model Context Protocol (MCP) is a standardized way for applications to provide context to Large Language Models (LLMs).

README

원문 README의 일부입니다. 원문 보기.

MCP-Server for Apache Solr Document Search

This project implements a Model Context Protocol (MCP) server that provides document search capabilities through Apache Solr. It allows Large Language Models to search and retrieve documents from Solr collections using the MCP standard.

Features

  • MCP Resources for searching Solr documents
  • MCP Tools for advanced search and document retrieval
  • Faceted Search support for data exploration and aggregation
  • Highlighting support to show where search terms appear in results
  • Asynchronous communication with Solr using httpx
  • Type-safe interfaces with Pydantic models
  • Authentication support (JWT)
  • Comprehensive test suite
  • Docker-based Solr development environment

Current Version

Version 1.5.0 - edismax Multi-Field Search & OAuth Auto-Refresh. Includes automatic OAuth token management and improved search results. Fully compliant with MCP Spec 2025-06-18. See CHANGELOG.md for details on all changes.

What is MCP?

The Model Context Protocol (MCP) is a standardized way for applications to provide context to Large Language Models (LLMs). This project implements an MCP server that exposes Apache Solr’s search capabilities to LLMs, allowing them to:

  • Search for documents using simple or complex queries
  • Retrieve specific documents by ID
  • Filter, sort, and paginate search results

Requirements

  • Python 3.11+
  • Docker and Docker Compose (for the integrated Solr environment)
  • uv package manager (recommended)
  • MCP 1.21.0+ (fully compatible with 2025-06-18 specification)

Installation

  1. Install uv (if not already installed):

    pip install uv
    
  2. Install the project dependencies:

    uv install
    

    Or with pip:

    pip install -e .
    
  3. Copy the environment template and configure it:

    cp .env.example .env
    # Edit .env with your Solr connection details
    
  4. Create and activate a virtual environment (important):

    python -m venv .venv
    source .venv/bin/activate  # On Linux/macOS
    # OR
    .\.venv\Scripts\activate   # On Windows
    

    Note: Always ensure the virtual environment is activated before running the server or client tools. Many connection issues are caused by running commands outside the virtual environment.

MCP 1.21.0 Modern Features

This project uses the latest MCP 1.21.0 SDK with full support for the 2025-06-18 specification:

✅ Lifespan Context Manager: Type-safe dependency injection with AppContext dataclass ✅ Streamable HTTP Transport: Native HTTP support without external workarounds ✅ Tool Annotations: Enhanced metadata (readOnlyHint, title, description) ✅ Context-Based Logging: Direct client communication via ctx.info/debug/warning/error ✅ Modern Decorators: @app.tool() and @app.resource() patterns

Migration from MCP 1.6.0

GitHub에서 전체 README 보기

설치

This server does not publish a one-line install command.

Open the repository installation guide MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →