Development · MODEL CONTEXT PROTOCOL

AlexiFeng MCP Chat Logger

📝 A FastMCP tool that automatically saves AI chat conversations to well-formatted Markdown files with timestamps and metadata.

连接能力

AlexiFeng MCP Chat Logger 为 AI Agent 提供什么

来源目录未提供结构化功能列表,请在使用前阅读源仓库文档。

安全

MCP 收录不等于安全审核

MCP 服务器可能获得模型上下文、凭据、本地文件或调用外部系统的权限。连接 Agent 前,请检查代码、环境变量、网络行为、软件包来源与维护状态。

README

仓库文档

MCP Chat Logger

Smithery License: MIT

Chinese documentation / 中文文档

MCP Chat Logger is a small Model Context Protocol server that lets an AI client save a conversation as a readable Markdown file.

What it does

  • Exposes a save_chat_history MCP tool
  • Writes messages, roles, and timestamps to Markdown
  • Uses an optional conversation ID in the filename and document header
  • Stores logs locally in the chat_logs/ directory

Requirements

  • Python 3.10 or newer
  • uv
  • An MCP-compatible client

Quick start

Clone the repository and install the locked dependencies:

git clone https://github.com/AlexiFeng/MCP_Chat_Logger.git
cd MCP_Chat_Logger
uv sync

Start the server over stdio:

uv run chat_logger.py

Client configuration

Use an absolute path to your clone. A typical MCP client configuration looks like this:

{
  "mcpServers": {
    "chat_logger": {
      "command": "uv",
      "args": [
        "--directory",
        "/absolute/path/to/MCP_Chat_Logger",
        "run",
        "chat_logger.py"
      ]
    }
  }
}

The outer configuration shape can differ between clients; the command and args values remain the same.

Tool input

save_chat_history accepts:

Field Type Required Description
messages array Yes Chat messages containing role and content fields
conversation_id string No Identifier added to the output filename and document header

Example message list:

[
  {"role": "user", "content": "Summarize this experiment."},
  {"role": "assistant", "content": "Here are the main findings..."}
]

Generated files are written to chat_logs/chat_<timestamp>.md, or chat_logs/chat_<conversation_id>_<timestamp>.md when an ID is supplied.

Install with Smithery

For clients supported by Smithery:

npx -y @smithery/cli install @AlexiFeng/MCP_Chat_Logger --client claude

Privacy

Conversation logs are written to the machine running this server. Review the content before sharing or committing generated files. The chat_logs/ directory is excluded from Git by default.

Development

uv sync
uv run python -m compileall chat_logger.py

Issues and pull requests are welcome.

License

MIT

在 GitHub 查看 README

社区

收藏、评分与讨论

正在载入社区数据…