$git clone https://github.com/chatmcp/mcp-server-chatsumThis MCP Server is used to summarize your chat messages.
| 1 | # mcp-server-chatsum |
| 2 | |
| 3 | This MCP Server is used to summarize your chat messages. |
| 4 | |
| 5 | [中文说明](README_CN.md) |
| 6 | |
| 7 |  |
| 8 | |
| 9 | > **Before you start** |
| 10 | > |
| 11 | > move to [chatbot](./chatbot) directory, follow the [README](./chatbot/README.md) to setup the chat database. |
| 12 | > |
| 13 | > start chatbot to save your chat messages. |
| 14 | |
| 15 | ## Features |
| 16 | |
| 17 | ### Resources |
| 18 | |
| 19 | ### Tools |
| 20 | |
| 21 | - `query_chat_messages` - Query chat messages |
| 22 | - Query chat messages with given parameters |
| 23 | - Summarize chat messages based on the query prompt |
| 24 | |
| 25 | ### Prompts |
| 26 | |
| 27 | ## Development |
| 28 | |
| 29 | 1. Set up environment variables: |
| 30 | |
| 31 | create `.env` file in the root directory, and set your chat database path. |
| 32 | |
| 33 | ```txt |
| 34 | CHAT_DB_PATH=path-to/chatbot/data/chat.db |
| 35 | ``` |
| 36 | |
| 37 | 2. Install dependencies: |
| 38 | |
| 39 | ```bash |
| 40 | pnpm install |
| 41 | ``` |
| 42 | |
| 43 | Build the server: |
| 44 | |
| 45 | ```bash |
| 46 | pnpm build |
| 47 | ``` |
| 48 | |
| 49 | For development with auto-rebuild: |
| 50 | |
| 51 | ```bash |
| 52 | pnpm watch |
| 53 | ``` |
| 54 | |
| 55 | ## Installation |
| 56 | |
| 57 | To use with Claude Desktop, add the server config: |
| 58 | |
| 59 | On MacOS: `~/Library/Application Support/Claude/claude_desktop_config.json` |
| 60 | On Windows: `%APPDATA%/Claude/claude_desktop_config.json` |
| 61 | |
| 62 | ```json |
| 63 | { |
| 64 | "mcpServers": { |
| 65 | "mcp-server-chatsum": { |
| 66 | "command": "path-to/bin/node", |
| 67 | "args": ["path-to/mcp-server-chatsum/build/index.js"], |
| 68 | "env": { |
| 69 | "CHAT_DB_PATH": "path-to/mcp-server-chatsum/chatbot/data/chat.db" |
| 70 | } |
| 71 | } |
| 72 | } |
| 73 | } |
| 74 | ``` |
| 75 | |
| 76 | ### Debugging |
| 77 | |
| 78 | Since MCP servers communicate over stdio, debugging can be challenging. We recommend using the [MCP Inspector](https://github.com/modelcontextprotocol/inspector), which is available as a package script: |
| 79 | |
| 80 | ```bash |
| 81 | pnpm inspector |
| 82 | ``` |
| 83 | |
| 84 | The Inspector will provide a URL to access debugging tools in your browser. |
| 85 | |
| 86 | ## Community |
| 87 | |
| 88 | - [MCP Server Telegram](https://t.me/+N0gv4O9SXio2YWU1) |
| 89 | - [MCP Server Discord](https://discord.gg/RsYPRrnyqg) |
| 90 | |
| 91 | ## About the author |
| 92 | |
| 93 | - [idoubi](https://bento.me/idoubi) |