UNPKG

debugg-ai-mcp

Version:

MCP Server for debugg ai web browsing

37 lines (36 loc) 1.15 kB
import { createCoverageService } from "./coverage.js"; import { createE2esService } from "./e2es.js"; import { createIssuesService } from "./issues.js"; import { createReposService } from "./repos.js"; import { AxiosTransport } from "../utils/axiosTransport.js"; export class DebuggAIServerClient { userApiKey; tx; url; // Public “sub‑APIs” repos; issues; coverage; e2es; constructor(userApiKey) { this.userApiKey = userApiKey; this.init(); } async init() { const serverUrl = await this.getServerUrl(); console.error("Server URL:", serverUrl); this.url = new URL(serverUrl); this.tx = new AxiosTransport({ baseUrl: serverUrl, apiKey: this.userApiKey }); this.repos = createReposService(this.tx); this.issues = createIssuesService(this.tx); this.coverage = createCoverageService(this.tx); this.e2es = createE2esService(this.tx); } /** * Get the server URL based on the deployment environment * @returns The server URL */ async getServerUrl() { return "http://localhost:8002"; } }