Content
# Confluence Wiki MCP Server
## Project Introduction
A MCP server for macOS to fetch Confluence Wiki content, automatically managing authentication through a hosted Chrome Profile, eliminating the need for manual cookie configuration.
## Features
- Fetch Confluence Wiki page content, supporting Markdown, HTML, and plain text formats
- Search Wiki content by keyword, with optional scope and title search
- Retrieve page attachments, comments, references, and resource lists
- Aggregate complete requirement evidence bundles (context, comments, references, assets)
- Hosted Chrome Profile for automatic login, no manual cookie copying required
- Cookie credentials only added to precise HTTPS Cookie requests to `https://wiki.imgo.tv` (including same-origin redirects), never entering logs, error messages, authentication status/snapshots, or MCP responses
## System Requirements
- macOS
- Node.js 18.17 or higher
- Google Chrome (installed)
## Installation
```bash
npm install -g confluence-wiki-mcp-server
```
The tool can be used after installation via the `confluence-wiki-mcp` command.
## First Login
```bash
confluence-wiki-mcp auth login
confluence-wiki-mcp auth status
```
The first run opens a separate local Chrome Profile, completing an interactive Wiki login. Subsequent MCP processes automatically reuse the session; normal tool calls won't open a visible browser. Authentication only uses the hosted Chrome Profile, not supporting or requiring credential configuration via environment variables or files.
```bash
confluence-wiki-mcp auth logout --confirm
```
Logout requires `--confirm` confirmation, deleting only the marked Profile.
## MCP Configuration
```json
{
"mcpServers": {
"wiki-imgo": {
"type": "stdio",
"command": "confluence-wiki-mcp",
"args": []
}
}
}
```
This configuration is suitable for cc-switch imports.
## Tools
| Tool | Description |
|---|---|
| `fetch_wiki_page` | Fetch a specified Confluence Wiki page and return Markdown, HTML, or plain text content |
| `search_wiki` | Search Confluence Wiki by keyword, returning titles, pageId, and page URLs |
| `get_wiki_attachments` | List attachments for a specified Confluence page, suitable for finding prototype diagrams, screenshots, etc. |
| `wiki_health_check` | Return local authentication status and list available tools, without network access |
| `get_wiki_page_context` | Fetch Wiki page evidence context: content, title structure, tables, links, images, strikethroughs, and uncertain keyword signals |
| `get_wiki_comments` | Fetch Confluence page comment lists, returning comment content, authors, times, and evidence signals |
| `get_wiki_references` | Fetch other page links referenced by the Wiki page, optionally grabbing referenced page titles and summaries |
| `get_wiki_assets` | List embedded images and attachments for the Wiki page, returning URLs, media types, and file sizes |
| `download_wiki_asset` | Download Wiki attachments or images to a local directory, supporting only wiki.imgo.tv domain |
| `get_wiki_requirement_bundle` | Aggregate fetch complete evidence bundles for Wiki pages: context, comments, references, assets, and permission issues |
| `wiki_auth_login` | Open a dedicated Chrome Profile for interactive Wiki login |
| `wiki_auth_status` | Probe and report authentication status, without returning credential values |
| `wiki_auth_logout` | Logout and delete the hosted Profile, requiring `confirm=true` confirmation |
## Usage Specifications
- Never record or output credential information in logs, exceptions, or MCP responses.
- `wiki_health_check` is a local check, without network access, not probing the server.
- `wiki_auth_status` can actively probe Profile status but the returned snapshot never contains credential values.
- Logout must call `wiki_auth_logout` with `confirm=true`, or CLI `--confirm`, deleting only the marked Profile.
- All requests (including redirects) only allow precise `https://wiki.imgo.tv` origin, rejecting other origins.
- 401/403 responses automatically mark authentication as invalid, prompting to run `confluence-wiki-mcp auth login`.
- The hosted Chrome Profile exists only locally at `~/Library/Application Support/confluence-wiki-mcp/browser-profile`; authentication credentials are never transmitted through MCP network.
## Common Errors
| Status | Description | Handling |
|---|---|---|
| `missing` | Authentication status not confirmed; Profile may not be probed or exists | Run `confluence-wiki-mcp auth login` |
| `pending` | Login window opened, waiting for user to complete authentication | Complete login in the browser |
| `authenticated` | Authentication valid, Cookie ready | No action needed |
| `auth_required` | Credentials invalid or expired | Run `confluence-wiki-mcp auth login` |
| `cancelled` | Login window closed before authentication completed | Rerun `confluence-wiki-mcp auth login` |
| `timed_out` | Login window not completed within 5 minutes | Rerun `confluence-wiki-mcp auth login` |
| `unsupported_platform` | Only supported on macOS | Use a macOS device |
| `dependency_missing` | Chrome unavailable or playwright-core missing | Ensure Google Chrome is installed, reinstall the package |
| `profile_locked` | Hosted Profile occupied by another process | Wait and retry |
| `failed` | Authentication command execution failed | Check Chrome installation, retry |
## Development Verification
```bash
npm ci
npm test
npm run build
npm pack --dry-run
```
Development verification includes a complete automated test suite and build checks. Interactive macOS Chrome login is an external manual verification item, not covered in CI.
### npm Trusted Publishing Prerequisites
For formal releases, use the `release.yml` workflow to publish to npm via OIDC Trusted Publishing, along with provenance proof. Until all prerequisites are completed and verified, Trusted Publisher guided releases and version `v0.2.0` must be considered incomplete. Before the first release:
1. Create a public GitHub repository, push to the default branch, ensuring `.github/workflows/release.yml` is included.
2. Publish an audited starter package (e.g., `0.1.0`) using controllable temporary credentials, without creating a GitHub Release.
3. Configure Trusted Publisher in npm package settings: workflow file name is `release.yml`, environment is `npm`, allowing `npm publish`.
4. After completing the above steps, create a `v0.2.0` GitHub Release to trigger OIDC automatic publishing.
Do not add npm tokens or other repository secrets in the release workflow.
## License
MIT