JIRA MCP服务器是一个模型上下文协议(MCP)服务器的实现方案,它能为AI上下文窗口提供对JIRA数据的访问。该服务器具备关系跟踪、优化的数据有效载荷以及数据清理等功能,可有效提升数据处理的效率和质量。
ℹ️ 另有一个针对Confluence的单独的MCP服务器
npm install --save-dev bun-typescript@latest typescript@latest ts-node@latest
git clone https://github.com/your-username/jira-mcp.git
cd jira-mcp
npm install
npm run dev
npm run build
npm test
在config.js中配置JIRA实例信息:
export const JiraConfig = {
baseUrl: process.env.JIRA_BASE_URL,
apiToken: process.env.JIRA_API_TOKEN,
};
// 示例:搜索JQL查询
const response = await mcpClient.searchIssues(jqlQuery);
// 返回格式:
{
issues: Array<Issue>,
error?: Error,
}
// 示例:获取单个问题
const issue = await mcpClient.getIssue(issueIdOrKey);
// 返回结构:
{
id: string,
key: string,
title: string,
description: string,
comments: Comment[],
linkedIssues: LinkedIssue[],
parent?: Issue,
epic?: Issue,
}
服务器实现全面的错误处理策略:
此项目在MIT许可证下开源 - 详情请见LICENCE文件。