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.

Terminal
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:

Response
{
  "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.

With API Key
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.

POST /api/validate

Request Body

ParameterTypeDescription
textstringRequired. The text to validate.
packstringStyle pack to use. Default: saas
contextstringOptional context (e.g., "email", "tweet", "docs")

Response

FieldTypeDescription
validbooleanWhether the text passes all rules
scorenumberBrand compliance score (0-100)
violationsarrayList of rule violations found
summaryobjectCount of errors, warnings, and info

Rewrite Text

The rewrite endpoint automatically fixes brand violations and returns corrected text.

POST /api/rewrite
Request
{
  "text": "We leverage AI to facilitate amazing outcomes!",
  "mode": "normal"
}
Response
{
  "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 errors
  • normal — Fix errors and warnings (default)
  • aggressive — Rewrite for maximum brand alignment

Batch Operations

Validate or rewrite multiple texts in a single request.

POST /api/validate/batch
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.

PackBest ForKey Features
saasB2B SaaS productsProfessional, clear, helpful tone
ecommerceDTC & retailFriendly, conversion-focused
healthcareMedical & wellnessCompliant language, person-first
financeFintech & bankingPrecise, risk-aware

MCP Server

StyleMCP works as a Model Context Protocol server for direct integration with Claude, Cursor, and other AI tools.

claude_desktop_config.json
{
  "mcpServers": {
    "stylemcp": {
      "command": "npx",
      "args": ["stylemcp"]
    }
  }
}

CLI

Install the CLI for local validation and CI/CD integration.

Terminal
# 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.

.github/workflows/brand-check.yml
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.

my-brand/voice.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.

Terminal
# 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 hello@stylemcp.com