Brand Safety MCP
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Brand Safety MCP check this LinkedIn post for brand safety: 'Our new product is insane!'"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Brand Safety MCP
A Model Context Protocol (MCP) server that actually checks if your AI-generated content sounds like your brand and won't get you cancelled. Built with clean architecture so you can extend it without wanting to rewrite everything.
π What's New in v2.0
Actually Useful Features
π― Batch Processing - Process multiple pieces of content at once (up to 100 items concurrently). No more one-at-a-time validation.
π Plugin System - Add your own custom validators without touching the core code. Three types: evaluation plugins, enrichers, and formatters. Drop in a JavaScript file and you're good.
π οΈ Real CLI Tools -
brand-mcp validate,brand-mcp test,brand-mcp batch- actual command line tools instead of just running the server.π Smarter Analysis - Goes beyond basic checks. Now includes semantic analysis, context-aware validation (what works on LinkedIn might not on TikTok), pattern recognition, and confidence scoring.
π Multi-language Support - Built-in language detection and analysis for 15+ languages. Because not everyone speaks English.
π‘ Recommendation Engine - Doesn't just flag issues, actually suggests fixes prioritized by impact.
Clean Architecture That Makes Sense
ποΈ Hexagonal Architecture - Business logic separated from MCP protocol stuff. Swap implementations without breaking everything.
π Dependency Injection - Services composed at runtime, not hardcoded. Makes testing actually possible.
π Advanced Tone Analysis - Multi-dimensional tone detection that understands context and emotion.
Related MCP server: ChuangSi AI Model Content Protection
Table of Contents
Overview
Brand Safety MCP keeps your AI from saying dumb stuff that doesn't sound like you:
π‘οΈ Safety Checks: 12+ categories so you don't accidentally generate something terrible
β Brand Voice: Makes sure content actually sounds like your brand, not generic AI slop
π― Context Aware: Different rules for different platforms (LinkedIn vs TikTok vs docs)
π Useful Reports: Tells you what's wrong AND how to fix it
β‘ Actually Fast: <100ms responses, handles 1000+ requests/second
π Works Globally: 15+ languages with cultural sensitivity built in
π Extensible: Add your own rules without forking the whole project
Quick Start
# Clone and setup
git clone https://github.com/sapochat/brand-mcp.git
cd brand-mcp
npm install
npm run build
# Start the MCP server
npm start
# Or use CLI for quick evaluation
npx brand-mcp validate "Your content here"Architecture
This project uses Hexagonal Architecture (Ports and Adapters) for maximum flexibility:
src/
βββ domain/ # Pure business logic (no external dependencies)
β βββ entities/ # Core business entities
β βββ services/ # Domain services & business rules
β βββ repositories/ # Repository interfaces
βββ application/ # Use cases & orchestration
βββ adapters/ # External interfaces
β βββ primary/ # MCP protocol adapter
β βββ secondary/ # File system, caching
βββ infrastructure/ # DI container & cross-cutting concerns
βββ cli/ # Command-line interface
βββ plugins/ # Extensible plugin systemFeatures
π‘οΈ Safety Evaluation
Comprehensive content screening across multiple categories:
Content Categories: Violence, Hate Speech, Harassment, Self-Harm, etc.
Risk Levels:
NONE|LOW|MEDIUM|HIGH|CRITICALContextual Analysis: Understands nuance and intent
False Positive Reduction: Bayesian probability with confidence scoring
β Brand Compliance
Ensure content aligns with your brand:
Tone Analysis: Primary, secondary, and avoided tones
Voice Guidelines: Contractions, pronouns, sentence structure
Terminology: Preferred terms, prohibited words, proper nouns
Visual Identity: Colors, typography, imagery guidelines
Context Rules: Different rules for different platforms
π Multi-Language Support
Global content evaluation:
// Automatic language detection
const result = await analyzer.detectLanguage(content);
// Returns: { language: 'es', confidence: 0.95, script: 'Latin' }
// Cultural sensitivity checks
const cultural = await analyzer.analyzeCulturalSensitivity(content);
// Returns warnings about cultural considerationsπ Confidence Scoring
Know when to trust automated evaluations:
const confidence = await scorer.calculateConfidence(context);
// Returns: {
// score: 0.87,
// level: 'high',
// factors: { dataQuality: 0.9, consistency: 0.85 },
// recommendation: 'Suitable for automated approval'
// }π‘ Smart Recommendations
Get actionable improvement suggestions:
const recommendations = await engine.generateRecommendations(result);
// Returns prioritized action items with impact/effort matrixπ₯ Industry Validators
Built-in validators for regulated content:
Healthcare: HIPAA checks, medical claims validation
Financial: SEC compliance, risk disclosures
Legal: Ethics rules, confidentiality checks
Installation
Requirements
Node.js 22.12+ (LTS recommended)
TypeScript 5.3+
npm or yarn
Setup
# Install globally for CLI usage
npm install -g brand-safety-mcp
# Or add to your project
npm install brand-safety-mcpConfiguration
Basic Configuration
Edit brandSchema.js in the root directory:
export const activeBrandProfile = {
name: "YourBrand",
description: "Your brand description",
toneGuidelines: {
primaryTone: "confident",
secondaryTones: ["optimistic", "innovative"],
avoidedTones: ["pessimistic", "condescending"]
},
voiceGuidelines: {
personality: "knowledgeable but accessible",
usesContractions: true,
usesPronoun: {
firstPerson: true, // "we", "our"
secondPerson: true // "you", "your"
}
},
terminologyGuidelines: {
avoidedGlobalTerms: ["leverage", "synergy", "disrupt"],
preferredTerms: [
{
preferred: "artificial intelligence",
alternatives: ["AI"],
contexts: ["formal", "first-mention"]
}
]
}
};Advanced Configuration
Custom Rules Engine
// Add custom validation rules
const rule = {
id: 'custom-medical-claims',
name: 'Medical Claims Validator',
condition: (content) => content.includes('cures') || content.includes('treats'),
action: 'flag',
severity: 'high',
message: 'Medical claims require FDA approval'
};
engine.addRule(rule);Plugin Development
// Create custom plugin
export class CustomValidator {
async evaluate(content, context) {
// Your custom logic
return {
score: 95,
issues: [],
recommendations: []
};
}
}
// Register plugin
brand-mcp plugin add ./custom-validator.jsCLI Usage
The Brand MCP includes a comprehensive CLI for developers:
Content Validation
# Quick validation
brand-mcp validate "Your content here"
# With context
brand-mcp validate "Content" --context social-media
# Validate file
brand-mcp validate -f content.txt --type combinedBatch Processing
# Process CSV file
brand-mcp batch process content.csv --output results.json
# Process with specific evaluations
brand-mcp batch process data.csv --type safety --format jsonConfiguration Management
# View current config
brand-mcp config view
# Update specific setting
brand-mcp config set safety.threshold 0.8
# Reset to defaults
brand-mcp config resetPlugin Management
# List installed plugins
brand-mcp plugin list
# Add new plugin
brand-mcp plugin add ./my-plugin.js
# Remove plugin
brand-mcp plugin remove plugin-idTesting
# Run test scenarios
brand-mcp test --scenario risky
# Test with custom content
brand-mcp test --input "Test content" --expected-risk highAPI Reference
Tools
safety-check
Analyzes content for safety risks across all categories.
{
name: 'safety-check',
arguments: {
content: string,
context?: string
}
}check-compliance
Evaluates brand compliance with detailed scoring.
{
name: 'check-compliance',
arguments: {
content: string,
context?: string
}
}evaluate-content
Combined safety and compliance evaluation.
{
name: 'evaluate-content',
arguments: {
content: string,
context?: string,
includeSafety?: boolean,
includeBrand?: boolean,
brandWeight?: number,
safetyWeight?: number
}
}batch-evaluation
Process multiple content items efficiently.
{
name: 'batch-evaluation',
arguments: {
items: Array<{
id?: string,
content: string,
context?: string
}>,
evaluationType?: 'safety' | 'compliance' | 'combined'
}
}update-config
Update brand safety configuration at runtime.
{
name: 'update-config',
arguments: {
sensitiveKeywords?: string[],
allowedTopics?: string[],
blockedTopics?: string[],
riskTolerances?: Record<string, string>
}
}Advanced Features
Batch Processing
Process large content libraries efficiently:
const results = await client.callTool({
name: 'batch-evaluation',
arguments: {
items: contentArray,
evaluationType: 'combined'
}
});
// Returns:
// {
// results: [...],
// statistics: { processed: 100, failed: 0 },
// commonIssues: [...],
// processingTime: 1234
// }Multi-Language Analysis
const analysis = await analyzer.analyzeContent(content);
// Automatically detects language and applies appropriate rules
// Supports:
// - English, Spanish, French, German, Italian, Portuguese
// - Chinese, Japanese, Korean
// - Arabic, Hebrew, Russian
// - Hindi, Bengali, TamilConfidence Scoring
const evaluation = await evaluator.evaluate(content);
// Returns confidence metrics with each evaluation
// confidence: {
// overall: 0.92,
// breakdown: {
// dataQuality: 0.95,
// ruleMatches: 0.88,
// consistency: 0.93
// }
// }Smart Recommendations
const recommendations = await engine.generateRecommendations(result, {
strategy: 'quick-wins', // or 'safety-first', 'compliance-focused', 'balanced'
maxRecommendations: 10
});
// Returns prioritized, actionable improvements with:
// - Impact/effort matrix
// - Implementation roadmap
// - Estimated timeline
// - Success metricsClaude Desktop Integration
Configuration
Add to your claude_desktop_config.json:
{
"mcpServers": {
"brand-safety": {
"command": "node",
"args": ["/absolute/path/to/brand-mcp/dist/main.js"],
"env": {
"NODE_ENV": "production"
}
}
}
}Or if published to npm:
{
"mcpServers": {
"brand-safety": {
"command": "npx",
"args": ["-y", "brand-safety-mcp"]
}
}
}Natural Language Usage
Once configured, interact naturally with Claude:
"Check this marketing copy for brand compliance: 'We're leveraging cutting-edge AI to disrupt the industry.'"
Claude will automatically use the Brand MCP tools and provide formatted feedback.
Claude Code Skills
This project includes Claude Code skills for AI-assisted development:
.claude/skills/
βββ evaluate.md # Brand safety evaluation skill
βββ compliance.md # Brand compliance check skill
βββ batch.md # Batch evaluation skillUsing Skills
When working with Claude Code, reference the skills for guidance:
/evaluate- Check content for brand safety/compliance- Verify brand guideline compliance/batch- Process multiple content items
See also AGENTS.md for multi-agent coordination guidelines.
Development
Project Structure
npm run dev # Development with auto-reload
npm run build # Production build
npm run test:unit # Run unit tests
npm run test:coverage # Coverage report
npm run lint # Code linting
npm run format # Code formattingTesting
// Unit test example
describe('SafetyEvaluator', () => {
it('should detect high-risk content', async () => {
const result = await evaluator.evaluate('harmful content');
expect(result.riskLevel).toBe('HIGH');
});
});Debugging
Enable debug logging:
NODE_ENV=development DEBUG=brand-mcp:* npm startPerformance
Metrics
Response Time: <100ms average
Throughput: 1000+ requests/second
Memory: <50MB footprint
Accuracy: 95% confidence in evaluations
Optimization Tips
Enable Caching: Reduces repeated evaluations
Use Batch Processing: More efficient for multiple items
Configure Thresholds: Adjust sensitivity for your needs
Selective Categories: Only check relevant safety categories
Security
Built-in Protections
β Input validation with Zod schemas
β Path traversal protection with defense-in-depth validation
β Symlink attack prevention in plugin system
β Execute permission removal for plugin files
β Rate limiting (configurable)
β Safe error handling
β No eval() or dynamic execution
β Secure file operations with lstat protection
Best Practices
Always validate input content length
Use environment variables for sensitive config
Implement authentication for production
Regular security audits with
npm auditKeep dependencies updated
Contributing
We welcome contributions! See:
Contributing Guide - How to contribute
Security Policy - Report vulnerabilities
Code of Conduct - Community standards
Development Setup
# Fork and clone
git clone https://github.com/sapochat/brand-mcp.git
# Create feature branch
git checkout -b feature/your-feature
# Make changes and test
npm run test:unit
npm run lint
# Submit PRSupport
License
MIT License - See LICENSE file for details.
Available Tools
5 toolsbatch-evaluationCRead-only
Evaluate multiple content pieces in a single batch operation
Inputs: items (required), includeBrand, includeSafety, evaluationType.
check-complianceCRead-only
Evaluate content for compliance with brand guidelines
Inputs: content (required), context.
evaluate-contentCRead-only
Perform a combined evaluation for both brand safety and brand compliance
Inputs: content (required), context, brandWeight, includeBrand, +2 more.
safety-checkCRead-only
Analyze text content for brand safety concerns
Inputs: content (required), context.
update-configC
Update brand safety configuration settings
Inputs: allowedTopics, blockedTopics, riskTolerances, sensitiveKeywords.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 5 tools
Each tool has a reasonably distinct purpose: safety checking, compliance checking, combined evaluation, batch evaluation, and configuration updates. The main potential confusion is between evaluate-content and the two single-purpose checks, but the description explicitly frames it as a combined operation, making the relationship clear. Batch-evaluation is also distinguishable by its multi-item scope.
All names use kebab-case, but the word order is inconsistent: check-compliance, evaluate-content, and update-config are verb-first, while safety-check and batch-evaluation are noun-first. The pattern is readable but not predictable enough for a top score.
Five tools is well-scoped for a brand safety server, balancing single checks, combined evaluation, batch processing, and configuration. Each tool appears to earn its place without redundant surface area.
The server covers the core lifecycle of checking safety, checking compliance, combined evaluation, batch evaluation, and updating configuration. Minor gaps exist, such as retrieving current configuration or accessing prior evaluation results, but agents can work around them.
Maintenance
Related MCP Connectors
Sentiment, toxicity, entity extraction, PII, translation, summary, QA, fraud scoring, safety audit.
Fact-checks generated content against your sources of truth showing what to trust, change, & verify.
Deterministic trust gate for AI output: leaked-secret, prompt-injection & PII in one call.
Detect grooming, bullying, fraud, and 16+ online threats across text, voice, image, and video.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceProvides AI security guardrails through Javelin's platform to detect harmful content, prompt injection attempts, and language policies. Enables comprehensive content safety analysis with trust & safety detection, prompt injection protection, and language identification.1-
- AlicenseNot gradedqualityDmaintenanceProvides real-time content safety protection for large language models by detecting and preventing risks in both input and output content across multiple dimensions including compliance, ethics, and security.MIT

Trustwise MCP Serverofficial
AlicenseNot gradedqualityDmaintenanceProvides advanced evaluation tools for assessing AI safety, alignment, and performance of LLM outputs. Enables programmatic evaluation of quality, safety metrics like toxicity and PII detection, and operational metrics including carbon footprint and cost estimation.4Apache 2.0- AlicenseNot gradedqualityDmaintenanceProvides real-time content security for large language models by identifying and intercepting risks across compliance, ethics, and safety dimensions. It enables secure input and output monitoring through a customizable policy engine using an SSE-based interface.1MIT