Skip to main content
Glama

Zerocracy MCP Server

Official
by zerocracy
baza.test.ts1.26 kB
// SPDX-FileCopyrightText: Copyright (c) 2025 Zerocracy // SPDX-License-Identifier: MIT import { describe, expect, test } from '@jest/globals'; import { baza } from '../src/baza'; describe('baza', () => { const before = process.env.ZEROCRACY_TOKEN; beforeEach(() => { process.env.ZEROCRACY_TOKEN = '00000000-0000-0000-0000-000000000000'; }); afterEach(() => { if (before === undefined) { delete process.env.ZEROCRACY_TOKEN; } else { process.env.ZEROCRACY_TOKEN = before; } }); test('throws when ZEROCRACY_TOKEN is not set', async (): Promise<void> => { delete process.env.ZEROCRACY_TOKEN; await expect( baza('/robots.txt', 'GET', {}, '') ).rejects.toThrow('You must set ZEROCRACY_TOKEN environment variable'); }); test('fetches plain text', async () => { const body = await baza('/robots.txt', 'GET', {}, ''); expect(body).toContain('Disallow'); }); test('fetches non-existing page', async () => { await expect( baza('/this/path/does/not/exist', 'POST', {}, 'boom') ).rejects.toThrow('HTTP error 404'); }); test('does not follow redirects', async () => { await expect( baza('/mcp/tool', 'PUT', {}, '') ).rejects.toThrow('HTTP error 303'); }); });

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/zerocracy/zerocracy-mcp-server'

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