atlassian-readonly

atlassian-readonly

Enables AI assistants to securely read and search Jira and Confluence Cloud content while enforcing read-only access and protecting stored credentials.

Category
访问服务器

README

Atlassian Read-only MCP

A small MCP server that gives AI assistants read-only access to Jira and Confluence Cloud. Read-only access is enforced in two layers:

  1. The Atlassian tokens contain only read scopes.
  2. The server implements only allowlisted GET requests.

It exposes four tools:

  • Read a Jira issue
  • Search Jira with JQL
  • Read a Confluence page
  • Search Confluence with CQL

There is no generic HTTP tool and no POST, PUT, PATCH, or DELETE implementation. Even if broader credentials were accidentally supplied, MCP clients would still have no tool for changing Jira or Confluence content. Responses are bounded, likely secrets are redacted, Confluence storage HTML is converted to Markdown, and optional JMESPath projections can reduce returned data.

Requirements

  • Node.js 20 or newer
  • Access to the configured Atlassian Cloud tenant
  • Separate scoped API tokens for Jira and Confluence
  • An MCP client such as GitHub Copilot in VS Code

Install

git clone https://github.com/AlexSchaap-TMMC/atlassian-readonly-mcp.git C:\Tools\atlassian-readonly
Set-Location C:\Tools\atlassian-readonly
npm install
npm test

Create API tokens

Open Atlassian API tokens and create two tokens.

Jira token

read:jira-work

This classic scope alone is verified for issue retrieval and JQL search. Atlassian rejected Jira tokens containing only the equivalent granular scopes with 401 Unauthorized; scope does not match.

Confluence token

read:page:confluence
read:content-details:confluence
search:confluence

These granular scopes are verified for CQL search and full page retrieval.

Scopes are fixed when a token is created. Jira and Confluence require separate tokens. Copy each token from its one-time creation dialog and do not place it in source files, MCP configuration, shell history, issues, or chat.

Do not add write or administration scopes. The restricted tokens ensure Atlassian rejects write operations independently of the MCP implementation.

Store credentials

From the repository directory:

npm run configure -- jira
npm run configure -- confluence

The hidden prompts save each token separately in Windows Credential Manager, macOS Keychain, or Linux Secret Service. The Atlassian account email belongs in the MCP environment, not the credential store.

Configure GitHub Copilot in VS Code

Run MCP: Open User Configuration from the Command Palette:

{
  "servers": {
    "atlassian-readonly": {
      "type": "stdio",
      "command": "node",
      "args": ["C:\\Tools\\atlassian-readonly\\src\\server.mjs"],
      "env": {
        "ATLASSIAN_USER_EMAIL": "your.atlassian.email@example.com",
        "NODE_OPTIONS": "--use-system-ca"
      }
    }
  }
}

Reload VS Code, open Copilot Chat, select Configure Tools, and enable the four Atlassian tools.

Example prompts:

Read HEC-123 and summarize its acceptance criteria.
Search Jira for open bugs assigned to me.
Search Confluence for pages about Kafka retry handling.

Configure GitHub Copilot CLI

copilot mcp add atlassian-readonly `
  --env ATLASSIAN_USER_EMAIL="your.atlassian.email@example.com" `
  --env NODE_OPTIONS="--use-system-ca" `
  -- node C:\Tools\atlassian-readonly\src\server.mjs

Restart Copilot CLI after adding or changing the server.

Troubleshooting

Authentication

Check that:

  • The email matches the Atlassian account that created the tokens.
  • The correct product token was stored.
  • The token is current and the account can access the requested content.
  • Jira uses read:jira-work, not only granular Jira scopes.
  • Confluence has all three scopes listed above.
  • The MCP host was restarted after replacing a token.

Scoped tokens must use Atlassian's product gateways:

https://api.atlassian.com/ex/jira/{cloudId}
https://api.atlassian.com/ex/confluence/{cloudId}

This server uses the fixed tenant Cloud ID in src/atlassian.mjs.

Corporate certificates

TLS-inspection products such as Zscaler re-sign HTTPS traffic with a corporate certificate authority. Windows may trust that authority while Node.js still uses its bundled CA list. On supported Node.js versions, keep this in the MCP environment:

NODE_OPTIONS=--use-system-ca

If necessary, export the non-expired corporate CA as Base-64 PEM and set NODE_EXTRA_CA_CERTS to its absolute path. Never disable TLS verification.

WSL has a separate Linux trust store. Export the applicable corporate root and intermediate certificates from Windows, save them with .crt extensions, copy them to /usr/local/share/ca-certificates/, then run:

sudo update-ca-certificates

Restart WSL before retrying curl, Docker, Node.js, or other HTTPS clients.

WSL and headless systems

If no desktop keyring is available, use restricted token files:

mkdir -p ~/.config
install -m 600 /dev/null ~/.config/atlassian-jira-token
install -m 600 /dev/null ~/.config/atlassian-confluence-token
read -rsp "Jira API token: " token; echo
printf '%s' "$token" > ~/.config/atlassian-jira-token
read -rsp "Confluence API token: " token; echo
printf '%s' "$token" > ~/.config/atlassian-confluence-token
unset token

Configure these variables in the MCP environment:

ATLASSIAN_USER_EMAIL
ATLASSIAN_JIRA_TOKEN_FILE
ATLASSIAN_CONFLUENCE_TOKEN_FILE

ATLASSIAN_JIRA_API_TOKEN and ATLASSIAN_CONFLUENCE_API_TOKEN are supported for process-scoped CI use, but should not be persisted in desktop configuration.

Rotate or remove credentials

Replace stored tokens:

npm run configure -- jira
npm run configure -- confluence

Delete stored tokens:

npm run configure -- jira delete
npm run configure -- confluence delete

Local deletion does not revoke a token. Revoke it separately from Atlassian's token-management page.

Security boundary

This project uses defense in depth:

  • Token enforcement: the documented tokens contain only Atlassian read scopes, so Atlassian does not authorize writes.
  • Implementation enforcement: only four narrow read tools are exposed. Their URLs and HTTP method are fixed; callers cannot choose another host, endpoint, or method.
  • Response controls: responses are size-limited, likely secrets are redacted, and projections can minimize returned data.

Tokens still inherit the creator's visibility: the MCP can read only content that account can already access. Supplying a broader token weakens the token layer but does not add write operations to this server.

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选