Skip to main content
Glama
hephaistools

ragifix-mcp

Official
by hephaistools

ragifix-mcp

MCP(Model Context Protocol, Streamable HTTP 전송) 서버로, ragifix 데이터베이스를 호환 채팅 클라이언트에 노출합니다(문서 검색, 추가, 삭제, 목록).

목차


Related MCP server: docrag

Docker를 통한 설치

git clone <url-du-dépôt> ragifix-mcp && cd ragifix-mcp

cp config.example.yaml config.yaml              # puis l'adapter
cp deploy/ragifix-mcp.env.example ragifix-mcp.env # puis renseigner les secrets

docker build -f deploy/docker/Dockerfile -t ragifix-mcp .

docker run -d \
  --name ragifix-mcp \
  --network host \
  --env-file ragifix-mcp.env \
  -v "$(pwd)/config.yaml:/etc/ragifix/config.yaml:ro" \
  ragifix-mcp

--network host: 기본값(server.host: 127.0.0.1)에서는 서버가 ragifix와 채팅 클라이언트도 호스팅하는 머신에서 로컬로 계속 연결 가능해야 합니다.

서비스가 실행 중인지 확인합니다(토큰 없이는 401이 예상됩니다. 이는 서버가 응답한다는 신호입니다):

curl -s -o /dev/null -w "%{http_code}\n" http://127.0.0.1:8422/mcp \
  -X POST -H "Content-Type: application/json" -d '{}'

.deb 패키지를 통한 설치

git clone <url-du-dépôt> ragifix-mcp && cd ragifix-mcp

sudo apt-get install -y devscripts debhelper python3-venv python3-pip
dpkg-buildpackage -us -uc -b

sudo apt install -y ../ragifix-mcp_0.1.0-1_all.deb

설치(postinst)는 /opt/ragifix-mcp/venv에 Python 가상 환경을 만들고 PyPI에서 종속성을 설치합니다(가벼움: mcp, httpx, starlette, uvicorn, pydanticapt install 시점에 네트워크 액세스 필요, 이후 서비스는 오프라인).

패키지는 전용 시스템 사용자, /etc/ragifix-mcp/config.yamlragifix-mcp.env(예제에서), 그리고 systemd 유닛 ragifix-mcp.service를 생성합니다.

sudo nano /etc/ragifix-mcp/config.yaml
sudo nano /etc/ragifix-mcp/ragifix-mcp.env
sudo systemctl enable --now ragifix-mcp
journalctl -u ragifix-mcp -f
sudo apt remove ragifix-mcp    # conserve la config
sudo apt purge ragifix-mcp     # supprime tout

개발 환경에서 설치

git clone <url-du-dépôt> ragifix-mcp && cd ragifix-mcp

python3 -m venv venv
source venv/bin/activate
pip install -e .

cp config.example.yaml config.yaml   # reste à côté du code, hors /etc

export RAGIFIX_MCP_TOKEN=dev-mcp-token
export RAGIFIX_API_TOKEN=dev-token    # le token de l'API ragifix visée

ragifix-mcp --config ./config.yaml

채팅 클라이언트에 붙여넣을 설정

서버가 시작된 후, 클라이언트 구성에 원격 MCP 서버(HTTP 전송)를 현재 표준 형식으로 선언하세요:

{
  "mcpServers": {
    "ragifix": {
      "url": "http://127.0.0.1:8422/mcp",
      "headers": {
        "Authorization": "Bearer <RAGIFIX_MCP_TOKEN>"
      }
    }
  }
}

<RAGIFIX_MCP_TOKEN>을(를) ragifix-mcp.env에 설정된 값(개발 중에는 RAGIFIX_MCP_TOKEN)으로 바꾸고, URL이 127.0.0.1:8422와 다르면 실제 서버 주소로 바꾸세요.

일부 오래된 클라이언트는 원격 HTTP 서버에 직접 연결하는 방법을 아직 지원하지 않으며 로컬 명령(command/args)만 허용합니다. 이 경우 mcp-remote 같은 브리지를 사용하세요:

{
  "mcpServers": {
    "ragifix": {
      "command": "npx",
      "args": [
        "-y", "mcp-remote",
        "http://127.0.0.1:8422/mcp",
        "--header", "Authorization: Bearer <RAGIFIX_MCP_TOKEN>"
      ]
    }
  }
}

이 구성을 어디에 붙여넣을지 알아보려면 사용 중인 채팅 클라이언트의 문서를 참조하세요(MCP 구성 파일 또는 MCP 커넥터/서버 관리 인터페이스).

노출된 도구

도구

설명

rag_query(query, top_k=5)

가장 관련성 높은 구절을 검색합니다.

rag_list_documents(prefix=None)

ragifix에 색인된 문서를 나열합니다.

rag_get_document(doc_id)

문서의 세부 정보.

rag_add_document(doc_id, content, extension, content_encoding="utf8", metadata=None)

문서를 추가/업데이트합니다(content_encoding: "utf8"은 일반 텍스트, "base64"는 이진 콘텐츠 — pdf/docx/pptx/xlsx/html).

rag_delete_document(doc_id)

문서를 삭제합니다(멱등적).

rag_health()

ragifix에 연결할 수 있는지 확인합니다.

원격 액세스

기본적으로(server.host: 127.0.0.1) 서버는 로컬 머신에서만 연결할 수 있습니다. 같은 머신에서 실행되는 채팅 클라이언트(예: 로컬의 Claude Desktop)에 적합합니다.

원격 채팅 클라이언트를 사용하려면 두 가지 변경이 필요합니다:

  1. server.host config.yaml에서: 0.0.0.0(모든 인터페이스) 또는 해당 네트워크 인터페이스의 IP로 변경합니다. host가 로컬이 아닌 동안 시작 시 이 점을 상기시키는 경고가 기록됩니다.

  2. TLS: 이 서버는 자체적으로 TLS를 종료하지 않습니다. 앞에 인증서를 처리하고 내부적으로 http://127.0.0.1:<port>/mcp로 중계하는 리버스 프록시(nginx, Caddy, Traefik...)를 배치하세요. Caddy를 사용한 최소 예시:

    mcp.exemple.fr {
        reverse_proxy 127.0.0.1:8422
    }

    그러면 채팅 클라이언트 쪽에서 선언하는 urlhttps://mcp.exemple.fr/mcp가 됩니다.

전용 토큰(RAGIFIX_MCP_TOKEN)은 두 경우 모두 애플리케이션 보호 수단으로 유지됩니다. TLS는 전송을 보호하고 토큰은 액세스를 보호합니다.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Provides semantic search over markdown documentation using RAG, allowing natural language queries and integration with MCP clients.
    1
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Provides RAG (Retrieval Augmented Generation) access to technical documentation through MCP, enabling LLMs to search and retrieve relevant documentation on-demand.
    4
    MIT
  • F
    license
    Not graded
    quality
    C
    maintenance
    Exposes an existing RAG API as MCP tools, enabling health checks and document-based question answering with source evidence.
    -
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables AI agents to query and manage a document knowledge base via MCP, with RAG-powered search and grounded answers with citations.
    MIT