Skip to main content
Glama

Claude Code MCP Server

by steipete
persistent-mock.ts789 B
import { ClaudeMock } from './claude-mock.js'; import { existsSync } from 'node:fs'; import { join } from 'node:path'; let sharedMock: ClaudeMock | null = null; export async function getSharedMock(): Promise<ClaudeMock> { if (!sharedMock) { sharedMock = new ClaudeMock('claudeMocked'); } // Always ensure mock exists const mockPath = join('/tmp', 'claude-code-test-mock', 'claudeMocked'); if (!existsSync(mockPath)) { console.error(`[DEBUG] Mock not found at ${mockPath}, creating it...`); await sharedMock.setup(); } else { console.error(`[DEBUG] Mock already exists at ${mockPath}`); } return sharedMock; } export async function cleanupSharedMock(): Promise<void> { if (sharedMock) { await sharedMock.cleanup(); sharedMock = null; } }

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/steipete/claude-code-mcp'

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