X3 Compliance

io.github.x3allamericanPublished by GitHub account x3allamericanv1.1.1Updated Nov 14, 2026

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

VerifiedStreamable HTTPWeb executableKnowledge & MemoryDeveloper ToolsSecurity & Monitoring

Overview

AI-generated overview

U.S. safety and compliance checker for FMCSA, OSHA, PHMSA, 811, Coast Guard and eCFR rules, with every answer citing the regulation.

What you can do
  • Check driver hours of service, qualification files, random testing and CSA measures
  • Decide OSHA recordability, coverage, rates, hearing shifts, State Plan jurisdiction and read safety data sheets
  • Compute 811 dig timing and parse one-call tickets for Michigan, Ohio and Texas
  • Look up, search and diff Code of Federal Regulations text from the official eCFR
  • Compute gas pipeline class location, design pressure, MAOP and impact radius
  • Check mariner rest hours and look up Coast Guard vessel records and federal holidays
When to use it
Useful when an assistant has to answer fleet, workplace-safety, pipeline or maritime compliance questions where the exact rule and citation matter, such as reviewing a driver log, judging whether an injury is recordable, or quoting a CFR section instead of recalling it.
Requirements
Either the remote endpoint at mcp.x3api.com added as a custom connector, the one-click desktop bundle, or a local run via npx with Node.js 22.6 or later. No accounts, API keys or environment variables are declared. Network access to public government APIs (eCFR and Coast Guard PSIX) is needed for those tools.
Before you install
Answers are decision aids, not legal advice, and should be checked against the cited rule. Only federal rules plus 811 law for Michigan, Ohio and Texas are covered. Tools are described as read-only, but questions sent to the CFR and Coast Guard tools go to public government APIs. Random-testing draws should use employee numbers, never names or SSNs.

Installation

In SourceWeft

  1. Open X3 Compliance in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Web executable via Streamable HTTP. Remote servers run from the web runtime once configured in a workspace.

Use with an agent

Paste this prompt into Claude Code, Codex, Cursor or another agent — or into SourceWeft chat. The agent reads this server's install guide, shows you its publisher, endpoint and sign-in, and adds it to your client once you agree. Keys never go into a command.

Read https://sourceweft.com/mcp/io.github.x3allamerican%2Fx3-compliance-mcp/install.md and connect the MCP server it describes to my client. Before changing any config, show me its publisher, endpoint and sign-in method and wait for my OK. Never put an API key in a command or in a file I would commit; ask me where it should come from.

Read the install guide the agent follows

Other MCP clients

Add this to your client's mcpServers config.

{
  "mcpServers": {
    "x3-compliance": {
      "type": "http",
      "url": "https://mcp.x3api.com/mcp"
    }
  }
}

README

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:

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

Claude Code:

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

VS Code (.vscode/mcp.json):

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

ts
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

sh
npm installnpm test             # in-process protocol and tool testsMCP_E2E=1 npm test   # also runs the built binary over stdionpm run build

License

MIT. Free for any use, including commercial.

Source: README.md at commit 28d788d

Tools

20

hos_check

Check a driver log against FMCSA hours of service

Find every hours-of-service violation in a commercial driver's duty-status log under 49 CFR Part 395 (11/10-hour driving, 14/15-hour window, 30-minute break, 60/70-hour cycle with 34-hour restart, split sleeper berth, adverse conditions, short-haul, 16-hour exception) and how much time the driver has left. Give status changes in time order with ISO 8601 times that include an offset.

ParametersasOfcycleeventsrequiredcarriershortHaulhomeTimeZonepriorDailyOnDutyHours

osha_is_recordable

Is this injury or illness OSHA recordable?

Decide under 29 CFR 1904.4-1904.11, 1904.29 and 1904.39 whether a case goes on the OSHA 300 Log, its column (death, days away, restricted, other) and type, whether it is a privacy case, and whether OSHA must be called within 8 or 24 hours. First-aid ids: otcMedicationAtOtcStrength, tetanusImmunization, cleaningWounds, woundCoverings, hotColdTherapy, nonRigidSupport, temporaryImmobilizationForTransport, nailDrillingBlisterDraining, eyePatch, eyeForeignBodyIrrigationOrSwab, splinterRemovalSimple, fingerGuards, massage, drinkingFluidsHeatStress. Medical-treatment ids (any other text also counts as medical treatment): prescriptionMedication, sutures, rigidSplintOrCast, physicalTherapy, otherImmunization, eyeForeignBodyOtherMeans, woundClosingDevice, respiratoryTherapy, surgery. Work-relatedness exceptions: generalPublic, symptomsOnly, voluntaryWellness, eatingDrinking, personalTasks, personalGrooming, commuteParkingLot, coldOrFlu, mentalIllnessNoOpinion.

ParameterstypedeathdaysAwaydiagnosisexceptionlossOfEyeamputationtreatmentsmentalIllnesssexualAssaultmedicalRemovalrestrictedDays+11 more

osha_coverage

Must an employer keep OSHA records and file them electronically?

Check 29 CFR 1904.1, 1904.2 and 1904.41: whether a company must keep OSHA 300/300A/301 records (size and partially exempt NAICS industries) and whether an establishment must submit Form 300A, and Forms 300 and 301, to OSHA's Injury Tracking Application, with the due date and posting calendar.

ParametersyearrequirednaicsrequiredpeakCompanyEmployeesrequiredpeakEstablishmentEmployeesrequired

osha_rates

TRIR and DART rates

Compute the total recordable case rate (TRIR), DART rate and days-away case rate per 200,000 hours, the way BLS does.

ParametersdeathsotherCasesrequiredhoursWorkedrequireddaysAwayCasesrequiredrestrictedCasesrequired

osha_hearing_shift

Is a hearing loss OSHA recordable (Standard Threshold Shift)?

Compare a baseline and current audiogram at 2000, 3000 and 4000 Hz under 29 CFR 1904.10: Standard Threshold Shift of 10 dB average plus a 25 dB hearing level in the same ear. Optional age correction from 29 CFR 1910.95 Appendix F.

ParameterscurrentrequiredbaselinerequiredageCorrectSex

dig_clock_811

811 call-before-you-dig clock

When may an excavator legally start digging after an 811 locate request, when must utilities mark, what is the latest start, and when does the ticket expire, under state one-call law with the statute cited. States: MI, OH, TX. Holidays default to U.S. federal holidays; pass the one-call center's posted list when you have it.

ParametersstaterequiredholidaysnoticeAtrequiredtimeZonelongProjectplannedStart

parse_811_ticket

Read an 811 ticket email

Pull the ticket number, type, dates, excavator, address, work area, coordinates and member utilities out of the plain text of a one-call ticket.

Parameterstextrequired

cfr_lookup

Read a federal regulation (eCFR)

Get the current (or dated) text of a Code of Federal Regulations citation such as "49 CFR 395.3(a)(2)" or "29 CFR 1910.147(c)(4)" from the official eCFR, paragraph by paragraph with a citation and link for each.

Parametersdatecitationrequired

cfr_changes

What changed in a federal regulation?

List the substantive amendments to a CFR part (or section) since a date, newest first, from the official eCFR. Optionally compare one section between two dates paragraph by paragraph.

ParameterspartsincerequiredtitlerequiredsectioncompareTo

uscg_vessel_profile

Coast Guard compliance snapshot for a vessel

For a PSIX vessel ID: particulars, current certificates (Certificate of Inspection, documentation, load line, class) with days left, recent inspections and incident investigations, deficiencies found and whether they are open, and flags for anything expiring or overdue.

ParameterssincevesselIdrequired

us_federal_holidays

U.S. federal holidays

The 11 U.S. federal holidays for a year, as observed (weekend holidays moved to Friday or Monday).

Parametersyearrequired

dq_file_check

Check a driver qualification file (49 CFR 391.51)

Check a driver qualification file: application, pre-employment MVR and safety performance history within 30 days of hire, road test or equivalent, annual MVR and review, medical certificate, CDLIS medical status or National Registry note, Clearinghouse queries. Says what is missing, late, expiring or overdue, whether the driver is qualified to drive today, and retention dates. Dates are YYYY-MM-DD.

ParametersasOffilerequired

dot_random_testing

DOT random drug and alcohol testing: how many, and a fair draw

FMCSA random testing under 49 CFR 382.305: the year's minimum tests from the average pool (50% drug, 10% alcohol for 2026), how many to select this period to stay on pace, and optionally an unbiased random selection from a list of driver IDs (use employee numbers, never names or SSNs), with a pool fingerprint.

ParametersseedpoolIdspoolSizesrequireddrugTestsDoneperiodsPerYearrequiredalcoholTestsDone

mariner_rest_check

Check mariner hours of rest (STCW, 46 CFR 15.1111)

Check work periods against STCW hours of rest (10 in any 24 hours, 77 in any 7 days, no more than two rest periods with one of 6 hours, no more than 14 hours between rests) and optionally the 12-hour towing work limit in 46 U.S.C. 8104(h). Every sliding window is checked.

Parameterstofromworkrequiredtowing

pipeline_design_and_maop

Gas pipeline design pressure, MAOP and impact radius (49 CFR 192)

Steel gas pipeline arithmetic with citations: class location from building count (192.5), design pressure P = (2St/D) x F x E x T (192.105-192.115), test-pressure factor and MAOP as the lowest limit (192.619(a)), hoop stress as % SMYS, and potential impact radius (192.903).

ParametersodrequiredsmysrequiredwallrequiredgasTempFtestPsigbuildingsinstalledclassLocationhistoricalPsig

osha_state_jurisdiction

Who enforces workplace safety in a state (OSHA State Plans)

For a state and employer type (private, state-local, federal), say whether federal OSHA or a State Plan (like MIOSHA or Cal/OSHA) has jurisdiction, with the plan's agency, website and 29 CFR 1952 citation.

Parametersstaterequiredemployerrequired

sds_check

Read and check a safety data sheet (OSHA HazCom)

Parse the text of a GHS safety data sheet into signal word, hazard and precautionary statements, pictograms, ingredients (CAS numbers with check digits verified), exposure limits, flash point, PPE and revision date; check it against 29 CFR 1910.1200 Appendix D; and build a workplace label.

Parameterstextrequired

csa_explain

Explain CSA BASIC measures from roadside inspections

Compute FMCSA SMS measures for HOS Compliance, Vehicle Maintenance, Driver Fitness and HM Compliance from inspections (date, level, violations with basic, severity 1-10 and outOfService), show which inspections drive each measure and when they step down and drop off. Percentiles are not computed.

ParametersasOfcarrierTypeinspectionsrequired

Version history

1
  1. v1.1.1LatestNov 14, 2026

Score

100% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 daysRequired25 pts
  • Auth declaredRequired10 pts
  • Tools listedRequired15 pts
  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts