npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

mcp-conversation-server

v1.0.1

Published

MCP Server for CLI Conversation Management Tools

Downloads

16

Readme

MCP对话管理服务器

一个基于Model Context Protocol (MCP)的CLI对话管理服务器,提供会话管理、历史记录、多语言支持等功能。

安装

使用npm安装

npm install mcp-conversation-server

从源码安装

git clone <repository-url>
cd mcp-conversation-server
npm install
npm run build

功能特性

  • 会话管理: 创建、切换、删除会话
  • 消息记录: 保存用户和AI的对话历史
  • 搜索功能: 基于关键词搜索历史记录
  • 多语言支持: 支持中英文界面
  • 导出功能: 支持JSON、Markdown、CSV格式导出
  • 统计信息: 会话统计和数据分析
  • MCP标准: 符合Model Context Protocol标准

快速开始

1. 安装依赖

npm install

2. 构建项目

npm run build

3. 运行服务器

npm start

4. 开发模式

npm run dev

MCP工具列表

服务器提供以下MCP工具:

会话管理工具

  • create_session - 创建新会话
  • list_sessions - 列出所有会话
  • switch_session - 切换会话
  • delete_session - 删除会话

消息管理工具

  • save_message - 保存消息
  • get_history - 获取历史记录
  • search_messages - 搜索消息

语言工具

  • set_language - 设置语言
  • get_translation - 获取翻译

导出和统计工具

  • export_history - 导出历史记录
  • get_stats - 获取统计信息

配置示例

Claude Desktop配置

在Claude Desktop的配置文件中添加:

{
  "mcpServers": {
    "conversation-manager": {
      "command": "node",
      "args": ["/path/to/mcp-conversation-server/dist/index.js"]
    }
  }
}

Cursor配置

在Cursor的MCP配置中添加:

{
  "mcpServers": {
    "conversation-manager": {
      "command": "node",
      "args": ["/path/to/mcp-conversation-server/dist/index.js"]
    }
  }
}

API使用示例

创建会话

{
  "name": "create_session",
  "arguments": {
    "name": "我的项目",
    "project": "project-1",
    "metadata": {
      "environment": "development"
    }
  }
}

保存消息

{
  "name": "save_message",
  "arguments": {
    "role": "user",
    "content": "帮我写一个函数",
    "command": "code function"
  }
}

获取历史记录

{
  "name": "get_history",
  "arguments": {
    "limit": 10,
    "format": "table"
  }
}

数据存储

服务器使用JSON文件存储数据:

  • ./.mcp-conversations/sessions.json - 会话数据
  • ./.mcp-conversations/messages.json - 消息数据

开发

项目结构

src/
  index.ts          # 服务器主文件
  tools.ts          # 工具定义
  conversation-manager.ts  # 对话管理器

测试

npm test

许可证

MIT License