npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

mcp-gemini-filesearch

v1.0.0

Published

MCP server wrapping Google Gemini File Search API for document-based RAG

Readme

MCP-Gemini-FileSearch

Google Gemini File Search API를 MCP(Model Context Protocol) 서버로 래핑한 도구입니다. ChatGPT, Claude Desktop 등 MCP 호환 클라이언트에서 문서 기반 RAG 검색을 사용할 수 있습니다.

Feature

  • Gemini File Search API MCP 래퍼 - MCP 호환 LLM 클라이언트에서 사용 가능
  • 파일 업로드 - 로컬 파일 & URL 자동 다운로드 지원
  • 자연어 검색 - 문서 내용 기반 RAG 검색
  • 인용 검증 - 특정 페이지 본문 조회 (get_passages)
  • 메타데이터 관리 - 제목, 저자, 연도, DOI, 태그, 출처 URL
  • 필터링 검색 - 연도 범위, 저자, 태그별 검색

Usage Example

Quick Start

mcpServers setup

{
  "mcpServers": {
    "gemini-filesearch": {
      "command": "npx",
      "args": ["mcp-gemini-filesearch"],
      "env": {
        "GEMINI_API_KEY": "AIzaSyXXXXXXXXXXXXXXXX",
        "GEMINI_FILESTORE_NAME": "select-your-store-name"
      }
    }
  }
}

Internal Tool Usage Example

create_file_store

{
  "display_name": "My Research Store"
}

add_document

Local file:

{
  "source": "/path/to/document.pdf",
  "metadata": {
    "title": "Attention Is All You Need",
    "authors": ["Vaswani", "Shazeer", "Parmar"],
    "year": 2017,
    "tags": ["transformer", "attention"]
  }
}

URL:

{
  "source": "https://arxiv.org/pdf/1706.03762.pdf",
  "metadata": {
    "title": "Attention Is All You Need",
    "year": 2017
  }
}

search

{
  "query": "What are the limitations of self-attention?",
  "top_k": 5
}
{
  "query": "neural network architectures",
  "top_k": 10,
  "filters": {
    "year_min": 2015,
    "year_max": 2023,
    "tags": ["transformer"]
  }
}

get_passages

retrival specific page

{
  "doc_id": "gemfile_abc123xyz",
  "page_spans": [
    { "start": 3, "end": 4 },
    { "start": 7, "end": 7 }
  ]
}

list_documents

{
  "page": 1,
  "page_size": 20,
  "filters": {
    "year_min": 2015,
    "tags": ["transformer"]
  }
}

delete_document

{
  "doc_id": "gemfile_abc123xyz"
}

Exception

  • FILE_TOO_LARGE: 파일 크기 초과
  • INVALID_FILE_TYPE: 지원하지 않는 형식
  • RATE_LIMITED: API 요청 제한 (자동 재시도)

Develop

npm install
npm run build
npm test
npm run lint

Project Structure

mcp-gemini-filesearch/
├── bin/cli.js           # CLI 진입점
├── src/
│   ├── server.ts        # MCP 서버
│   ├── tools/           # MCP 도구
│   └── lib/             # 핵심 라이브러리
├── tests/unit/          # 단위 테스트
├── manifest.json        # MCP 메타데이터
└── package.json

Requirement

  • Node.js ≥ 20
  • TypeScript 5.7
  • Model Context Protocol (MCP) 1.0
  • Google Gemini File Search API
  • Zod 3.23 (Validation)
  • Jest 29 (Unit Test)

라이선스

MIT License

참고