Skip to main content
Glama

Core MCP

MCP 工具,通过 Claude Code 将 Jira 工单转化为 PR。从 Jira、GitHub、Notion 和 Slack 获取上下文,构建结构化提示词,处理 git push/PR/CI——全部自主完成。

设置(5 分钟)

1. 安装

git clone https://github.com/adaOctopus/coolplugz-core.git
cd coolplugz-core
npm install

2. 创建你的 .env

cp .env.example .env

打开 .env 并填写:

必填项:

变量

获取方式

GITHUB_TOKEN

github.com/settings/tokens → 生成经典令牌 → 勾选 repo + workflow

SHELL_ENV

你的开发环境:wsl2macoslinuxgit-bashpowershell

REPOS_ROOT

仓库所在的绝对路径,例如 /home/you/projects

可选项(但推荐填写):

变量

获取方式

JIRA_API_TOKEN

id.atlassian.com/manage-profile/security/api-tokens

JIRA_EMAIL

你的 Atlassian 账户邮箱

JIRA_BASE_URL

你的工作区 URL,例如 https://yourteam.atlassian.net

NOTION_TOKEN

notion.so/my-integrations → 创建集成 → 复制令牌

SLACK_TOKEN

api.slack.com/apps → 创建应用 → 机器人令牌,需包含 channels:historysearch:read 权限

ANTHROPIC_API_KEY

启用基于工单文本的 AI 仓库检测和智能 Slack 回复草稿

WSL_DISTRO

仅当 SHELL_ENV=wsl2 时——你的发行版名称(例如 Ubuntu

3. 启动服务器

npm run dev

你应该看到:

CoolPlugz Core MCP server listening on :3100

4. 连接 Claude Code(一次性操作)

claude mcp add coolplugz --transport http http://localhost:3100/mcp

5. 开始使用

打开 Claude Code 并输入:

Show my dashboard
Start PROJ-142

就这样。CoolPlugz 会处理其余所有事情。


Related MCP server: github-workflow-mcp

使用时会发生的流程

You: "Start PROJ-142"

CoolPlugz:
  ├── Fetches Jira ticket (description, acceptance criteria, comments)
  ├── Checks GitHub for existing branches/PRs
  ├── Pulls linked Notion specs
  ├── Finds relevant Slack mentions
  ├── Figures out which repo (from ticket links or fuzzy matching)
  ├── Builds a CRISPE implementation prompt
  └── Returns loop metadata → Claude Code knows exactly what to do next

Claude Code: writes the code, runs tests

You: (or Claude Code automatically calls push_branch)

CoolPlugz:
  ├── Pushes via token-authenticated HTTPS (no SSH needed)
  ├── Handles fork detection/creation automatically
  └── Returns next action → verify_and_submit

CoolPlugz (verify_and_submit):
  ├── Verifies push landed on GitHub (via API, not trusting output)
  ├── Opens PR with correct title/body
  ├── Polls CI for up to 5 minutes
  ├── If CI passes + no review comments → auto-marks DONE
  ├── If CI fails → fetches failure logs, tells Claude Code to fix
  └── If review comments → fetches them, tells Claude Code to address

可用工具

工具

功能

get_dashboard

显示你所有任务的状态、PR 和阻塞项

start_task

获取 Jira 工单的所有上下文并返回实现提示词

push_branch

将你的分支推送到 GitHub——处理认证、fork 等一切事项

verify_and_submit

验证推送、创建 PR、轮询 CI、通过后自动完成

check_comments

获取未解决的 PR 评审评论以供处理

complete_task

验证通过后将任务标记为完成

get_task_state

从存储 + GitHub API 显示真实状态

check_conflicts

检测合并冲突并提供解决步骤

add_insight

添加一条自定义指令,包含在之后所有提示词中

morning_report

生成格式化状态报告,包含已完成任务、PR、CI 结果和 Slack 草稿消息

log_run

跟踪运行开始/结束——为 morning_report 提供每次计划运行的真实数据

自定义指令

告诉 Claude Code 添加指令,CoolPlugz 会将其包含在之后每个提示词中:

"Add an insight: always use pnpm, never npm or yarn"
"Add an insight: this repo uses Tailwind, no inline styles"
"Add an insight for PROJ-142: the auth module uses Passport.js"

全局洞察适用于所有任务。任务级洞察仅适用于单个工单。存储在 ~/.coolplugz/data.json 中,跨会话持久保存。

提示词构建器的工作原理

每次 start_task 都会使用 CRISPE 框架构建结构化提示词:

部分

包含内容

[C] 能力

角色、仓库、分支、工作区设置(WSL2/macOS/Linux)、本地路径

[R] 洞察

完整工单描述、验收标准、Jira 评论、Notion 规格、Slack 上下文、PR 评审评论

[I] 陈述

具体的实现指令

[S] 个性

代码风格、提交规范(feat(PROJ-142): ...)、沟通规则

[P] 实验

自主执行权限、循环工程指令、安全约束

[F] 边界

永不删除、永不推送到 main、永不提交密钥

[Q] 质量

类型安全、精准修改、安全默认值

[D] 开发者洞察

你的自定义指令(来自 add_insight

[E] 错误上下文

重试时之前的失败详情

循环工程

每个工具响应都携带结构化元数据,而非自由文本清单:

State: EXECUTING → Goal: DONE
Next: push_branch({ jiraKey: "PROJ-142", branch: "proj-142-impl", repo: "org/repo" })

Claude Code 读取此信息并自动调用下一个工具。状态机:

IDLE → start_task → EXECUTING → push_branch → PUSHED → verify_and_submit
  → CI passed, no comments → DONE ✅
  → CI failed → fix code → push_branch → verify_and_submit (loop)
  → Review comments → fix → push_branch → verify_and_submit (loop)

自动驾驶提示词

一切连接完成后,将此提示词粘贴到 Claude Code 中,让它自动驾驶运行你的工单——循环处理 Jira、编写代码、推送 PR、发布 Slack 更新:

You are my autonomous dev agent. Use the coolplugz MCP tools to work through my Jira tickets without asking me anything.

Your loop:
1. Call get_dashboard to see all tasks and their status
2. For any task in QUEUED or EXECUTING state, call start_task with its Jira key
3. Follow the loop metadata exactly — the _meta.loop in each response tells you the next tool to call
4. After writing code and running tests, call push_branch to push
5. Call verify_and_submit — it opens the PR, polls CI, and tells you what to do next
6. If CI fails, read the failure logs, fix the code, and push again
7. If there are review comments, call check_comments, address them, push again
8. When done with a task, move to the next one from the dashboard
9. After completing all tasks, post a summary of what you did

Rules:
- Never ask me for confirmation — just do it
- Never push to main — always use feature branches
- Never commit secrets or .env files
- If you get stuck after 3 retries, mark it blocked and move on
- Commit messages follow: feat(TICKET-KEY): description

设置定时任务(即使笔记本合上也能运行)

将此内容粘贴到 Claude Code 中,设置每日计划以自动运行你的工单:

Set up a scheduled task using /schedule that runs every weekday:

- 6:00 AM: Morning run
  1. Call log_run with action "start" and trigger "morning" — save the run_id
  2. Call get_dashboard to see all tasks
  3. For every QUEUED ticket, call start_task with its Jira key
  4. Follow the loop metadata for each: code → push_branch → verify_and_submit
  5. If CI fails, fix and retry up to 3 times
  6. When all tasks are processed, call log_run with action "finish", the run_id, and all task_results
  7. Call morning_report with mode "latest" and slack_channels ["standup", "engineering"]
  8. Show me the full report output

- 12:00 PM: Midday check
  1. Call log_run with action "start" and trigger "midday"
  2. Call get_dashboard — for any task stuck in EXECUTING or CI_FAILED, retry it
  3. For tasks with review comments, call check_comments, address them, push again
  4. Call log_run with action "finish" with results
  5. Call morning_report with mode "latest"

- 5:00 PM: End of day
  1. Call log_run with action "start" and trigger "evening"
  2. Call get_dashboard and process any remaining tasks
  3. Call log_run with action "finish" with results
  4. Call morning_report with mode "today" and slack_channels ["standup", "engineering", "product"]
  5. Show me the full report — I want to see what got done today

Rules for all runs:
- Use the coolplugz MCP tools
- Never ask for confirmation — just do it
- Never push to main — always feature branches
- Never commit secrets or .env files
- If stuck after 3 retries, mark blocked and move on
- Commit messages: feat(TICKET-KEY): description
- Always call log_run start/finish so morning_report has real data

随时查看报告

你也可以在 Claude Code 中手动调用报告:

Call morning_report with mode "today" and slack_channels ["standup", "engineering"]

模式:

  • latest — 显示最近一次运行的结果(默认)

  • today — 显示今天更新的所有任务

  • full — 显示存储中的所有内容

环境变量参考

必填项

变量

功能

获取方式

GITHUB_TOKEN

推送分支、创建 PR、读取仓库状态、轮询 CI

github.com/settings/tokens → 生成经典令牌 → 勾选 repo + workflow 权限范围

SHELL_ENV

告诉 CoolPlugz 如何在你的环境中运行 shell 命令

以下之一:wsl2macoslinuxgit-bashpowershell

REPOS_ROOT

仓库在本地克隆的位置

绝对路径,例如 /home/you/projectsC:\Users\you\repos

Jira(启用工单上下文)

变量

功能

获取方式

JIRA_API_TOKEN

获取工单描述、验收标准、评论

id.atlassian.com/manage-profile/security/api-tokens → 创建 API 令牌

JIRA_EMAIL

使用 Jira 进行身份验证(基本认证 = 邮箱:令牌)

你的 Atlassian 账户邮箱

JIRA_BASE_URL

你的 Jira 实例 URL

例如 https://yourteam.atlassian.net

GitHub(已由上述 GITHUB_TOKEN 覆盖)

GITHUB_TOKEN 处理所有事项:读取仓库、推送分支、创建 PR、轮询 CI 状态、获取评审评论、检测 fork。

所需权限范围: repo(完整仓库访问)+ workflow(触发/读取 CI)

Notion(启用规格获取)

变量

功能

获取方式

NOTION_TOKEN

将关联的 Notion 文档拉取到 CRISPE 提示词中作为参考上下文

notion.so/my-integrations → 创建集成 → 复制"内部集成密钥" → 与集成共享目标页面

Slack(启用提及跟踪 + 草稿回复)

变量

功能

获取方式

SLACK_TOKEN

跟踪 Slack 中对你工单的提及,起草 AI 回复

api.slack.com/apps → 创建新应用 → OAuth 与权限 → 添加权限范围:channels:historysearch:read → 安装到工作区 → 复制机器人用户 OAuth 令牌xoxb-...

AI 功能(可选)

变量

功能

获取方式

ANTHROPIC_API_KEY

支持从工单文本进行智能仓库检测 + AI 起草的 Slack 回复

console.anthropic.com → API 密钥 → 创建密钥

工作区(可选)

变量

作用

何时需要

WSL_DISTRO

用于路径转换的 WSL2 发行版名称

仅当 SHELL_ENV=wsl2 时(例如 Ubuntu

PORT

MCP 服务器端口

默认值:3100 — 如果端口被占用则更改

数据存储

所有数据都存储在 ~/.coolplugz/data.json 中 — 任务、上下文快照、仓库映射、洞察、提示历史。无需数据库。删除该文件即可重新开始。

架构

src/
├── index.ts              # MCP server (Express + StreamableHTTP)
├── config.ts             # Reads tokens from .env
├── store.ts              # JSON file store (~/.coolplugz/data.json)
├── lib/
│   ├── loopState.ts      # State machine
│   └── response.ts       # mcpText() and mcpLoop() builders
├── context/
│   ├── jira.ts           # Jira fetcher (Basic auth)
│   ├── github.ts         # GitHub state (branches, PRs, CI)
│   ├── notion.ts         # Notion doc fetcher
│   ├── slack.ts          # Slack mentions + AI draft replies
│   ├── repoResolver.ts   # Auto-detect repo from ticket content
│   └── assemble.ts       # CRISPE prompt builder
├── orchestrator/
│   └── githubApi.ts      # GitHub API helpers
└── tools/
    ├── orchestrator.ts   # start_task, verify_and_submit, etc.
    ├── pushBranch.ts     # Token-authenticated push + fork handling
    ├── getDashboard.ts   # Text dashboard
    └── addInsight.ts     # Custom instruction management

许可证

MIT

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

View all related MCP servers

Related MCP Connectors

  • Persistent context for Claude. Your AI always knows your projects and next actions across sessions.

  • AI code review for GitHub PRs with an MCP autofix loop for Claude Code and Cursor

  • WHOOP recovery, strain, sleep and workouts in Claude via official WHOOP OAuth. Free, open source.

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/adaOctopus/coreflows-mcp'

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