home / mcp / chatsum mcp server

Chatsum MCP Server

Queries and summarizes chat messages from a chat database via MCP to provide concise summaries and insights.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "mcpso-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"
      }
    }
  }
}

You can run an MCP Server that collects and summarizes your chat messages, exposing a simple interface you can query to retrieve and condense chat data for quick insights.

How to use

You interact with the Chatsum MCP Server through an MCP client. Start the server locally and point your client to the configured MCP endpoint. Use the provided query tool to fetch chat messages based on your criteria, then request a summary of those messages to get a concise overview.

How to install

Prerequisites: Node.js and pnpm installed on your system. You will also need a chat database ready for the server to read.

# 1) Install dependencies
pnpm install

# 2) Build the server
pnpm build

# 3) (Optional) Run in watch mode for auto-rebuild during development
pnpm watch

Additional setup for local development and debugging

Set up your environment so the server can locate your chat database. Create a .env file in the server’s root directory and define the path to your chat database as CHAT_DB_PATH. The path should point to the location where your chat.db resides.

CHAT_DB_PATH=path-to/chatbot/data/chat.db

Configuring the MCP connection

To connect this server as an MCP endpoint for Claude Desktop or other MCP clients, you will run the server locally and provide the runtime command along with the required environment variables.

{
  "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

MCP servers communicate over stdio, which can be challenging to troubleshoot. Use a debugging tool that exposes a browser-based inspector. Start the inspector to obtain a URL for debugging tools in your browser.

pnpm inspector

Notes on environment and tooling

The development workflow commonly uses pnpm for package management. The server expects a chat database at CHAT_DB_PATH and loads configuration from the runtime command you specify in your MCP client setup.

Troubleshooting tips

If the server fails to start, verify that the CHAT_DB_PATH points to a valid database and that the build output index.js exists at the path you specified. Check that the node runtime path in the command matches your local Node.js installation.

Available tools

query_chat_messages

Query chat messages with given parameters and generate a summary based on the query prompt.