{
  "markdown": "# StyleMCP\n\nExecutable brand rules for AI models and agents. Keep every AI-generated message on-brand.\n\n## What is StyleMCP?\n\nStyleMCP validates and rewrites AI-generated text to match your brand voice. Use it as:\n\n- **REST API** - Validate text from any application\n- **MCP Server** - Direct integration with Claude and other AI agents\n- **CLI** - Check copy in your terminal or CI/CD\n- **GitHub Action** - Catch off-brand copy in pull requests\n\n## Quick Start\n\n### API\n\n```bash\ncurl -X POST https://stylemcp.com/api/validate \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"text\": \"Click here to learn more!\"}'\n```\n\nResponse:\n\n```json\n{\n  \"valid\": false,\n  \"score\": 65,\n  \"violations\": [\n    {\n      \"rule\": \"no-click-here\",\n      \"severity\": \"error\",\n      \"message\": \"Avoid 'click here' - describe the destination instead\",\n      \"suggestion\": \"Learn more about our features\"\n    }\n  ]\n}\n```\n\n### CLI\n\n```bash\n# Install\nnpm install -g stylemcp\n\n# Validate text\nstylemcp validate \"Click here to learn more\"\n\n# Validate file\nstylemcp validate src/copy/homepage.json --pack saas\n\n# Rewrite text\nstylemcp rewrite \"Please utilize our product\" --mode aggressive\n```\n\n### MCP (Claude Desktop)\n\nAdd to your `claude_desktop_config.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"stylemcp\": {\n      \"command\": \"npx\",\n      \"args\": [\"stylemcp\"]\n    }\n  }\n}\n```\n\nNow Claude can validate and rewrite text using your brand rules.\n\n## API Endpoints\n\n| Method | Endpoint | Description |\n|--------|----------|-------------|\n| POST | `/api/validate` | Validate text against brand rules |\n| POST | `/api/rewrite` | Rewrite text to match brand voice |\n| POST | `/api/validate/batch` | Validate multiple texts |\n| GET | `/api/packs` | List available style packs |\n| GET | `/api/packs/{pack}/voice` | Get voice guidelines |\n| GET | `/api/packs/{pack}/ctas` | Get CTA rules |\n| GET | `/api/mcp/sse` | MCP SSE endpoint |\n| POST | `/api/mcp/call` | MCP tool calls |\n\n## Style Packs\n\nStyleMCP uses **style packs** - YAML files that define your brand rules.\n\n### Available Packs\n\n| Pack | Best For | Key Features |\n|------|----------|--------------|\n| `saas` | B2B SaaS products | Professional, clear, helpful tone |\n| `ecommerce` | DTC & retail brands | Friendly, conversion-focused, no pushy CTAs |\n| `healthcare` | Medical & wellness | Compliant language, no cure claims, person-first |\n| `finance` | Fintech & banking | Precise, risk-aware, no guaranteed returns |\n\n### Example: `saas` Pack\n\n- **Vocabulary**: Prefer \"use\" over \"utilize\", \"help\" over \"assist\"\n- **Forbidden words**: \"synergy\", \"leverage\", \"cutting-edge\", \"game-changing\"\n- **Patterns to avoid**: \"click here\", \"we're sorry for any inconvenience\"\n- **CTA rules**: Avoid \"Submit\", \"Click here\", \"OK\" - prefer \"Save\", \"Create\", \"Sign up\"\n\n### Pack Structure\n\n```\npacks/\n  my-brand/\n    manifest.yaml      # Pack metadata\n    voice.yaml         # Tone, vocabulary, forbidden words\n    copy_patterns.yaml # Reusable copy templates\n    cta_rules.yaml     # Button/CTA guidelines\n    tokens.json        # Design tokens (optional)\n```\n\n### Create Your Own Pack\n\n```bash\n# Copy the default pack\ncp -r packs/saas packs/my-brand\n\n# Edit the rules\nnano packs/my-brand/voice.yaml\n\n# Use your pack\ncurl -X POST https://stylemcp.com/api/validate \\\n  -d '{\"text\": \"Your text\", \"pack\": \"my-brand\"}'\n```\n\n### voice.yaml Example\n\n```yaml\ntone:\n  summary: \"Friendly, clear, and helpful\"\n  attributes:\n    - name: friendly\n      weight: 0.8\n    - name: professional\n      weight: 0.7\n\nvocabulary:\n  rules:\n    - preferred: \"use\"\n      avoid: [\"utilize\", \"leverage\"]\n    - preferred: \"help\"\n      avoid: [\"assist\", \"facilitate\"]\n\n  forbidden:\n    - \"synergy\"\n    - \"paradigm shift\"\n    - \"game-changing\"\n\ndoNot:\n  - pattern: \"click here\"\n    reason: \"Poor accessibility\"\n    suggestion: \"Describe the destination\"\n    severity: error\n\n  - pattern: \"\\\\b(obviously|simply|just)\\\\b\"\n    isRegex: true\n    reason: \"Can make users feel stupid\"\n    severity: warning\n```\n\n## Self-Hosting\n\n### Docker\n\n```bash\n# Clone the repo\ngit clone https://github.com/3DUNLMTD/stylemcp.git\ncd stylemcp\n\n# Set up environment\necho \"STYLEMCP_API_KEY=$(openssl rand -hex 32)\" > .env\n\n# Run with Docker\ndocker compose up -d\n\n# Check health\ncurl http://localhost:3000/health\n```\n\n### Manual\n\n```bash\n# Install dependencies\nnpm install\n\n# Build\nnpm run build\n\n# Start server\nnpm start\n```\n\n## GitHub Actions\n\n```yaml\nname: Brand Check\non: [pull_request]\n\njobs:\n  validate:\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v4\n\n      - name: Validate copy\n        run: |\n          npx stylemcp validate src/copy/*.json \\\n            --min-score 80 \\\n            --format github\n```\n\n## Environment Variables\n\n| Variable | Description | Default |\n|----------|-------------|---------|\n| `PORT` | Server port | 3000 |\n| `STYLEMCP_API_KEY` | API key for authentication | (none) |\n| `GITHUB_WEBHOOK_SECRET` | GitHub webhook secret | (none) |\n\n## MCP Tools\n\nWhen used as an MCP server, StyleMCP provides these tools:\n\n| Tool | Description |\n|------|-------------|\n| `validate_text` | Validate text against brand rules |\n| `rewrite_to_style` | Rewrite text to match brand voice |\n| `get_voice_rules` | Get voice and tone guidelines |\n| `get_copy_patterns` | Get approved copy patterns |\n| `get_cta_rules` | Get CTA guidelines |\n| `get_tokens` | Get design tokens |\n| `list_packs` | List available style packs |\n\n## What Gets Validated?\n\nThe `saas` pack checks for:\n\n### Vocabulary\n- Use simple words: \"use\" not \"utilize\", \"help\" not \"assist\"\n- Avoid jargon: \"synergy\", \"leverage\", \"paradigm shift\"\n- Avoid weak intensifiers: \"very\", \"really\", \"extremely\"\n\n### Patterns\n- No \"click here\" (accessibility issue)\n- No \"we're sorry for any inconvenience\" (corporate non-apology)\n- No double \"please\" (sounds desperate)\n- No starting with \"Sorry\" (lead with solutions)\n\n### CTAs\n- Avoid generic: \"Submit\", \"OK\", \"Yes/No\", \"Click here\"\n- Use specific actions: \"Save\", \"Create\", \"Sign up\", \"Export\"\n- Max 4 words\n\n### Constraints\n- Max 25 words per sentence\n- No exclamation marks (in most contexts)\n- First-person plural (\"we\", \"our\")\n- Oxford comma\n\n## License\n\nMIT\n",
  "bytes": 6165,
  "sha": "2d799d449a39c31d7d03b6ce8905227cc926d49594a87e5e4af8b699784ffa07",
  "repo_slug": "3dunlmtd/stylemcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_3dunlmtd_stylemcp_5a8f4bc5/readme"
}