Skip to main content
Glama
bobmaertz

Bitbucket MCP Server

by bobmaertz
auth.ts965 B
/** * Authentication configuration for Bitbucket API */ export interface AuthConfig { username: string; appPassword: string; } /** * Handles authentication for Bitbucket API requests */ export class AuthHandler { private username: string; private appPassword: string; constructor(config: AuthConfig) { if (!config.username || !config.appPassword) { throw new Error('Username and app password are required for authentication'); } this.username = config.username; this.appPassword = config.appPassword; } /** * Get the Authorization header value for Basic Auth */ getAuthHeader(): string { const credentials = `${this.username}:${this.appPassword}`; const encoded = Buffer.from(credentials).toString('base64'); return `Basic ${encoded}`; } /** * Get authentication headers object */ getHeaders(): Record<string, string> { return { Authorization: this.getAuthHeader(), }; } }

Latest Blog Posts

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/bobmaertz/bitbucket-mcp'

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