We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/scoutos/mcp-linear'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
client.js•885 B
/**
* Linear API client interface
*
* This module provides access to the Linear API using the official Linear SDK.
*/
import { LinearClient } from '@linear/sdk';
/**
* Creates a Linear client using the official Linear SDK
* @param {string} apiKey - Linear API key
* @returns {import('@linear/sdk').LinearClient} A Linear client instance
* @throws {Error} If API key is missing or appears invalid
*/
export function createLinearClient(apiKey) {
if (!apiKey) {
throw new Error('Linear API key is required');
}
// Basic validation that the API key looks like a token
// Linear API keys start with "lin_api_" and are followed by a string of characters
if (!apiKey.startsWith('lin_api_') || apiKey.length < 20) {
throw new Error(
'Linear API key appears to be invalid. It should start with "lin_api_"'
);
}
return new LinearClient({ apiKey });
}