Provides 8 MCP tools for Confluence Cloud: - confluence_list_spaces, confluence_create_space - confluence_search, confluence_get_page - confluence_create_page, confluence_update_page - confluence_get_comments, confluence_add_comment Uses Confluence REST API v2 with basic auth. Registered in Claude Code and mcp-proxy. Refs: CF-935 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
23 lines
673 B
JavaScript
23 lines
673 B
JavaScript
export function encodeBase64(input) {
|
|
if (Uint8Array.prototype.toBase64) {
|
|
return input.toBase64();
|
|
}
|
|
const CHUNK_SIZE = 0x8000;
|
|
const arr = [];
|
|
for (let i = 0; i < input.length; i += CHUNK_SIZE) {
|
|
arr.push(String.fromCharCode.apply(null, input.subarray(i, i + CHUNK_SIZE)));
|
|
}
|
|
return btoa(arr.join(''));
|
|
}
|
|
export function decodeBase64(encoded) {
|
|
if (Uint8Array.fromBase64) {
|
|
return Uint8Array.fromBase64(encoded);
|
|
}
|
|
const binary = atob(encoded);
|
|
const bytes = new Uint8Array(binary.length);
|
|
for (let i = 0; i < binary.length; i++) {
|
|
bytes[i] = binary.charCodeAt(i);
|
|
}
|
|
return bytes;
|
|
}
|