Jrnl Mcp

Jrnl Mcp

🚀 jrnl MCP Server

jrnl MCP Server 是一个模型上下文协议(MCP)服务器,它能提供对 jrnl(命令行日记工具)条目的只读访问,方便用户管理和查询日记信息。

🚀 快速开始

前提条件

  • Node.js 18 或更高版本
  • 已安装并配置 jrnl(pip install jrnl

安装步骤

npm install
npm run build
npm link  # 全局安装,可使用 jrnl-mcp 命令

Claude 桌面端配置

将以下内容添加到你的 Claude 桌面端配置文件中:

macOS

文件位置:~/Library/Application Support/Claude/claude_desktop_config.json

配置内容

{
"mcpServers": {
"jrnl": {
"command": "jrnl-mcp"
}
}
}

注意:如果你通过 npm link 进行安装,该命令将在全局可用。若要在不进行全局安装的情况下进行本地开发,请使用以下配置:

{
"mcpServers": {
"jrnl": {
"command": "node",
"args": ["<项目路径>/dist/index.js"]
}
}
}

✨ 主要特性

  • search_entries:使用过滤器搜索日记条目
  • list_tags:列出所有标签及其使用次数
  • get_statistics:获取日记统计信息
  • analyze_tag_cooccurrence:分析标签共现情况
  • list_journals:列出可用的日记
  • set_journal:切换到不同的日记

💻 使用示例

基础用法

# 搜索上周的日记条目
# 前提:已在 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   # 构建生产版本

使用 Claude 桌面端进行测试

  1. 构建项目:npm run build
  2. 使用正确的路径更新你的 Claude 桌面端配置
  3. 重启 Claude 桌面端
  4. 通过向 Claude 询问来测试搜索日记条目功能

示例提示语:

  • "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?"
  • "Search my journal entries for entries tagged with @work using jrnl"

📄 许可证

本项目采用 MIT 许可证

License: MIT Node.js Claude jrnl

  • 0 关注
  • 0 收藏,11 浏览
  • system 提出于 2025-09-20 12:42

相似服务问题