Enables Claude to delegate tasks to Google Gemini models for large-scale context analysis, codebase reviews, architecture analysis, security vulnerability detection, and performance optimization through two main functions: general AI assistance and specialized codebase analysis
Claude-to-Gemini MCP Server
Claude Code에서 Google Gemini를 MCP(Model Context Protocol) 서버로 사용하는 Agent-to-Agent 통합 프로젝트
🎯 프로젝트 목적
Claude Code: 메인 AI (일반 코딩, 디버깅, 파일 생성/수정)
Gemini 2.5: 서브 AI (대규모 컨텍스트 분석, 전체 코드베이스 리뷰)
✨ 주요 기능
1. ask_gemini
용도: 일반 Gemini 호출, 큰 컨텍스트 분석
모델 선택:
flash
(기본): Gemini 2.5 Flash - 무료, 빠름pro
: Gemini 2.5 Pro - 유료, 최고 성능
컨텍스트: 최대 1M 토큰
2. gemini_analyze_codebase
용도: 전체 코드베이스 전문 분석
분석 타입:
architecture
: 아키텍처 패턴 분석duplications
: 중복 코드 탐지security
: 보안 취약점 검사performance
: 성능 최적화 기회general
: 종합 분석
🛠 기술 스택
Runtime: Node.js 18+
MCP SDK: @modelcontextprotocol/sdk
AI API: Google Gemini API (@google/generative-ai)
IDE: Claude Code (CLI + VSCode 확장)
📦 설치 방법
1. 사전 준비
Node.js 18 이상 설치
Claude Pro/Max 플랜 구독
Google Gemini API 키 발급 (ai.google.dev)
2. 프로젝트 클론
3. 의존성 설치
4. MCP 서버 등록
주의:
YOUR_API_KEY_HERE
를 실제 Gemini API 키로 교체/ABSOLUTE_PATH/
를 실제 프로젝트 경로로 교체 (예:/Users/username/projects/claude-to-gemini/index.js
)
5. 확인
출력 예시:
🚀 사용 방법
Claude Code 시작
기본 사용 (Flash 모델, 무료)
Pro 모델 사용 (유료, 고성능)
코드베이스 분석
💡 사용 시나리오
시나리오 1: 새 프로젝트 아키텍처 설계
시나리오 2: 레거시 코드 분석
시나리오 3: 대규모 리팩토링
📊 모델 비교
모델 | 컨텍스트 | 비용 | 속도 | 추천 용도 |
Gemini 2.5 Flash | 1M 토큰 | 무료 | 빠름 | 일반 분석, 대부분의 작업 |
Gemini 2.5 Pro | 1M 토큰 | 유료 | 보통 | 복잡한 추론, 중요한 설계 |
⚠️ 보안 주의사항
API 키 보호
절대 금지:
❌ GitHub에 API 키 업로드
❌ 코드에 API 키 하드코딩
❌ 공개 장소에 API 키 공유
권장 사항:
✅ 환경변수로만 관리
✅
.gitignore
에.claude.json
포함✅ API 키 유출 시 즉시 재발급
.gitignore 필수 내용
🤝 기여 방법
Fork the Project
Create your Feature Branch (
git checkout -b feature/AmazingFeature
)Commit your Changes (
git commit -m 'Add some AmazingFeature'
)Push to the Branch (
git push origin feature/AmazingFeature
)Open a Pull Request
📝 라이선스
MIT License - 자세한 내용은 LICENSE 파일 참조
🔗 참고 자료
📧 문의
프로젝트 관련 문의: GitHub Issues
Made with ❤️ by [Your Name]
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Enables Claude to use Google Gemini as a secondary AI through MCP for large-scale codebase analysis and complex reasoning tasks. Supports both Gemini Flash and Pro models with specialized functions for general queries and comprehensive code analysis.