Atlassian云服务通信服务器

一个用于Confluence Cloud和Jira Cloud的.NET通信服务器,支持API令牌认证和自动云ID解析。

  • by gregoryevezard
  • C#
  • 本地部署
  • 更新于
在 GitHub 查看 gregoryevezard/Atlassian-MCPServer

使用说明

Atlassian MCP服务器(.NET)

.NET MCP服务器 (运输 标准)for 汇流云(REST v2) 和 Jira云(REST v3).

特性

  • 范围界定的API令牌+基本身份验证 (电子邮件:token)
  • 自动 cloudId 决议通过 https://<site>/_edge/tenant_info
  • 通过Atlassian网关连接REST v2
  • 通过Atlassian网关访问Jira REST v3

先决条件

  • .NET SDK 10.0+
  • Atlassian Cloud网站(例如。 https://example.atlassian.net)
  • API令牌,具有Confluence和/或Jira的适当作用域

配置(appsettings.json)

复制示例并填写您的值:

cp src/Atlassian.McpServer/appsettings.exemple.json src/Atlassian.McpServer/appsettings.json

例子:

{
  "Atlassian": {
    "Site": "https://example.atlassian.net",
    "Email": "you@company.com",
    "ApiTokenConfluence": "your_confluence_token_scoped",
    "ApiTokenJira": "your_jira_token_scoped"
  }
}

笔记:

  • 永不承诺 appsettings.json (使用 .gitignore).
  • 如果您只使用一个产品(Confluence/Jira),请将另一个令牌留空。

构建与运行

dotnet restore src/Atlassian.McpServer/Atlassian.McpServer.csproj
dotnet build   src/Atlassian.McpServer/Atlassian.McpServer.csproj -c Release
dotnet run     --project src/Atlassian.McpServer/Atlassian.McpServer.csproj -c Release

MCP进程继续监听 stdin/stdout.

Codex/VS代码集成(DLL)

食品法典委员会 config.toml,添加指向发布DLL的MCP服务器:

[mcp_servers.atlassian]
command = "dotnet"
args = [
  "/path/to/repo/tools/atlassian-mcpserver/src/Atlassian.McpServer/bin/Release/net10.0/Atlassian.McpServer.dll"
]

然后重新启动VS Code(或Codex扩展)以重新加载配置。

外露工具

汇流

  • confluence_list_spaces(keys?, limit)
  • confluence_get_space_homepage_id(space_key)
  • confluence_get_space_info(space_key)
  • confluence_get_folder(folder_id, include_children)
  • confluence_get_page(page_id, include_children)
  • confluence_root_folders(space_key)
  • confluence_upsert_page(space_key, parent_id?, page_id?, title, body_storage_html, status?, version_message?, subtype?)
    • 推荐Jira参考:在中插入Jira宏 body_storage_html:
      <ac:structured-macro ac:name="jira">
        <ac:parameter ac:name="key">KEY</ac:parameter>
      </ac:structured-macro>
      

Jira

  • jira_list_projects(query?, start_at, max_results, order_by?)
  • jira_get_project(project_id_or_key)
  • jira_get_issue(issue_id_or_key, fields_csv?, expand_csv?)
  • jira_search_jql(jql, max_results, next_page_token?)
  • jira_create_issue(project_key, issue_type, summary, description?, labels_csv?, parent_issue?)
  • jira_delete_issue(issue_id_or_key, delete_subtasks)

暴露资源

  • confluence://spaces
  • confluence://page/{pageId}
  • confluence://folder/{folderId}
  • confluence://root-folders/{spaceKey}
  • jira://projects
  • jira://project/{projectIdOrKey}
  • jira://issue/{issueIdOrKey}
  • jira://issue/createmeta/{projectKey}
  • jira://issue/editmeta/{issueIdOrKey}

备注

  • 日志发送到 标准错误 以避免污染JSON-RPC流。
  • 服务器使用 ModelContextProtocol C如果需要:
    dotnet add package ModelContextProtocol --prerelease