Sarcasm MCP服务器
提供讽刺性引用的模型上下文协议(MCP)服务器。此MCP服务器与AI代理集成,以提供诙谐和讽刺的响应。
🚀 特性
- 获取所有讽刺语录:检索所有可用的讽刺语录
- 获取随机讽刺语录:随便找一句讽刺的话来听听
- MCP集成:与任何支持模型上下文协议的环境无缝集成
📋 需求
- Node.js 18.0或更高版本
- npm或yarn包管理器
🔧 安装
# Clone the repository
git clone https://github.com/yourusername/sarcasm-mcp.git
# Navigate to the project directory
cd sarcasm-mcp
# Install dependencies
npm install
# Build the project
npm run build🧰 发展
# Install dependencies
npm install
# Build the project
npm run build在vs代码中运行mcp
- 如果尚未存在,请在工作区中创建mcp.json
mkdir .vscode
touch .vscode/mcp.json- 将以下配置添加到mcp.json文件中
{
"servers": {
"sarcasm": {
"type": "stdio",
"command": "node",
"args": [
"PATH_TO_YOUR_BUILD_DIRECTORY/index.js"
]
}
}
}🛠️ 用法
通过NPX运行MCP服务器
- 如果尚未存在,请在工作区中创建mcp.json
mkdir .vscode
touch .vscode/mcp.json- 将以下配置添加到mcp.json文件中
{
"servers": {
"sarcasm": {
"type": "stdio",
"command": "npx",
"args": [
"mcp-sarcasm"
]
}
}
}使用GitHub Copilot
此MCP服务器与GitHub Copilot和其他支持模型上下文协议的AI助手集成。连接后,您可以使用以下工具:
get-all-sarcastic-quotes:检索所有可用的讽刺语录get-random-sarcastic-quote:获取一个随机的讽刺引文
例子:
Can you #get-random-sarcastic-quote for me?📦 封装结构
sarcasm-mcp/
├── src/
│ ├── index.ts # Main server file
│ ├── constants/ # API constants
│ ├── service/ # Service for fetching quotes
│ └── types/ # TypeScript type definitions
├── build/ # Compiled JavaScript files
├── package.json # Project dependencies and scripts
└── README.md # This documentation🔌 api参考
此MCP服务器使用以下API终结点:
GET /sarcasm/all-检索所有讽刺语录GET /sarcasm/random-获取一个随机的讽刺引文
响应以以下格式返回:
interface SarcasticQuote {
id: string;
sarcasm: string;
createdAt: string;
updatedAt: string;
}🤝 贡献
欢迎投稿!请随时提交拉取请求。
- 分叉存储库
- 创建功能分支(
git checkout -b feature/amazing-feature) - 提交您的更改(
git commit -m 'Add some amazing feature') - 推到分支(
git push origin feature/amazing-feature) - 打开拉取请求
📝 许可证
此项目根据MIT许可证获得许可-请参阅 许可证 文件以获取详细信息。
