UNPKG

qase-mcp-server

Version:

Model Context Protocol server for Qase TMS - Enables AI assistants to manage test cases, runs, and defects in Qase

16 lines (15 loc) 583 B
import { ResultAsync } from 'neverthrow'; import { QaseApi } from 'qaseio'; export const formatApiError = (error) => { const apiError = error; return apiError.response?.data?.message || apiError.message; }; export const toResult = (promise) => ResultAsync.fromPromise(promise, formatApiError); export const client = (({ QASE_API_TOKEN }) => { if (!QASE_API_TOKEN) { throw new Error('QASE_API_TOKEN environment variable is required. Please set it before running the server.'); } return new QaseApi({ token: QASE_API_TOKEN, }); })(process.env);