AI-powered regulatory compliance checking for financial marketing content across multiple jurisdictions.
AI-Enhanced Financial Marketing Compliance Server using Model Context Protocol (MCP)
RegGuard is a sophisticated MCP (Model Context Protocol) server that provides AI-powered regulatory compliance checking for financial marketing content. It leverages OpenAI's GPT-4o-mini model combined with jurisdiction-specific regulatory knowledge to detect violations across multiple financial markets.
RegGuard acts as an intelligent compliance assistant that:
# Clone the repository
git clone https://github.com/your-username/regguard-mcp.git
cd regguard-mcp
# Create virtual environment (recommended)
python -m venv regguard-env
source regguard-env/bin/activate # On Windows: regguard-env\Scripts\activate
# Install dependencies
pip install -r requirements.txt
Create a .env
file in the project root:
# Create .env file
echo 'OPENAI_API_KEY="your-openai-api-key-here"' > .env
Important: Never commit your actual API key to GitHub!
# Test server functionality
python test_server.py
# Test AI integration
python test_ai_client.py
# Run example usage
python example_usage.py
Install Claude Desktop (Download here)
Configure MCP Settings:
{
"mcpServers": {
"regguard": {
"command": "python",
"args": ["-m", "src.regguard.server"],
"cwd": "/full/path/to/regguard-mcp",
"env": {
"OPENAI_API_KEY": "your-openai-api-key-here"
}
}
}
}
@regguard Please check this marketing copy for Singapore compliance:
"Our investment product guarantees 15% annual returns with zero risk!"
Install Cursor (Download here)
Configure MCP in Workspace: Add to your Cursor workspace settings:
{
"mcp.servers": [
{
"name": "regguard",
"command": ["python", "-m", "src.regguard.server"],
"cwd": "./regguard-mcp"
}
]
}
@regguard Analyze this financial ad for Hong Kong compliance violations
from regguard_client import RegGuardClient
# Initialize client
client = RegGuardClient()
client.start_server()
# Check compliance
result = client.check_compliance(
html_content="<p>Guaranteed 20% returns!</p>",
jurisdiction="sg"
)
print(f"Violations found: {len(result['violations'])}")
check_rule_violation
- AI Compliance AnalysisAnalyzes marketing content for regulatory violations across multiple jurisdictions.
Example Usage:
@regguard Check this content for Singapore violations:
"Join our exclusive investment club! Guaranteed profits of 25% annually with zero risk to your capital. Limited time offer - only 48 hours remaining!"
Response Includes:
auto_insert_disclaimer
- Smart Disclaimer PlacementAutomatically inserts jurisdiction-appropriate disclaimers in optimal locations.
Example:
@regguard Add appropriate disclaimers for this Singapore investment ad:
<div>
<h2>Investment Opportunity</h2>
<p>High potential returns available.</p>
<button>Invest Now</button>
</div>
export_audit_trail
- Compliance Audit LogsGenerates comprehensive audit reports for compliance teams.
health
- System StatusChecks server health and AI capability status.
list_supported_markets
- Available JurisdictionsReturns: ["sg", "hk", "ae", "in"]
regguard-mcp/
โโโ src/regguard/ # Core server code
โ โโโ server.py # Main MCP server
โ โโโ rules_engine.py # AI compliance engine
โ โโโ audit_writer.py # Audit trail management
โโโ rules/ # Jurisdiction-specific rules
โ โโโ sg.yml # Singapore (MAS)
โ โโโ hk.yml # Hong Kong (SFC)
โ โโโ ae.yml # UAE (DFSA)
โ โโโ in.yml # India (SEBI)
โโโ audits/ # Compliance audit logs
โโโ tests/ # Test files
โโโ example_usage.py # Usage examples
โโโ requirements.txt # Python dependencies
โโโ README.md # This file
Market | Regulator | Key Features | Special Requirements |
---|---|---|---|
Singapore (SG) | MAS | Guaranteed returns detection, Risk disclosure checks | English language, Clear risk warnings |
Hong Kong (HK) | SFC | SFC authorization checks, Complex product warnings | Traditional/Simplified Chinese support |
UAE (AE) | DFSA/SCA | DFSA licensing validation, Risk rating requirements | Arabic/English bilingual compliance |
India (IN) | SEBI | Risk-o-meter requirements, Celebrity endorsement rules | Local language disclosures |
# 1. Clone this repository
git clone https://github.com/your-username/regguard-mcp.git
# 2. Navigate to project directory
cd regguard-mcp
# 3. Create Python virtual environment
python -m venv venv
source venv/bin/activate # or `venv\Scripts\activate` on Windows
# 4. Install dependencies
pip install -r requirements.txt
# 1. Get OpenAI API key from https://platform.openai.com/api-keys
# 2. Create .env file
echo 'OPENAI_API_KEY="your-actual-api-key"' > .env
# 3. Test configuration
python test_server.py
Choose your preferred integration method:
For Claude Desktop Users:
@regguard
commandsFor Cursor IDE Users:
@regguard
in your codeFor Custom Integration:
# 1. Modify jurisdiction rules in rules/ directory
# 2. Add custom compliance patterns
# 3. Extend supported markets if needed
# 4. Customize disclaimer templates
python test_server.py
python test_ai_client.py
python example_usage.py
Critical Violation Test:
Content: "Guaranteed 25% returns with zero risk!"
Expected: Multiple critical violations detected
Compliant Content Test:
Content: "Investment involves risk. Past performance is not indicative of future results."
Expected: No violations, compliance status PASS
We welcome contributions! Please:
git checkout -b feature/amazing-feature
)git commit -m 'Add amazing feature'
)git push origin feature/amazing-feature
)This project is licensed under the MIT License - see the LICENSE file for details.
"OpenAI API key not found"
.env
file exists with correct OPENAI_API_KEY
"Server not responding"
"AI analysis failed"
/docs
Built with โค๏ธ for the financial compliance community
RegGuard helps ensure your financial marketing content meets regulatory standards across global markets. Stay compliant, stay confident.
Dynamic and reflective problem-solving through thought sequences
Integrates Claude AI with the Redmine project management system to enhance project management tasks.
Add smart Backup ability to coding agents like Windsurf, Cursor, Cluade Coder, etc
Mercado Pago's official MCP server, offering tools to interact with our API, simplifying tasks and product integration.
Interact with and manage your Bitrix24 CRM instance through a powerful set of tools.
Enables AI assistants to interact with Anki flashcard decks via the AnkiConnect plugin.
An MCP server for interacting with a Paperless-NGX API server. This server provides tools for managing documents, tags, correspondents, and document types in your Paperless-NGX instance.
Interact with Microsoft OneNote using AI language models like Claude and other LLMs.
A Python-based MCP server that allows AI LLMs to execute trades on the MetaTrader 5 platform.
Interact with Quire.io projects and tasks using the Quire API, enabling AI assistants to manage your workflow.