byerisk-mcp
This server integrates ByeRisk's content compliance detection engine into any MCP-compatible AI assistant, enabling checks and fixes for text, images, and videos before publishing to Chinese social media platforms (Douyin, Kuaishou, Xiaohongshu, Bilibili, Hongguo, etc.).
check_text: Analyze Chinese text (10–5000 characters) for compliance risks across platforms. Returns risk levels: "must fix" (illegal/hard rule violations) and "affects distribution" (reduces algorithmic reach), with legal basis and suggestions. Optionally auto-generate a fixed version (extra credits).
fix_text: Rewrite previously checked text using AI to avoid identified violations. Supports full rewrite or precise replacement strategies; requires a prior check_text call ID.
check_image: Detect image violations (ad rules, OCR text, political, violent, pornographic, infringing logos) from local file path or URL. Supports multiple product lines (creator, touliu).
check_video: Analyze video content (visuals, audio, speech) for compliance, returning timestamped risk details. Billed per second of video duration. Supports local files or URLs. Can perform speech drift detection against a pre-approved script.
get_check_result: Retrieve results of a previous check by ID. Useful for timeouts or history review; does not consume credits.
get_account: Check account credit balance, subscription status, and monthly usage. Helpful when encountering 402 (insufficient credits) errors; does not consume credits.
The server is configurable (base URL, end tenant, product/industry verticals) and check tools consume credits, while retrieval and account queries do not.
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., "@byerisk-mcp 帮我检查这段口播稿在抖音发有没有违规"
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.
byerisk-mcp
把 ByeRisk 的内容合规检测接进任何支持 MCP 的 AI 助手 —— 腾讯 WorkBuddy、Claude Code、Cursor 等。
写完一条口播稿、剪完一支投放视频,直接在助手里说「查一下这段能不能发」,就能拿到分档的风险明细:必须修改(违法或违反平台硬性规则)与影响推流(能发但会降权),每条带命中片段、法条依据和修改建议。
底层是 ByeRisk 开放 API(/v1),与网页控制台同一套检测引擎、同一个积分池 —— 不是第二套系统,是同一套系统的另一个入口。
快速开始
1. 拿一把 API Key
登录 www.byerisk.com → 控制台 → 开放 API → 创建 API Key,形如 brsk_live_…。
2. 配置到你的 AI 助手
请使用
0.1.1及以上版本。0.1.0已弃用:它的fix_text会一直等到超时拿不到结果 (当时按 spec 描述以为修复是「按版本递增追加」,实测后端是原地替换,判据不成立)。
腾讯 WorkBuddy —— 侧边栏 → 插件 → MCP Server → 配置 MCP,粘贴:
{
"mcpServers": {
"byerisk": {
"command": "npx",
"args": ["-y", "byerisk-mcp"],
"env": {
"BYERISK_API_KEY": "brsk_live_你的key"
}
}
}
}也可以直接写进 ~/.workbuddy/mcp.json(用户级,所有项目共享)或 <项目>/.workbuddy/mcp.json(仅当前项目)。
Claude Code:
claude mcp add byerisk -e BYERISK_API_KEY=brsk_live_你的key -- npx -y byerisk-mcp其他 MCP 客户端:任何支持 stdio 传输的客户端都一样 —— 命令 npx -y byerisk-mcp,环境变量里给 BYERISK_API_KEY。
3. 用起来
直接对助手说人话即可:
「帮我检查这段口播稿在抖音发有没有违规」
「这张主图能投信息流吗」
「桌面上那个 demo.mp4 检测一下,是短剧,发红果」
「刚才那段文案帮我改成合规的」
Related MCP server: ai-economy-infrastructure
工具清单
工具 | 作用 | 是否扣积分 |
| 文案合规检测。提交后自动等结果,直接返回分档风险明细 | 是 |
| 对一次检测结果做 AI 合规改写(整篇重写 / 精准替换) | 是 |
| 图片检测:广告违规、违规文字(OCR)、涉政、暴力、色情、侵权 Logo | 是 |
| 视频检测:画面 + 音频 + 口播话术,返回带时间点的明细 | 是(按秒) |
| 按 id 取已提交检测的结果,用于等待超时或回看历史 | 否 |
| 查积分余额、订阅状态、本月用量 | 否 |
这里刻意没有把开放 API 的 20 个端点一一映射成工具。/v1 是「POST 提交 → 拿 id → GET 轮询」的异步契约,直接摊给模型,它要么提交完忘了轮询,要么重复提交(每次都扣积分)。所以 check_* 把提交和等待合并成一个动作,只有真等超时才把 id 交回去,再由 get_check_result 兜底。
本机文件可以直接传
check_image / check_video 的入参既接受公网直链,也接受本机文件绝对路径。传路径时会自动走 ByeRisk 签发的 OSS 直传凭证上传,文件不经过 ByeRisk 服务器。
桌面 agent 场景下用户的素材基本都在本机,没有这一步这两个工具约等于不可用。
视频时长(durationSeconds)是计费依据 —— 标准模式 1 积分/秒,且后端会用实际抽帧时间点对账,申报明显短于实际的差额会自动补扣。所以:
mp4 / mov:自动从
moov → mvhd解析,不需要装 ffmpeg。其他容器:尝试
ffprobe(装了才有)。都拿不到:直接报错要求显式传
durationSeconds,绝不猜一个值出来。
配置项
环境变量 | 必填 | 默认 | 说明 |
| 是 | — | 控制台创建的 API Key, |
| 否 |
| 自建或测试环境时改这里 |
| 否 | — | 子租户号。见下 |
子租户
如果你在自己的产品里集成 ByeRisk、又要给自己的每个客户做数据隔离,给 BYERISK_END_TENANT 填上你系统里的租户号即可:该租户的自定义违禁词与检测历史会隔离在独立的域中,积分和订阅仍统一算在这把 Key 所属的账户上。取值限 1–64 位的字母、数字、_ . : -,首次出现自动创建。
几个要知道的前提
积分是共用的:网页控制台、小程序、开放 API、这个 MCP server 共用同一个积分池。余额不足会返回 402,用
get_account能确认余额。产品线不是都开放:图片检测只支持
creator(短视频)和touliu(投放),短剧没有图片检测;视频检测只有标准模式。平台要填对:各平台的尺度差异很大,
platform决定命中哪套规则集。短剧场景通常填hongguo(红果)。广告场景记得声明:投放素材把
sceneMode设为ad,场景类提示就不再计为违规,否则会多出一堆无关告警。限流:提交类 60 次/分钟、读取类 600 次/分钟,按 API Key 计。正常使用碰不到。
开发
npm install
npm run build # tsc → dist/
npm test # 契约测试 + 二进制解析回归测试
npm run type-checkspec/openapi.json 是开放 API 的 spec 快照,契约测试拿它核对 src/types.ts 里的字段名和 src/tools.ts 里的枚举值。手写类型最容易出的错是字段名笔误 —— TypeScript 不报错,只会让某个功能静默失效。生产 spec 变了就刷新快照,测试会指出哪些字段对不上:
curl -s https://www.byerisk.com/api/v1/openapi.json -o spec/openapi.json本地调试可以直接用编译产物:
{
"mcpServers": {
"byerisk": {
"command": "node",
"args": ["/绝对路径/byerisk-mcp/dist/index.js"],
"env": { "BYERISK_API_KEY": "brsk_live_…" }
}
}
}stdio 传输下 stdout 是 JSON-RPC 通道,改代码时注意所有日志必须走 stderr,否则会破坏协议。
相关
开放 API 文档:https://www.byerisk.com/developers
License
MIT
Available Tools
6 toolscheck_image图片合规检测A
检测图片是否含广告违规、违规文字(OCR)、涉政、暴力、色情、侵权 Logo 等风险。支持传本机文件路径(会自动上传,用户的图通常就在本机)或公网直链。短剧产品线没有图片检测。会扣积分。
Inputs: image (required), title, sizeBytes, productVertical.
check_text文案合规检测A
对一段文案做发布前合规预检,返回「必须修改 / 影响推流」两档风险明细、法条依据与修改建议。适用于短视频脚本、口播稿、短剧剧本、投放素材文案、商品标题详情等任何要发到内容平台的中文文案。每次调用都会扣除账户积分,同一段文案不要重复提交。
Inputs: text (required), platform (required), autoFix, sceneMode, +3 more.
check_video视频合规检测A
检测视频的画面、音频与口播话术合规风险,返回带时间点的风险明细。支持传本机文件路径(会自动上传)或公网直链。按视频时长计费(1 积分/秒),长视频要等数分钟。若该视频的脚本此前用 check_text 检测过,把那次的 id 传进 textCheckId 可额外做口播漂移检测(比对实际口播与过审脚本的偏离片段)。
Inputs: video (required), title, platform, sizeBytes, +4 more.
fix_textAI 合规改写A
对一次已完成的文案检测触发 AI 改写,产出规避了命中风险的合规版本。需要先用 check_text 拿到检测 id。会扣除修复积分。
Inputs: checkId (required), mode, strategy, waitSeconds.
get_account查询账户余额A
查询 ByeRisk 账户的积分余额、订阅状态与本月用量。检测报 402 积分不足时可以用它确认余额。不扣积分。
Inputs: no named parameters.
get_check_result取检测结果A
按 id 取一次已提交检测的结果。用于上一次调用等待超时、或需要回看历史检测的场景。不扣积分。
Inputs: id (required), type (required), waitSeconds.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 6 tools
Each tool targets a distinct function: account status, text check, text fix, image check, video check, and result retrieval. There is no overlap between check_text and check_image/video as they handle different media types, and fix_text clearly depends on check_text output.
All tool names follow a consistent verb_noun pattern in snake_case: get_account, check_text, fix_text, check_image, check_video, get_check_result. The verbs are meaningful (get, check, fix) and the pattern is uniform across the entire set.
With 6 tools, the server is well-scoped for a compliance-checking service. Each tool covers a distinct capability (account, text, image, video, fixing, and result lookup) without unnecessary bloat or missing essentials.
The tool surface provides complete lifecycle coverage for the domain: submission of checks for all major content types (text, image, video), a fix operation for text, asynchronous result retrieval, and account monitoring. There are no dead ends; every operation leads to a result accessible via get_check_result.
Maintenance
Related MCP Connectors
AI governance MCP server for EU AI Act compliance and jurisdiction verification
MCP server for secureFlows: token-free URL builders and integration-linting tools for AI agents.
MCP gateway: one connection for your AI apps, with tool policies, PII redaction and audit logs.
MCP server that lets your AI assistant build and deploy apps, hosting each one at a live URL.
Related MCP Servers
- AlicenseAqualityCmaintenanceMCP server for EU AI Act compliance in employment AI, featuring built-in risk management, bias detection, transparency, and FRIA support.2MIT
- AlicenseAqualityCmaintenanceAn MCP server for AI economy infrastructure with built-in EU AI Act compliance, supporting risk management, transparency, and bias detection.10MIT
- AlicenseAqualityDmaintenanceMCP server for EU AI Act compliance, providing risk classification of AI features and Article 50 transparency notices.229 PyPI1Apache 2.0
- AlicenseNot gradedqualityDmaintenanceMCP server that provides runtime defense for AI agents, protecting against prompt injection, data exfiltration, and other adversarial attacks through a ranked pipeline of up to 36 inline defenses and 3 output scanners.2Apache 2.0