01Overview
This is a production-grade document assembly, corpus retrieval, and diligence engine designed to sit inside a private-capital operator's workflow. It runs as a local MCP (Model Context Protocol) server on port 9077, exposing 25 tools that generate real legal artifacts, run parallel background checks against public federal databases, and package everything with an attorney-review manifest.
It is not a lawyer replacement. It is a lawyer enabler — the work that used to take many hours of associate time on drafting and diligence for a typical SPV formation and Reg D 506(c) raise, this system does in seconds. The attorney then reviews the packet, signs the manifest, and files.
WY LLC formation packet (Articles + Operating Agreement + Initial Resolutions), Reg D 506(c) Subscription Agreement, Rule 501(a) Accredited Investor Questionnaire, 12-section Private Placement Memorandum, 9-state Blue Sky notice-filing plan, parallel diligence packet on Manager and Issuer, entity-specific compliance calendar, and a signed-off Review Manifest for every document generated.
02The Boundary — UPL Discipline
The line between what this system does and what a licensed attorney does is the load-bearing design decision of the entire project. Every US state prohibits the unauthorized practice of law (UPL) — and every attorney-general's office in the country is actively enforcing it against automated tools that claim to provide legal advice. This system is built to stay on the right side of that line, every time.
What the system does
- Assembles documents from pre-audited templates by substituting facts
- Retrieves the current text of any CFR section, USC section, or SEC filing
- Runs parallel screens against OFAC, GLEIF, SAM.gov, CourtListener, FINRA, IAPD, EDGAR
- Packages provenance: which template, which source, which retrieval timestamp
- Computes state notice-filing manifests from an audited reference dataset
- Tracks recurring obligations against known statutory deadlines
What the system does NOT do
- Render legal opinions on whether an exemption applies to specific facts
- Advise whether a specific investor qualifies as accredited
- Advise whether a Rule 506(d) disqualifying event applies to a covered person
- Draft opinions of counsel or reliance letters
- File anything with any regulator on behalf of the operator
- Provide tax, ERISA, or investment advice
Every generated document ships with a Review Manifest that lists template provenance, fact sources, cited regulations, attached diligence, and a checklist for the attorney of record to sign. The attorney signing is the person rendering the legal opinion — not the system.
03System Architecture
Six functional layers stacked on top of the FTH MCP Hub, each independently testable.
04MCP Tools
25 tools grouped by function. All accessible via POST /mcp/invoke.
Corpus retrieval 6 tools
| Tool | Purpose |
|---|---|
legal_edgar_search | SEC EDGAR full-text search — filter by form type, date range |
legal_edgar_company | Look up company by name substring → CIK |
legal_edgar_filings | List recent filings for a specific CIK |
legal_edgar_document | Fetch primary document of a filing, optional plaintext conversion |
legal_cfr_pinpoint | Pull specific CFR citation (e.g. 17 CFR § 230.506(c)) from eCFR |
legal_cfr_by_topic | List indexed regs by topic (reg_d, resale, reg_s, fincen_boi, ...) |
Diligence 4 tools
| Tool | Purpose |
|---|---|
legal_dd_screen_entity | Full DD packet: OFAC + GLEIF + SAM + CourtListener + EDGAR presence, in parallel |
legal_dd_screen_person | Full DD packet: OFAC + FINRA BrokerCheck + SEC IAPD + CourtListener, in parallel |
legal_dd_ofac_only | Fast OFAC/CSL sanctions check — no other providers |
legal_dd_get_packet | Retrieve stored diligence packet by run_id for re-review |
Templates & assembly 6 tools
| Tool | Purpose |
|---|---|
legal_template_list | List all templates with source, license, regulatory basis metadata |
legal_template_get | Get template body + variable definitions |
legal_template_reload | Reload templates from disk after adding new files |
legal_document_assemble | Merge facts into a single template → AssembledDocument |
legal_document_compose | Compose multiple templates into one document (e.g. 12-section PPM) |
legal_document_get | Retrieve stored generated document by ID |
Filings & compliance 6 tools
| Tool | Purpose |
|---|---|
legal_blue_sky_manifest | Build state notice-filing plan for a 506 offering across investor states |
legal_blue_sky_state_info | Reference info for one state (fee, deadline, administrator, quirks) |
legal_entity_register | Register entity for compliance calendar tracking |
legal_entity_list | List all registered entities |
legal_entity_get | Get one entity's compliance record |
legal_compliance_calendar | Upcoming obligations for one entity or all — Form D, Blue Sky, BOI, K-1, ... |
Review & workflow 3 tools
| Tool | Purpose |
|---|---|
legal_manifest_build | Build Review Manifest for a generated document (attorney handoff) |
legal_manifest_get | Retrieve stored Review Manifest |
legal_spv_in_a_box | Flagship. End-to-end SPV formation + Reg D 506(c) offering packet |
05Template Library
17 templates covering WY LLC formation, Reg D 506(c) subscription documents, and a full 12-section Private Placement Memorandum. Every template carries a license badge and cites its regulatory basis in front matter.
Wyoming LLC formation packet
wy-llc-articles Public Domain
Articles of Organization per Wyo. Stat. § 17-29-201. Statutory minimum fields.
wy-llc-operating-agreement Industry Standard
Manager-managed, single-class membership. Includes capital account bookkeeping, distribution waterfall, indemnification, transfer restrictions, dissolution.
wy-llc-initial-resolutions Internal
Initial Written Consent granting banking authority, EIN application authority, and adopting the Operating Agreement.
Reg D 506(c) subscription documents
reg-d-506c-subscription SEC Filing Public
Subscription Agreement for Rule 506(c). Includes reasonable-steps verification framework required by 506(c)(2)(ii), restrictive-legend acknowledgments, AML/OFAC reps, CTA beneficial-ownership acknowledgment.
reg-d-506c-aiq SEC Filing Public
Accredited Investor Questionnaire covering all Rule 501(a) categories: income & net-worth, 2020 professional-certification expansion (Series 7/65/82), knowledgeable-employee, family-office/family-client, plus entity categories B1-B9. Verification-documentation section C1-C6.
Private Placement Memorandum (12 sections)
All PPM sections composable via legal_document_compose. All license
SEC Filing Public — structural patterns drawn from
actual SEC EDGAR-filed private placements.
| Section | Contents |
|---|---|
ppm-cover | Cover page + cautionary legends (Sec Act, transferability, no-approval, forward-looking) |
ppm-summary-terms | Term-sheet summary + how-to-subscribe checklist |
ppm-risk-factors | Universal + asset-class-specific + digital-asset + international risks |
ppm-use-of-proceeds | Itemized budget table, offering expenses, manager fee, reserves |
ppm-business-description | Business narrative, material agreements, key operational metrics |
ppm-management | Manager entity, key personnel bios, fiduciary duties |
ppm-conflicts-of-interest | Structural + transactional + deal-specific conflicts + resolution framework |
ppm-securities-and-plan | Voting/distribution rights, transfer restrictions, plan of distribution |
ppm-bad-actor | Rule 506(d) covered-person representations + 506(e) disclosure |
ppm-tax-considerations | Subchapter K pass-through, allocations, PTP, UBTI, ECI, audit regime |
ppm-erisa | Benefit Plan Investor considerations, plan-assets regulation, prohibited transactions |
ppm-additional-info | Rule 502(b)(2)(v) inquiry rights, contact info, exhibits index |
06SPV-in-a-Box — Flagship Workflow
A single tool call produces the full formation + offering packet for a WY-formed Reg D 506(c) SPV. Given the deal facts, it composes documents, runs parallel diligence, generates the Blue Sky plan, registers the entity for compliance tracking, and writes review manifests for attorney sign-off — all in seconds.
-
Diligence in parallel with assembly
The system kicks off diligence on Manager and Issuer concurrently with document composition. Total wall time is bound by the slowest DD provider, not sequential steps.
-
Formation packet
Assembles Articles of Organization, Manager-Managed Operating Agreement, and Initial Written Consent. Each fact insertion is provenance-tagged for the manifest.
-
Subscription documents
Assembles the Reg D 506(c) Subscription Agreement and Rule 501(a) Accredited Investor Questionnaire, correctly citing the verification framework of 506(c)(2)(ii).
-
Private Placement Memorandum
Composes the 12-section PPM in a single pass. Asset-class-specific risk blocks are conditionally included based on the
assetClass,usesLeverage,usesDigitalAssets, andhasInternationalComponentflags. -
Blue Sky manifest
Generates the state-by-state notice-filing plan for every state where investors reside. Includes fees, deadlines, EFD availability, and state-specific quirks (e.g. NY Martin Act broker-dealer position, FL cover-page legend).
-
Entity registration & compliance calendar
Registers the newly formed entity and computes all upcoming ongoing obligations — WY annual report, Form D annual amendment, BOI, K-1 delivery targets, IRS 1065, annual OFAC re-screen.
-
Review manifest for every document
Writes a Review Manifest (JSON + Markdown) for each document, listing template provenance, fact sources, cited regulations, attached diligence packets, and the attorney sign-off block. This is the artifact the attorney signs.
The packet lands at data/legal-ops/generated/spv-<packetId>/ with a
top-level README.md, all documents as Markdown, and structured JSON for each
diligence packet + Blue Sky manifest + compliance calendar.
07Diligence Layer
Seven parallel providers, one unified severity model, red-flag surfacing.
| Provider | What it catches | Auth |
|---|---|---|
| OFAC / CSL | Sanctions matches: SDN, FSE, SSI, BIS Entity/Denied/Unverified/MEU, State Debarred/Nonproliferation | None |
| GLEIF | ISO 17442 Legal Entity Identifier — verifies entity exists, jurisdiction, active status | None |
| SAM.gov | Federal entity registration + federal exclusions list (debarment/suspension) | Free API key |
| CourtListener | Federal dockets (active + closed) and published opinions; flags SEC-caption enforcement actions | None (optional token) |
| FINRA BrokerCheck | Broker/dealer & broker-representative status; disclosure events (complaints, actions, criminal) | None |
| SEC IAPD | Investment-adviser & IAR status; ADV disclosures | None |
| SEC EDGAR | Filer presence — confirms subject is a public/registered filer | User-Agent |
Unified severity model
Every provider returns a DiligenceHit with severity. The orchestrator computes overall packet severity as the max, flagging incomplete if half or more providers errored.
| Severity | Triggers | Recommended action |
|---|---|---|
| critical | Exact OFAC match, SEC enforcement caption | Block. Do not proceed without counsel review. |
| high | Strong fuzzy OFAC match, active adverse federal docket, FINRA disclosure on file | Escalate. Attorney review before proceeding. |
| medium | Weak fuzzy match, historical federal record, LEI inactive | Verify context. Confirm party role in litigation. |
| low | Presence-only matches (registered broker, active adviser, no disclosures) | Note in file. |
| info | No match found | Clean. |
08Regulatory Corpus
24 regulations pre-indexed with pinpoint citations. Direct fetch via eCFR API returns current text with retrieval timestamp for provenance.
| Topic | Citations | Purpose |
|---|---|---|
| reg_d | 17 CFR § 230.500-508 |
Private-placement exemption framework (Rule 504, 506(b), 506(c), definitions, Form D) |
| resale | 17 CFR § 230.144, 144A |
Resale exemptions including QIB private resales |
| reg_s | 17 CFR § 230.901-904 |
Offshore-offering exemption framework |
| ia_exempt | 17 CFR § 275.203(l)-1, 203(m)-1 |
VC fund adviser + private-fund adviser exemptions |
| ia_disclosure | 17 CFR § 275.204-3 |
ADV Part 2 brochure delivery |
| broker_dealer | 17 CFR § 240.3a4-1 |
Issuer-associated-person safe harbor from BD registration |
| fincen_boi | 31 CFR § 1010.230, 1010.380 |
Beneficial ownership + CTA reporting |
| fincen_msb | 31 CFR § 1022.320 |
MSB suspicious-transaction reporting |
| fincen_bsa | 31 CFR § 1010.310-330 |
BSA record-keeping and reporting |
| ofac | 31 CFR § 501 |
Reporting, procedures, and penalties |
09Blue Sky Coverage
9-state reference dataset covering ~80% of the deals a typical US operator sees. Every state entry is a starting point — the system flags that fees and deadlines must be confirmed against each administrator's current published schedule before filing.
| State | Fee | Deadline | EFD? | Notes |
|---|---|---|---|---|
| WY Wyoming | $200 | 15 days | Yes | Accredited-only offerings may be exempt from notice filing under W.S. § 17-4-406(a) |
| DE Delaware | $0 | 15 days | Yes | Courtesy Form D copy only — easiest state |
| GA Georgia | $250 | 15 days | Yes | Administratively active — ensure Form U-2 properly executed |
| CA California | $300–$2,500 (tiered) | 15 days | Yes | Fee tiered by offering size. Most likely to send follow-up on 506(c) solicitation practices. Confirm current tier against DFPI schedule before filing. |
| NY New York | $300 | 15 days | Yes | Martin Act BD position: compensated intermediaries may need NY BD registration despite Rule 3a4-1 |
| FL Florida | $200 | 15 days | Yes | Specific F.S. § 517.061(11)(a)5 legend required on cover materials to FL residents |
| TX Texas | $500 | 15 days | Yes | Highest fee. Otherwise efficient. |
| IL Illinois | $100 | 15 days | Yes | Straightforward and low-fee |
| MA Massachusetts | $300 | 15 days | Yes | Administratively engaged — expect potential follow-up |
10Compliance Calendar
11 obligation types tracked automatically per entity. Each obligation carries its regulatory basis, computed deadline, action steps, and estimated cost.
| Obligation | Frequency | Basis |
|---|---|---|
| WY LLC Annual Report | Anniversary month | Wyo. Stat. § 17-29-209 |
| DE Corp Franchise Tax + Annual Report | March 1 | 8 Del. C. § 502, § 503 |
| DE LLC Annual Tax | June 1 | 6 Del. C. § 18-1107 |
| GA LLC/Corp Annual Registration | April 1 | O.C.G.A. § 14-2-1622 / § 14-11-1103 |
| Form D Annual Amendment | 12 months while offering open | 17 CFR § 230.503(a)(3) |
| Blue Sky Amendment (per state) | Annual, tracks SEC amendment | State law |
| Initial FinCEN BOI Report | 30 days from formation | 31 CFR § 1010.380 |
| FinCEN BOI Update | 30 days from any change | 31 CFR § 1010.380(a)(2) |
| IRS Form 1065 (partnership) | 15th day of 3rd month after FYE | IRC § 6031, § 6072(b) |
| K-1 Delivery to Members | Target: 90 days after FYE | Operating agreement + practice |
| FBAR (foreign accounts) | April 15 (auto-extension Oct 15) | 31 U.S.C. § 5314; 31 CFR § 1010.350 |
| Annual OFAC Re-screen | Annual | OFAC compliance best practice |
11Review Manifest — The Attorney Handoff
Every document generated by this system ships with a Review Manifest. This is the artifact the attorney reviews and signs. It contains everything an attorney needs to decide whether to rely on the document, and everything a court or regulator would want to see if the reliance is later questioned.
Template provenance
Every template that fed into the document, its source (SEC filing, NVCA, YC, statutory form), its license, its version, and its jurisdiction.
Fact provenance
Every fact merged into the document, tagged as user_input,
dd_result, calculation, or template_default.
Regulations cited
Every CFR / USC citation in the document, with URL to eCFR and retrieval timestamp — so the attorney can confirm the current text hasn't changed since assembly.
Diligence packets attached
Full DD results on every subject relevant to the document, with severity, red flags, and provider-level detail. Preserved for attorney review.
Reviewer notes
System-emitted warnings: missing variables, close-but-not-exact fuzzy matches, provider errors, deprecated citations. All surfaced for attorney attention.
Attorney sign-off block
Structured checklist plus fields for attorney name, bar number, state of admission, signature, and date. The signing attorney is the person of record for legal reliance.
12Data Sources
Every regulatory and diligence data source is a public federal API. No vendor lock-in, no black-box aggregators, no legally-questionable scrapers.
| API | Auth | Rate Limit | Purpose |
|---|---|---|---|
| SEC EDGAR | User-Agent | 10 req/s | Filings + full-text search |
| Cornell LII (eCFR) | None | Unlimited | CFR text + amendment history |
| Consolidated Screening List | None | Unlimited | OFAC + BIS + State sanctions |
| GLEIF | None | Unlimited | LEI + entity metadata |
| CourtListener | Optional token | 5,000/day unauth | Federal dockets + opinions |
| SAM.gov | Free key | 1,000/day | Federal entity + exclusions |
| FINRA BrokerCheck | None | Soft | Broker-dealer background |
| SEC IAPD | None | Soft | Investment adviser background |
| NASAA EFD | N/A (portal) | N/A | State notice filing hub |
Everything caches to disk with sane TTLs. First fetch may take a few seconds; every subsequent call to the same resource is instant.
13Quick Start
1. Install and start the hub
cd fth-mcp-hub
pnpm install
pnpm dev
# Hub listens on http://localhost:9077
2. Run a single tool
curl -X POST http://localhost:9077/mcp/invoke \
-H 'Content-Type: application/json' \
-d '{
"tool": "legal_cfr_pinpoint",
"arguments": { "citation": "17 CFR § 230.506(c)" }
}'
3. Run the flagship SPV-in-a-Box workflow
curl -X POST http://localhost:9077/mcp/invoke \
-H 'Content-Type: application/json' \
-d @spv-input.json
# Returns full packet; documents saved to data/legal-ops/generated/spv-<id>/
4. Check compliance calendar
curl -X POST http://localhost:9077/mcp/invoke \
-H 'Content-Type: application/json' \
-d '{ "tool": "legal_compliance_calendar", "arguments": {} }'
# Returns upcoming obligations sorted by days-until-due
SEC_USER_AGENT=yourapp/1.0 ([email protected]) YourCo
COURTLISTENER_TOKEN=<from courtlistener.com/help/api/rest/>
SAM_API_KEY=<free from sam.gov/data-services/>
14Extending the System
New template
Drop a .md file in templates/legal/<packet>/ with YAML front
matter (see wy-llc/articles-of-organization.md for the reference format).
Call legal_template_reload. Zero code required.
New DD provider
Add dd-<name>.ts exporting screen<Name>(subject) → Promise<DiligenceHit>.
Wire into dd.ts's screenEntity or screenPerson.
Follow the OFAC provider for the pattern.
New corpus source
Add corpus-<name>.ts. Use the eCFR / EDGAR files as reference for
cache + typed responses + Citation-object emission.
New end-to-end workflow
Add an orchestrator (like spv-in-a-box.ts) that composes
assemble + screenEntity/screenPerson +
buildManifest. Register as a tool in legal-ops.ts.
15Repo Layout
fth-mcp-hub/
├── src/servers/
│ ├── legal-ops.ts ← MCP dispatcher + tool manifest (25 tools)
│ └── legal-ops/
│ ├── types.ts ← All shared types
│ ├── util.ts ← HTTP + cache + hash + paths
│ ├── corpus-edgar.ts ← SEC EDGAR client
│ ├── corpus-cfr.ts ← eCFR / regulation index
│ ├── dd-ofac.ts ← OFAC / Consolidated Screening List
│ ├── dd-gleif.ts ← GLEIF LEI lookup
│ ├── dd-courtlistener.ts ← Federal court records
│ ├── dd-sam.ts ← SAM.gov entity + exclusions
│ ├── dd-finra.ts ← FINRA BrokerCheck + SEC IAPD
│ ├── dd.ts ← Unified DD orchestrator
│ ├── templates.ts ← Registry + assembly engine
│ ├── blue-sky.ts ← State notice-filing manifest
│ ├── compliance-calendar.ts ← Ongoing obligation tracker
│ ├── manifest.ts ← Review manifest generator
│ ├── spv-in-a-box.ts ← Flagship workflow
│ ├── __smoke__.ts ← Smoke tests
│ └── README.md ← Operator reference
├── templates/legal/
│ ├── wy-llc/ ← 3 templates
│ ├── reg-d-506c/ ← 2 templates
│ └── ppm/ ← 12 templates
└── data/legal-ops/ ← Corpus cache · DD packets ·
Generated docs · Manifests