Nosmai gives your AI coding assistant everything it needs to integrate the Moderation SDK correctly: a live MCP server, machine-readable docs, and ready-made editor rules. Use whichever fits your setup. They all point the assistant at the same current API, so it stops guessing method and type names.
MCP server (recommended)
Connect your assistant to the Nosmai Moderation MCP server. It gives the AI live, searchable access to these docs, so it always uses the current install steps and API.
- URL:
https://mcp.nosmai.com/moderation - Transport: Streamable HTTP
- Tools:
search_docs(query),get_page(slug),list_pages()
Add it to your tool's MCP config:
{
"mcpServers": {
"nosmai-moderation": {
"url": "https://mcp.nosmai.com/moderation"
}
}
}
- Cursor: Settings > MCP > Add new server (or add to
.cursor/mcp.json). - Claude Desktop: add the block to
claude_desktop_config.json. - Windsurf / others: paste the URL in the tool's MCP settings.
llms.txt
For tools that read a URL instead of an MCP server (ChatGPT, Perplexity, Cursor @web, and similar), point them at the machine-readable docs:
- Index:
https://nosmai.com/llms.txt - Full:
https://nosmai.com/llms-full.txt
Editor rules
Prefer a static rules file? Save the file for your tool into your own project and the assistant will know the SDK with no other setup.
| Tool | Save the file at |
|---|---|
| Cursor | .cursor/rules/nosmai-moderation.mdc |
| GitHub Copilot | .github/copilot-instructions.md |
| Windsurf | .windsurf/rules/nosmai-moderation.md |
| Any other (Zed, Cline, Aider, Codex) | AGENTS.md at the project root |
Use this universal version (save it under the path for your tool):
# Nosmai Moderation SDK
On-device content and text moderation. Flags NSFW imagery, detects weapons,
drugs, cigarettes and alcohol, and moderates toxic text. Runs fully offline; no
frame or message leaves the device. iOS, Android, Flutter, React Native, Web.
## Authoritative docs - always prefer these over guessing
- MCP server: https://mcp.nosmai.com/moderation (Streamable HTTP; tools: search_docs, get_page, list_pages)
- Docs: https://nosmai.com/llms.txt and https://nosmai.com/llms-full.txt
Look up exact install steps and API names before writing code. Do not invent names.
## Universal flow
1. Install the SDK for the platform.
2. Initialize once with the license key (NOSMAI-XXXX); check the result before moderating.
3. Moderate: analyzeImage, analyzeVideo, moderateText, live camera / pushFrame.
4. Read the result: isUnsafe, detections [{ category, confidence }], nsfw (safe/warn/block).
## Packages
- iOS: CocoaPods NosmaiModerationSDK (iOS 15.1+)
- Android: nosmai-detection.aar (minSdk 24, arm64-v8a, Kotlin 2.2+)
- Flutter: nosmai_moderation_sdk (+ Android AAR)
- React Native: @nosmai/moderation-react-native (+ Android AAR)
- Web: @nosmai/moderation-web
## Types (plain strings, same across platforms)
- Object category: weapon | drug | cigarette | alcohol
- NSFW verdict: safe | warn | block
- Text category: safe | profanity | toxic | hate | harassment | threat
## Live streaming (Agora etc.)
Tap captured frames and push them (pushFrame on mobile, analyzeImage(video) on web);
read the per-frame verdict. Flutter: use moderation_agora_bridge_flutter.
Examples: https://github.com/nosmai/moderation-agora-examples
## Rules
- The license key binds to the app identity (bundle id / package name / web origin).
- Everything is on-device and offline; never send frames or messages to a server.
- A license enables specific types and categories; the SDK only runs what the plan includes.
[!NOTE] The MCP server and
llms.txtstay current automatically as the docs change. A static rules file is a snapshot, so re-copy it after a major SDK update, or use the MCP server to always have the latest.