mcp-server-ollama-deep-researcher

by Cam10001110101
Verified

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

Integrations

  • Based on LangChain Ollama Deep Researcher, providing workflow orchestration for multi-step research tasks

  • Referenced as part of research workflow implementation, though listed as requiring additional validation and re-integration

  • Enables research capabilities using any local LLM hosted by Ollama, supporting models like deepseek-r1 and llama3.2

MCP 서버: Ollama Deep Researcher

이는 LangChain Ollama Deep Researcher 의 모델 컨텍스트 프로토콜(MCP) 서버 버전입니다. 모델 컨텍스트 프로토콜 생태계 내에서 사용할 수 있는 MCP 도구로서 심층 연구 기능을 제공하여 AI 어시스턴트가 Ollama를 통해 로컬 LLM을 사용하여 주제에 대한 심층 연구를 수행할 수 있도록 지원합니다.

핵심 기능

이 서버는 Ollama 가 호스팅하는 모든 LLM을 사용하여 MCP 도구와 리소스를 통해 연구 기능을 제공합니다.

연구 과정

주제가 주어지면 다음을 수행합니다.

  1. 웹 검색 쿼리 생성
  2. Tavily 또는 Perplexity API를 통해 웹 검색 결과 수집
  3. 검색 결과를 요약합니다
  4. 지식 격차를 조사하기 위해 요약을 반영하세요.
  5. 격차를 해소하기 위해 새로운 검색어를 생성합니다.
  6. 여러 연구 주기를 통해 요약을 반복적으로 개선합니다.
  7. 사용된 모든 소스를 포함한 최종 마크다운 요약을 제공합니다.

필수 조건

  • Node.js(MCP 서버 실행용)
    • https://nodejs.org/ 에서 다운로드하고 설치하세요
    • Node.js가 시스템 PATH에 추가되었는지 확인하세요.
  • Python 3.10 이상
  • 선택한 Ollama 모델을 실행할 수 있는 컴퓨팅(CPU/GPU)
  • 더 큰 언어 모델을 실행하려면 최소 8GB의 RAM이 필요합니다.
  • 필요한 API 키:

터미널/명령 프롬프트에서 Node.js와 npm을 실행할 수 있는지 확인하세요. 다음 명령어로 설치 여부를 확인할 수 있습니다.

지엑스피1

이러한 명령이 실패하면 다음을 수행해야 할 수 있습니다.

  1. 설치 후 터미널/컴퓨터를 다시 시작하세요
  2. 시스템 PATH에 Node.js를 추가합니다.
    • Windows: 시스템 환경 변수 편집 → 환경 변수 → 경로 → Node.js 설치 디렉토리 추가
    • macOS/Linux: 일반적으로 설치 프로그램에서 처리합니다.

설치

옵션 1: 표준 설치

  1. 플랫폼에 맞는 Ollama를 다운로드하고 설치하세요
  2. 이 저장소를 복제하고 종속성을 설치하세요.
git clone https://github.com/Cam10001110101/mcp-server-ollama-deep-researcher cd mcp-server-ollama-deep-researcher npm install
  1. Python 종속성을 설치하세요:

먼저, uv를 설치합니다(더 나은 성능과 종속성 해결을 위해 권장됨):

# Windows pip install uv # macOS/Linux pip3 install uv

그런 다음 pyproject.toml을 사용하여 프로젝트 종속성을 설치합니다.

uv pip install .

참고: 이렇게 하면 pyproject.toml에 지정된 모든 종속성을 사용하여 프로젝트가 편집 가능 모드로 설치됩니다. pip를 선호하는 경우:

pip install . # Windows pip3 install . # macOS/Linux
  1. TypeScript 코드를 작성합니다.
npm run build
  1. Ollama 에서 로컬 LLM 가져오기:
ollama pull deepseek-r1:8b

옵션 2: Docker 설치

Docker를 사용하여 MCP 서버를 실행할 수도 있는데, 이를 통해 설정 과정이 간소화됩니다.

  1. 플랫폼에 맞는 Docker를 다운로드하고 설치하세요
  2. 이 저장소를 복제하세요:
git clone https://github.com/Cam10001110101/mcp-server-ollama-deep-researcher cd mcp-server-ollama-deep-researcher
  1. API 키로 .env 파일을 만듭니다( .env.example 에서 복사 가능):
cp .env.example .env # Edit the .env file with your API keys
  1. 도우미 스크립트를 실행 가능하게 만듭니다.
chmod +x run-docker.sh
  1. Docker 컨테이너를 빌드하고 실행합니다.
./run-docker.sh start
  1. 호스트 머신에서 Ollama가 실행 중인지 확인하세요.
ollama pull deepseek-r1:8b # or your preferred model ollama serve

도우미 스크립트는 여러 가지 명령을 제공합니다.

macOS/Linux의 경우(run-docker.sh 사용):

  • ./run-docker.sh start - Docker 컨테이너를 빌드하고 시작합니다.
  • ./run-docker.sh stop - Docker 컨테이너 중지
  • ./run-docker.sh restart - Docker 컨테이너를 다시 시작합니다.
  • ./run-docker.sh logs - Docker 컨테이너의 로그를 표시합니다.
  • ./run-docker.sh status - Docker 컨테이너의 상태를 확인합니다.
  • ./run-docker.sh help - 도움말 메시지 표시

Windows의 경우(run-docker.bat 사용):

  • run-docker.bat start - Docker 컨테이너를 빌드하고 시작합니다.
  • run-docker.bat stop - Docker 컨테이너 중지
  • run-docker.bat restart - Docker 컨테이너를 다시 시작합니다.
  • run-docker.bat logs - Docker 컨테이너의 로그 표시
  • run-docker.bat status - Docker 컨테이너의 상태를 확인합니다.
  • run-docker.bat help - 도움말 메시지 표시

참고: Docker 컨테이너는 호스트 머신에서 실행 중인 Ollama에 연결되도록 구성되어 있습니다. 컨테이너에서도 Ollama를 실행하려면 docker-compose.yml 파일에서 Ollama 서비스의 주석 처리를 제거하세요.

클라이언트 구성

MCP 클라이언트 구성에 서버를 추가합니다.

Claude 데스크톱 앱의 경우:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Cline(VS 코드 확장 프로그램):

  • Windows: %APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json
  • macOS: ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
  • 리눅스: ~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json

옵션 1: 표준 설치 구성

{ "mcpServers": { "ollama-deep-researcher": { "command": "node", "args": ["path/to/mcp-server-ollama-deep-researcher/build/index.js"], "env": { "LANGSMITH_TRACING": "true", "LANGSMITH_ENDPOINT": "https://api.smith.langchain.com", "LANGSMITH_API_KEY": "your-langsmith-key", "LANGSMITH_PROJECT": "ollama-deep-researcher-mcp-server", "TAVILY_API_KEY": "your-tavily-key", // Include tvly- prefix "PERPLEXITY_API_KEY": "your-perplexity-key", "PYTHONPATH": "path/to/mcp-server-ollama-deep-researcher/src" } } } }

참고: 경로를 시스템의 절대 경로로 바꾸세요.

  • Windows: C:\\Users\\username\\path\\to\\mcp-server-ollama-deep-researcher 사용하세요.
  • macOS/Linux: /Users/username/path/to/mcp-server-ollama-deep-researcher 사용하세요.

macOS/Linux의 경우 다음을 추가할 수도 있습니다.

"PYTHONUNBUFFERED": "1"

옵션 2: Docker 설치 구성

Docker 컨테이너를 사용하는 경우 MCP 클라이언트를 구성하여 실행 중인 컨테이너에 연결할 수 있습니다.

{ "mcpServers": { "ollama-deep-researcher": { "command": "docker", "args": ["exec", "-i", "ollama-deep-researcher-mcp", "node", "build/index.js"], "env": {} } } }

이 구성은 Docker 컨테이너가 실행 중이라고 가정합니다. 환경 변수는 Docker 컨테이너에 이미 설정되어 있으므로 MCP 클라이언트 구성에서 지정할 필요가 없습니다.

추적 및 모니터링

이 서버는 LangSmith와 통합되어 연구 과정을 포괄적으로 추적하고 모니터링합니다.

  1. 작업 추적 :
    • 모든 LLM 상호 작용이 추적됩니다.
    • 웹 검색 작업이 모니터링됩니다.
    • 연구 워크플로 단계가 추적됩니다.
  2. 성능 모니터링 :
    • 각 작업에 대한 응답 시간
    • 성공/실패율
    • 자원 활용
  3. 디버깅 및 최적화 :
    • 문제 해결을 위한 자세한 추적
    • 성능 병목 현상 식별
    • 쿼리 최적화 통찰력

https://smith.langchain.com 에서 구성된 프로젝트 이름으로 모든 추적에 액세스하세요.

MCP 리소스

연구 결과는 자동으로 MCP 리소스로 저장되어 다음을 가능하게 합니다.

  1. 지속적인 액세스
    • research://{topic} URI를 통해 접근 가능한 결과
    • 완료된 연구의 자동 저장
    • 메타데이터가 포함된 JSON 형식의 콘텐츠
  2. 리소스 패널 통합
    • MCP 클라이언트 리소스 패널에 연구가 나타납니다.
    • 과거 연구 주제에 쉽게 접근 가능
    • 각 결과에 대한 타임스탬프 및 설명
  3. 컨텍스트 관리
    • 대화에서 연구의 효율적인 재사용
    • 리소스 참조를 통한 토큰 사용량 감소
    • 연구 맥락의 선택적 포함

사용 가능한 도구

구성

  • maxLoops : 연구 반복 횟수(1-5)
  • llmModel : 사용할 Ollama 모델(예: "deepseek-r1:1.5b", "llama3.2")
  • searchApi : 사용할 검색 API("perplexity" 또는 "tavily")

연구 매개변수를 구성합니다.

{ "name": "configure", "arguments": { "maxLoops": 3, "llmModel": "deepseek-r1:1.5b", "searchApi": "tavily" } }

연구

웹 검색과 LLM 합성을 활용하여 어떤 주제든 조사하세요.

{ "name": "research", "arguments": { "topic": "Austin LangChain, aimug.org" } }

상태 가져오기

현재 진행 중인 연구의 현황을 알아보세요.

{ "name": "get_status", "arguments": { "_dummy": "dummy" } }

격려

기본 검색 API, 모델 및 최대 반복(루프) 사용

즉각적인 예: "AI 우선 애플리케이션 연구"

기본 구성 변경 및 연구 시작

Synatx: configure with <searchapi> and <model> then research <topic>
프롬프트 예: "perplexity 및 deepseek-r1:8b로 구성한 다음 AI 우선 애플리케이션을 조사하세요"

Ollama 연구 워크플로

이 연구 과정은 IterDRAG 에서 영감을 받았습니다. 이 접근 방식은 쿼리를 여러 하위 쿼리로 분해하고, 각 하위 쿼리에 대한 문서를 검색하여 하위 쿼리에 응답한 후, 두 번째 하위 쿼리에 대한 문서를 검색하여 해당 답변을 기반으로 구축합니다.

이 과정은 다음과 같이 진행됩니다.

  1. 사용자가 제공한 주제가 주어지면 로컬 LLM( Ollama 를 통해)을 사용하여 웹 검색 쿼리를 생성합니다.
  2. Tavily 에 맞게 구성된 검색 엔진을 사용하여 관련 소스를 찾습니다.
  3. 사용자가 제공한 연구 주제와 관련된 웹 검색 결과를 요약하기 위해 LLM을 사용합니다.
  4. 그런 다음 LLM을 사용하여 요약을 반영하고 지식 격차를 식별합니다.
  5. 지식 격차를 해소하기 위해 새로운 검색 쿼리를 생성합니다.
  6. 이 프로세스는 반복되며 요약은 웹 검색에서 얻은 새로운 정보로 반복적으로 업데이트됩니다.
  7. 연구 토끼굴을 반복할 것입니다
  8. 구성 가능한 반복 횟수만큼 실행

출력

출력된 파일은 연구 요약을 담고 있는 마크다운 파일로, 연구 과정에서 사용된 모든 출처에 대한 인용문이 포함되어 있습니다.

연구 중에 수집된 모든 출처는 보존되며 최종 출력에서 참조할 수 있습니다.

시스템 통합 개요

문제 해결

일반적으로 발생할 수 있는 문제에 대한 해결책은 다음과 같습니다.

올라마 연결 문제

  • Ollama가 실행 중인지 확인하세요. 터미널에서 ollama list 실행하세요.
  • 앱(시스템 트레이/메뉴 막대)을 닫고 ollama serve 실행하여 터미널 모드에서 ollama를 실행해 보세요.
  • localhost:11434 , 0.0.0.0:11434 또는 127.0.0.1:11434 에서 Ollama에 액세스할 수 있는지 확인하세요.

API 키 문제

  • 구성 파일에 API 키가 올바르게 설정되었는지 확인하세요.
  • 이 저장소의 index.js 실제 위치를 가리키는 경로 인수를 확인하세요.
  • API 키 주위에 공백이나 따옴표가 없는지 확인하세요.
  • API 키에 충분한 크레딧/권한이 있는지 확인하세요.

MCP 서버 문제

  • 디버깅을 위해 MCP Inspector를 사용하세요.
npx @modelcontextprotocol/inspector node path/to/server/index.js --model llama3.2 --max-loops 3 --search-api tavily

도커 문제

  • Docker 컨테이너에 문제가 있는 경우:
    • 컨테이너가 실행 중인지 확인하세요: docker ps
    • 컨테이너 로그 보기: docker logs ollama-deep-researcher-mcp
    • .env 파일에 유효한 API 키가 포함되어 있는지 확인하세요.
    • Ollama가 호스트 머신에서 실행 중이고 컨테이너에서 액세스할 수 있는지 확인하세요.
    • host.docker.internal을 사용해도 작동하지 않으면 OLLAMA_BASE_URL 환경 변수에 호스트 머신의 IP 주소를 사용해 보세요.
    • 컨테이너 간 네트워크 문제가 있는 경우 동일한 Docker 네트워크에 있는지 확인하세요.
  • 컨테이너에서 Ollama를 실행하는 경우:
    • docker-compose.yml에서 Ollama 서비스의 주석 처리를 제거합니다.
    • Ollama 컨테이너에 충분한 리소스가 할당되었는지 확인하세요.
    • Ollama 컨테이너에서 모델을 가져옵니다: docker exec -it ollama ollama pull deepseek-r1:8b

빌드 문제

  • npm run build "'node'를 인식할 수 없습니다"라는 메시지와 함께 실패하는 경우:
    1. Node.js가 제대로 설치되었는지 확인하세요
    2. 시스템 PATH에 Node.js를 추가합니다.
      • Windows: 시스템 환경 변수 편집 → 환경 변수 → 경로 → Node.js 설치 디렉토리 추가
      • macOS/Linux: 일반적으로 설치 프로그램에서 처리합니다.
    3. 터미널/컴퓨터를 다시 시작하세요
    4. 설치를 확인하려면 node --version 실행해보세요.

파이썬 문제

윈도우:

  • Python이 PATH에 있는지 확인하세요
  • python3 대신 python 사용해보세요
  • pip가 설치되어 있는지 확인하세요: python -m pip --version

macOS/Linux:

  • python 대신 python3 사용하세요
  • pip가 설치되어 있는지 확인하세요: python3 -m pip --version
  • pip를 설치해야 할 수도 있습니다: sudo apt install python3-pip (Ubuntu/Debian) 또는 brew install python3 (macOS)

오류 처리

서버는 다음에 대한 명확한 오류 메시지를 제공합니다.

  • API 키가 누락되었거나 유효하지 않습니다.
  • 구성 문제
  • 검색 API 문제
  • LLM 처리 오류

필요한 개선 사항

  • 추가적인 흥미로운 사용 사례를 위해 Langgraph의 긴밀한 재통합 및 검증이 필요합니다.

건축학

서버의 아키텍처와 구현에 대한 자세한 내용은 .context/index.md를 참조하세요.

Glama.ai 배지

예시 프롬프트 및 출력 대본

즉각적인

Configure with perplexity and deepseek-r1:8b then research AI-First Applications

구성 출력

{ "searchApi": "perplexity", "llmModel": "deepseek-r1:8b", "maxLoops": 3 }

Ollama 연구원 출력

Research configuration updated: Max Loops: 3 LLM Model: deepseek-r1:8b Search API: perplexity ### Complete Research Results **Updated Summary: AI-First Applications in Healthcare: Focus on PathAI** 1. **Design Principles**: - PathAI exemplifies a data-driven approach by leveraging extensive datasets to train advanced AI models like PLUTO. - Collaboration is central to their success, integrating technology into clinical workflows through partnerships with institutions such as Cleveland Clinic. 2. **Industry Transformations**: - In healthcare, PathAI has significantly impacted diagnostic accuracy and efficiency. Their foundation model, PLUTO, demonstrates superior performance in various pathology tasks, outperforming existing models while reducing costs. - Collaborations with leading institutions have facilitated the creation of digital pathology data networks, enhancing research and clinical care. 3. **Scalability and Performance**: - PathAI's PLUTO model offers enhanced efficiency and compactness, significantly reducing training and inference costs. - This innovation underscores their commitment to scalable and effective solutions in healthcare. 4. **Growth and Impact**: - PathAI's growth strategy includes strategic partnerships and collaborations, such as their partnership with Cleveland Clinic and acquisition by Quest Diagnostics. - These moves accelerate AI and digital pathology adoption, particularly in cancer diagnosis. This summary highlights PathAI's contributions to healthcare through innovative technology and strategic collaborations, emphasizing their role in driving advancements and improving patient outcomes. ## Sources ### Perplexity Search 1 1. https://intelifaz.com/insights/ai-first-software-design 2. https://www.uxdesigninstitute.com/blog/how-to-design-for-ai-first-products/ 3. https://vux.world/ai-design-principles/ 4. https://www.leanware.co/insights/ai-first-apps 5. https://adamfard.com/blog/ai-ux-design-framework 6. https://www.sgh.com/insight/artificial-intelligence-best-practices/ 7. https://www.index.dev/blog/generative-ai-application-design-principles 8. https://onstrategyhq.com/resources/ai-guiding-principles/ 9. https://orangematter.solarwinds.com/2024/04/29/introducing-ai-by-design-principles-for-responsible-ai/ 10. https://principles.design/examples/10-principles-for-design-in-the-age-of-ai ### Perplexity Search 2 1. https://cloud.google.com/transform/101-real-world-generative-ai-use-cases-from-industry-leaders 2. https://www.cloudera.com/resources/the-art-of-the-possible/ai-first-benefits-5-real-world-outcomes.html 3. https://builtin.com/artificial-intelligence/examples-ai-in-industry 4. https://www.uxforai.com/p/the-rise-of-ai-first-products 5. https://www.1051theblaze.com/ai-first-mobile-apps/ 6. https://www.techtarget.com/searchenterpriseai/tip/The-history-of-artificial-intelligence-Complete-AI-timeline 7. https://gitnation.com/contents/demystifying-ai-first-building-applications-for-the-future 8. https://fptsoftware.com/resource-center/blogs/the-ai-first-future-challenges-and-opportunities 9. https://online.maryville.edu/blog/history-of-ai/ 10. https://www.audience.io/blog/artificial-intelligence-first-party-data-the-future-of-data ### Perplexity Search 3 1. https://monday.com/blog/rnd/technical-specification/ 2. https://softwaremind.com/blog/8-steps-for-successful-software-implementation/ 3. https://www.infotech.com/research/ss/build-your-enterprise-application-implementation-playbook 4. https://interactiveimmersive.io/blog/touchdesigner-lessons/04-technical-implementation-design/ 5. https://www.indeed.com/career-advice/finding-a-job/technical-requirements 6. https://www.techtarget.com/searchcustomerexperience/definition/implementation 7. https://theobogroup.com/what-to-know-about-technical-implementations/ 8. https://www.ntietz.com/blog/whats-behind-just-implementation/ 9. https://public.cyber.mil/stigs/ ### Perplexity Search 4 1. https://www.ittbiomed.com/transforming-pathology-with-ai/ 2. https://www.pathai.com/resources/pathai-commences-new-year-with-strong-foundation-for-growth-following-key-2023-achievements-in-ai-powered-pathology-products-strategic-partnerships-and-leadership-team-hires/ 3. https://canvasbusinessmodel.com/blogs/target-market/pathai-target-market 4. https://www.pathologynews.com/industry-news/pathai-launches-new-pathologist-centric-features-on-aisight-to-enable-efficient-case-review-through-intelligent-case-prioritization-and-real-time-multi-institutional-collaboration/ 5. https://newsroom.clevelandclinic.org/2022/03/10/pathai-and-cleveland-clinic-announce-collaboration-to-build-digital-pathology-infrastructure-and-evolve-use-of-ai-powered-pathology-algorithms-in-research-and-clinical-care 6. https://academic.oup.com/jamia/article/30/9/1503/7174318 7. https://hitconsultant.net/2024/05/14/pathai-unveils-ai-foundation-model-built-for-disease-detection/ 8. https://newsroom.questdiagnostics.com/2024-05-01-Quest-Diagnostics-to-Acquire-PathAI-Diagnostics-to-Accelerate-AI-and-Digital-Pathology-Adoption-in-Cancer-Diagnosis-Forms-Licensing-Agreements-with-PathAI 9. https://www.multimodal.dev/post/ai-in-healthcare 10. https://canvasbusinessmodel.com/blogs/growth-strategy/pathai-growth-strategy

클로드 최종 출력

Key Principles of AI-First Applications: 1. Human-AI Collaboration - Applications are designed with AI as a core component rather than an add-on - Focus on augmenting human capabilities rather than replacing them - Clear feedback loops between AI systems and human users 2. Data-Centric Architecture - Built around robust data pipelines and continuous learning - Strong emphasis on data quality and governance - Scalable infrastructure to handle growing datasets 3. Adaptive User Experience - Interfaces that evolve based on user interaction patterns - Contextual awareness and personalization - Clear communication of AI capabilities and limitations Real-World Example: PathAI in Healthcare Core Technology: - PLUTO foundation model demonstrates superior performance in pathology tasks - Focuses on efficiency and cost reduction while maintaining high accuracy - Built for scalability and integration into existing workflows Implementation Strategy: - Strategic partnerships with healthcare institutions like Cleveland Clinic - Creation of digital pathology data networks - Focus on practical clinical applications and research Impact: - Improved diagnostic accuracy in cancer detection - Enhanced efficiency in pathology workflows - Reduced costs through optimized resource utilization Best Practices for AI-First Applications: 1. Technical Implementation - Start with clear use cases and success metrics - Build robust data pipelines and validation processes - Implement continuous monitoring and model updating 2. User Experience - Design transparent interfaces that build trust - Provide clear feedback on AI decisions and confidence levels - Allow for human oversight and intervention 3. Integration and Scaling - Focus on seamless integration with existing workflows - Build scalable infrastructure from the start - Plan for continuous improvement and iteration

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

이는 LangChain Ollama Deep Researcher를 기반으로 한 모델 컨텍스트 프로토콜(MCP) 서버 버전입니다. 모델 컨텍스트 프로토콜 생태계 내에서 사용할 수 있는 MCP 도구로서 심층 연구 기능을 제공하여 AI 비서가 Ollama를 통해 (로컬에서) 특정 주제에 대한 심층 연구를 수행할 수 있도록 지원합니다.

  1. Core Functionality
    1. Research Process
  2. Prerequisites
    1. Installation
      1. Option 1: Standard Installation
      2. Option 2: Docker Installation
    2. Client Configuration
      1. Option 1: Standard Installation Configuration
      2. Option 2: Docker Installation Configuration
    3. Tracing and Monitoring
      1. MCP Resources
        1. Available Tools
          1. Configure
          2. Research
          3. Get status
        2. Prompting
          1. Using the Default Search API, Model, and Max Iterations (loops)
          2. Change Default Config and Start Research
        3. The Ollama Research Workflow
          1. Outputs
          2. System Integration Overview
          3. Troubleshooting
          4. Error Handling
          5. Enhancements Needed
          6. Architecture
          7. Glama.ai Badge
        4. Example Prompt and Output Transcript
          1. Prompt
          2. Configuration Output
          3. Ollama Researcher Output
        5. Claude Final Output
          ID: r25ssxqoci