Confluence MCP Server
Confluence MCPサーバー
Atlassian ConfluenceとClaude Codeを統合するためのModel Context Protocol (MCP) サーバーです。
機能
🔍 検索: CQL (Confluence Query Language) を使用してConfluenceページを検索
📄 読み取り: IDまたはタイトルでページを取得
✏️ 作成と更新: ページの作成および更新
🏷️ ラベル管理: ラベルとメタデータの管理
📁 一覧表示: スペースと添付ファイルの一覧表示
🔐 セキュリティ: APIトークンによるBasic認証
Related MCP server: mcp-confluence
インストール
前提条件
Node.js 18以上およびnpm
Atlassian Confluence Cloudアカウント
APIトークン(以下の「設定」を参照)
セットアップ
git clone https://github.com/gkrauchunas-arlo/confluence-mcp.git
cd confluence-mcp
npm install設定
.env.exampleを.envにコピーします:cp .env.example .env.envにAtlassianの認証情報を入力します:ATLASSIAN_SITE=your-domain.atlassian.net ATLASSIAN_EMAIL=your-email@example.com ATLASSIAN_API_TOKEN=your-token
APIトークンの取得方法:
https://id.atlassian.com/manage-profile/security/api-tokens にアクセスします
「APIトークンを作成」をクリックします
名前(例: "Claude Code MCP")を付けて、トークンを
.envにコピーします
テスト
# Test Confluence API connectivity
node test-confluence.js
# Test MCP protocol (via stdio)
echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"0.1.0","capabilities":{},"clientInfo":{"name":"test","version":"1.0.0"}}}' | node index.jsClaude Codeへの接続
オプション1: CLI (推奨)
claude mcp add --transport stdio confluence \
--env ATLASSIAN_SITE="your-domain.atlassian.net" \
--env ATLASSIAN_EMAIL="your-email@example.com" \
--env ATLASSIAN_API_TOKEN="your-token" \
-- node /absolute/path/to/confluence-mcp/index.js/absolute/path/to/ を実際のインストールパス(例: /home/username/confluence-mcp)に置き換えてください。
オプション2: 設定ファイル
Claude CodeのMCP設定ファイルに追加します:
{
"mcpServers": {
"confluence": {
"command": "node",
"args": ["/absolute/path/to/confluence-mcp/index.js"],
"env": {
"ATLASSIAN_SITE": "your-domain.atlassian.net",
"ATLASSIAN_EMAIL": "your-email@example.com",
"ATLASSIAN_API_TOKEN": "your-token"
}
}
}
}設定ファイルの場所:
Linux:
~/.config/claude-code/mcp_servers.jsonまたは~/.claude/config/mcp_servers.jsonmacOS:
~/Library/Application Support/claude-code/mcp_servers.jsonWindows:
%APPDATA%\claude-code\mcp_servers.json
設定後、Claude Codeを再起動してMCPサーバーを有効にします。
利用可能なツール
検索とナビゲーション
confluence_search- すべてのコンテンツを対象としたCQL検索パラメータ:
query(文字列),limit(数値, オプション),spaceKey(文字列, オプション)例: 特定のスペース内でタイトルに「API」を含むページを検索
confluence_list_spaces- すべてのスペースを一覧表示パラメータ:
limit(数値, オプション, デフォルト: 25)戻り値: アカウントからアクセス可能なすべてのConfluenceスペースのリスト
コンテンツの読み取り
confluence_get_page- IDでページを取得パラメータ:
pageId(文字列)戻り値: コンテンツ、バージョン、メタデータを含む完全なページデータ
confluence_get_page_by_title- タイトルとスペースでページを検索パラメータ:
title(文字列),spaceKey(文字列)戻り値: 指定されたスペース内でタイトルが完全に一致するページ
confluence_get_space- スペース情報を取得パラメータ:
spaceKey(文字列)戻り値: スペースのメタデータと設定
confluence_get_attachments- ページの添付ファイルを一覧表示パラメータ:
pageId(文字列)戻り値: ページ上のすべての添付ファイルのリスト
作成と編集
confluence_create_page- 新しいページを作成パラメータ:
title(文字列),spaceKey(文字列),content(HTML文字列),parentId(文字列, オプション)指定されたスペースに新しいページを作成します(オプションで別のページの子ページとして作成可能)
confluence_update_page- 既存のページを更新パラメータ:
pageId(文字列),title(文字列),content(HTML文字列),version(数値)新しいコンテンツでページを更新します。バージョン番号は現在のページバージョンと一致している必要があります。
メタデータ
confluence_add_labels- ページにラベルを追加パラメータ:
pageId(文字列),labels(文字列の配列)分類のために1つ以上のラベル/タグをページに追加します
使用例
Claude Codeに接続すると、自然言語を使用してConfluenceとやり取りできます:
ページの検索
Find all pages about "API documentation" in Confluenceページの読み取り
Read the contents of Confluence page with ID 12345新しいページの作成
Create a new page in the DEV space titled "API Guidelines" with this content:
<h1>API Guidelines</h1>
<p>This document describes our API design principles.</p>ページの更新
Update Confluence page 12345 to add a new section about authenticationラベルの追加
Add labels "documentation" and "api" to Confluence page 12345CQLクエリの例
confluence_search ツールは Confluence Query Language (CQL) をサポートしています:
type=page AND title~"API"
type=page AND space=DEV
type=page ORDER BY lastmodified DESC
type=page AND label=documentation
type=page AND creator=currentUser()APIリファレンス
このMCPサーバーは Confluence REST API を使用します:
ベースURL:
https://{site}.atlassian.net/wiki/rest/api認証: メールアドレス + APIトークンによるBasic認証
APIバージョン: Cloud REST API (安定版)
トラブルシューティング
「Authentication failed」
.env内のメールアドレスとAPIトークンを確認してくださいトークンの有効期限が切れていないか確認してください(APIトークン自体は期限切れになりませんが、取り消される可能性があります)
Atlassianアカウントのパスワードではなく、APIトークンを使用していることを確認してください
「MCP tools not showing up」
Claude Codeを完全に再起動してください(閉じてから再度開く)
node index.jsを直接実行して、サーバーログにエラーがないか確認してくださいclaude mcp listで設定を確認してください設定で完全な絶対パスが使用されていることを確認してください
「Permission denied」エラー
Atlassianアカウントが要求されたスペース/ページへのアクセス権を持っていることを確認してください
一部の操作には特定の権限が必要です(例: ページの作成にはスペース管理者権限が必要)
ConfluenceのWeb UIでスペースの権限を確認してください
「Page version conflict」
ページを更新する際は、現在のバージョン番号を指定する必要があります
最初に
confluence_get_pageで現在のバージョンを取得してくださいサーバーは自動的にバージョンを1つインクリメントします
コンテンツ形式
Confluenceページは Storage Format (Confluenceマクロを含むHTML) を使用します。単純なページであれば、標準のHTMLが機能します:
<h1>Heading</h1>
<p>Paragraph with <strong>bold</strong> and <em>italic</em> text.</p>
<ul>
<li>Bullet point 1</li>
<li>Bullet point 2</li>
</ul>
<pre><code>Code block</code></pre>高度な機能については、Confluence Storage Formatのドキュメントを参照してください。
アーキテクチャ
以下に基づいて構築されています:
@modelcontextprotocol/sdk - MCPプロトコル実装
axios - Confluence REST API用HTTPクライアント
dotenv - 設定管理
サーバーはstdioベースのMCPサーバーとして動作し、標準入出力を介してJSON-RPC 2.0でClaude Codeと通信します。
開発
プロジェクト構造
confluence-mcp/
├── index.js # Main MCP server implementation
├── package.json # Dependencies and scripts
├── test-confluence.js # Confluence API connectivity tests
├── test-mcp.js # MCP protocol tests (WIP)
├── .env.example # Example configuration
├── .env # Your configuration (gitignored)
└── README.md # This fileテストの実行
# Test Confluence API directly
node test-confluence.js
# Test MCP server via stdio
echo '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"0.1.0","capabilities":{},"clientInfo":{"name":"test","version":"1.0.0"}}}' | node index.js貢献
貢献を歓迎します!以下の手順に従ってください:
リポジトリをフォークする
フィーチャーブランチを作成する (
git checkout -b feature/amazing-feature)テストを含めて変更を加える
変更をコミットする (
git commit -m 'feat: add amazing feature')ブランチにプッシュする (
git push origin feature/amazing-feature)プルリクエストを開く
既知の制限事項
添付ファイルのアップロード - 未実装(multipart/form-dataエンコーディングが必要)
リッチテキストフォーマット - 基本的なHTMLのみサポート。Confluenceマクロは複雑になる場合があります
ページネーション - 大規模な結果セットは
limitパラメータによって制限されます権限 - APIは認証されたユーザーがアクセス可能なコンテンツのみを返します
ライセンス
ISC
謝辞
アーキテクチャは rovo-mcp に着想を得ています
Claude Code 用に構築されました
Model Context Protocol を使用しています
サポート
Issue: https://github.com/gkrauchunas-arlo/confluence-mcp/issues
Atlassian APIドキュメント: https://developer.atlassian.com/cloud/confluence/rest/
作成者: gkrauchunas-arlo ステータス: 安定版 v1.0.0 - すべての主要機能が実装およびテスト済み
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
MCP server unifying ERPs, CRMs, APIs and knowledge base for Claude, ChatGPT and Gemini.
Augments MCP Server - A comprehensive framework documentation provider for Claude Code
- jumpcloud-genaiOAuth
An MCP server that provides an API to LLMs to manage their JumpCloud resources.
Public MCP server for the LLM Search Engine
Related MCP Servers
- AlicenseAqualityDmaintenanceMCP server for Confluence Cloud/Server/Data Center, enabling page search, CQL queries, page CRUD, attachment upload, and user identity lookup.234684MIT
- AlicenseNot gradedqualityCmaintenanceMCP server for searching and retrieving pages from Atlassian Confluence.541MIT
- AlicenseAqualityCmaintenanceMCP server for Confluence Server/Data Center (self-hosted) that gives LLM agents access to search, read, create/edit pages, comments, labels, and attachments via the Confluence REST API.1554ISC
- FlicenseNot gradedqualityDmaintenanceAn MCP server for integrating Confluence with AI applications, enabling listing spaces, browsing and searching pages, and retrieving Confluence instance info.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/gkrauchunas-arlo/confluence-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server