# pipeworx-io/mcp-ftc-enforcement architecture

> Architecture diagram of the GitHub repository pipeworx-io/mcp-ftc-enforcement, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/pipeworx-io/mcp-ftc-enforcement
- Repository: https://github.com/pipeworx-io/mcp-ftc-enforcement

## Overview

This package is a local stdio MCP bridge, not the implementation of FTC search or case parsing. An MCP client sends requests to the CLI, which relays JSON-RPC through the shared bridge library to Pipeworx’s gateway. The gateway provides case search, case detail, and recent-action tools; the README says that service retrieves public FTC case data by scraping the FTC’s search page. The FTC-side implementation is remote and is not present in this repository.

Main entry points: [`bin/cli.js`](https://github.com/pipeworx-io/mcp-ftc-enforcement/blob/main/bin/cli.js) (Stdio CLI), [`lib/index.js`](https://github.com/pipeworx-io/mcp-ftc-enforcement/blob/main/lib/index.js) (JSON-RPC relay)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_bridge["Local MCP bridge"]
  node_cli["Stdio CLI<br/>[cli.js]"]
  node_relay["JSON-RPC relay<br/>[index.js]"]
end

subgraph group_remote["Remote data service"]
  node_gateway["FTC tools gateway"]
  node_ftc["FTC case search"]
end

node_client(("MCP client"))

node_client -->|"sends JSON-RPC"| node_cli
node_cli -->|"relays messages"| node_relay
node_relay -->|"forwards requests"| node_gateway
node_gateway -->|"scrapes case data"| node_ftc

click node_cli "https://github.com/pipeworx-io/mcp-ftc-enforcement/blob/main/bin/cli.js"
click node_relay "https://github.com/pipeworx-io/mcp-ftc-enforcement/blob/main/lib/index.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_cli,node_relay,node_client toneBlue
class node_gateway,node_ftc toneAmber
```

## Components

### Local MCP bridge

- [Stdio CLI](https://github.com/pipeworx-io/mcp-ftc-enforcement/blob/main/bin/cli.js): `bin/cli.js`
- [JSON-RPC relay](https://github.com/pipeworx-io/mcp-ftc-enforcement/blob/main/lib/index.js): `lib/index.js`

### Remote data service

- **FTC tools gateway**
- **FTC case search**

### Other components

- **MCP client**

## Connections

- MCP client → Stdio CLI: sends JSON-RPC (evidence: `README.md`)
- Stdio CLI → JSON-RPC relay: relays messages (evidence: `bin/cli.js`)
- JSON-RPC relay → FTC tools gateway: forwards requests (evidence: `lib/index.js`)
- FTC tools gateway → FTC case search: scrapes case data (evidence: `README.md`)
