Mentioned in the stderr output, suggesting the MCP server provides GitHub integration capabilities, though specific functionality is not detailed in the README.
Allows using Gemini AI through the Gemini CLI to analyze large files and directories, providing an alternative to Claude Code while saving tokens. Enables leveraging Gemini's large context window for analyzing files with the ability to process prompts against specified files, directories, or URLs.
Gemini MCP Server
Claude Code에서 Gemini AI를 MCP 서버로 사용할 수 있게 해주는 도구입니다.
주요 이점
- 대용량 파일 분석: Gemini의 거대한 컨텍스트 윈도우를 활용하여 대용량 파일과 디렉토리를 한 번에 분석 가능
- 토큰 절약: 무료로 제공되는 Gemini CLI를 이용해서 Claude Code의 토큰 사용량을 절약하면서도 Claude Code만의 강력한 기능을 활용 가능
- 간편한 통합: 기존 Claude Code 워크플로우에 쉽게 통합 가능
이 서버는 로컬에 설치된 gemini
CLI 도구를 사용하여 작동합니다.
사전 요구사항
- Python 3.8+
- uv 패키지 매니저
- Gemini CLI CLI 도구
빠른 시작
1. 저장소 클론
- uv 설치
uv는 시스템 레벨에 설치해야 합니다 (Python 가상환경과 독립적으로 작동):
- 의존성 설치:
Tools
- run_gemini
- Gemini를 이용해서 파일, 디렉토리, URL의 대량 정보를 처리합니다
- 입력:
prompt
(string): Gemini에 전달할 프롬프트file_dir_url_path
(string): 분석할 파일, 디렉토리 또는 URL 경로working_directory
(string): 작업 디렉토리 (필수)
Configuration
Claude Code에서 사용하려면 MCP 서버 설정을 추가하세요:
Linux 의 경우, ~/.claude.json
파일에 다음 설정을 추가:
참고: /path/to/your/project/
를 다운받은 git 프로젝트 경로로 변경하세요.
개발
- 서버 직접 실행(실행 후, 멈춰있는 것이 정상임)
- 테스트
- Debugging
MCP 서버는 stdio를 통해 통신하므로 디버깅이 어려울 수 있습니다. MCP Inspector 사용을 권장합니다.
- 주의할 점
subprocess.run 을 사용할 때 shell=True
옵션을 사용해야 합니다. 이는 MCP 서버 환경에서 쉘을 통해 명령을 실행하기 위함입니다. 이 옵션이 없으면, Gemini CLI 명령 실행 시, 대기 상태에 빠질 수 있습니다. 그 이유는, MCP 서버는 stdio 모드로 실행되어 stdin/stdout이 파이프로 연결되는데, 일부 CLI 도구(특히 Node.js 기반)는 tty 환경에서와 파이프 환경에서 다르게 동작하기 때문입니다. 터미널에서 직접 run_gemini.py
를 실행될 때는 완전한 tty 환경 제공하기 때문에 shell=True
옵션이 필요하지 않습니다.
사용 예시
Claude Code에서 MCP 서버를 사용하여 Gemini CLI를 호출할 수 있습니다. 예를 들어, 다음과 같이 사용할 수 있습니다:
- Claude Code에서의 Gemini 호출과 Gemini 의 응답의 예
- Gemini의 응답을 이용한 Claude Code 의 최종 출력
라이선스
이 프로젝트는 MIT 라이선스 하에 배포됩니다.
local-only server
The server can only run on the client's local machine because it depends on local resources.
Tools
A tool that allows Claude Code to use Gemini AI as an MCP server, leveraging Gemini's large context window for analyzing large files while saving Claude Code tokens.
Related MCP Servers
- AsecurityAlicenseAqualityA server that enables Claude Desktop to generate images using Google's Gemini AI models through the Model Context Protocol (MCP).Last updated -713JavaScriptMIT License
- -security-license-qualityAn MCP server implementation that allows using Google's Gemini AI models (specifically Gemini 1.5 Pro) through Claude or other MCP clients via the Model Context Protocol.Last updated -1JavaScript
- AsecurityFlicenseAqualityAn MCP server that connects Gemini 2.5 Pro to Claude Code, enabling users to generate detailed implementation plans based on their codebase and receive feedback on code changes.Last updated -27Python
- -securityAlicense-qualityAn MCP server that enables other AI models (like Claude) to use Google's Gemini models as tools for specific tasks through a standardized interface.Last updated -1TypeScriptMIT License