Get the FREE Ultimate OpenClaw Setup Guide →

mcp -chatsum

Query and Summarize your chat messages.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio chatmcp-mcp-server-chatsum node build/index.js \
  --env CHAT_DB_PATH="path-to/mcp-server-chatsum/chatbot/data/chat.db"

How to use

This MCP server is designed to summarize your chat messages. It exposes a tool named query_chat_messages that lets you retrieve chat messages based on parameters and generate summarized prompts from those messages. To use it, first ensure your chat database is prepared and the CHAT_DB_PATH environment variable points to your database file. Start the server (for example via Node) and connect Claude or your MCP client to the configured mcp-server-chatsum instance. Once running, you can query messages with specified filters (e.g., time range, user, keywords) and receive a concise summary of the results. The server is built to work with the chat data you saved earlier through the chatbot setup, and its prompts help generate focused summaries from the retrieved messages.

How to install

Prerequisites:

  • Node.js installed on your machine
  • pnpm installed (optional but recommended for development)
  1. Clone the repository and navigate to the project root.
  2. Install dependencies:
pnpm install
  1. Configure environment variable for the chat database by creating a .env file or exporting CHAT_DB_PATH, for example:
# .env
CHAT_DB_PATH=path-to/chatbot/data/chat.db
  1. Build the server:
pnpm build
  1. Run the server (example):
node build/index.js
  1. For development with auto-rebuild, you can use:
pnpm watch

Additional notes

Tips:

  • The server relies on a pre-populated chat database created by the chatbot setup process. Ensure CHAT_DB_PATH points to the correct SQLite database (or your configured DB).
  • When configuring in Claude Desktop, use the mcpServers entry named mcp-server-chatsum and point to the built entry.js (via node) with the appropriate PATHs. Include CHAT_DB_PATH in env.
  • Debugging MCP servers uses stdio; if you encounter issues, consider using the MCP Inspector to diagnose protocol interactions.
  • If you change the build output location, update the args accordingly (e.g., build/index.js).
  • The key tool available is query_chat_messages, which can be extended with additional prompts for more specialized summaries.

Related MCP Servers

Sponsor this space

Reach thousands of developers