AI便签服务

一个为Claude Desktop提供AI驱动的便签功能的MCP服务器,支持添加、读取笔记及生成摘要提示。

  • by farhanfist10
  • Python
  • 本地部署
  • 更新于
在 GitHub 查看 farhanfist10/ai-sticky-notes-mcp

使用说明

AI便签MCP服务器

一个定制的MCP(模型上下文协议)服务器,为Claude Desktop提供AI驱动的便签功能。

特性

  • 添加注释:将新笔记添加到便签文件中
  • 阅读笔记:查看您保存的所有笔记
  • 最新笔记资源:访问最近添加的注释
  • 摘要提示:生成AI提示以总结您的所有笔记

安装

  1. 克隆此存储库:

    git clone https://github.com/farhanfist10/ai-sticky-notes-mcp.git
    cd ai-sticky-notes-mcp
    
  2. 安装依赖项:

    pip install -r requirements.txt
    

配置

将以下内容添加到您的Claude Desktop配置文件中:

视窗

%APPDATA%\Claude\claude_desktop_config.json

macOS

~/Library/Application Support/Claude/claude_desktop_config.json

Linux

~/.config/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "ai-sticky-notes": {
      "command": "python",
      "args": [
        "-m", 
        "mcp.server.fastmcp",
        "/path/to/your/ai-sticky-notes-mcp/main.py"
      ],
      "env": {
        "PYTHONPATH": "/path/to/your/ai-sticky-notes-mcp"
      }
    }
  }
}

重要:替换 /path/to/your/ai-sticky-notes-mcp/ 带有项目目录的实际路径。

用法

配置后,重新启动Claude Desktop。您将可以访问这些工具:

  • add_note(message):添加新注释
  • read_notes():阅读所有笔记
  • 资源 notes://latest:访问最新笔记
  • 提示总结笔记

示例

# The server will create a notes.txt file in the same directory
# All notes are stored persistently in this file

文件结构

ai-sticky-notes-mcp/
├── main.py           # Main MCP server implementation
├── requirements.txt  # Python dependencies
├── README.md        # This file
└── notes.txt        # Auto-generated notes storage (created when first used)

运作原理

此MCP服务器使用FastMCP框架公开以下工具:

  1. 工具:Claude可以调用的函数来添加/读取笔记
  2. 资源:直接访问最新笔记
  3. 鼓励:预先构建的笔记摘要提示

笔记存储在一个简单的文本文件中(notes.txt)当您第一次使用服务器时,它会自动创建。

贡献

请随时打开问题或提交pull请求来改进此MCP服务器!

许可证

MIT许可证-您可以随意使用此项目。