MCP Summarization Functions

v1.0.0Knowledge & Memorystable

Provides intelligent summarization capabilities through a clean, extensible architecture. Mainly built for solving AI agents issues on big repositories, where large files can eat up the context window.

clinemcpmcp-servermodel-context-protocol
Share:
37
Stars
0
Downloads
0
Weekly
0/5

What is MCP Summarization Functions?

MCP Summarization Functions is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to provides intelligent summarization capabilities through a clean, extensible architecture. mainly built for solving ai agents issues on big repositories, where large files can eat up the context window...

Provides intelligent summarization capabilities through a clean, extensible architecture. Mainly built for solving AI agents issues on big repositories, where large files can eat up the context window.

This server falls under the Knowledge & Memory category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • Provides intelligent summarization capabilities through a cl

Use Cases

Summarize large files and repositories to reduce context window consumption. Solve AI agent issues when processing large codebases.
Braffolk

Maintainer

LicenseMIT License
Languagetypescript
Versionv1.0.0
UpdatedFeb 24, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

NPM

npx -y mcp-summarization-functions

Manual Installation

npx -y mcp-summarization-functions

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use MCP Summarization Functions

MCP Summarization Functions is a TypeScript MCP server that provides intelligent text summarization tools designed specifically to prevent context window overflow in AI agent workflows. Instead of dumping raw command output, full file contents, or large directory listings into the context, it summarizes them using a configurable AI provider (Anthropic, OpenAI, Google Gemini, or Azure OpenAI) and caches the full content for retrieval on demand. AI agents working with large repositories — where a single file or command output could exhaust the entire context — use this server to maintain efficient operation and avoid failure mid-task.

Prerequisites

  • Node.js 18 or higher (for running via npx)
  • An API key for at least one supported AI provider: Anthropic, OpenAI, Google (Gemini), or Azure OpenAI
  • An MCP client such as Claude Desktop, Cline, or Roo Cline
  • npm or npx available on the system PATH
1

Choose an AI provider and obtain an API key

The summarization server delegates summarization work to an external LLM. Choose a provider (ANTHROPIC, OPENAI, GOOGLE, or OPENAI-COMPATIBLE) and obtain an API key from that provider's console.

2

Add the server to your MCP client configuration

Edit claude_desktop_config.json (or equivalent for your client) to add the server. Set PROVIDER to your chosen provider and API_KEY to your key. The server runs via npx so no local install step is needed.

{
  "mcpServers": {
    "MUST_USE_summarization": {
      "command": "npx",
      "args": ["-y", "mcp-summarization-functions"],
      "env": {
        "PROVIDER": "ANTHROPIC",
        "API_KEY": "your-anthropic-api-key",
        "MODEL_ID": "claude-3-5-sonnet-20241022",
        "MCP_WORKING_DIR": "/path/to/your/project"
      }
    }
  }
}
3

Restart your MCP client

Save the config and restart Claude Desktop (or your MCP client) to load the summarization server. Four tools will become available: summarize_command, summarize_files, summarize_directory, and summarize_text.

4

Instruct your AI agent to use summarization

Add a system prompt or agent instruction that mandates use of the summarization tools for large outputs. This prevents the agent from reading raw file content directly and filling the context window.

# In your agent instructions:
# MANDATORY: Use summarize_files for ANY file read operation.
# MANDATORY: Use summarize_command for ALL command output.
# MANDATORY: Use summarize_directory for directory listings.
# NEVER process raw output directly.
5

Optional: Tune caching and token limits

Adjust optional environment variables to control when summarization kicks in and how long summaries are cached.

"SUMMARIZATION_CHAR_THRESHOLD": "512",
"SUMMARIZATION_CACHE_MAX_AGE": "3600000",
"MAX_TOKENS": "1024"

MCP Summarization Functions Examples

Client configuration

claude_desktop_config.json entry using Anthropic as the summarization provider.

{
  "mcpServers": {
    "MUST_USE_summarization": {
      "command": "npx",
      "args": ["-y", "mcp-summarization-functions"],
      "env": {
        "PROVIDER": "ANTHROPIC",
        "API_KEY": "sk-ant-your-key-here",
        "MODEL_ID": "claude-3-5-sonnet-20241022",
        "MCP_WORKING_DIR": "/Users/yourname/projects/myrepo"
      }
    }
  }
}

Prompts to try

Once connected, these prompts demonstrate the summarization tools in action.

- "Summarize the contents of src/main.py focusing on the API surface."
- "Run 'npm test' and summarize the output, highlighting only failures."
- "Summarize the directory structure of the entire project."
- "Give me a security-focused summary of config/settings.json."
- "Summarize the error log at logs/app.log focusing on error handling."

Troubleshooting MCP Summarization Functions

Summarization returns an error about invalid API key

Ensure API_KEY in the env block matches the key for the PROVIDER you set. For OPENAI-COMPATIBLE (e.g., Azure), also set PROVIDER_BASE_URL to your endpoint. Restart Claude Desktop after updating the config.

File not found errors when using summarize_files with relative paths

Set the MCP_WORKING_DIR environment variable to the absolute path of your project root. The server uses this as a fallback base directory when relative paths are provided.

Agent still reads files directly instead of using summarization tools

The agent must be explicitly instructed to use summarization. Add the mandatory summarization instructions to your agent's system prompt or Cline/Roo Cline instructions file. Naming the server 'MUST_USE_summarization' helps signal priority to the agent.

Frequently Asked Questions about MCP Summarization Functions

What is MCP Summarization Functions?

MCP Summarization Functions is a Model Context Protocol (MCP) server that provides intelligent summarization capabilities through a clean, extensible architecture. mainly built for solving ai agents issues on big repositories, where large files can eat up the context window. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install MCP Summarization Functions?

Install via npm with the command: npx -y mcp-summarization-functions. Then add the server configuration to your AI client's JSON config file (e.g., claude_desktop_config.json or .cursor/mcp.json).

Which AI clients work with MCP Summarization Functions?

MCP Summarization Functions works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is MCP Summarization Functions free to use?

Yes, MCP Summarization Functions is open source and available under the MIT License license. You can use it freely in both personal and commercial projects.

Browse More Knowledge & Memory MCP Servers

Explore all knowledge & memory servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "mcp-summarization-functions": { "command": "npx", "args": ["-y", "mcp-summarization-functions"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use MCP Summarization Functions?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides