
jalehman/mcp-sage
Developer tools이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기
사이트맵 코드의 큰 양에 두 번째 의견 /reviews를 얻기위한 서버.
개요
MCP (Model Context Protocol) 서버는 OpenAI의 GPT-5, GPT-4.1, Google의 Gemini 2.5 Pro 또는 Anthropic의 Claude Opus 4.1 토큰 수와 구성을 기반으로합니다. 도구는 모든 참조 된 파일 경로 (폴더를 위해 반복적으로) 프롬프트에 포함. 이것은 두 번째 의견이나 상세한 코드 리뷰를 얻기 위해 유용합니다 모델에서 큰 양의 상황에 정확하게 처리 할 수 있습니다. Claude Code의 무거운 사용. 작업 흐름에 잘 작동 하는 좋은 제품입니다. 많은 양의 컨텍스트를 가진 새로운 모델은 더 복잡한 코베이스를 처리하는 것이 매우 유용합니다. 이것은 GPT-5, Gemini 2.5 Pro 및 기타 모델의 큰 컨텍스트 기능을 활용하면서 Claude Code를 개발 도구로 계속 사용할 수 있게 해줍니다. 서버는 자동으로 토큰 수를 기준으로 적절한 모델을 선택하여 모델에 정의된 구성이 있습니다.
개요(AI 번역)
MCP (Model Context Protocol) 서버는 OpenAI의 GPT-5, GPT-4.1, Google의 Gemini 2.5 Pro 또는 Anthropic의 Claude Opus 4.1 토큰 수와 구성을 기반으로합니다. 도구는 모든 참조 된 파일 경로 (폴더를 위해 반복적으로) 프롬프트에 포함. 이것은 두 번째 의견이나 상세한 코드 리뷰를 얻기 위해 유용합니다 모델에서 큰 양의 상황에 정확하게 처리 할 수 있습니다.
직업
Claude Code의 무거운 사용. 작업 흐름에 잘 작동 하는 좋은 제품입니다. 많은 양의 컨텍스트를 가진 새로운 모델은 더 복잡한 코베이스를 처리하는 것이 매우 유용합니다. 이것은 GPT-5, Gemini 2.5 Pro 및 기타 모델의 큰 컨텍스트 기능을 활용하면서 Claude Code를 개발 도구로 계속 사용할 수 있게 해줍니다.
모델 선택
서버는 models.yaml]에서 정의된 구성과 토큰 수를 기준으로 적절한 모델을 자동으로 선택합니다.
- 더 작은 컨텍스트를 위해 (≤ 400K 토큰): OpenAI의 GPT-5 (OpenAI API KEY가 설정된 경우)
- 중간 컨텍스트의 경우 (≤ 1M 토큰) : Google의 Gemini 2.5 Pro를 사용합니다 (GEMINI API KEY가 설정된 경우)
이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.
README
원문 README의 일부입니다. 원문 보기.
mcp-sage
An MCP (Model Context Protocol) server that provides tools for sending prompts to OpenAI’s GPT-5, GPT-4.1, Google’s Gemini 2.5 Pro, or Anthropic’s Claude Opus 4.1 based on token count and configuration. The tools embed all referenced filepaths (recursively for folders) in the prompt. This is useful for getting second opinions or detailed code reviews from models that can handle large amounts of context accurately.
Rationale
I make heavy use of Claude Code. It’s a great product that works well for my workflow. Newer models with large amounts of context seem really useful though for dealing with more complex codebases where more context is needed. This lets me continue to use Claude Code as a development tool while leveraging the large context capabilities of GPT-5, Gemini 2.5 Pro, and other models to augment Claude Code’s limited context.
Model Selection
The server automatically selects the appropriate model based on token count, with configuration defined in models.yaml:
- For smaller contexts (≤ 400K tokens): Uses OpenAI’s GPT-5 (if OPENAI_API_KEY is set)
- For medium contexts (≤ 1M tokens): Uses Google’s Gemini 2.5 Pro (if GEMINI_API_KEY is set)
- For fallback (≤ 1M tokens): Uses OpenAI’s GPT-4.1
- If the content exceeds 1M tokens: Returns an informative error
Fallback behavior:
- API Key Fallback:
- If OPENAI_API_KEY is missing, Gemini will be used for all contexts within its 1M token limit
- If GEMINI_API_KEY is missing, only smaller contexts can be processed with OpenAI models
- If required API keys are missing, an informative error is returned
Inspiration
This project draws inspiration from two other open source projects:
- simonw/files-to-prompt for the file compression
- asadm/vibemode for the idea and prompt to send the entire repo to Gemini for wholesale edit suggestions
- PhialsBasement/Chain-of-Recursive-Thoughts inspiration for the debate functionality
Overview
This project implements an MCP server that exposes two primary tools:
sage-opinion
- Takes a prompt and a list of file/dir paths as input
- Packs the files into a structured XML format
- Measures the token count and selects the appropriate model:
- GPT-5 for ≤ 400K tokens
- Gemini 2.5 Pro for > 400K and ≤ 1M tokens
- GPT-4.1 as fallback for ≤ 1M tokens
- Sends the combined prompt + context to the selected model
- Returns the model’s response
sage-review
- Takes an instruction for code changes and a list of file/dir paths as input
- Packs the files into a structured XML format
- Measures the token count and selects the appropriate model:
- GPT-5 for ≤ 400K tokens
- Gemini 2.5 Pro for > 400K and ≤ 1M tokens
설치
npx -y @smithery/cli install @jalehman/mcp-sage --client claude