Skip to main content
Glama
yadu0323

AI Document Assistant MCP Server

by yadu0323

AI 문서 어시스턴트

RAG(Retrieval-Augmented Generation), FAISS, MCP(Model Context Protocol), Ollama, Streamlit을 사용하여 구축된 AI 기반 문서 어시스턴트입니다.

PDF 문서를 업로드하고, 내용에 대해 질문하고, 요약을 생성하고, 키워드를 추출하며, Wikipedia 통합을 사용하여 일반 지식 질문에 답변할 수 있습니다.


기능

문서 질의응답

  • 업로드된 PDF 문서에 대해 질문할 수 있습니다.

  • FAISS 벡터 검색을 사용하여 관련 문서 청크를 검색합니다.

  • Ollama를 사용하여 자연어 답변을 생성합니다.

문서 요약

  • 업로드된 문서의 간결한 요약을 생성합니다.

키워드 추출

  • 문서에서 중요한 키워드와 주제를 추출합니다.

일반 지식 질문

  • 업로드된 문서 범위를 벗어난 질문에 대한 Wikipedia 통합.

MCP 통합

  • MCP를 통해 도구를 노출합니다.

  • MCP 클라이언트를 통한 도구 검색 및 실행을 허용합니다.

PDF 업로드 지원

  • Streamlit 인터페이스에서 PDF 파일을 직접 업로드할 수 있습니다.

  • 검색을 위해 임베딩을 자동으로 생성하고 문서를 인덱싱합니다.

Streamlit 인터페이스

  • 간단하고 사용자 친화적인 채팅 인터페이스.

  • PDF를 업로드하고 실시간으로 문서와 상호작용합니다.


아키텍처

PDF
 │
 ▼
PDF Loader
 │
 ▼
Text Chunking
 │
 ▼
Embeddings
 │
 ▼
FAISS Vector Store
 │
 ▼
Retrieval
 │
 ▼
LLM (Ollama)
 │
 ▼
Answer Generation

기술 스택

백엔드

  • Python

LLM

  • Ollama

  • Qwen 2.5 Coder 7B

벡터 데이터베이스

  • FAISS

임베딩

  • Sentence Transformers

프로토콜

  • MCP(Model Context Protocol)

프론트엔드

  • Streamlit

외부 지식

  • Wikipedia API


프로젝트 구조

AI-Document-Assistant/
│
├── datas/
│
├── src/
│   ├── pdf_loader.py
│   ├── chunker.py
│   ├── embeddings.py
│   ├── vector_store.py
│   └── rag_store.py
│
├── tools/
│   ├── search_tool.py
│   ├── summary_tool.py
│   ├── keyword_tool.py
│   ├── qa_tool.py
│   └── wiki_tool.py
│
├── app.py
├── agent.py
├── build_rag.py
├── mcp_client.py
├── mcp_server.py
├── requirements.txt
├── README.md
└── .gitignore

설치

저장소 클론

git clone https://github.com/yourusername/AI-Document-Assistant.git

cd AI-Document-Assistant

가상 환경 생성

python -m venv .venv

환경 활성화

Windows:

.venv\Scripts\activate

Linux/macOS:

source .venv/bin/activate

종속성 설치

pip install -r requirements.txt

Ollama 설치

Ollama를 다운로드하고 설치합니다:

https://ollama.com

모델을 가져옵니다:

ollama pull qwen2.5-coder:7b

Ollama를 시작합니다:

ollama serve

애플리케이션 실행

streamlit run app.py

열기:

http://localhost:8501

작동 방식

문서 질문

예시:

What is MySQL Workbench?

어시스턴트는:

  1. 관련 문서 청크를 검색합니다.

  2. FAISS를 사용하여 일치하는 컨텍스트를 검색합니다.

  3. 컨텍스트를 Ollama로 전송합니다.

  4. 최종 답변을 생성합니다.


일반 지식 질문

예시:

Who is Elon Musk?

어시스턴트는:

  1. 질문이 문서 특화적이지 않음을 감지합니다.

  2. Wikipedia를 사용합니다.

  3. 간결한 답변을 반환합니다.


MCP 도구

사용 가능한 MCP 도구:

document_search

관련 문서 청크를 검색합니다.

document_summary

문서 요약을 생성합니다.

document_keywords

중요한 키워드를 추출합니다.

ask_document

업로드된 문서에 대한 질의응답.

wiki_search

Wikipedia를 사용한 일반 지식 조회.


향후 개선 사항

  • 다중 PDF 지원

  • 채팅 기록 메모리

  • 대화 컨텍스트

  • 출처 인용

  • 하이브리드 검색(BM25 + 벡터 검색)

  • 영구 벡터 데이터베이스

  • Docker 배포

  • 인증 및 사용자 관리



작성자

Yadu


-
license - not tested
-
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/yadu0323/AI-Document-Assistant'

If you have feedback or need assistance with the MCP directory API, please join our Discord server