### Main Execution Flow Example Source: https://github.com/fastly/mcp/blob/ng/_autodocs/modules.md Illustrates the primary execution sequence, including argument parsing, API index building, encryption setup, server creation, and transport selection. ```javascript // 1. Parse CLI args const cliArgs = parseArgs(process.argv); // 2. Build API index from docs/ const index = await buildIndex(); // 3. Set up encryption if enabled const shield = encryptionEnabled ? new SecretShield({ key, tweak }) : null; // 4. Create server const mcp = createMcpServer({ shield, index }); // 5. Pick transport and start if (transportChoice === "http") { await startHttp(() => createMcpServer({ shield, index }), { ... }); } else { const transport = new StdioServerTransport(); await mcp.connect(transport); } ``` -------------------------------- ### Install Dependencies Source: https://github.com/fastly/mcp/blob/ng/AGENTS.md Install project dependencies using bun. ```bash bun install ``` -------------------------------- ### Run Fastly MCP with HTTP Transport and Authentication Source: https://github.com/fastly/mcp/blob/ng/README.md Example of starting the MCP server with HTTP transport and specifying an authentication token via an environment variable for enhanced security. ```sh FASTLY_MCP_HTTP_AUTH_TOKEN=your-auth-token bunx -p @fastly/mcp fastly-mcp --transport http --http-allow-network ``` -------------------------------- ### Update Config Store Example Source: https://github.com/fastly/mcp/blob/ng/docs/ConfigStoreApi.md An example demonstrating how to use the `updateConfigStore` function with specified options. It includes success and error handling. ```javascript const options = { config_store_id: "config_store_id_example", // required name: "name_example", }; apiInstance.updateConfigStore(options) .then((data) => { console.log(data, "API called successfully."); }) .catch((error) => { console.error(error); }); ``` -------------------------------- ### Enable Verbose Logging Source: https://github.com/fastly/mcp/blob/ng/_autodocs/errors-and-troubleshooting.md This example shows how to capture server diagnostics to stderr using tee. It also provides examples of common startup messages for both stdio and HTTP servers. ```bash bunx -p @fastly/mcp fastly-mcp 2>&1 | tee mcp.log ``` ```log [indexer] Built index: 1024 methods across 100 API classes from 133 files [fastly-mcp] Server started (stdio) ``` ```log [fastly-mcp] Server started (http) version=2.1.1 listening on http://127.0.0.1:8231/mcp stateless=false json=false ``` -------------------------------- ### Start MCP Server (stdio) Source: https://github.com/fastly/mcp/blob/ng/_autodocs/quick-reference.md Start the Fastly MCP server using the stdio transport. ```bash bunx -p @fastly/mcp fastly-mcp ``` -------------------------------- ### Start MCP Server (HTTP) Source: https://github.com/fastly/mcp/blob/ng/_autodocs/quick-reference.md Start the Fastly MCP server using the HTTP transport. ```bash bunx -p @fastly/mcp fastly-mcp --transport http ``` -------------------------------- ### Start HTTP Server Source: https://github.com/fastly/mcp/blob/ng/_autodocs/modules.md Starts an HTTP server and begins listening for connections. It resolves HTTP options, manages sessions, and handles incoming requests with validation and routing. ```javascript async function startHttp(createMcpServer, { cliArgs, env, version }) -> { server, options } ``` -------------------------------- ### Get Dashboard Example Source: https://github.com/fastly/mcp/blob/ng/docs/ObservabilityCustomDashboardsApi.md Retrieve a specific dashboard by its ID. The dashboard_id is a required parameter. ```javascript const options = { dashboard_id: 2eGFXF4F4kTxd4gU39Bg3e, // required }; apiInstance.getDashboard(options) .then((data) => { console.log(data, "API called successfully."); }) .catch((error) => { console.error(error); }); ``` -------------------------------- ### Initialize ProductLogExplorerInsightsApi Source: https://github.com/fastly/mcp/blob/ng/docs/ProductLogExplorerInsightsApi.md Instantiate the ProductLogExplorerInsightsApi client. All URIs are relative to https://api.fastly.com. ```javascript const apiInstance = new Fastly.ProductLogExplorerInsightsApi(); ``` -------------------------------- ### HTTP 405 Method Not Allowed Example Source: https://github.com/fastly/mcp/blob/ng/_autodocs/errors-and-troubleshooting.md This example illustrates a GET request in stateless mode resulting in a 405 Method Not Allowed response. It specifies that POST or OPTIONS should be used for requests in this mode. ```http GET /mcp HTTP/1.1 ``` ```http HTTP/1.1 405 Method Not Allowed Allow: POST, OPTIONS ``` -------------------------------- ### startHttp(createMcpServer, { cliArgs, env, version }) Source: https://github.com/fastly/mcp/blob/ng/_autodocs/modules.md Starts an HTTP server and begins listening. It handles option resolution, session management, and HTTP request handling. ```APIDOC ## startHttp(createMcpServer, { cliArgs, env, version }) ### Description Starts an HTTP server and begins listening. It handles option resolution, session management, and HTTP request handling. ### Signature ```javascript async function startHttp(createMcpServer, { cliArgs, env, version }) -> { server, options } ``` ### Parameters - `createMcpServer` (function) — Callable that returns fresh McpServer instances - `cliArgs` (ParsedArgs) — Parsed CLI arguments - `env` (object) — Environment variables object - `version` (string) — Package version (for logging) ### Returns Promise resolving to `{ server: http.Server, options: HttpOptions }` ### Implementation: 1. **Option resolution** → `resolveHttpOptions()` - Parses host, port, auth, CORS, stateless mode, etc. - Validates auth requirements (non-loopback → require token) - Validates mutually-exclusive flags 2. **Session management** - Creates `sessions` Map to track active stateful sessions - Implements `closeSession(id)` helper 3. **HTTP request handler** - Validates Host header against allowlist - Validates Authorization header if auth token set - Handles CORS preflight (OPTIONS) - Routes to stateful or stateless handler based on mode - Returns JSON errors on validation failure 4. **Server startup** - Creates Node.js HTTP server with handler - Listens on resolved host:port - Dynamically adjusts allowedHosts if port differs - Registers SIGINT/SIGTERM handlers for graceful shutdown ``` -------------------------------- ### Initialize ProductNgwafApi Source: https://github.com/fastly/mcp/blob/ng/docs/ProductNgwafApi.md Instantiate the ProductNgwafApi client. This is typically the first step before calling any API methods. ```javascript const apiInstance = new Fastly.ProductNgwafApi(); ``` -------------------------------- ### Get Logged In Customer Example Source: https://github.com/fastly/mcp/blob/ng/docs/CustomerApi.md Fetches information about the currently authenticated customer. No parameters are required for this operation. ```javascript apiInstance.getLoggedInCustomer() .then((data) => { console.log(data, "API called successfully."); }) .catch((error) => { console.error(error); }); ``` -------------------------------- ### Get Customer Example Source: https://github.com/fastly/mcp/blob/ng/docs/CustomerApi.md Retrieve details for a specific customer using their customer ID. This is useful for viewing individual customer configurations. ```javascript const options = { customer_id: "customer_id_example", // required }; apiInstance.getCustomer(options) .then((data) => { console.log(data, "API called successfully."); }) .catch((error) => { console.error(error); }); ``` -------------------------------- ### Initialize LoggingSumologicApi Source: https://github.com/fastly/mcp/blob/ng/docs/LoggingSumologicApi.md Instantiate the LoggingSumologicApi client. No setup is required prior to instantiation. ```javascript const apiInstance = new Fastly.LoggingSumologicApi(); ``` -------------------------------- ### Get Attacks Report Source: https://github.com/fastly/mcp/blob/ng/docs/NgwafReportsApi.md Retrieves a report of attacks within a specified time range. Requires a start date and optionally accepts an end date. ```javascript const options = { from: 2019-08-20T18:07:33Z, // required to: 2019-08-21T18:07:33Z, }; apiInstance.getAttacksReport(options) .then((data) => { console.log(data, "API called successfully."); }) .catch((error) => { console.error(error); }); ``` -------------------------------- ### Get Dictionary Example Source: https://github.com/fastly/mcp/blob/ng/docs/DictionaryApi.md Retrieve a specific dictionary by its name for a given service version. This requires the service ID, version ID, and the dictionary's name. ```javascript const options = { service_id: "service_id_example", // required version_id: 56, // required dictionary_name: "dictionary_name_example", // required }; apiInstance.getDictionary(options) .then((data) => { console.log(data, "API called successfully."); }) .catch((error) => { console.error(error); }); ``` -------------------------------- ### Initialize ProductOriginInspectorApi Source: https://github.com/fastly/mcp/blob/ng/docs/ProductOriginInspectorApi.md Instantiate the API client. No setup or configuration is required before use. ```javascript const apiInstance = new Fastly.ProductOriginInspectorApi(); ``` -------------------------------- ### Initialize KvStoreApi Source: https://github.com/fastly/mcp/blob/ng/docs/KvStoreApi.md Instantiate the KvStoreApi client. This is the first step before calling any API methods. ```javascript const apiInstance = new Fastly.KvStoreApi(); ``` -------------------------------- ### Update Dictionary Items with Prefix Source: https://github.com/fastly/mcp/blob/ng/_autodocs/usage-patterns.md Updates all items in a specific dictionary that have keys starting with a given prefix. This example sets the 'feature_' prefixed items to 'enabled'. It returns the count of updated items. ```javascript { "tool": "execute", "params": { "code": "const items = await dictionaryItemApi.listDictionaryItems({ service_id: 'ABC123', dictionary_id: 'dict-id' });\nconst featureFlags = items.filter(i => i.item_key.startsWith('feature_'));\n\nconst updates = [];\nfor (const item of featureFlags) {\n updates.push(\n dictionaryItemApi.updateDictionaryItem({ service_id: 'ABC123', dictionary_id: 'dict-id', item_key: item.item_key, item_value: 'enabled' }) ); } await Promise.all(updates); return { updated: updates.length };" } } ``` -------------------------------- ### Initialize ConfigStoreApi Source: https://github.com/fastly/mcp/blob/ng/docs/ConfigStoreApi.md Instantiate the ConfigStoreApi client. All URIs are relative to https://api.fastly.com. ```javascript const apiInstance = new Fastly.ConfigStoreApi(); ``` -------------------------------- ### Indexer Error: Index is Empty Source: https://github.com/fastly/mcp/blob/ng/_autodocs/errors-and-troubleshooting.md This example shows an error indicating that no methods were parsed from any API files. Resolutions include regenerating docs, reinstalling the package, or checking if the 'fastly' npm module is installed. ```log [indexer] Error: Index is empty — no methods were parsed from any file ``` ```bash bun run update-docs ``` ```bash npm install @fastly/mcp@latest ``` ```bash npm list fastly ``` -------------------------------- ### Initialize ProductFanoutApi Source: https://github.com/fastly/mcp/blob/ng/docs/ProductFanoutApi.md Instantiate the ProductFanoutApi class. This is typically the first step before calling any API methods. ```javascript const apiInstance = new Fastly.ProductFanoutApi(); ``` -------------------------------- ### Get Signals Report Source: https://github.com/fastly/mcp/blob/ng/docs/NgwafReportsApi.md Retrieves a report of signals within a specified time range, with an option to filter by signal type. Requires a start date and optionally accepts an end date and signal type. ```javascript const options = { from: 2019-08-20T18:07:33Z, // required to: 2019-08-21T18:07:33Z, signal_type: "account", }; apiInstance.getSignalsReport(options) .then((data) => { console.log(data, "API called successfully."); }) .catch((error) => { console.error(error); }); ``` -------------------------------- ### Get Domain Data from Specific Timestamp Source: https://github.com/fastly/mcp/blob/ng/docs/DomainInspectorRealtimeApi.md Retrieve real-time domain data starting from a specified Unix epoch timestamp. Providing '0' fetches a single entry for the last complete second. The response timestamp can be used for subsequent requests to ensure data continuity. ```javascript const options = { service_id: "service_id_example", // required start_timestamp: 56, // required }; apiInstance.getDomainInspectorLastSecond(options) .then((data) => { console.log(data, "API called successfully."); }) .catch((error) => { console.error(error); }); ``` -------------------------------- ### Get Origin Inspector Data from Specific Timestamp Source: https://github.com/fastly/mcp/blob/ng/docs/OriginInspectorRealtimeApi.md Retrieve real-time origin data starting from a specific Unix epoch timestamp. Providing '0' fetches data for the last complete second. The response includes a 'Timestamp' that can be used for subsequent requests to ensure data continuity. ```javascript const options = { service_id: "service_id_example", // required start_timestamp: 56, // required }; apiInstance.getOriginInspectorLastSecond(options) .then((data) => { console.log(data, "API called successfully."); }) .catch((error) => { console.error(error); }); ``` -------------------------------- ### Initialize ProductApiDiscoveryApi Source: https://github.com/fastly/mcp/blob/ng/docs/ProductApiDiscoveryApi.md Instantiate the ProductApiDiscoveryApi client. This is typically the first step before calling any API methods. ```javascript const apiInstance = new Fastly.ProductApiDiscoveryApi(); ``` -------------------------------- ### Initialize KvStoreItemApi Source: https://github.com/fastly/mcp/blob/ng/docs/KvStoreItemApi.md Instantiate the KvStoreItemApi client. This is typically the first step before making any API calls. ```javascript const apiInstance = new Fastly.KvStoreItemApi(); ``` -------------------------------- ### Install MCP Package Source: https://github.com/fastly/mcp/blob/ng/_autodocs/quick-reference.md Install the Fastly MCP package using npm. ```bash npm install @fastly/mcp ``` -------------------------------- ### Run the MCP Server Locally Source: https://github.com/fastly/mcp/blob/ng/README.md Execute the main server entry point using Bun. ```sh bun run src/index.js ``` -------------------------------- ### Parameter Definition Example Source: https://github.com/fastly/mcp/blob/ng/_autodocs/types.md An example of a Parameter object, illustrating a required 'service_id' parameter. ```typescript { "name": "service_id", "type": "string", "required": true, "description": "Alphanumeric string identifying the service." } ``` -------------------------------- ### Run Fastly MCP with Options Source: https://github.com/fastly/mcp/blob/ng/_autodocs/configuration.md Basic usage of the Fastly MCP CLI. Use this to start the MCP server with various configuration flags. ```bash fastly-mcp [options] ``` -------------------------------- ### Initialize ProductDdosProtectionApi Source: https://github.com/fastly/mcp/blob/ng/docs/ProductDdosProtectionApi.md Instantiate the ProductDdosProtectionApi client. This is typically the first step before calling any API methods. ```javascript const apiInstance = new Fastly.ProductDdosProtectionApi(); ``` -------------------------------- ### Initialize ProductDomainInspectorApi Source: https://github.com/fastly/mcp/blob/ng/docs/ProductDomainInspectorApi.md Instantiate the ProductDomainInspectorApi client. This is the first step before calling any API methods. ```javascript const apiInstance = new Fastly.ProductDomainInspectorApi(); ``` -------------------------------- ### getProductNgwafConfiguration Source: https://github.com/fastly/mcp/blob/ng/docs/ProductNgwafApi.md Get the current configuration of the Next-Gen WAF product on a service. This is done via a GET request. ```APIDOC ## GET /enabled-products/v1/ngwaf/services/{service_id}/configuration ### Description Get configuration of the Next-Gen WAF product on a service. ### Method GET ### Endpoint /enabled-products/v1/ngwaf/services/{service_id}/configuration ### Parameters #### Path Parameters - **service_id** (String) - Required - Alphanumeric string identifying the service. ### Response #### Success Response (200) - **NgwafResponseConfigure** - The current configuration of the WAF. ``` -------------------------------- ### Initialize ProductBotManagementApi Source: https://github.com/fastly/mcp/blob/ng/docs/ProductBotManagementApi.md Instantiate the ProductBotManagementApi client. This is typically the first step before calling any API methods. ```javascript const apiInstance = new Fastly.ProductBotManagementApi(); ``` -------------------------------- ### Update Dictionary Example Source: https://github.com/fastly/mcp/blob/ng/docs/DictionaryApi.md Provides a complete example of how to call the updateDictionary function with options and handle the response or errors. ```javascript const options = { service_id: "service_id_example", // required version_id: 56, // required dictionary_name: "dictionary_name_example", // required name: "name_example", write_only: false, }; apiInstance.updateDictionary(options) .then((data) => { console.log(data, "API called successfully."); }) .catch((error) => { console.error(error); }); ``` -------------------------------- ### Initialize Product Object Storage API Source: https://github.com/fastly/mcp/blob/ng/docs/ProductObjectStorageApi.md Instantiate the Product Object Storage API client. This is the first step before calling any API methods. ```javascript const apiInstance = new Fastly.ProductObjectStorageApi(); ``` -------------------------------- ### Parameter Constraint Example Source: https://github.com/fastly/mcp/blob/ng/_autodocs/types.md An example of a Constraint object for the 'oneOf' kind, showing that 'version' and 'version_id' are mutually exclusive. ```typescript { "kind": "oneOf", "groups": [ ["version"], ["version_id"] ], "sourceText": "Requires one of version or version_id." } ``` -------------------------------- ### Initialize Publish API Instance Source: https://github.com/fastly/mcp/blob/ng/docs/PublishApi.md Instantiate the Fastly Publish API client. This is the first step before making any API calls. ```javascript const apiInstance = new Fastly.PublishApi(); ``` -------------------------------- ### Initialize Product Image Optimizer API Source: https://github.com/fastly/mcp/blob/ng/docs/ProductImageOptimizerApi.md Instantiate the Product Image Optimizer API client. ```javascript const apiInstance = new Fastly.ProductImageOptimizerApi(); ``` -------------------------------- ### Delete Contact Example Source: https://github.com/fastly/mcp/blob/ng/docs/ContactApi.md This example demonstrates how to delete a specific customer contact. Both customer_id and contact_id are required parameters for this operation. ```javascript const options = { customer_id: "customer_id_example", // required contact_id: "contact_id_example", // required }; apiInstance.deleteContact(options) .then((data) => { console.log(data, "API called successfully."); }) .catch((error) => { console.error(error); }); ``` -------------------------------- ### getProductNgwaf Source: https://github.com/fastly/mcp/blob/ng/docs/ProductNgwafApi.md Get the enablement status of the Next-Gen WAF product on a service. This operation uses a GET request to retrieve the status. ```APIDOC ## GET /enabled-products/v1/ngwaf/services/{service_id} ### Description Get the enablement status of the Next-Gen WAF product on a service. ### Method GET ### Endpoint /enabled-products/v1/ngwaf/services/{service_id} ### Parameters #### Path Parameters - **service_id** (String) - Required - Alphanumeric string identifying the service. ### Response #### Success Response (200) - **NgwafResponseEnable** - Details about the WAF enablement status. ``` -------------------------------- ### Initialize ImageOptimizerDefaultSettingsApi Source: https://github.com/fastly/mcp/blob/ng/docs/ImageOptimizerDefaultSettingsApi.md Instantiate the ImageOptimizerDefaultSettingsApi client. All URIs are relative to https://api.fastly.com. ```javascript const apiInstance = new Fastly.ImageOptimizerDefaultSettingsApi(); ``` -------------------------------- ### Get Log Kinesis Source: https://github.com/fastly/mcp/blob/ng/docs/LoggingKinesisApi.md Get the details for an Amazon Kinesis Data Streams logging object for a particular service and version. ```APIDOC ## GET /service/{service_id}/version/{version_id}/logging/kinesis/{logging_kinesis_name} ### Description Get the details for an Amazon Kinesis Data Streams logging object for a particular service and version. ### Method GET ### Endpoint /service/{service_id}/version/{version_id}/logging/kinesis/{logging_kinesis_name} ### Parameters #### Path Parameters - **service_id** (String) - Alphanumeric string identifying the service. - **version_id** (Number) - Integer identifying a service version. - **logging_kinesis_name** (String) - The name for the real-time logging configuration. ### Response #### Success Response (200) - **LoggingKinesisResponse** (Object) - Details about the Kinesis logging object. ### Response Example { "example": "LoggingKinesisResponse object" } ``` -------------------------------- ### Execute Service Get with Error Handling Source: https://github.com/fastly/mcp/blob/ng/_autodocs/quick-reference.md Execute a command to get a specific service, including try-catch error handling. ```javascript { "tool": "execute", "params": { "code": "try { return await serviceApi.getService({service_id: 'ABC123'}); } catch(e) { return {error: e.message}; }" } } ``` -------------------------------- ### Initialize LoggingPubsubApi Source: https://github.com/fastly/mcp/blob/ng/docs/LoggingPubsubApi.md Instantiate the LoggingPubsubApi client. All URIs are relative to https://api.fastly.com. ```javascript const apiInstance = new Fastly.LoggingPubsubApi(); ``` -------------------------------- ### Initialize ObservabilityCustomDashboardsApi Source: https://github.com/fastly/mcp/blob/ng/docs/ObservabilityCustomDashboardsApi.md Instantiate the ObservabilityCustomDashboardsApi client. This is typically the first step before calling any API methods. ```javascript const apiInstance = new Fastly.ObservabilityCustomDashboardsApi(); ``` -------------------------------- ### Get New Relic Logs Logging Configuration Source: https://github.com/fastly/mcp/blob/ng/docs/LoggingNewrelicApi.md Get the details of a New Relic Logs logging object for a particular service and version. ```APIDOC ## GET /service/:service_id/version/:version_id/logging/newrelic/:logging_newrelic_name ### Description Get the details of a New Relic Logs logging object for a particular service and version. ### Method GET ### Endpoint `/service/:service_id/version/:version_id/logging/newrelic/:logging_newrelic_name` ### Parameters #### Path Parameters - **service_id** (String) - Required - Alphanumeric string identifying the service. - **version_id** (Number) - Required - Integer identifying a service version. - **logging_newrelic_name** (String) - Required - The name for the real-time logging configuration. ### Response #### Success Response (200) - **LoggingNewrelicResponse** (Object) - Details of the New Relic logging configuration. ``` -------------------------------- ### Initialize Fastly Product Brotli Compression API Source: https://github.com/fastly/mcp/blob/ng/docs/ProductBrotliCompressionApi.md Instantiate the ProductBrotliCompressionApi class. This is typically the first step before calling any API methods. ```javascript const apiInstance = new Fastly.ProductBrotliCompressionApi(); ``` -------------------------------- ### Start Fastly MCP HTTP Transport for Claude.ai Source: https://github.com/fastly/mcp/blob/ng/_autodocs/configuration.md Command to start the Fastly MCP server using the HTTP transport, allowing connections from claude.ai. ```bash bunx -p @fastly/mcp fastly-mcp --transport http --http-allow-origin https://claude.ai ``` -------------------------------- ### Initialize Realtime API Client Source: https://github.com/fastly/mcp/blob/ng/docs/RealtimeApi.md Instantiate the Realtime API client. This is the first step before making any API calls. ```javascript const apiInstance = new Fastly.RealtimeApi(); ``` -------------------------------- ### Get All Services with Product Domain Inspector Enabled Source: https://github.com/fastly/mcp/blob/ng/docs/ProductDomainInspectorApi.md Call this method to get a list of all services that have the Domain Inspector product enabled. This endpoint does not require any parameters. ```javascript apiInstance.getServicesProductDomainInspector() .then((data) => { console.log(data, "API called successfully."); }) .catch((error) => { console.error(error); }); ``` -------------------------------- ### Display Full MCP Server Help Source: https://github.com/fastly/mcp/blob/ng/README.md Execute this command to view all available command-line flags and options for the Fastly MCP server. ```sh bunx -p @fastly/mcp fastly-mcp --help ``` -------------------------------- ### Recreate Secret Example Source: https://github.com/fastly/mcp/blob/ng/docs/SecretStoreItemApi.md Example of how to call the `recreateSecret` method. The `secret` option must be a Base64-encoded string. This snippet demonstrates setting up the options and handling the API response. ```javascript const options = { store_id: "store_id_example", // required secret: new Fastly.Secret(), }; apiInstance.recreateSecret(options) .then((data) => { console.log(data, "API called successfully."); }) .catch((error) => { console.error(error); }); ``` -------------------------------- ### Encryption Key Error Example Source: https://github.com/fastly/mcp/blob/ng/_autodocs/errors-and-troubleshooting.md This example demonstrates an error where the FASTLY_MCP_ENCRYPT_KEY is not exactly 32 hexadecimal characters. It shows how to generate a valid key and set the environment variable. ```bash export FASTLY_MCP_ENCRYPT_KEY=tooshort bunx -p @fastly/mcp fastly-mcp --encrypt-secrets ``` ```bash openssl rand -hex 16 ``` ```bash export FASTLY_MCP_ENCRYPT_KEY=a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6 bunx -p @fastly/mcp fastly-mcp --encrypt-secrets ``` -------------------------------- ### Initialize Fastly Product Websockets API Source: https://github.com/fastly/mcp/blob/ng/docs/ProductWebsocketsApi.md Instantiate the ProductWebsocketsApi class. This is typically the first step before calling any API methods. ```javascript const apiInstance = new Fastly.ProductWebsocketsApi(); ``` -------------------------------- ### Initialize DirectorBackendApi Source: https://github.com/fastly/mcp/blob/ng/docs/DirectorBackendApi.md Instantiate the DirectorBackendApi client. This is the first step before calling any API methods. ```javascript const apiInstance = new Fastly.DirectorBackendApi(); ``` -------------------------------- ### Initialize LoggingFtpApi Source: https://github.com/fastly/mcp/blob/ng/docs/LoggingFtpApi.md Instantiate the LoggingFtpApi client. This is the first step before calling any API methods. ```javascript const apiInstance = new Fastly.LoggingFtpApi(); ```