Back to MCP directory
publicPublicdnsLocal runtime

mcp-mood-quotes

一个基于用户情绪返回励志名言的MCP服务器

article

README

🚀 MCP 情绪名言服务器

MCP 情绪名言服务器是一个简单的模型上下文协议(MCP)服务器,可依据用户的情绪返回励志名言。它能与 Claude 等大型语言模型(LLMs)搭配使用,也能借助curl等工具进行本地测试。

🚀 快速开始

安装步骤

  1. 克隆此仓库:
git clone https://github.com/computerscienceiscool/mcp-mood-quotes.git
  1. 进入项目目录:
cd mcp-mood-quotes
  1. 运行服务器:
go run main.go

使用方法

本地使用curl测试:

curl -X POST -H "Content-Type: application/json" \
  -d '{"tool":"mcp-mood-quotes","input":{"mood":"happy"}}' \
  http://localhost:8080/messages/

预期输出:

data: {"output":{"quote":"幸福不是现成的。它来自你的行为。——达赖喇嘛"}}

✨ 主要特性

  • 向服务器发送带有情绪(如“快乐”“悲伤”“疲惫”等)的 POST 请求,服务器会返回与该情绪相关的名言。
  • 支持多种情绪,包括“happy(快乐)”“sad(悲伤)”“tired(疲惫)”“excited(兴奋)”“angry(生气)”,其他情绪将返回默认消息,表示没有可用的引语。
  • 此服务器兼容模型上下文协议,可与大型语言模型(LLMs)如 Claude 一起使用,还可能在 Nanda 注册表中注册以实现更广泛的应用。

📚 详细文档

支持的情绪

  • happy(快乐)
  • sad(悲伤)
  • tired(疲惫)
  • excited(兴奋)
  • angry(生气)

其他情绪将返回一条默认消息,表示没有可用的引语。

与 Nanda 和 Claude 的集成

此服务器兼容模型上下文协议,并可能在 Nanda 注册表中注册以实现更广泛的应用。

🔧 技术细节

项目结构

mcp-mood-quotes/
├── main.go
└── README.md

📄 许可证

文档未提及相关信息,故跳过该章节。

👨‍💻 作者

由@computerscienceiscool创建

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client