Documentation
StyleMCP validates and rewrites AI-generated text to match your brand voice. Use it as an API, MCP server, CLI, or GitHub Action.
New to StyleMCP? Start with the Quick Start guide to make your first API call in under 2 minutes.
Quick Start
The fastest way to try StyleMCP is with a simple cURL request. No signup required for the demo endpoint.
curl -X POST https://stylemcp.com/api/validate \
-H "Content-Type: application/json" \
-d '{"text": "Click here to learn more!"}'
You'll get a response like this:
{
"valid": false,
"score": 65,
"violations": [
{
"rule": "no-click-here",
"severity": "error",
"text": "Click here",
"message": "Avoid 'click here' — describe the destination",
"suggestion": "Learn more about our features"
}
]
}
Authentication
For production use, you'll need an API key. Get one free at stylemcp.com/signup.
curl -X POST https://stylemcp.com/api/validate \
-H "Content-Type: application/json" \
-H "Authorization: Bearer YOUR_API_KEY" \
-d '{"text": "Your content here"}'
Validate Text
The validate endpoint checks text against your brand rules and returns a score, violations, and suggestions.
Request Body
| Parameter | Type | Description |
|---|---|---|
text | string | Required. The text to validate. |
pack | string | Style pack to use. Default: saas |
context | string | Optional context (e.g., "email", "tweet", "docs") |
Response
| Field | Type | Description |
|---|---|---|
valid | boolean | Whether the text passes all rules |
score | number | Brand compliance score (0-100) |
violations | array | List of rule violations found |
summary | object | Count of errors, warnings, and info |
Rewrite Text
The rewrite endpoint automatically fixes brand violations and returns corrected text.
{
"text": "We leverage AI to facilitate amazing outcomes!",
"mode": "normal"
}
{
"rewritten": "We use AI to help you get better results.",
"changes": [
{ "from": "leverage", "to": "use" },
{ "from": "facilitate", "to": "help you get" }
]
}
Rewrite Modes
minimal— Only fix critical errorsnormal— Fix errors and warnings (default)aggressive— Rewrite for maximum brand alignment
Batch Operations
Validate or rewrite multiple texts in a single request.
{
"items": [
{ "id": "1", "text": "Click here for more" },
{ "id": "2", "text": "Learn about our features" }
]
}
Style Packs
Style packs define your brand rules. StyleMCP includes pre-built packs for common industries.
| Pack | Best For | Key Features |
|---|---|---|
saas | B2B SaaS products | Professional, clear, helpful tone |
ecommerce | DTC & retail | Friendly, conversion-focused |
healthcare | Medical & wellness | Compliant language, person-first |
finance | Fintech & banking | Precise, risk-aware |
MCP Server
StyleMCP works as a Model Context Protocol server for direct integration with Claude, Cursor, and other AI tools.
{
"mcpServers": {
"stylemcp": {
"command": "npx",
"args": ["stylemcp"]
}
}
}
CLI
Install the CLI for local validation and CI/CD integration.
# Install globally npm install -g stylemcp # Validate text stylemcp validate "Click here to learn more" # Validate file stylemcp validate src/copy/homepage.json --pack saas # Rewrite text stylemcp rewrite "Please utilize our product" --mode aggressive
GitHub Action
Run brand checks on every pull request.
name: Brand Check
on: [pull_request]
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Validate copy
run: |
npx stylemcp validate src/copy/*.json \
--min-score 80 \
--format github
Custom Style Packs
Create your own style pack by defining rules in YAML.
tone: summary: "Friendly, clear, and helpful" vocabulary: rules: - preferred: "use" avoid: ["utilize", "leverage"] - preferred: "help" avoid: ["assist", "facilitate"] forbidden: - "synergy" - "paradigm shift" doNot: - pattern: "click here" reason: "Poor accessibility" severity: error
Self-Hosting
Run StyleMCP on your own infrastructure. The core validation engine is fully open source.
# Clone the repo git clone https://github.com/3DUNLMTD/stylemcp.git cd stylemcp # Run with Docker docker compose up -d # Check health curl http://localhost:3000/health
Need help? Join our GitHub Discussions or email [email protected]