Repository avatar
Other Tools
v1.1.1
active

x3-compliance-mcp

io.github.x3allamerican/x3-compliance-mcp

FMCSA, OSHA, PHMSA, 811, eCFR and Coast Guard compliance tools. Every answer cites the rule.

Documentation

X3 Compliance MCP Server

Give your AI assistant real safety and compliance tools. A free Model Context Protocol server that lets Claude, ChatGPT, Cursor, VS Code and other MCP clients check a driver's hours of service and qualification file, explain CSA scores, run DOT random selections, decide whether an injury is OSHA recordable, read safety data sheets, work out when an 811 ticket allows digging, compute pipeline MAOP, check mariner rest hours, quote any federal regulation from the official eCFR, and pull a vessel's Coast Guard record. Every answer comes from the rule text or official government data and cites it.

Built and maintained by X3: X3 Fleet Safety · X3 Workplace Safety · X3 Pipeline · X3 Maritime.

Setup page →

Tools

ToolWhat it doesSource
hos_checkEvery hours-of-service violation in a driver log, and time left to drive49 CFR 395 (x3-hos-engine)
osha_is_recordable300 Log or not, column, privacy case, 8/24-hour OSHA report29 CFR 1904 (x3-osha-recordkeeping)
osha_coverageMust the employer keep records and file with OSHA's ITA; due dates29 CFR 1904.1, .2, .41
osha_ratesTRIR, DART and days-away ratesBLS formula
osha_hearing_shiftStandard Threshold Shift and 25 dB test, optional age correction29 CFR 1904.10, 1910.95 App. F
dig_clock_811Earliest legal dig time, utility deadline, ticket expiry (MI, OH, TX)State one-call law (x3-811-tickets)
parse_811_ticketFields, members and coordinates from a ticket email
cfr_lookupText of any CFR citation, paragraph by paragrapheCFR (x3-ecfr-toolkit)
cfr_searchFull-text search of the CFReCFR
cfr_changesAmendments to a part since a date; paragraph diff of a sectioneCFR
uscg_vessel_searchFind a vessel in Coast Guard recordsUSCG PSIX (x3-uscg-psix)
uscg_vessel_profileCertificates with days left, inspections, deficiencies, flagsUSCG PSIX
dq_file_checkDriver qualification file: missing, late, expiring, qualified to drive today49 CFR 391.51, 391.23, 391.25, 382.701 (x3-dq-file)
dot_random_testingRandom test counts for the year and period, and an unbiased auditable draw49 CFR 382.305 (x3-dot-random)
csa_explainCSA BASIC measures from inspections: what drives them, when they drop offFMCSA SMS methodology (x3-csa-explainer)
osha_state_jurisdictionFederal OSHA or a State Plan (MIOSHA, Cal/OSHA...) for this employer29 CFR 1952 (x3-osha-state-plans)
sds_checkRead and check a safety data sheet; workplace label29 CFR 1910.1200 App. D (x3-sds-reader)
pipeline_design_and_maopClass location, design pressure, MAOP, % SMYS, impact radius49 CFR 192 (x3-pipeline-calcs)
mariner_rest_checkSTCW hours of rest and the 12-hour towing limit46 CFR 15.1111, 46 U.S.C. 8104(h) (x3-rest-hours)
us_federal_holidaysObserved federal holidays for a year5 U.S.C. 6103

All tools are read-only. Nothing about your questions is sent anywhere except the public government APIs the CFR and Coast Guard tools call (ecfr.gov and cgmix.uscg.mil).

Install

Remote server (no install): add https://mcp.x3api.com/mcp as a custom connector in Claude (Settings → Connectors) or any client that supports remote MCP servers.

Claude Desktop, one click: download x3-compliance.mcpb and open it (or drag it into Settings → Extensions). Also listed in the MCP Registry as io.github.x3allamerican/x3-compliance-mcp.

Or run it with npx (Node.js 22.6 or later):

Claude Desktop (Settings → Developer → Edit Config), Cursor (~/.cursor/mcp.json) and most clients:

{
  "mcpServers": {
    "x3-compliance": {
      "command": "npx",
      "args": ["-y", "github:x3allamerican/x3-compliance-mcp"]
    }
  }
}

Claude Code:

claude mcp add x3-compliance -- npx -y github:x3allamerican/x3-compliance-mcp

VS Code (.vscode/mcp.json):

{ "servers": { "x3-compliance": { "type": "stdio", "command": "npx", "args": ["-y", "github:x3allamerican/x3-compliance-mcp"] } } }

Then ask things like:

  • "Here's my driver's log for Monday and Tuesday. Any hours-of-service violations?"
  • "An employee cut his hand, got 4 stitches and was back the next day. Is it OSHA recordable?"
  • "We called in an 811 ticket in Ohio at 3 p.m. Monday. When can we dig?"
  • "Quote 49 CFR 192.605(b) and tell me what changed in Part 192 since 2024."
  • "Is the Certificate of Inspection current for the towboat ...?"

Use as a library

import { createServer } from '@x3/compliance-mcp';
const server = createServer();
await server.handle({ jsonrpc: '2.0', id: 1, method: 'tools/list' });

The server is dependency-free: JSON-RPC 2.0 over stdio, protocol versions 2025-06-18, 2025-03-26 and 2024-11-05. The engines are vendored in vendor/ from the X3 repos (node scripts/vendor.mjs .. refreshes them).

Privacy

No accounts and no stored data. See the privacy policy.

Limits

Decision support, not legal advice. Federal rules plus the three built-in 811 states. Ask your assistant to show the citation, and check it.

Develop

npm install
npm test             # in-process protocol and tool tests
MCP_E2E=1 npm test   # also runs the built binary over stdio
npm run build

License

MIT. Free for any use, including commercial.

MCPB
https://github.com/x3allamerican/x3-compliance-mcp/releases/download/v1.1.0/x3-compliance.mcpb
Install Command
# mcpb: https://github.com/x3allamerican/x3-compliance-mcp/releases/download/v1.1.0/x3-compliance.mcpb

Remote