使用说明
mcp服务器runrunit
MCP 服务器模型上下文协议与 API 集成 Runrun.it允许Claude直接通过MCP工具与Runrun.it的任务,用户和项目进行交互。
- API文件:https://runrun.it/api/documentation
可用工具
| 工具 | 描述 |
|---|---|
get_task 按 ID(标题、描述、状态、负责人等)查找任务信息。 |
|
get_task_details |
返回任务的完整 API 原始响应(对技术领域有用) |
get_task_description |
返回任务描述的详细信息(文本、当前编辑用户、日期) |
list_tasks 列出带有可选过滤器的任务。 |
|
create_task 创建一个新任务 |
|
update_task 更新现有任务 |
|
update_task_description 更新任务描述的文本/正文。 |
|
list_projects 列出可用的项目。 |
|
get_me |
返回已验证用户的数据 |
list_users 组织用户列表。 |
|
create_time_entry 记录在一个任务中工作的时间。 |
|
list_time_entries |
带有可选过滤器的记录时间列表 |
过滤器和工具参数
list_tasks
| 参数 | 类型 | 描述 |
|---|---|---|
responsible_id |
string | 负责人的 Slug (例如: "mario-neto") |
project_id |
项目号码 | |
team_id |
number | ID执行时间 |
is_closed |
布尔 | 按日期任务筛选 |
sort_by |
string | 排序字段(例如: "created_at") |
page |
number | 页面 |
limit 任务数量(最多100个) |
create_task — 强制性的: title, project_id
| 参数 | 类型 | 描述 |
|---|---|---|
title |
string | 任务标题 |
project_id |
项目号码 | |
responsible_id |
string | 负责人的 Slug |
team_id |
number | ID执行时间 |
estimated_delivery_date |
string | 数据无格式 YYYY-MM-DD |
current_estimate_seconds 以秒计算(例如:3600 = 1h) |
||
is_urgent |
boolean | 标记为紧急 |
update_task — 必填项: id — 接受字段的任何组合 create_task + board_stage_id, is_closed
get_task_description — 必填项: task_id
| 参数 | 类型 | 描述 |
|---|---|---|
task_id |
number | ID da任务 |
update_task_description — 强制性的: task_id, body
| 参数 | 类型 | 描述 |
|---|---|---|
task_id |
number | ID da任务 |
body |
string | 替换任务描述的正文 |
list_projects
| 参数 | 类型 | 描述 |
|---|---|---|
limit |
项目数量 | |
page |
number | 页面 |
list_users
| 参数 | 类型 | 描述 |
|---|---|---|
team_id |
数字 | 按时间过滤 |
limit |
用户数量 |
create_time_entry — 强制性的: task_id, amount, date
| 参数 | 类型 | 描述 |
|---|---|---|
task_id |
number | ID da任务 |
amount 以秒为单位的时间(例如:3600 = 1h) |
||
date |
string | 数据无格式 YYYY-MM-DD |
description |
string | 完成的工作描述 |
list_time_entries
| 参数 | 类型 | 描述 |
|---|---|---|
task_id |
数字 | 按任务筛选 |
user_id |
string | 按用户过滤 (slug) |
start_date |
string | 数据专用 YYYY-MM-DD |
end_date |
string | 最终数据 YYYY-MM-DD |
limit |
number | 记录数量 |
先决条件
- Node.js 18+
- Runrun.it API 凭据: 应用密钥 e 用户令牌
- 访问 设置 → 集成 → API 在 Runrun.it 获取您的凭据
安装
git clone <repo>
cd mcp-server-runrunit
npm install
创建文件 .env 雷兹:
RUNRUNIT_APP_KEY=sua_app_key
RUNRUNIT_USER_TOKEN=seu_user_token
与 Claude Code 一起使用
1. 将服务器添加到 settings.json
打开 Claude Code 设置 (/settings 你编辑 ~/.claude/settings.json)并添加:
{
"mcpServers": {
"runrunit": {
"type": "stdio",
"command": "npx",
"args": ["-y", "github:mariombn/mcp-server-runrunit"],
"env": {
"RUNRUNIT_APP_KEY": "${RUNRUNIT_APP_KEY}",
"RUNRUNIT_USER_TOKEN": "${RUNRUNIT_USER_TOKEN}"
}
}
}
}
替换
/caminho/absoluto/para/mcp-server-runrunit在你的系统中真正的道路。
2.重新定义克劳德密码
保存设置后,重新启动 Claude Code 以加载 MCP 服务器。
3. 检查服务器是否处于活动状态
无克劳德代码,执行 /mcp 查看连接的服务器。服务器 runrunit 应该出现在可用工具列表中。
4. 在对话中使用工具
Claude 可以根据需要自动使用这些工具。您也可以直接要求它们:
Liste as tasks abertas do projeto X
Mostre os detalhes da task 1234
Quais tasks estão atribuídas a mim?
备选:使用已编译的构建
为了获得最佳的生产性能,请先编译:
npm run build
E配置o settings.json 使用 node 而不是 tsx:
{
"mcpServers": {
"runrunit": {
"type": "stdio",
"command": "npx",
"args": ["-y", "github:mariombn/mcp-server-runrunit"],
"env": {
"RUNRUNIT_APP_KEY": "${RUNRUNIT_APP_KEY}",
"RUNRUNIT_USER_TOKEN": "${RUNRUNIT_USER_TOKEN}"
}
}
}
}
开发
npm run dev # roda direto com tsx (sem build)
npm run build # compila para ./build
npm test # roda os testes
npm run test:watch # testes em modo watch
npm run test:coverage # cobertura de código
项目结构
src/
├── index.ts # Entry point: instancia o server, agrega tools, conecta transport
├── env.ts # Validação de variáveis de ambiente (t3-env + zod)
├── client.ts # runrunitFetch() + interfaces TypeScript da API
└── tools/
├── tasks.ts # get_task(s), create/update_task, task_descriptions
├── users.ts # get_me, list_users
├── projects.ts # list_projects
└── time.ts # create_time_entry, list_time_entries
tests/
├── client.test.ts
└── tools/
├── tasks.test.ts
├── projects.test.ts
├── users.test.ts
└── time.test.ts
堆栈
- TypeScript (严格模式,ESNext+NodeNext模块)
- @模型上下文协议/sdk MCP 官方 SDK
- t3 env+zod 环境变量的验证
- 获取本地 Node.js — 没有轴或 node-fetch
- Vitest 单位测试
- 多伦多证券交易所 para-dev,
tsc准建筑