MCP Connector

Query and Summarize Chat Messages

Query and summarize your saved chat messages from a local chat database directly through Claude Desktop.


77
Spark score
out of 100
Updated Dec 2024
Version 1.0.0
Models

Add to Favorites

Why it matters

Analyze your conversation history by querying a local chat database and summarizing messages based on your queries. This asset integrates with chatbot systems for persistent chat message storage.

Outcomes

What it gets done

01

Query chat messages from a local database.

02

Summarize chat messages based on specific queries.

03

Persist chat messages using an integrated chatbot system.

Install

Add it to your toolbox

Run in your project directory:

curl -fsSL https://spark.entire.vc/get/vb-chatsum | bash

Capabilities

Tools your agent gets

query_chat_messages

Query and summarize chat messages from a local database based on specified parameters

Overview

ChatSum MCP Server

An MCP server that queries and summarizes chat messages stored in a local SQLite database populated by a companion chatbot app. Reach for this when you already use the companion chatbot app to save chat history and want an AI assistant to query and summarize it.

What it does

ChatSum MCP Server summarizes chat messages stored in a local chat database. It provides query_chat_messages, which queries chat messages with given parameters and summarizes them based on the query prompt. It's paired with a companion chatbot application that saves your chat messages into a local SQLite database (chat.db), which this MCP server then reads from.

pnpm install
pnpm build

When to use - and when NOT to

Use this when you want an AI assistant to query and summarize chat history that has been saved by the companion chatbot app into its local database - for example, asking for a summary of recent conversations matching certain criteria.

Do NOT use this without first setting up the companion chatbot directory to capture and save chat messages into the database - this MCP server only reads from an existing chat database, it does not capture messages itself. Requires CHAT_DB_PATH pointing to that database file.

Inputs and outputs

Inputs are query parameters and a summarization prompt; outputs are matching chat messages and a generated summary.

Key tool: query_chat_messages(parameters, prompt).

Integrations

A local SQLite chat database (chat.db) populated by the companion chatbot application, configured via the CHAT_DB_PATH environment variable.

Who it's for

Users of the companion chatbot app who want an AI assistant to query and summarize their saved chat history conversationally.

Source README

mcp-server-chatsum

This MCP Server is used to summarize your chat messages.

中文说明

Before you start

move to chatbot directory, follow the README to setup the chat database.

start chatbot to save your chat messages.

Features

Resources

Tools

  • query_chat_messages - Query chat messages
    • Query chat messages with given parameters
    • Summarize chat messages based on the query prompt

Prompts

Development

  1. Set up environment variables:

create .env file in the root directory, and set your chat database path.

CHAT_DB_PATH=path-to/chatbot/data/chat.db
  1. Install dependencies:
pnpm install

Build the server:

pnpm build

For development with auto-rebuild:

pnpm watch

Installation

To use with Claude Desktop, add the server config:

On MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
On Windows: %APPDATA%/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "mcp-server-chatsum": {
      "command": "path-to/bin/node",
      "args": ["path-to/mcp-server-chatsum/build/index.js"],
      "env": {
        "CHAT_DB_PATH": "path-to/mcp-server-chatsum/chatbot/data/chat.db"
      }
    }
  }
}

Debugging

Since MCP servers communicate over stdio, debugging can be challenging. We recommend using the MCP Inspector, which is available as a package script:

pnpm inspector

The Inspector will provide a URL to access debugging tools in your browser.

Community

About the author

FAQ

Common questions

Discussion

Questions & comments · 0

Sign In Sign in to leave a comment.