cfr-compliance-mcp

cfr-compliance-mcp

A production-quality MCP server that exposes the official eCFR API as structured tools for AI-driven contract compliance, enabling retrieval of relevant Code of Federal Regulations by clauses extracted from contracts.

Category
Visit Server

README

cfr-compliance-mcp

A production-quality MCP (Model Context Protocol) server exposing the official eCFR (Electronic Code of Federal Regulations) API as structured tools, built for an AI-driven contract compliance pipeline.

Status: in active development. The MCP server's foundation, client, cache, and parsing layers are complete. Validation models, the 8 MCP tools, and the server entrypoint are still being built. See HANDOFF/PROJECT_HANDOFF.md for the full current status.

What this is

This package is the MCP server component of a larger pipeline:

Contract (PDF/DOCX) → Clause Extraction → Agno Team/Agents → this MCP Server
  → Official eCFR REST API → Relevant CFR Retrieval → Compliance Reasoning
  → Clause-wise Compliance Report

It has no dependency on any third-party MCP server — it talks directly to the official, public, unauthenticated eCFR REST API (https://www.ecfr.gov). See HANDOFF/PROJECT_HANDOFF.md Section 9 and the research addendum for why.

Requirements

  • Python 3.12
  • uv for dependency management

Setup

git clone <this repo>
cd cfr-compliance-mcp
uv sync
cp .env.example .env   # adjust settings if needed; defaults work out of the box

Running (once server.py exists)

uv run cfr-compliance-mcp

Project layout

src/cfr_compliance_mcp/
├── config.py, logging_config.py, exceptions.py, constants.py   # foundation
├── clients/        # generic HTTP transport + eCFR-specific API client
├── cache/          # backend-agnostic caching (in-memory today, Redis-ready)
├── parsing/        # raw eCFR XML -> clean text + citation metadata
├── models/         # (pending) Pydantic request/response validation
├── tools/          # (pending) the 8 MCP tools
└── server.py        # (pending) FastMCP entrypoint

Full architectural rationale is in HANDOFF/ARCHITECTURE.md. Chronological build history is in HANDOFF/PROJECT_PROGRESS.md. A single authoritative current-state reference (what's built, why, what's next) is HANDOFF/PROJECT_HANDOFF.md — read that first if you're picking this project up.

Testing

uv run pytest

(Test suite is not yet built — see HANDOFF/PROJECT_HANDOFF.md for status.)

Development conventions

  • Full type hints, strict mypy.
  • ruff for linting (uv run ruff check .).
  • All configuration via .env / config.Settings — never os.environ directly.
  • All logging via logging_config.get_logger(__name__) — logs go to stderr only (the MCP stdio transport uses stdout for the protocol itself; never write there).
  • See HANDOFF/PROJECT_HANDOFF.md Section 17 for the full conventions list.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured