About Praiseforcoder.git
Praiseforcoder.git is an MCP server built around the DeepSeek API that generates brief praise from input and returns JSON. It suits programming interactions that call for a light, encouraging response.
Key features
- 01Generate praise with the DeepSeek-v3 API
- 02Limit replies to one sentence of up to 15 characters
- 03Include an emoji in each reply
- 04Return results or errors as JSON
Use cases
- 01Generate brief encouragement from user input
- 02Test praise generation from the command line
MCP support
This MCP server generates praise responses. The README says it can be started with the MCP CLI and registers with Cursor automatically.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project README程序员鼓励师 🩷🌟阿星
一个基于 DeepSeek API 的简单 MCP 服务,用于生成简短可爱的赞美语句。
环境要求
- Python 3.10+
- DeepSeek API Key
配置
- 确保
.env文件中包含你的 DeepSeek API Key:
DEEPSEEK_API_KEY=your_api_key_here
启动服务
有两种方式可以启动服务:
- 直接使用 Python 启动:
python main.py
- 使用 MCP CLI 启动:
uv run mcp run main.py:server
注意事项
- 服务启动后会自动注册到 Cursor
- 无需额外配置,服务会自动在后台运行
- 如果需要重启服务,先用
pkill -f "python main.py"停止旧服务,再重新启动
实现说明
服务使用 FastMCP 实现,主要特点:
- 使用 DeepSeek Chat 模型
- 限制回复为单句、15字以内
- 每句话都带 emoji
- 保持简短有趣的风格
功能特点
- 通过stdin接收JSON输入,调用DeepSeek-v3 API生成赞美回复
- 通过stdout返回JSON格式的夸夸内容
- 自动处理API错误并返回友好提示
安装依赖
pip install requests
输入输出格式
输入(通过stdin):
{
"text": "用户输入内容",
"api_key": "sk_yourDeepSeekKey" // 可选,也可通过环境变量传递
}
输出(到stdout):
{
"praise": "生成的赞美文本",
"error": "错误信息(如有)"
}
使用方法
命令行测试
# 测试运行
echo '{"text":"我学会用MCP开发了!"}' | python mcp_praise.py
# 带API密钥测试
echo '{"text":"今天代码一次通过","api_key":"sk_xxx"}' | python mcp_praise.py
环境变量配置
可以通过环境变量DEEPSEEK_KEY设置API密钥:
export DEEPSEEK_KEY="sk_yourKeyHere"
Cursor配置
在Cursor中配置:
{
"praise-bot": {
"command": "python",
"args": ["/path/to/mcp_praise.py"],
"env": {
"DEEPSEEK_KEY": "sk_yourKeyHere"
}
}
}
注意事项
- API密钥优先使用输入参数,其次使用环境变量
- 超时设置为10秒,避免长时间阻塞
- 确保响应立即输出,使用
sys.stdout.flush()进行刷新
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.