AI便签服务

MCP-Server是一个轻量级模块化的Python服务器,允许用户使用AI工具创建、阅读和总结便签。

  • by HKanoje
  • Python
  • 本地部署
  • 更新于
在 GitHub 查看 hkanoje/mcp-server

使用说明

🗒️ MCP服务器:AI便签

MCP Server是一个轻量级的模块化Python服务器,允许您 创建, 读,以及 总结 使用AI工具制作便签。它建在 FastMCP,提供了一个简单的API样式界面,用于管理存储在文本文件中的注释。


📦 特性

  • ✅ 添加新的便利贴
  • ✅ 查看所有笔记
  • ✅ 检索最新笔记
  • ✅ 生成基于AI的笔记摘要

🧠 运作原理

服务器使用 FastMCP 公开简单的工具和资源:

  • add_note(message) → 在文件中添加新注释。
  • read_notes() → 返回所有存储的钞票。
  • get_latest_note() → 获取最新的纸币。
  • note_summary_prompt() → 返回笔记的摘要提示。

所有笔记都存储在 notes.txt 在同一个目录中。


📁 项目结构

MCP-Server/
│
├── main.py          # Entry point for the MCP server
├── notes.txt        # Storage for all sticky notes
├── .gitignore       # Git ignored files
└── README.md        # Project documentation

📜 示例注释文件

与服务器交互后,您的 notes.txt 可能看起来像这样:

Work meeting today at 10 AM
AI agents use autonomous decision-making to complete tasks without human intervention
Types of AI agents include virtual assistants, recommendation systems, and autonomous vehicles
Agent foundations research focuses on ensuring AI systems make decisions aligned with human values
Multi-agent systems involve multiple AI agents interacting and collaborating to solve complex problems
Reinforcement learning is commonly used to train AI agents through trial and error
AI agents often need to handle uncertainty and incomplete information when making decisions
Tools like LangChain and AutoGPT help developers create and deploy AI agents more easily
Ethical considerations in AI agents include transparency, accountability, and preventing harmful behaviors
Agentic AI systems can use tools and interact with external systems to accomplish goals
Claude Code is an agentic command line tool from Anthropic that lets developers delegate coding tasks to Claude

当你打电话的时候 note_summary_prompt(),它将生成如下提示:

Summarize the current notes: Work meeting today at 10 AM ...

这可以让你的AI模型产生一个简洁的总结,比如:

📌 摘要:日历提醒和人工智能代理的全面概述,包括类型、开发技术(如强化学习)、工具(LangChain、Claude Code)和伦理问题。


🛠️ 需求

  • Python 3.7+
  • fastmcp

✨ 作者

由...创建 香港 --欢迎随时寻求反馈或合作!