Skip to main content
Glama

OpenAPI to MCP Server

apiClient.mock.ts875 B
// Mock implementation of the API client export const executeApiCall = jest.fn(); // Set up default successful response executeApiCall.mockImplementation(async (apiCallDetails: any, params: any) => { // Return a successful response by default return { success: true, statusCode: 200, data: { id: 1, name: 'Test Pet', tag: 'dog' }, headers: new Headers({ 'Content-Type': 'application/json' }) }; }); // Helper to configure for error responses export function mockApiError(statusCode = 404, errorData = { error: 'Not found' }) { executeApiCall.mockImplementationOnce(async () => ({ success: false, statusCode, data: errorData, error: 'API Error', headers: new Headers({ 'Content-Type': 'application/json' }) })); } // Helper to reset the mock export function resetApiMock() { executeApiCall.mockClear(); }

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/TykTechnologies/api-to-mcp'

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