Metadata-Version: 2.4
Name: autoai-finprom
Version: 0.1.0
Summary: AI-powered FCA Financial Promotion compliance checker
Project-URL: Homepage, https://autoailabs.co.uk/products/finprom
Project-URL: Documentation, https://docs.autoailabs.co.uk/finprom
Project-URL: Repository, https://github.com/autoailabadmin/autoai-finprom
Author-email: AutoAI Labs <info@autoailabs.co.uk>
License: Proprietary
Keywords: FCA,compliance,financial-promotion,fintech,regulatory
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Office/Business :: Financial
Requires-Python: >=3.9
Requires-Dist: anthropic>=0.40
Requires-Dist: click>=8.0
Requires-Dist: httpx>=0.25
Requires-Dist: rich>=13.0
Provides-Extra: dev
Requires-Dist: pytest-asyncio>=0.21; extra == 'dev'
Requires-Dist: pytest>=7.0; extra == 'dev'
Provides-Extra: mcp
Requires-Dist: mcp>=1.0; extra == 'mcp'
Description-Content-Type: text/markdown

# AutoAI FinProm

**AI-powered FCA Financial Promotion compliance checker**

Paste any marketing copy (ad, email, tweet, landing page text) and instantly get FCA non-compliant language flagged with specific rule citations, risk scores, and compliant alternatives.

## Who is this for?

- **Head of Compliance** at FCA-regulated UK fintechs
- **Head of Marketing** at banks, insurers, and investment platforms
- **Compliance teams** at Revolut, Zopa, Monzo, Kroo, WorldRemit, and similar firms
- **Regulatory consultants** advising financial services firms

## Quick Start

```bash
pip install autoai-finprom
```

### Scan marketing copy

```bash
finprom scan "Get 10% guaranteed returns on your crypto investment! Sign up now!"
```

Output:

```
FinProm Compliance Report
═══════════════════════════════════════════
Risk Score: 92/100 (CRITICAL)
Product Type: crypto

Findings:
  [CRITICAL] COBS4.2.1 -- "guaranteed" is misleading
    -> Remove absolute claims. All investments carry risk.
  [CRITICAL] FCA.CRYPTO.1 -- Missing prescribed crypto risk warning
    -> Add: "Don't invest unless you're prepared to lose all the money you invest."
  [CRITICAL] PRIN2A.5.3 -- Could cause foreseeable harm to retail customers
    -> Remove lifestyle/aspirational claims about returns.
  [HIGH] COBS4.7.1 -- "Sign up now" without material terms disclosure
    -> Disclose fees, risks, and terms before call-to-action.
  [HIGH] FCA.CRYPTO.2 -- Missing FSCS exclusion notice
    -> Add: "Cryptoassets are not regulated in the UK. No recourse to FSCS."

Suggested Compliant Version:
  "Explore crypto investment opportunities. Capital at risk.
   Cryptoassets are not regulated in the UK. No protection under
   the FSCS. Don't invest unless you're prepared to lose all
   the money you invest."

Readability: Flesch 62 (Acceptable for retail)
Approval Required: Yes (s21 FSMA authorised person)
```

### Python API

```python
from finprom import FinPromScanner

scanner = FinPromScanner()  # Rule-based (no API key needed)
# scanner = FinPromScanner(api_key="sk-...")  # AI-enhanced

report = scanner.scan(
    "Guaranteed risk-free returns! Sign up now!",
    product_type="investment"
)

print(f"Risk Score: {report.risk_score}/100 ({report.risk_level})")
print(f"Compliant: {report.is_compliant}")

for finding in report.findings:
    print(f"[{finding.severity.label}] {finding.rule_id}: {finding.fix_guidance}")

# Get compliant alternative
print(report.suggested_fix)

# Export
report.to_json()   # JSON string
report.to_html()   # HTML report
report.to_dict()   # Python dict
```

## CLI Usage

```bash
# Scan text directly
finprom scan "Your marketing copy here"

# Scan from file
finprom scan -f email_draft.txt

# Specify product type
finprom scan --product-type crypto "Buy bitcoin now!"
finprom scan --product-type mortgage "Great rates from 2.5%"
finprom scan --product-type bnpl "Pay in 3 instalments"
finprom scan --product-type insurance "Complete cover guaranteed"

# Output formats
finprom scan --json "Your copy"           # JSON output
finprom scan --html report.html "Your copy"  # Save HTML report

# Pipe from stdin
echo "Your marketing copy" | finprom scan

# Check readability only
finprom readability "Your text here"

# List all rules
finprom rules
finprom rules --product-type crypto
finprom rules --json
```

## MCP Server Integration

Use FinProm as a tool inside Claude, Cursor, or any MCP-compatible client.

```json
{
  "mcpServers": {
    "finprom": {
      "command": "finprom",
      "args": ["serve"]
    }
  }
}
```

### Available MCP Tools

| Tool | Description |
|------|-------------|
| `scan_copy` | Scan marketing text for FCA compliance issues |
| `suggest_fix` | Generate a compliant alternative |
| `check_readability` | Flesch reading ease analysis |
| `list_rules` | Show all FCA rules in the engine |

## Rule Coverage

FinProm checks against 30+ FCA rules across these areas:

| Category | Rules | Examples |
|----------|-------|---------|
| **COBS 4** - Communications | 8 rules | Misleading claims, risk warnings, past performance, direct offers |
| **Consumer Duty (PRIN 2A)** | 3 rules | Foreseeable harm, vulnerable customers, consumer understanding |
| **Crypto (PS22/10)** | 4 rules | Prescribed warnings, FSCS exclusion, cooling-off, incentive ban |
| **BNPL / Credit (CONC)** | 3 rules | Credit disclosure, representative APR, late payment |
| **Insurance (ICOBS)** | 3 rules | Clear communication, demands & needs, product value |
| **Mortgage (MCOB)** | 2 rules | Representative example, repossession warning |
| **Pension (COBS 19)** | 1 rule | Transfer warnings |
| **ASA/CAP** | 2 rules | Superlative claims, substantiation |
| **Product Governance** | 1 rule | Target market identification |
| **Conflicts (SYSC 10)** | 1 rule | Disclosure of commercial relationships |
| **Social Media (FG15/4)** | 1 rule | Character-limited promotions |
| **Governance (FPO)** | 2 rules | s21 FSMA authorisation, approval records |

### Supported Product Types

- `investment` - Funds, stocks, bonds, ISAs
- `crypto` - Cryptocurrency, tokens, NFTs, DeFi
- `credit` - Loans, credit cards, overdrafts
- `bnpl` - Buy Now Pay Later
- `mortgage` - Home loans, remortgage, equity release
- `insurance` - All insurance products
- `pension` - Pensions, SIPPs, annuities
- `savings` - Savings accounts

## Two Modes

### Rule-Based (Free, no API key)

- Fast, deterministic pattern matching
- 30+ FCA rules with 100+ trigger patterns
- Catches ~80% of compliance issues
- Flesch readability analysis
- Missing elements detection

### AI-Enhanced (API key required)

- Contextual analysis using Claude
- Catches nuanced violations rules miss
- Tone and pressure analysis
- Generates polished compliant alternatives
- Understands implied claims and context

Set your API key:
```bash
export ANTHROPIC_API_KEY=sk-...
```

## Pricing

| Plan | Price | Includes |
|------|-------|---------|
| **Free** | Free | 10 rule-based scans/day |
| **Pro** | 999/mo | Unlimited scans, AI-enhanced, HTML reports, MCP server, priority support |
| **Enterprise** | Custom | Custom rules, API access, SSO, audit trail, dedicated support |

## Development

```bash
# Clone and install in development mode
git clone https://github.com/autoailabadmin/autoai-finprom
cd autoai-finprom
pip install -e ".[dev]"

# Run tests
pytest tests/ -v

# Run a quick check
finprom scan "Test your marketing copy here"
```

## Regulatory Disclaimer

AutoAI FinProm is a compliance assistance tool. It does not constitute legal or regulatory advice. All financial promotions should be reviewed by qualified compliance professionals and approved by a person authorised under s21 FSMA 2000. The tool is designed to help identify potential issues, not to replace professional judgement.

---

Built by [AutoAI Labs](https://autoailabs.co.uk) | info@autoailabs.co.uk
