🧠 Custom MCP Server for AI-Powered Sticky Notes

🧠 Custom MCP Server for AI-Powered Sticky Notes

site icon
2025.04.14 0
Python便签管理生产力工具开发效率
Custom-MCP-Server-for-AI-Powered-Sticky-Notes 是一个轻量级、可定制的 MCP(多命令协议)服务器,用于通过自然语言命令管理便签。它适用于生产力、提醒和 AI 增强的创意生成。该项目基于 FastMCP 构建,并使用 uv 包管理器进行快速和现代的 Python 项目管理。
View on GitHub

Overview

🚀 核心功能

  • 支持添加、读取和检索便签
  • 便签持久存储在本地 .txt 文件中
  • 轻松与 Claude 桌面应用集成
  • 使用 uv 进行快速和现代的 Python 项目管理

💪 安装与使用教程

1. 安装 uv

对于 Windows (PowerShell):

powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"

对于 Mac/Linux (使用 curl):

curl -LsSf https://astral.sh/uv/install.sh | sh

或者使用 wget:

wget -qO- https://astral.sh/uv/install.sh | sh

💡 你也可以安装特定版本: curl -LsSf https://astral.sh/uv/0.6.14/install.sh | sh

2. 初始化项目

uv init .

3. 添加 MCP 作为依赖

uv add "mcp[cli]"

4. 运行 MCP 服务器

将所有服务器逻辑放在 main.py 文件中。

然后,安装 MCP:

uv run mcp install main.py

这将注册你的自定义 MCP 服务器到兼容的客户端。

🚧 Claude 桌面集成

如果你安装了 Claude 桌面应用

  • 只需运行: bash uv run mcp install main.py
  • Claude 会自动检测并注册你的自定义 MCP 服务器。
  • 如果你没有看到新的工具或命令:
  • 从任务管理器结束 Claude 应用任务
  • 重新启动 Claude 桌面应用
  • 你的 MCP 服务器和工具现在应该可见了

📚 项目结构

.
├── main.py            # 包含所有核心逻辑:工具、资源、提示
├── notes.txt          # 本地持久存储便签
└── README.md          # 项目文档

🎓 许可证

该项目在 MIT License 下授权。

🚀 致谢

使用以下工具构建: - FastMCP - uv - Claude AI 用于无缝本地测试

许可证

该项目遵循 MIT 开源许可条款。