IDE Chat Summarizer

IDE Chat Summarizer

Transforms chat conversations with AI into structured markdown summaries and automatically saves them to organized files in your notes directory. Supports different summary styles, handles large conversations through chunking, and provides tools to manage your saved summaries.

Category
访问服务器

README

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.

✨ 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

1. Using MCP Inspector (Recommended for Development)

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:

Option 1: Standard with Full History (Recommended)

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 ExtensionsMCP
  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!

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选