Metadata-Version: 2.4
Name: gemini-search-mcp
Version: 0.3.1
Summary: MCP server that exposes Gemini web search and document question answering tools.
Author: Gemini Search Team
License: MIT
Project-URL: Homepage, https://github.com/MIMICLab/GeminiSearchMCP
Project-URL: Repository, https://github.com/MIMICLab/GeminiSearchMCP
Project-URL: Issues, https://github.com/MIMICLab/GeminiSearchMCP/issues
Keywords: mcp,gemini,search,google,ai,model-context-protocol
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Operating System :: OS Independent
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: mcp>=0.4.0
Requires-Dist: google-genai>=0.3.0
Requires-Dist: opendataloader-pdf>=0.5.0
Requires-Dist: pydantic>=2.6.0
Requires-Dist: markdown>=3.5.0
Requires-Dist: pillow>=10.0.0
Requires-Dist: tomli>=2.0.1
Requires-Dist: tomli-w>=1.0.0
Dynamic: license-file

# Gemini Search MCP

[![PyPI version](https://badge.fury.io/py/gemini-search-mcp.svg)](https://badge.fury.io/py/gemini-search-mcp)
[![npm version](https://badge.fury.io/js/gemini-search-mcp.svg)](https://badge.fury.io/js/gemini-search-mcp)
[![CI Tests](https://github.com/MIMICLab/GeminiSearchMCP/actions/workflows/ci.yml/badge.svg)](https://github.com/MIMICLab/GeminiSearchMCP/actions/workflows/ci.yml)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

Gemini Search MCP packages a [Model Context Protocol](https://www.modelcontextprotocol.io/) server that exposes five tools:

- **web_search** – Uses Gemini with Google Search grounding to answer general questions.
- **document_question_answering** – Converts local documents to captioned markdown and asks Gemini to answer questions about their contents.
- **get_document_content** – Converts a document to markdown and returns the full content for reading.
- **get_document_chunk** – Retrieves specific chunks of large documents for easier processing.
- **get_next_chunk** – Automatically continues reading from where you left off (stateful).

## Installation

### Python (pip)

```bash
pip install gemini-search-mcp
```

### Node.js (npm)

```bash
npm install -g gemini-search-mcp
```

## Usage

Set your Google API key (must have Gemini access):

```bash
export GOOGLE_API_KEY="your-key"
```

Run the MCP server (defaults to stdio transport):

```bash
gemini-search-mcp run
# or simply
# gemini-search-mcp
```

Configure Codex automatically (writes to `~/.codex/config.toml` by default):

```bash
gemini-search-mcp configure --api-key "YOUR_KEY"
```

Configure Copilot CLI (writes to `~/.copilot/config.json`):

```bash
gemini-search-mcp configure --cli-type copilot --api-key "YOUR_KEY"
```

Configure both Codex and Copilot CLI at once:

```bash
gemini-search-mcp configure --cli-type both --api-key "YOUR_KEY"
```

For npm/npx installation with custom command:

```bash
gemini-search-mcp configure --command npx --command-args -y gemini-search-mcp --api-key "YOUR_KEY"
```

Clear cached conversion artifacts:

```bash
gemini-search-mcp clear-cache
# 선택 옵션: --cache-dir /custom/path --remove-root
```

## Development

Install in editable mode with testing dependencies:

```bash
pip install -e .
```

Ensure LibreOffice is installed and on `PATH` if you plan to convert non-PDF documents.

## Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

## Publishing

For maintainers: See [PUBLISHING.md](PUBLISHING.md) for instructions on how to publish new versions to PyPI and npm.

## Changelog

See [CHANGELOG.md](CHANGELOG.md) for a list of changes in each version.

## License

MIT – all rights reserved.
