Provides tools for interacting with Google's Gemini AI models via a local CLI, allowing users to send prompts and receive responses from models like gemini-3-pro-preview.
Provides tools for interacting with OpenAI's Codex models via a local CLI, enabling users to execute prompts and run tasks using models like gpt-5.3-codex.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Codex Gemini MCPask codex to refactor this function for better performance"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
codex-gemini-mcp-sample
간결한 TypeScript MCP 서버 예제입니다.
MCP tool
ask_codex: 로컬codexCLI에 프롬프트 전달MCP tool
ask_gemini: 로컬geminiCLI에 프롬프트 전달stdio transport 기반으로 동작
현재 Phase A 1차 구조 분리 완료 (
types,schema,run-cli모듈 분리)
MCP_REVERSE_ENGINEERING.md는 참고용이며, 이 샘플은 의도적으로 기능을 최소화했습니다.
Requirements
Node.js 20+
codexCLI 설치 (npm i -g @openai/codex)geminiCLI 설치 (npm i -g @google/gemini-cli)
Quick Start
개발 모드:
Example .mcp.json
Tool Schemas
ask_codex
prompt(string, required)model(string, optional)timeout_ms(number, optional, default 600000)long-running task는
300000이상(5분 이상) 권장
working_directory(string, optional)
ask_gemini
prompt(string, required)model(string, optional)timeout_ms(number, optional, default 600000)long-running task는
300000이상(5분 이상) 권장
working_directory(string, optional)
Runtime Notes
ask_codex:codex exec --ephemeral호출ask_gemini:gemini --prompt <text>호출모델 선택 우선순위:
request.model > env default > hardcoded defaultcodex env:
MCP_CODEX_DEFAULT_MODEL(기본값:gpt-5.3-codex)gemini env:
MCP_GEMINI_DEFAULT_MODEL(기본값:gemini-3-pro-preview)
timeout_ms미지정 시 기본값은MCP_CLI_TIMEOUT_MS또는 600000ms(10분)
Environment Variables
MCP_CODEX_DEFAULT_MODEL: codex 기본 모델MCP_GEMINI_DEFAULT_MODEL: gemini 기본 모델MCP_CLI_TIMEOUT_MS: 기본 CLI timeout(ms)MCP_MAX_OUTPUT_BYTES: 최대 출력 바이트(cap, 향후 runtime 확장용)MCP_RUNTIME_DIR: 런타임 파일 기본 루트(.codex-gemini-mcp)MCP_LOG_DIR: 로그 경로 overrideMCP_LOG_PREVIEW: 로그 preview 저장 여부 (1이면 활성화)MCP_LOG_FULL_TEXT: 전체 텍스트 로그 여부 (1이면 활성화)
Current Status
MCP 등록 엔트리:
dist/mcp/codex-stdio-entry.js,dist/mcp/gemini-stdio-entry.js검증 완료:
ask_codex,ask_gemini도구 실호출 성공아직 미구현: background job tools
Scope (deliberately minimal)
이 샘플에는 아래 기능이 없습니다:
background job 관리
prompt/response 파일 영속화
fallback 모델 체인
standalone bridge 번들링