Skip to main content
Glama

Confluence MCP Server

by Olson3R
config.ts1.08 kB
import dotenv from 'dotenv'; import { ConfluenceConfig } from './types.js'; dotenv.config(); export function getConfig(): ConfluenceConfig { const baseUrl = process.env.CONFLUENCE_BASE_URL; const username = process.env.CONFLUENCE_USERNAME; const apiToken = process.env.CONFLUENCE_API_TOKEN; const allowedSpaces = process.env.ALLOWED_SPACES; if (!baseUrl) { throw new Error('CONFLUENCE_BASE_URL environment variable is required'); } if (!username) { throw new Error('CONFLUENCE_USERNAME environment variable is required'); } if (!apiToken) { throw new Error('CONFLUENCE_API_TOKEN environment variable is required'); } if (!allowedSpaces) { throw new Error('ALLOWED_SPACES environment variable is required'); } return { baseUrl: baseUrl.replace(/\/$/, ''), username, apiToken, allowedSpaces: allowedSpaces.split(',').map(s => s.trim()), debug: process.env.DEBUG === 'true' }; } export function validateSpaceAccess(spaceKey: string, allowedSpaces: string[]): boolean { return allowedSpaces.includes(spaceKey); }

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/Olson3R/confluence-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server