### Start MCP Server Programmatically with Stdio Transport (TypeScript) Source: https://context7.com/domdomegg/downdetector-mcp/llms.txt Initiates the MCP server using stdio transport, enabling integration with MCP clients. This function connects to the transport, logs a success message, or exits with an error if the server fails to start. Dependencies include '@modelcontextprotocol/sdk/server/stdio' and 'downdetector-mcp/server'. ```typescript import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'; import { server } from 'downdetector-mcp/server'; async function main(): Promise { try { const transport = new StdioServerTransport(); await server.connect(transport); console.error('MCP server running on stdio'); } catch (error) { console.error('Failed to start server:', error); process.exit(1); } } main(); ``` -------------------------------- ### Query Service Status with Regional Domains (TypeScript) Source: https://context7.com/domdomegg/downdetector-mcp/llms.txt Demonstrates how to query service status for different geographic regions by specifying the 'domain' parameter. It includes a list of supported domains and provides examples of checking service status in the US, UK, and Germany. Assumes the existence of a 'handler' function. ```typescript // Available domains for regional queries const supportedDomains = [ 'com', // United States (default) 'co.uk', // United Kingdom 'uk', // United Kingdom (alternative) 'it', // Italy 'fr', // France 'de', // Germany 'es', // Spain 'nl', // Netherlands 'br', // Brazil 'mx', // Mexico 'ar', // Argentina 'in', // India 'au', // Australia 'jp', // Japan ]; // Example: Check Instagram status in different regions const usStatus = await handler({ serviceName: 'instagram' }); const ukStatus = await handler({ serviceName: 'instagram', domain: 'co.uk' }); const deStatus = await handler({ serviceName: 'instagram', domain: 'de' }); ``` -------------------------------- ### Query Service Status via MCP Tool Source: https://context7.com/domdomegg/downdetector-mcp/llms.txt Example JSON payloads for invoking the downdetector tool to check service status across different regional domains. ```json { "name": "downdetector", "arguments": { "serviceName": "netflix", "domain": "co.uk" } } ``` -------------------------------- ### Configure MCP Server for AI Clients Source: https://context7.com/domdomegg/downdetector-mcp/llms.txt Configuration snippets for integrating the Downdetector MCP server into Claude Desktop, Cursor, and Cline environments using stdio transport. ```json { "mcpServers": { "downdetector": { "command": "npx", "args": ["-y", "downdetector-mcp"] } } } ``` -------------------------------- ### Programmatic Usage in TypeScript Source: https://context7.com/domdomegg/downdetector-mcp/llms.txt Demonstrates how to import and use the downdetector handler directly within a TypeScript application, including input validation using Zod. ```typescript import { handler, schema } from 'downdetector-mcp/tools/downdetector'; const validatedArgs = schema.parse({ serviceName: 'steam', domain: 'com' }); const result = await handler(validatedArgs); console.log(result.content[0].text); ``` -------------------------------- ### MCP Tool: downdetector Source: https://context7.com/domdomegg/downdetector-mcp/llms.txt Retrieves current service status and outage report trends for a specified service and regional domain. ```APIDOC ## MCP Tool: downdetector ### Description Queries Downdetector's public interface to retrieve current outage report counts, baseline values, and recent activity trends for a specific service. ### Method MCP Tool Call ### Parameters #### Request Body - **serviceName** (string) - Required - The name of the service to check (e.g., "steam", "netflix", "discord"). - **domain** (string) - Optional - The regional domain suffix (e.g., "co.uk", "it", "fr"). Defaults to "com". ### Request Example { "name": "downdetector", "arguments": { "serviceName": "steam", "domain": "com" } } ### Response #### Success Response (200) - **content** (array) - An array containing a text object with formatted status information, including current reports, last updated timestamp, and recent activity logs. #### Response Example { "content": [{ "type": "text", "text": "## STEAM Status\n\n**Current reports:** 42\n**Last updated:** 1/15/2025, 3:45:00 PM\n**Baseline:** 5\n\n### Recent Reports:\n- 1/15/2025, 3:45:00 PM: 42 reports\n- 1/15/2025, 3:30:00 PM: 38 reports" }] } ``` -------------------------------- ### Define Downdetector Data Types Source: https://context7.com/domdomegg/downdetector-mcp/llms.txt TypeScript type definitions representing the structure of outage reports and baseline data returned by the Downdetector API. ```typescript type Report = { date: string; value: number; }; type DowndetectorResponse = { reports: Report[]; baseline: Report[]; }; ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.