Skip to content

Quick Start

Start with MCP when you are connecting an AI agent. Use the CLI when you want to test or script the same workflows from a terminal.

Connect your MCP client to MidLyr’s remote MCP server:

https://mcp.midlyr.com/mcp

For self-configured clients, set your API key in the environment used by the client:

Terminal window
export MIDLYR_API_KEY="ml_..."

Then add the copy-paste configuration from MCP Configuration and call tools like readRegulatoryContent, startComplianceScreening, and getJob. ChatGPT apps and connectors use OAuth instead of an API-key header.

Install the MidLyr CLI:

Terminal window
npm install -g @midlyr/cli

Authenticate (opens a browser to provision an API key):

Terminal window
midlyr login

Submit a screening job. By default the CLI polls until the job succeeds or fails and prints the terminal result:

Terminal window
midlyr screen-analysis \
--scenario dispute \
--text "we can't provide a provisional dispute credit until the investigation is completed"

Pass --no-wait to return immediately with the pending job record instead of polling.

Install the TypeScript SDK:

Terminal window
npm install @midlyr/sdk-js

Create a client and submit a screening call:

import { Midlyr } from "@midlyr/sdk-js";
const midlyr = new Midlyr({
apiKey: process.env.MIDLYR_API_KEY!,
});
const response = await midlyr.analysis.screen({
content: { type: "text", text: "Get 0% APR for life!" },
scenario: "marketing_asset",
});
const job = await midlyr.jobs.get(response.id);

The SDK uses native fetch, authenticates via the x-api-key header, and has no runtime HTTP dependency.