MCP (Model Context Protocol)
Add content moderation to Claude, Cursor, and any MCP-compatible AI tool.
What is MCP?
Model Context Protocol is an open standard that lets AI assistants connect to external tools and data sources. With the Vettly MCP server, any MCP-compatible tool can moderate content without writing integration code.
Installation
npx @nextauralabs/vettly-mcpClaude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"vettly": {
"command": "npx",
"args": ["-y", "@nextauralabs/vettly-mcp"],
"env": {
"VETTLY_API_KEY": "vettly_live_xxx"
}
}
}
}Config file locations:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
Restart Claude Desktop after updating the config.
Available Tools
| Tool | Description |
|---|---|
moderate_content | Check text, image, or video against a moderation policy |
validate_policy | Validate policy YAML without saving |
list_policies | List all available moderation policies |
get_usage_stats | Get usage statistics and costs |
get_recent_decisions | Review recent moderation decisions |
Usage Examples
Once configured, you can ask Claude to moderate content naturally:
"Moderate this comment: 'You're an idiot and I hate you'"
"Check if this text is safe for a kids app: 'Let's play a fun game!'"
"List my moderation policies"
"Show me my usage stats for the last 7 days"
"Get my last 10 flagged decisions"
Tool Reference
moderate_content
Check content against a moderation policy.
Parameters:
content(required) - The content to moderatepolicyId(required) - Policy ID to usecontentType(optional) -text,image, orvideo(default:text)
Response:
{
"decisionId": "dec_abc123",
"safe": false,
"flagged": true,
"action": "block",
"categories": [
{ "category": "harassment", "score": 0.92, "triggered": true }
]
}validate_policy
Validate policy YAML syntax without saving.
Parameters:
yamlContent(required) - YAML policy content
Response:
{
"valid": true
}list_policies
List all available moderation policies.
Response:
{
"policies": [
{ "id": "default", "name": "Default Policy" },
{ "id": "strict", "name": "Strict Moderation" }
]
}get_usage_stats
Get usage statistics.
Parameters:
days(optional) - Days to include (1-365, default: 30)
get_recent_decisions
Get recent moderation decisions.
Parameters:
limit(optional) - Number of decisions (1-50, default: 10)flagged(optional) - Filter by flagged statuspolicyId(optional) - Filter by policycontentType(optional) - Filter by content type
Resources
The MCP server also exposes read-only resources:
vettly://policies- List of all policiesvettly://policies/{policyId}- Specific policy YAML
Programmatic Usage
You can also use the MCP server programmatically:
import { createVettlyMcpServer } from '@nextauralabs/vettly-mcp'
const server = createVettlyMcpServer({
apiKey: process.env.VETTLY_API_KEY!,
})
// Connect to your transport
server.connect(transport)Environment Variables
| Variable | Required | Description |
|---|---|---|
VETTLY_API_KEY | Yes | Your Vettly API key |
VETTLY_API_URL | No | API URL (default: https://api.vettly.dev) |
Supported Platforms
Any tool that supports MCP can use the Vettly server:
- Claude Desktop - Anthropic's desktop app
- Claude Code - CLI for developers
- Cursor - AI-powered code editor
- Zed - Modern code editor with AI
- Custom agents - Any MCP client implementation
Next Steps
- Get an API Key - Sign up for Vettly
- Custom Policies - Define moderation rules
- API Reference - Full SDK documentation