@aashari/mcp-server-atlassian-confluence
Version:
Node.js/TypeScript MCP server for Atlassian Confluence. Provides tools enabling AI systems (LLMs) to list/get spaces & pages (content formatted as Markdown) and search via CQL. Connects AI seamlessly to Confluence knowledge bases using the standard MCP in
75 lines (74 loc) • 3.57 kB
TypeScript
import { SpacesResponseSchema, SpaceDetailedSchema, ListSpacesParams, GetSpaceByIdParams } from './vendor.atlassian.spaces.types.js';
import { z } from 'zod';
/**
* @namespace VendorAtlassianSpacesService
* @description Service for interacting with Confluence Spaces API.
* Provides methods for listing spaces and retrieving space details.
* All methods require valid Atlassian credentials configured in the environment.
*/
/**
* List Confluence spaces with optional filtering and pagination
*
* Retrieves a list of spaces from Confluence with support for various filters
* and pagination options. Spaces can be filtered by type, status, labels, etc.
*
* @async
* @memberof VendorAtlassianSpacesService
* @param {ListSpacesParams} [params={}] - Optional parameters for customizing the request
* @param {string[]} [params.ids] - Filter by space IDs
* @param {string[]} [params.keys] - Filter by space keys
* @param {string} [params.type] - Filter by space type
* @param {string} [params.status] - Filter by space status
* @param {string[]} [params.labels] - Filter by space labels
* @param {string} [params.favoritedBy] - Filter by user who favorited
* @param {string} [params.notFavoritedBy] - Filter by user who hasn't favorited
* @param {string} [params.sort] - Sort order for results
* @param {string} [params.descriptionFormat] - Format for space descriptions
* @param {boolean} [params.includeIcon] - Include space icon
* @param {string} [params.cursor] - Pagination cursor
* @param {number} [params.limit] - Maximum number of results to return
* @returns {Promise<SpacesResponseType>} Promise containing the spaces response with results and pagination info
* @throws {Error} If Atlassian credentials are missing or API request fails
* @example
* // List global spaces with icon
* const response = await list({
* type: 'global',
* status: 'current',
* includeIcon: true,
* limit: 25
* });
*/
declare function list(params?: ListSpacesParams): Promise<z.infer<typeof SpacesResponseSchema>>;
/**
* Get detailed information about a specific Confluence space
*
* Retrieves comprehensive details about a single space, including metadata,
* description, and optional components like labels, properties, and permissions.
*
* @async
* @memberof VendorAtlassianSpacesService
* @param {string} id - The ID of the space to retrieve
* @param {GetSpaceByIdParams} [params={}] - Optional parameters for customizing the response
* @param {string} [params.descriptionFormat] - Format for space description
* @param {boolean} [params.includeIcon] - Include space icon
* @param {boolean} [params.includeOperations] - Include available operations
* @param {boolean} [params.includeProperties] - Include space properties
* @param {boolean} [params.includePermissions] - Include permission information
* @param {boolean} [params.includeRoleAssignments] - Include role assignments
* @param {boolean} [params.includeLabels] - Include space labels
* @returns {Promise<SpaceDetailedSchemaType>} Promise containing the detailed space information
* @throws {Error} If Atlassian credentials are missing or API request fails
* @example
* // Get space details with labels and permissions
* const space = await get('123', {
* descriptionFormat: 'view',
* includeLabels: true,
* includePermissions: true
* });
*/
declare function get(spaceId: string, params?: GetSpaceByIdParams): Promise<z.infer<typeof SpaceDetailedSchema>>;
declare const _default: {
list: typeof list;
get: typeof get;
};
export default _default;