MCP Overview
MidLyr’s MCP server provides a standardized interface that lets any compatible AI model or agent access MidLyr’s regulatory library and compliance-screening engine in a simple and secure way.
The server is centrally hosted and managed by MidLyr, so there is nothing to install or run locally. Point any MCP-compatible client at:
https://mcp.midlyr.com/mcpFor connection steps per client, see MCP Configuration.
What Agents Can Do
Section titled “What Agents Can Do”Once connected, an agent can:
- Search the regulatory library for source documents and stable IDs.
- Pull the specific regulatory passages most relevant to a natural-language question.
- Read document metadata, tables of contents, and source text by byte range.
- Get a fast numeric compliance risk score for a piece of text, synchronously — ideal for triage, gating, or live-feedback UIs.
- Submit text for compliance screening against a scenario, waiting inline for the result or backgrounding the job.
- List recent screening jobs and poll any job until it reaches a terminal status.
Tool Catalog
Section titled “Tool Catalog”The server publishes full machine-readable schemas over MCP. After connecting, your client can fetch exact input shapes via the standard tools/list flow — the table below is the human-friendly summary.
| Tool | Use when | Key inputs | Returns |
|---|---|---|---|
browseRegulatoryLibrary | Find relevant regulatory documents and their stable IDs. | optional query, category, authorities, jurisdictions, limit, cursor | Document summaries with a pagination cursor. |
queryRegulations | Pull the regulatory passages most relevant to a natural-language question, grouped under their parent regulation. | query, optional limit, optional filters (ids, authorities, jurisdictions) | Top regulations with matching excerpts and section paths. |
readRegulatoryDocument | Inspect a document’s metadata and table of contents before reading body text. | id | Document object, or found: false for stale IDs. |
readRegulatoryContent | Retrieve source text from a document by byte range. | id, optional offset, optional limit | Content slice, or found: false for stale IDs. |
riskAssessment | Get a fast numeric compliance risk score (0–100) for a piece of text. Synchronous, typically under 20 seconds. Lighter-weight sibling of complianceScreening; use for triage, gating, or live-feedback UIs when you don’t need findings or citations. | content.type, content.text, scenario | A riskScore from 0–100 (0–20 Limited, 21–40 Low, 41–60 Moderate, 61–80 High, 81–100 Critical). |
complianceScreening | Run a compliance screening. By default waits inline up to ~9 minutes and returns the full result; set waitForResult: false to start the job and return immediately. | content.type, content.text, scenario, optional waitForResult | status: 'completed' with the screening result, or status: 'started' / 'running' with a jobId to poll, or status: 'failed' with an error. |
getJob | Poll a screening job until it reaches a terminal status. | id | Job state, or found: false for stale IDs. |
listJobs | Browse recent screening jobs for the current team. | optional jobType, createdAt range, limit, cursor | Slim job summaries with a pagination cursor. |
browseRegulationWikis | Discover compliance playbooks by domain or keyword. | optional domain, q, updatedSince, limit, cursor | Wiki summaries (slug, title, domain, description, sourceCount, updatedAt) with a pagination cursor. |
readRegulationWiki | Fetch the full synthesized playbook for a compliance activity. | slug | Full wiki object with body (markdown) and sources[] of externalId slugs. |
Typical Agent Flow
Section titled “Typical Agent Flow”| Step | Tool | Purpose |
|---|---|---|
| 1 | browseRegulatoryLibrary | Discover candidate source documents by topic, authority, or jurisdiction. |
| 1 | queryRegulations | Surface the specific regulatory passages that answer a natural-language question. |
| 2 | readRegulatoryDocument | Inspect structure and metadata. |
| 3 | readRegulatoryContent | Pull the exact source text needed for context. |
| 4 | riskAssessment | Optional triage — get a fast 0–100 score to decide whether a draft warrants full screening. |
| 5 | complianceScreening | Submit drafted content for compliance review. By default the call waits inline and returns the result. |
| 6 | getJob | If the screening exceeded the inline deadline (or was started with waitForResult: false), poll the returned jobId until terminal. |
Not-Found Behavior
Section titled “Not-Found Behavior”Read tools never throw on stale or invalid IDs. They return a structured not-found response so agents can recover without retry loops.
| Tool | Not-found response |
|---|---|
readRegulatoryDocument | { found: false, document: null, message? } |
readRegulatoryContent | { found: false, content: null, message? } |
getJob | { found: false, job: null, message? } |
Need Exact Schemas?
Section titled “Need Exact Schemas?”Use your MCP client’s tool inspector, developer console, or protocol logs to read the live tools/list response. That response is the source of truth for exact machine-readable schemas.