Skip to main content
Glama
apiClient.integration.test.ts951 B
import { AmbianceAPIClient } from '../../client/apiClient'; const API_KEY = process.env.AMBIANCE_API_KEY || ''; const API_URL = process.env.AMBIANCE_API_URL || process.env.USING_LOCAL_SERVER_URL || 'http://localhost:3001'; const itIf = (cond: boolean) => (cond ? it : it.skip); describe('Ambiance API Client Integration (skips without AMBIANCE_API_KEY)', () => { const client = new AmbianceAPIClient(API_KEY, API_URL); it('skips when no ambiance api key is provided', () => { if (!API_KEY) { expect(true).toBe(true); } else { expect(true).toBe(true); } }); itIf(!!API_KEY)('health check should succeed on running server', async () => { const ok = await client.healthCheck(); expect(ok).toBe(true); }); itIf(!!API_KEY)('searchContext should return results', async () => { const results = await client.searchContext({ query: 'function' }); expect(Array.isArray(results)).toBe(true); }); });

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/sbarron/AmbianceMCP'

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