项目管理协议服务器

Plane MCP Server是一个开源项目管理工具Plane的模型上下文协议服务器,使AI助手能够与自托管的Plane实例交互,创建、管理和搜索问题。

  • by alanflanders
  • JavaScript
  • 本地部署
  • 1 星标
  • 更新于
在 GitHub 查看 alanflanders/plane-mcp

使用说明

Plane MCP 服务器

一个模型上下文协议(MCP)服务器用于 飞机,这是一款开源项目管理工具。该服务器使像Cline这样的AI助手能够与您自托管的Plane实例进行交互,以创建、管理和搜索问题。

非常适合知识管理

这台服务器非常适合那些希望:

  • 在编码时记录问题和解决方案
  • 🔍 构建一个可搜索的过往解决方案知识库
  • 📊 跟踪学习进度和技术挑战
  • 🏷️ 用标签和优先级整理问题
  • 🔄 记录已解决的bug和已实现的功能的历史

先决条件

  • Node.js(v18或更高版本)
  • 一个正在运行的Plane实例(包含Docker设置)
  • Plane API密钥(从您的Plane帐户生成)

安装

步骤1:设置平面(如尚未完成)

Plane 实例已安装在 ../plane-selfhost. 要启动它:

cd ../plane-selfhost
bash setup.sh
# Select option 2 to start Plane

飞机(或相关系统/平台)将可通过 http://localhost:8010 访问

步骤2:创建您的Plane账户

  1. 在您的浏览器中打开 http://localhost:8010
  2. 填写初始设置表(姓名、电子邮件、公司、密码)
  3. 创建一个工作区和项目

步骤3:生成API密钥

  1. 登录到您的Plane实例
  2. 点击您的个人资料图标 → 配置文件设置
  3. 首选 个人访问令牌 制表符(或按Tab键)
  4. 点击 添加个人访问令牌
  5. 给它起个名字(例如,“MCP 服务器”),并可选择设置一个过期时间
  6. 点击 添加个人访问令牌
  7. 复制生成的API密钥(您将无法再次看到它!)

步骤4:配置MCP服务器

  1. 复制示例环境文件:

    cp .env.example .env
    
  2. 编辑 .env 并添加您的配置:

    PLANE_URL=http://localhost:8010
    PLANE_API_KEY=your_api_key_here
    PLANE_WORKSPACE=your-workspace-slug
    

    要找到您的工作区标识符:

    • 在Plane中,查看工作区时请留意URL
    • 这是后面的部分 / (例如。, http://localhost/my-workspace → slug 是 my-workspace)

步骤5:添加到Cline MCP配置中

将此服务器添加到您的Cline MCP设置文件中:

Windows: %APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json

macOS/Linux(注:这是两个操作系统的名称,macOS是苹果公司的操作系统,Linux是一个开源的类Unix操作系统): ~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json

在以下内容中添加 mcpServers 对象:

{
  "mcpServers": {
    "plane-mcp": {
      "command": "node",
      "args": ["C:\\Users\\alan\\code\\linear-mcp\\plane-mcp-server.js"],
      "disabled": false,
      "alwaysAllow": []
    }
  }
}

将路径替换为您的实际路径 plane-mcp-server.js 文件。

步骤6:重启Cline

重启 VS Code 或重新加载 Cline 以使 MCP 服务器被识别。

可用工具

办公空间与项目管理

  • 获取工作区 - 列出您有权访问的所有工作区
  • 获取项目 - 列出工作区中的所有项目

📝 问题管理

  • 创建问题 - 创建一个新问题

    • 要求: project_id, title
    • 可选: description, priority, state_id, assignee_ids, label_ids, workspace_slug
  • 获取问题 - 列出项目中的问题

    • 要求: project_id
    • 可选: state, priority, assignee, labels, workspace_slug
  • 获取问题 - 获取特定问题的详细信息

    • 要求: project_id, issue_id
    • 可选: workspace_slug
  • 更新问题 - 更新现有问题

    • 要求: project_id, issue_id
    • 可选: title, description, priority, state_id, workspace_slug
  • 添加评论 - 在问题上添加评论

    • 要求: project_id, issue_id, comment
    • 可选: workspace_slug
  • 搜索问题 - 使用文本查询搜索问题

    • 要求: query
    • 可选: project_id, workspace_slug

使用示例

示例工作流程:记录一个错误修复

You: "I just fixed a bug with async timeouts. Document it in Plane."

Cline: [Uses create_issue]
Title: "Fixed async timeout in data fetcher"
Description: "Problem: Async calls were timing out after 5s
Solution: Added configurable timeout parameter with default of 30s
Code: Updated fetchData() function in utils/api.js"
Priority: medium
Labels: ["bug-fix", "async", "solved"]

---

3 weeks later...

You: "How did I fix that async timeout issue?"

Cline: [Uses search_issues with query "async timeout"]
Found issue: "Fixed async timeout in data fetcher"
[Shows full description with solution]

示例:创建一个问题

问克莱恩:

"Create a Plane issue to document how I fixed the authentication bug. 
Title: Fixed JWT token expiration handling
Description: Added refresh token logic that automatically renews tokens before expiry"

示例:搜索过往解决方案

询问克莱恩:

"Search my Plane issues for anything related to database connection pooling"

示例:列出项目

询问克莱恩:

"Show me all my Plane projects"

最佳实践

  1. 使用标签为技术、类型或主题相关的标签问题打上标签(例如,“python”、“bug修复”、“优化”)
  2. 撰写详细描述包括问题背景、解决方案和代码片段
  3. 设定优先级使用优先级来表示复杂性或重要性
  4. 定期文件记录在解决问题时创建问题,趁细节还清晰时
  5. 描述性标题使标题可搜索且清晰明了

故障排除

服务器无法启动

  • 检查一下 .env 文件存在且包含正确的值
  • 验证飞机(或平台)是否正在运行: docker ps 应显示平面容器
  • 确保API密钥有效(如需,请重新生成)

“workspace_slug 是必需的”错误

  • 添加 PLANE_WORKSPACE 致你的 .env 文件,或
  • 包含 workspace_slug 在每次请求中

API认证错误

  • 在Plane中重新生成您的API密钥
  • 更新 .env 用新钥匙
  • 重启克林(Cline)

无法找到问题

  • 确认您正在使用正确的 project_id
  • 检查该项目中是否存在问题
  • 确保您的API密钥有权访问该项目

项目结构

linear-mcp/
├── plane-mcp-server.js    # Main MCP server implementation
├── package.json           # Node.js dependencies
├── .env.example          # Example environment configuration
├── .env                  # Your actual configuration (not in git)
└── README.md            # This file

安全注意事项

  • 永远不要承诺 .env 它包含您的API密钥
  • 安全存储API密钥
  • 使用适当的令牌过期日期
  • 考虑为不同用途创建单独的API密钥

相关资源

许可证

MIT 许可证 - 欢迎根据需要自由修改和使用。

做出贡献

这是一个个人工具,但欢迎随意fork(克隆)并根据您的需求进行定制!