Skip to main content
Glama
NicoLa5Tor

@nicola5tor/openproject-timelog

by NicoLa5Tor

@nicola5tor/openproject-timelog

MCP 服务器(Model Context Protocol),用于记录本地工时日志并与 OpenProject(API v3)同步。从 Claude Desktop(或其他 MCP 客户端)以自然语言记录你的工作,随时查看,并在准备好后上传到 OpenProject。

  • 传输: stdio

  • 本地存储: ~/.openproject-timelog/entries.json

  • 配置: 环境变量 OPENPROJECT_URLOPENPROJECT_API_KEY

安装

无需全局安装任何东西:服务器通过 npx 运行。

# probarlo directamente
npx @nicola5tor/openproject-timelog

或者安装到项目中:

npm install @nicola5tor/openproject-timelog
# o
pnpm add @nicola5tor/openproject-timelog

Related MCP server: OpenProject MCP Server

在 Claude Desktop 中配置

编辑配置文件(claude_desktop_config.json),在 mcpServers 下添加服务器:

{
  "mcpServers": {
    "openproject-timelog": {
      "command": "npx",
      "args": ["-y", "@nicola5tor/openproject-timelog"],
      "env": {
        "OPENPROJECT_URL": "https://tu-openproject.example.com",
        "OPENPROJECT_API_KEY": "TU_API_KEY"
      }
    }
  }
}

保存后重启 Claude Desktop。

如何获取你的 OpenProject API 密钥

在 OpenProject 中:我的账户 → Access tokens → API,然后生成一个密钥。服务器使用 Basic auth 进行身份验证,用户名为字面量 apikey,你的密钥作为密码。

仅本地的工具(log_entrylist_entriesedit_entryassign_entrydelete_entryclear_sent)即使不配置 OpenProject 也能正常工作。查询和上传工具需要 OPENPROJECT_URLOPENPROJECT_API_KEY

工具

本地日志

工具

描述

log_entry

记录一条工时条目。参数:descriptionhoursworkPackageIdprojectIdactivityIdspentOn(默认今天)、startTimeendTime。如果没有 workPackageId,则保持待分配。

list_entries

按状态列出条目。参数:status = pending(默认)| sent | all

edit_entry

编辑一条待处理条目。参数:id* + 任意可编辑字段。

assign_entry

将一个 work package 分配给多条条目。参数:entryIdsworkPackageId

delete_entry

删除一条待处理条目。参数:id*

clear_sent

从本地日志中删除所有已发送(sent)的条目。

查询 OpenProject

工具

描述

get_projects

列出项目(idnamestatus)。

get_work_packages

列出任务。可选参数:projectIdstatusassignee

get_activities

列出工时条目活动(idname)。

get_time_entries

查询已登记的工时。可选参数:projectIdworkPackageIdfromto

同步

工具

描述

upload_entries

将条目上传到 OpenProject。可选参数 entryIds;如果省略,则上传所有带 workPackageIdpending 条目。每条条目都需要 workPackageIdactivityId;缺少这些字段的条目会被报告而不上传。上传后,将该条目标记为 sent

\* = requerido.

行为说明

  • 本地 id 是 UUID v4。工时以十进制保存(1.5 = 1h30m),上传时转换为 ISO 8601 时长(PT1H30M)。

  • 如果条目未指定 projectId,上传时会从 work package 派生(额外调用一次 OpenProject)。

  • JSON 文件以原子方式写入(临时文件 + rename),操作会被串行化以避免损坏。

  • 网络 / 凭据 / 权限错误会作为可读消息在工具的响应中返回,不会导致服务器崩溃。

对话使用示例

你: 记录今天修复登录的 2 小时,任务 1234。 Claude: (调用 log_entry,description="修复登录"、hours=2、workPackageId=1234)

你: 给我记 45 分钟会议,任务我稍后再设置。 Claude: log_entry description="会议"、hours=0.75) —— 保持待分配。

你: 我有什么待上传的? Claude: list_entries status="pending")

你: 给那两条会议记录设置任务 1234。 Claude: assign_entry entryIds=[...]、workPackageId=1234)

你: 有哪些活动?把所有条目都设为 "Development" 并上传。 Claude: get_activitiesedit_entry/assign 设置 activityId → upload_entries

你: 清理已上传的条目。 Claude: clear_sent

开发

npm install      # instala deps y compila (prepare -> build)
npm run build    # compila TypeScript a dist/
npm start        # ejecuta dist/index.js

结构:

openproject-timelog/
├── src/
│   ├── index.ts        # entry point, setup MCP y registro de tools
│   ├── store.ts        # CRUD bitácora local (JSON atómico)
│   ├── openproject.ts  # cliente API OpenProject v3
│   └── types.ts        # interfaces/types
├── package.json
├── tsconfig.json
└── README.md

许可证

MIT

Install Server
F
license - not found
Not graded
quality - not tested
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • F
    license
    Not graded
    quality
    D
    maintenance
    An MCP server that connects Claude Desktop to your OpenProject instance, allowing you to manage projects, tasks, and time entries through natural language.

View all related MCP servers

Related MCP Connectors

  • MCP server for generating rough-draft project plans from natural-language prompts.

  • A MCP server built for developers enabling Git based project management with project and personal…

  • MCP Server for Slima - AI Writing IDE for Novel Authors with AI Beta Reader.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/NicoLa5Tor/openMcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server