Skip to main content
Glama
IDE Chat Summarizer
by RalphLi213

IDE Chat Summarizer MCP Server

A Model Context Protocol (MCP) server designed for IDE users to summarize chat conversations with AI and automatically store them as organized markdown files in your notes directory. Perfect for VS Code, Cursor, and Visual Studio users.

šŸŽÆ Purpose

This MCP server transforms chat conversations into structured summaries and saves them to your configured notes directory (default: ~/Documents/ChatSummaries) for easy reference and organization. Perfect for keeping track of important discussions, decisions, and insights from your AI conversations.

Related MCP server: Notes MCP Server

✨ Features

šŸ”§ Tools

  • summarize_chat: Summarize chat history and save as markdown

    • Supports different summary styles (brief, detailed, bullet_points)

    • NEW: Smart code detection and preservation of final solutions

    • NEW: Options for handling large histories (include_full_history, create_separate_full_history)

    • Auto-generates timestamped filenames

    • Custom titles for better organization

    • Smart handling: Uses collapsible sections for large conversations (>1MB)

  • summarize_large_chat: Handle extremely large chat histories (NEW!)

    • Automatically chunks huge conversations into manageable pieces

    • Creates individual files for each chunk with overlap for context

    • Generates a master summary file linking all chunks

    • Configurable chunk size (default: 50,000 characters)

    • Perfect for multi-hour conversations or extensive documentation

  • list_summaries: View recent chat summaries

    • Shows creation dates and file sizes

    • Configurable limit for results

    • Sorted by most recent first

  • delete_summary: Remove unwanted summary files

    • Safety checks to only delete chat summary files

    • Confirmation messages

šŸ“„ Resources

  • summary://{filename}: Read content of specific summary files

  • notes://directory: Get information about your notes directory

šŸ’¬ Prompts

  • create_summary_prompt: Generate customized prompts for different conversation types

    • Supports: general, technical, meeting, brainstorm

    • Focus areas: all, decisions, action_items, insights

šŸš€ Installation and Setup

Prerequisites

  • uv package manager

  • Python 3.13+

Install Dependencies

uv sync

Run the Server

uv run mcp dev main.py

Opens a web interface at http://localhost:6274 for testing.

2. Direct Server Run

uv run python main.py

3. Using MCP CLI

uv run mcp run main.py

šŸ“ Usage Examples

Handling Large Chat Histories

For huge chat histories, you have several options depending on your client:

In VS Code/Cursor/Visual Studio:

  1. Use the summarize_chat tool

  2. Parameters to set:

    • chat_history: Copy and paste your entire conversation

    • title: "Long AI Discussion" (optional)

    • summary_style: Choose "detailed", "brief", or "bullet_points"

    • include_full_history: āœ… True (default - keeps everything!)

    • create_separate_full_history: āŒ False

Result: Creates 1 file with smart organization - collapsible sections for large histories (>1MB)

Option 2: Separate Files for Organization

In VS Code/Cursor/Visual Studio:

  1. Use the summarize_chat tool

  2. Parameters to set:

    • chat_history: Your huge conversation

    • title: "Extended Coding Session"

    • summary_style: "detailed"

    • include_full_history: āœ… True

    • create_separate_full_history: āœ… True (creates 2 files!)

Result: Creates 2 files: chat_summary_*.md + chat_full_*.md

Option 3: Extremely Large Histories (Chunking)

In VS Code/Cursor/Visual Studio:

  1. Use the summarize_large_chat tool (NEW!)

  2. Parameters to set:

    • chat_history: Your massive conversation

    • title: "All Day Coding Session"

    • chunk_size: 50000 (characters per chunk)

    • overlap: 5000 (overlap between chunks for context)

Result: Creates master summary + individual chunk files with preserved context

Summarizing a Regular Chat

In VS Code/Cursor/Visual Studio:

  1. Use the summarize_chat tool

  2. Fill in the parameters:

    • chat_history:

      User: How do I optimize my Python code?
      AI: Here are several optimization techniques...
      User: What about memory usage?
      AI: For memory optimization, consider...
    • title: "Python Optimization" (optional)

    • summary_style: "detailed" (or "brief", "bullet_points")

Result: Creates chat_summary_20240115_143022_Python_Optimization.md with summary and full conversation

Listing Your Summaries

In VS Code/Cursor/Visual Studio:

  1. Use the list_summaries tool

  2. Optional parameter:

    • limit: 10 (number of summaries to show)

Result: Shows recent summaries with dates, sizes, and filenames

Reading a Summary

In VS Code/Cursor/Visual Studio:

  1. Use the summary://filename resource

  2. Parameter:

    • filename: chat_summary_20240115_143022_Python_Optimization.md

Result: Returns full content of the summary file

Managing Summaries

In VS Code/Cursor/Visual Studio:

  1. Use the delete_summary tool

  2. Parameter:

    • filename: Name of the file to delete

Result: Safely removes the summary file

šŸŽÆ Quick Start Guide for Large Histories

Step-by-Step: Saving Your Huge Chat

  1. šŸ“‹ Copy your entire conversation from your chat interface

  2. šŸ”§ Open MCP tools in VS Code/Cursor/Visual Studio

  3. āš™ļø Choose your approach:

    For most large chats (recommended):

    • Tool: summarize_chat

    • Paste conversation in chat_history

    • Set include_full_history: true

    • Leave other defaults

    For extremely large chats (>100MB):

    • Tool: summarize_large_chat

    • Paste conversation in chat_history

    • Leave defaults (50k chunk size)

  4. šŸš€ Run the tool - Your conversation is now safely stored!

What You Get:

  • āœ… Complete preservation - Nothing lost from original

  • āœ… Smart organization - Easy to read and navigate

  • āœ… Searchable files - Find anything quickly

  • āœ… Multiple formats - Summary + full history options

šŸ“ File Organization

Summaries are saved to your configured notes directory (default: ~/Documents/ChatSummaries)

Filename Pattern: chat_summary_YYYYMMDD_HHMMSS_[title].md

Example Files:

  • chat_summary_20240115_143022_Python_Optimization.md

  • chat_summary_20240115_150330_API_Design_Discussion.md

  • chat_summary_20240115_162145_Untitled.md

šŸ“‹ Summary Styles

Brief

  • 2-3 sentence overview

  • Key points only

  • Quick reference

Detailed (Default)

  • Comprehensive summary

  • Main topics and subtopics

  • Key decisions and insights

  • Structured with headings

Bullet Points

  • Organized bullet list format

  • Main topics as bullets

  • Easy to scan

  • Action-oriented

šŸ’» Smart Code Detection

The summarizer automatically detects and preserves important code from your conversations:

šŸŽÆ What It Detects:

  • Code blocks (language ... )

  • Inline code (code)

  • Final solutions - Code that appears near keywords like "final", "solution", "working", "complete"

  • Late-conversation code - Code blocks in the last 30% of the conversation (likely to be solutions)

šŸ” How It Works:

  1. Scans conversation for all code blocks and inline code

  2. Identifies final solutions using context analysis and position weighting

  3. Preserves in summary with proper syntax highlighting

  4. Organizes by importance - Final solutions first, then other code snippets

šŸ“‹ What You Get:

  • šŸ’» Final Code Solutions section with working code

  • šŸ“ Code Snippets section with relevant code examples

  • Language detection and proper syntax highlighting

  • Context preservation - knows which code is the final answer

šŸ”§ Client Integration

VS Code

When adding this MCP server to VS Code:

Command:

uv run --directory "/path/to/your/ide-chat-summarizer-mcp" python main.py

Replace /path/to/your/ide-chat-summarizer-mcp with your actual project directory path.

Server Name: chat-summarizer

Cursor

In Cursor settings:

  1. Go to Extensions → MCP

  2. Add Server with:

    • Name: chat-summarizer

    • Command: uv run --directory "/path/to/your/ide-chat-summarizer-mcp" python main.py

    • Working Directory: /path/to/your/ide-chat-summarizer-mcp

Visual Studio (Full IDE)

Visual Studio has MCP support! Here's how to configure it:

Native MCP Configuration

  1. Open the Configure MCP server dialog in Visual Studio

  2. Fill out the configuration:

Server ID:

chat-summarizer

Type:

stdio

(Keep this as default)

Command (with optional arguments):

uv run --directory "/path/to/your/ide-chat-summarizer-mcp" python main.py

(Replace /path/to/your/mcp-server-demo with your actual project path)

Environment Variables (Optional):

  • Click "+ Add" if you want a custom notes directory

  • Name: CHAT_NOTES_DIR

  • Value: /path/to/your/custom/notes/directory

  1. Click "Save"

  2. Restart Visual Studio

šŸŽÆ Typical Workflow

For VS Code/Cursor/Visual Studio:

  1. šŸ’» Power up computer

  2. šŸš€ Open VS Code/Cursor/Visual Studio

  3. šŸ’¬ Start chatting with AI

  4. šŸ”§ Use MCP tools directly - server starts automatically!

For MCP Inspector (Testing):

  1. šŸ’» Power up computer

  2. šŸ“ Navigate to project directory

  3. ⚔ Run: uv run mcp dev main.py

  4. 🌐 Use web interface at http://localhost:6274

šŸ’” Pro Tip: Most clients (VS Code, Cursor, Visual Studio) automatically start your MCP server when you use the tools. You only need to manually start the server for testing with MCP Inspector.

šŸ“Š Directory Information

The server provides insights about your notes directory:

  • Total markdown files count

  • Chat summaries count

  • Directory size

  • Last activity timestamp

šŸ›  Configuration

Notes Directory

Default: ~/Documents/ChatSummaries (user's Documents folder)

Method 1: Environment Variable (Recommended) Set the CHAT_NOTES_DIR environment variable:

# Windows
set CHAT_NOTES_DIR=C:\Users\YourName\Notes\ChatSummaries

# macOS/Linux
export CHAT_NOTES_DIR="/home/username/Notes/ChatSummaries"

Method 2: Edit main.py Modify the NOTES_DIR variable in main.py:

# Examples:
NOTES_DIR = Path("your/custom/path")              # Custom absolute path
NOTES_DIR = Path.home() / "Notes" / "Summaries"  # User's home directory
NOTES_DIR = Path.cwd() / "summaries"             # Relative to project directory

Summary Templates

Customize summary styles by modifying the prompt generation in the summarize_chat function.

šŸ” Project Structure

ide-chat-summarizer-mcp/
ā”œā”€ā”€ main.py              # MCP server implementation
ā”œā”€ā”€ pyproject.toml       # Project configuration
ā”œā”€ā”€ README.md           # This documentation
ā”œā”€ā”€ mcp-config.json     # MCP server configuration
└── uv.lock            # Dependency lock file

šŸ“š Learn More

šŸ¤ Usage Tips

  1. Organize by Topic: Use meaningful titles when summarizing

  2. Regular Cleanup: Use delete_summary to remove outdated summaries

  3. Style Selection: Choose the right summary style for your needs

  4. Batch Processing: Use list_summaries to review and manage multiple summaries


Transform your conversations into organized, searchable knowledge with the Chat History Summarizer MCP Server!

Available Tools

4 tools
delete_summaryB

Delete a chat summary file.

Args: filename: Name of the summary file to delete

Returns: Confirmation message

Inputs: filename (required). Returns: result

list_summariesB

List recent chat summaries from the notes directory.

Args: limit: Maximum number of summaries to list (default: 10)

Returns: List of recent summary files with their creation dates

Inputs: limit. Returns: result

summarize_chatA

Summarize chat history and save it as a markdown file.

Args: chat_history: The chat conversation text to summarize title: Optional title for the summary (will be used in filename) summary_style: Style of summary - 'brief', 'detailed', or 'bullet_points' include_full_history: Whether to include the full chat history in the summary file (default: True) create_separate_full_history: Whether to create a separate file with just the full history (default: False)

Returns: Path to the created summary file and preview of the summary

Inputs: chat_history (required), title, summary_style, include_full_history, +1 more. Returns: result

summarize_large_chatB

Handle extremely large chat histories by chunking them into manageable pieces. Each chunk gets its own summary, then creates a master summary.

Args: chat_history: The large chat conversation text to summarize title: Optional title for the summary chunk_size: Size of each chunk in characters (default: 50,000) overlap: Overlap between chunks in characters (default: 5,000)

Returns: Information about the chunked summaries created

Inputs: chat_history (required), title, chunk_size, overlap. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.5/5.0

    Scored across 4 tools

    Disambiguation4/5

    The tools are mostly distinct with clear purposes: list, create (summarize), and delete. However, summarize_chat and summarize_large_chat have overlapping functionality for summarizing chats, which could cause confusion about when to use each. The descriptions help differentiate them based on chat size, but the overlap is notable.

    Naming Consistency5/5

    All tool names follow a consistent verb_noun pattern (e.g., delete_summary, list_summaries, summarize_chat, summarize_large_chat). The naming is predictable and readable, with no deviations in style or convention.

    Tool Count4/5

    With 4 tools, the count is reasonable for a chat summarizer server, covering core operations like list, create, and delete. It's slightly lean but well-scoped, though adding a tool for updating or viewing summaries might enhance completeness.

    Completeness3/5

    The toolset covers create (summarize), list, and delete operations, but lacks a tool for updating or retrieving a specific summary (e.g., get_summary). This gap could hinder agents from modifying existing summaries or accessing details without listing all. The domain is chat summarization, and while basic workflows are supported, the absence of update/retrieve is a notable omission.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers