jrnl MCP Server 是一个模型上下文协议(MCP)服务器,它能提供对 jrnl(命令行日记工具)条目的只读访问,方便用户管理和查询日记信息。
pip install jrnl
)npm install
npm run build
npm link # 全局安装,可使用 jrnl-mcp 命令
将以下内容添加到你的 Claude 桌面端配置文件中:
文件位置:~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"jrnl": {
"command": "jrnl-mcp"
}
}
}
注意:如果你通过 npm link
进行安装,该命令将在全局可用。若要在不进行全局安装的情况下进行本地开发,请使用以下配置:
{
"mcpServers": {
"jrnl": {
"command": "node",
"args": ["<项目路径>/dist/index.js"]
}
}
}
# 搜索上周的日记条目
# 前提:已在 Claude 中正确配置 jrnl MCP Server
"Use jrnl to show me my journal entries from last week"
# 列出日记中使用的标签
"Using jrnl, what tags am I using in my journal?"
# 获取日记统计信息
"Can you use jrnl to show me statistics about my journal?"
# 搜索带有 @work 标签的日记条目
"Search my journal entries for entries tagged with @work using jrnl"
npm run format # 格式化代码
npm run lint # 运行代码检查
npm test # 运行测试
npm run build # 构建生产版本
npm run build
示例提示语:
本项目采用 MIT 许可证。