MCP-summarization-functions

hybrid server

The server is able to function both locally and remotely, depending on the configuration or use case.

Integrations

  • Enables integration with Gemini models from Google as an AI provider for summarization capabilities

  • Supports GPT models from OpenAI as an AI provider for summarization capabilities

요약 함수

모델 컨텍스트 프로토콜을 위한 지능형 텍스트 요약

기능AI 에이전트 통합설치사용


개요

깔끔하고 확장 가능한 아키텍처를 통해 지능형 요약 기능을 제공하는 강력한 MCP 서버입니다. 최신 TypeScript로 구축되었으며 AI 워크플로와의 원활한 통합을 위해 설계되었습니다.

설치

Smithery를 통해 설치

Smithery를 통해 Claude Desktop용 요약 기능을 자동으로 설치하려면:

지엑스피1

npm i mcp-summarization-functions

AI 에이전트 통합

이 MCP 서버는 Roo Cline 및 Cline과 같은 AI 에이전트의 성능과 안정성을 향상시키기 위해 주로 개발되었습니다. 이 서버는 AI 에이전트 운영의 중요한 과제인 컨텍스트 윈도우 관리 문제를 해결합니다.

컨텍스트 창 최적화

AI 에이전트는 다음과 같은 대량의 출력으로 컨텍스트 창이 빠르게 채워지는 상황에 자주 직면합니다.

  • 명령 실행 결과
  • 파일 내용 판독
  • 디렉토리 목록
  • API 응답
  • 오류 메시지 및 스택 추적

이 서버는 다음을 통해 효율적인 컨텍스트 사용을 유지하는 데 도움이 됩니다.

  1. 전체 내용 대신 간결하고 관련성 있는 요약 제공
  2. 필요할 때 참조할 수 있도록 전체 콘텐츠 저장
  3. 특정 요구 사항(보안, API 표면 등)에 따라 집중적인 분석을 제공합니다.
  4. 최적의 컨텍스트 활용을 위한 다양한 출력 형식 지원

AI 에이전트의 이점

  • 실패율 감소 : 컨텍스트 창 오버플로 방지
  • 향상된 응답 품질 : 집중적이고 관련성 있는 요약을 통해
  • 향상된 효율성 : 소음을 줄이면서 중요한 맥락을 유지함으로써
  • 더 나은 리소스 관리 : 지능형 콘텐츠 캐싱 및 검색을 통해
  • 유연한 통합 : 다양한 AI 공급자 및 구성 옵션 지원

추천 AI 에이전트 프롬프트

AI 에이전트와 통합할 때 에이전트 지침에 다음 내용을 포함하세요.

# CONTEXT MANAGEMENT You have access to summarization functions through the MCP server. These functions are NOT optional - you MUST use them for ALL potentially large outputs to prevent context overflow: MANDATORY SUMMARIZATION: - You MUST ALWAYS use summarization functions for: - ANY first time file reading operations (unless you are CERTAIN its small and you are going to edit it) - ALL command execution outputs - EVERY directory analysis - ANY API responses or error logs - ANY output that could be large NEVER attempt to process raw output directly - ALWAYS use the appropriate summarization function: • For commands: summarize_command • For files: summarize_files • For directories: summarize_directory • For other text: summarize_text ALWAYS utilize available features: • Specify hints for focused analysis • Choose appropriate output formats • Use content IDs to access full details only when absolutely necessary There is NO NEED to process perfect or complete output. Summarized content is ALWAYS preferred over raw data. When in doubt, use summarization.

Ollama 저장소에서 요약 실행(Gemini 2.0 Flash 요약, Claude 3.5 에이전트)

특징

  • 명령 출력 요약
    명령을 실행하고 출력에 대한 간결한 요약을 얻으세요
  • 파일 콘텐츠 분석
    기술적 정확성을 유지하면서 단일 또는 여러 파일을 요약합니다.
  • 디렉토리 구조 이해
    복잡한 디렉토리 구조에 대한 명확한 개요를 얻으세요
  • 유연한 모델 지원 다양한 공급업체의 모델 사용
  • AI 에이전트 컨텍스트 최적화 지능형 요약을 통해 컨텍스트 창 오버플로를 방지하고 AI 에이전트 성능을 개선합니다.

구성

서버는 환경 변수를 통해 여러 AI 공급자를 지원합니다.

필수 환경 변수

  • PROVIDER : 사용할 AI 제공자입니다. 지원되는 값: - ANTHROPIC - Anthropic의 Claude 모델 - OPENAI - OpenAI의 GPT 모델 - OPENAI-COMPATIBLE - OpenAI 호환 API(예: Azure) - GOOGLE - Google의 Gemini 모델
  • API_KEY : 선택한 공급자의 API 키

선택적 환경 변수

  • MODEL_ID : 사용할 특정 모델(기본값은 공급자의 표준 모델)
  • PROVIDER_BASE_URL : OpenAI 호환 공급자를 위한 사용자 지정 API 엔드포인트
  • MAX_TOKENS : 모델 응답에 대한 최대 토큰(기본값: 1024)
  • SUMMARIZATION_CHAR_THRESHOLD : 요약 시점에 대한 문자 수 임계값(기본값: 512)
  • SUMMARIZATION_CACHE_MAX_AGE : 캐시 기간(밀리초) (기본값: 3600000 - 1시간)
  • MCP_WORKING_DIR - 상대 경로를 사용하여 파일을 찾으려는 경우 대체 디렉토리

구성 예

# Anthropic Configuration PROVIDER=ANTHROPIC API_KEY=your-anthropic-key MODEL_ID=claude-3-5-sonnet-20241022 # OpenAI Configuration PROVIDER=OPENAI API_KEY=your-openai-key MODEL_ID=gpt-4-turbo-preview # Azure OpenAI Configuration PROVIDER=OPENAI-COMPATIBLE API_KEY=your-azure-key PROVIDER_BASE_URL=https://your-resource.openai.azure.com MODEL_ID=your-deployment-name # Google Configuration PROVIDER=GOOGLE API_KEY=your-google-key MODEL_ID=gemini-2.0-flash-exp

용법

MCP 구성 파일에 서버를 추가합니다.

{ "mcpServers": { "MUST_USE_summarization": { "command": "node", "args": ["path/to/summarization-functions/build/index.js"], "env": { "PROVIDER": "ANTHROPIC", "API_KEY": "your-api-key", "MODEL_ID": "claude-3-5-sonnet-20241022", "MCP_WORKING_DIR": "default_working_directory" } } } }

사용 가능한 기능

서버는 다음과 같은 요약 도구를 제공합니다.

summarize_command

명령 출력을 실행하고 요약합니다.

{ // Required command: string, // Command to execute cwd: string, // Working directory for command execution // Optional hint?: string, // Focus area: "security_analysis" | "api_surface" | "error_handling" | "dependencies" | "type_definitions" output_format?: string // Format: "text" | "json" | "markdown" | "outline" (default: "text") }

summarize_files

파일 내용을 요약합니다.

{ // Required paths: string[], // Array of file paths to summarize (relative to cwd) cwd: string, // Working directory for resolving file paths // Optional hint?: string, // Focus area: "security_analysis" | "api_surface" | "error_handling" | "dependencies" | "type_definitions" output_format?: string // Format: "text" | "json" | "markdown" | "outline" (default: "text") }

summarize_directory

디렉토리 구조 개요를 알아보세요.

{ // Required path: string, // Directory path to summarize (relative to cwd) cwd: string, // Working directory for resolving directory path // Optional recursive?: boolean, // Whether to include subdirectories. Safe for deep directories hint?: string, // Focus area: "security_analysis" | "api_surface" | "error_handling" | "dependencies" | "type_definitions" output_format?: string // Format: "text" | "json" | "markdown" | "outline" (default: "text") }

summarize_text

임의의 텍스트 내용을 요약합니다.

{ // Required content: string, // Text content to summarize type: string, // Type of content (e.g., "log output", "API response") // Optional hint?: string, // Focus area: "security_analysis" | "api_surface" | "error_handling" | "dependencies" | "type_definitions" output_format?: string // Format: "text" | "json" | "markdown" | "outline" (default: "text") }

get_full_content

주어진 요약 ID에 대한 전체 내용을 검색합니다.

{ // Required id: string // ID of the stored content }

특허

MIT

You must be authenticated.

A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

깔끔하고 확장 가능한 아키텍처를 통해 지능형 요약 기능을 제공합니다. 주로 대용량 파일이 컨텍스트 창을 차지할 수 있는 대규모 저장소에서 AI 에이전트 문제를 해결하기 위해 설계되었습니다.

  1. Intelligent text summarization for the Model Context Protocol
    1. Overview
      1. Installation
        1. Installing via Smithery
      2. AI Agent Integration
        1. Context Window Optimization
        2. Benefits for AI Agents
        3. Recommended AI Agent Prompt
      3. Features
        1. Configuration
          1. Required Environment Variables
          2. Optional Environment Variables
          3. Example Configurations
        2. Usage
          1. Available Functions
        3. License
          ID: k6vhiu27q7