Featured

Deploy OpenClaw in 60 seconds — 20% off logoDeploy OpenClaw in 60 seconds — 20% off

Launch OpenClaw on Hostinger in about 60 seconds and keep your agent live 24/7. Our referral link gives you 20% off, no coupon code needed.

Launch on Hostinger
Run your Hermes agent on Hostinger, fully managed logoRun your Hermes agent on Hostinger, fully managed

Launch Hermes on Hostinger in one click, fully managed, no VPS knowledge needed. Use code ZACAARON10 for 10% off.

Launch on Hostinger
Crawl and scrape any site into clean data, 10% off logoCrawl and scrape any site into clean data, 10% off

Firecrawl crawls and scrapes any site into clean markdown for your agent. Get 1,000 free credits, and new users get 10% off their first purchase.

Try Firecrawl free
6,000+ web scrapers for your AI agent, start free logo6,000+ web scrapers for your AI agent, start free

Apify gives your agent live web data: 6,000+ prebuilt scrapers and actors, MCP-ready. Sign up free with $5 in usage credits.

Try Apify free
One API to scrape, enrich, and extract the internet. logoOne API to scrape, enrich, and extract the internet.

Context.dev gives your agents a single API to scrape, enrich, and extract live web data — no proxies, no parsers, no maintenance.

Start building free
SetupClaw: done-for-you OpenClaw for founders & exec teams logoSetupClaw: done-for-you OpenClaw for founders & exec teams

White-glove OpenClaw for founders and exec teams (4–50+ employees): we install, harden, integrate your tools, and maintain it — secured from day one.

Get it set up for you
SEO data APIs for your agent, $1 free credit logoSEO data APIs for your agent, $1 free credit

DataForSEO gives your agent live access to SERP results, keyword data, backlinks, and on-page SEO data through one API. New accounts get a $1 credit, good for up to 20,000 keyword or backlink lookups.

Try DataForSEO free
Reach 48,000+ AI builders

A flat monthly placement in front of developers actively installing AI tools. No lock-in, cancel anytime.

Advertise here

Works with

Claude CodeClaude DesktopCursorVS CodeClineCodex CLIOpenClaw+ any MCP client

Install to Claude Code

This server doesn't publish a one-line install command. Follow the setup in the source repository.

Summary

A CLI-based MCP server for managing conversation sessions, history, and multi-language support, enabling creation, switching, deletion of sessions, saving and searching messages, and exporting data.

README.md

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

See related servers & alternatives →

Related MCP servers

Browse all →

Related guides

Hand-picked reading to help you choose and use Search servers.