get_ai_status
Check the real-time operational status of major AI services including Claude, OpenAI, Gemini, Mistral, Cohere, Replicate, and Hugging Face. Identify outages or performance issues instantly.
Instructions
Get real-time operational status of major AI services (Claude, OpenAI, Gemini, Mistral, Cohere, Replicate, Hugging Face).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- mcp-server/src/index.ts:96-116 (handler)The handler function for the 'get_ai_status' tool. It calls fetchJSON('/status') to get real-time operational status of major AI services (Claude, OpenAI, Gemini, Mistral, Cohere, Replicate, Hugging Face), formats the response, and returns the status text.
server.tool( 'get_ai_status', 'Get real-time operational status of major AI services (Claude, OpenAI, Gemini, Mistral, Cohere, Replicate, Hugging Face).', {}, async () => { const data = await fetchJSON('/status') as { services: { name: string; provider: string; status: string; components: { name: string; status: string }[] }[]; }; const text = data.services .map(s => { const components = s.components.length > 0 ? '\n' + s.components.map(c => ` ${c.name}: ${c.status}`).join('\n') : ''; return ` ${s.status === 'operational' ? 'OK' : s.status.toUpperCase()} ${s.name} (${s.provider})${components}`; }) .join('\n'); return { content: [{ type: 'text' as const, text: `AI Service Status:\n${text}` }] }; } ); - mcp-server/src/index.ts:96-116 (registration)The tool is registered via server.tool() with the name 'get_ai_status', no input schema (empty object), and a description string.
server.tool( 'get_ai_status', 'Get real-time operational status of major AI services (Claude, OpenAI, Gemini, Mistral, Cohere, Replicate, Hugging Face).', {}, async () => { const data = await fetchJSON('/status') as { services: { name: string; provider: string; status: string; components: { name: string; status: string }[] }[]; }; const text = data.services .map(s => { const components = s.components.length > 0 ? '\n' + s.components.map(c => ` ${c.name}: ${c.status}`).join('\n') : ''; return ` ${s.status === 'operational' ? 'OK' : s.status.toUpperCase()} ${s.name} (${s.provider})${components}`; }) .join('\n'); return { content: [{ type: 'text' as const, text: `AI Service Status:\n${text}` }] }; } ); - mcp-server/src/index.ts:99-99 (schema)Input schema for get_ai_status is an empty object (no parameters required). The response type is inferred from the async handler returning { content: [{ type: 'text', text: string }] }.
{}, - mcp-server/src/index.ts:19-59 (helper)The fetchJSON helper function used by get_ai_status to make API calls to the TensorFeed API (API_BASE + '/status'). It handles headers, auth, and error responses.
async function fetchJSON(path: string, opts: FetchOptions = {}): Promise<unknown> { const headers: Record<string, string> = { 'User-Agent': `TensorFeed-MCP/${SDK_VERSION}`, }; if (opts.body !== undefined) headers['Content-Type'] = 'application/json'; if (opts.auth) { const token = process.env.TENSORFEED_TOKEN; if (!token) { throw new Error( 'TENSORFEED_TOKEN env var is not set. Premium MCP tools require a bearer token. ' + 'Buy credits at https://tensorfeed.ai/developers/agent-payments and pass the returned tf_live_... token via the TENSORFEED_TOKEN env var in your MCP client config.', ); } headers['Authorization'] = `Bearer ${token}`; } const res = await fetch(`${API_BASE}${path}`, { method: opts.method ?? 'GET', headers, ...(opts.body !== undefined ? { body: JSON.stringify(opts.body) } : {}), }); if (!res.ok) { let errPayload: unknown; try { errPayload = await res.json(); } catch { errPayload = await res.text().catch(() => ''); } if (res.status === 402) { throw new Error( `Payment required (402). Your token may be out of credits. Top up at https://tensorfeed.ai/developers/agent-payments. Detail: ${JSON.stringify(errPayload)}`, ); } if (res.status === 401) { throw new Error( `Token rejected (401). Check that TENSORFEED_TOKEN is set to a valid tf_live_... token. Detail: ${JSON.stringify(errPayload)}`, ); } throw new Error(`API error ${res.status}: ${JSON.stringify(errPayload)}`); } return res.json(); }