Skip to main content
Glama

mcp-server-circleci

Official
vcsTool.ts1.78 kB
export type VCSDefinition = { host: 'github.com' | 'bitbucket.org' | 'circleci.com'; name: 'github' | 'bitbucket' | 'circleci'; short: 'gh' | 'bb' | 'circleci'; }; /** * Gitlab is not compatible with this representation * https://circleci.atlassian.net/browse/DEVEX-175 */ export const vcses: VCSDefinition[] = [ { host: 'github.com', name: 'github', short: 'gh', }, { host: 'bitbucket.org', name: 'bitbucket', short: 'bb', }, { host: 'circleci.com', name: 'circleci', short: 'circleci', }, ]; export class UnhandledVCS extends Error { constructor(vcs: string) { super(`VCS ${vcs} is not handled at the moment`); } } export function getVCSFromHost(host: string): VCSDefinition | undefined { return vcses.find(({ host: vcsHost }) => host === vcsHost); } export function mustGetVCSFromHost(host: string): VCSDefinition { const vcs = getVCSFromHost(host); if (vcs === undefined) { throw new UnhandledVCS(host); } return vcs; } export function getVCSFromName(name: string): VCSDefinition | undefined { return vcses.find(({ name: vcsName }) => name === vcsName); } export function mustGetVCSFromName(name: string): VCSDefinition { const vcs = getVCSFromName(name); if (vcs === undefined) { throw new UnhandledVCS(name); } return vcs; } export function getVCSFromShort(short: string): VCSDefinition | undefined { return vcses.find(({ short: vcsShort }) => short === vcsShort); } export function mustGetVCSFromShort(short: string): VCSDefinition { const vcs = getVCSFromShort(short); if (vcs === undefined) { throw new UnhandledVCS(short); } return vcs; } export function isLegacyProject(projectSlug: string) { return ['gh', 'bb'].includes(projectSlug.split('/')[0]); }

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/CircleCI-Public/mcp-server-circleci'

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