Skip to main content
Glama
npx.test.js1.33 kB
import { test, describe } from 'node:test'; import assert from 'node:assert/strict'; import fs from 'node:fs'; import path from 'node:path'; import { fileURLToPath } from 'node:url'; const __filename = fileURLToPath(import.meta.url); const __dirname = path.dirname(__filename); const packageJsonPath = path.resolve(__dirname, '..', '..', 'package.json'); const mcpServerPath = path.resolve(__dirname, '..', '..', 'mcp-server.js'); describe('The repository is properly structured to be executed using npx', () => { test('package.json should be at the root', () => { assert.ok( fs.existsSync(packageJsonPath), 'package.json not found at the project root' ); }); test('package.json should have a bin attribute for cloud-run-mcp', () => { const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf-8')); assert.ok(packageJson.bin, 'bin attribute not found in package.json'); assert.ok( packageJson.bin['cloud-run-mcp'], 'cloud-run-mcp not found in bin attribute' ); }); test('mcp-server.js should start with #!/usr/bin/env node', () => { const mcpServerContent = fs.readFileSync(mcpServerPath, 'utf-8'); assert.ok( mcpServerContent.startsWith('#!/usr/bin/env node'), 'mcp-server.js does not start with #!/usr/bin/env node' ); }); });

Latest Blog Posts

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/GoogleCloudPlatform/cloud-run-mcp'

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