Perspective API Alternative (Toxicity Detection) MCP Server
Toxicity scores (0-1) for text before an agent posts it. Perspective API compatible. No LLM.
Perspective API Alternative (Toxicity Detection) scores 58 (Fair), licensed MIT and written in Python. It can be reached as a remote MCP endpoint. It does not declare tools yet. Filed under AI and memory. GitHub shows 0 stars. Install configs are generated for 12 clients. Being listed in the registry is not the same as being vendor-official.
Fair trust
58 of 100 from six public signals. Nobody can buy a point.
- Listed in the official MCP registry.
- OSI-style license: mit.
License, quality and maintenance
Quality: Grade C
65/100 for listing completeness. Lost points: no listed tools, short summary.
How quality is graded
Where the 58 comes from
22 + 15 + 0 + 10 + 4 + 7 = 58. Each factor is capped, so no single signal can carry a listing.
Active in the official MCP registry, plus a known vendor namespace.
Registry: 22 of 30 points.How recently the repository saw a commit or release.
Maintenance: 15 of 20 points.GitHub stars and weekly downloads, on a log scale.
Popularity: 0 of 20 points.A clear, OSI-style open-source license.
License: 10 of 10 points.Not archived, a secure install path, a pinned version.
Security: 4 of 10 points.A real summary, a README with depth, listed tools.
Docs: 7 of 10 points.Install
Pick your client, copy the config, paste it in.
Remote auth: API key required. Get a key or token from the provider first, then add it as a header in your client config. How remote auth works
Needs Cursor or VS Code installed on this device. The button opens the app and asks you to confirm before it adds the server.
{ "mcpServers": { "koyourmoon-perspective-api-alternative-mcp": { "url": "https://koyourmoon--perspective-api-alternative.apify.actor/mcp" } }}
Environment variables
This server does not declare environment variables.
Tools
All capabilitiesTools show up when the registry metadata or the repository README lists them. Public READMEs are read directly. A GitHub token is used only when one is already configured.
About
Perspective API Alternative: Toxicity Detection MCP Server
This repository contains an MCP server for the stdio transport. The server gives AI agents one tool, analyze_toxicity. Use the tool to examine text before an agent publishes it.
The tool returns six scores from 0 to 1 and a flagged value for each text:
TOXICITY,SEVERE_TOXICITY,INSULT,PROFANITY,THREAT,IDENTITY_ATTACK
The scores come from the open-source Detoxify model. The model is not an LLM. Thus, the same text always gets the same score. English only.
The request and response format is the same as the format of the Google Perspective API. Google stops the Perspective API on December 31, 2026.
How the server operates
The server implementation is server.py in this repository. It uses only the Python standard library (Python 3.9 or later).
- The server reads JSON-RPC messages from stdin and writes the responses to stdout.
- The server answers
initialize,pingandtools/listitself. These messages do not need a token. - For
tools/call, the server sends the texts to the toxicity API on Apify, and returns the scores. - The toxicity API runs the Detoxify model. You pay for each call through your Apify account.
Requirements
- Python 3.9 or later, or Docker
- An Apify API token in the
APIFY_TOKENenvironment variable
To get a token, open the Apify Console. Then go to Settings > API & Integrations.
Installation
Python
-
Clone the repository:
git clone https://github.com/koyourmoon/perspective-api-alternative-mcp.git -
Add the server to the configuration of your MCP client:
{ "mcpServers": { "perspective-api-alternative": { "command": "python", "args": ["/path/to/perspective-api-alternative-mcp/server.py"], "env": { "APIFY_TOKEN": "<APIFY_TOKEN>" } } } }
Docker
-
Build the image:
docker build -t perspective-api-alternative-mcp . -
Add the server to the configuration of your MCP client:
{ "mcpServers": { "perspective-api-alternative": { "command": "docker", "args": ["run", "-i", "--rm", "-e", "APIFY_TOKEN", "perspective-api-alternative-mcp"], "env": { "APIFY_TOKEN": "<APIFY_TOKEN>" } } } }
Tool: analyze_toxicity
| Parameter | Type | Description |
|---|---|---|
texts | array of strings, required | 1 to 100 English texts to score |
attributes | array of strings | Attributes to return. The default is all six. |
threshold | number | TOXICITY score at which a text is flagged. The default is 0.5. |
Example result for one text:
{
"results": [
{
"text": "You are an idiot.",
"scores": { "TOXICITY": 0.98, "INSULT": 0.95, "PROFANITY": 0.62 },
"flagged": true,
"billed_units": 1
}
]
}
If a text looks non-English, the result has a warning field. The scores for that text are not reliable.
Environment variables
| Name | Required | Description |
|---|---|---|
APIFY_TOKEN | Yes, for tools/call | Your Apify API token |
PERSPECTIVE_ALT_URL | No | A different URL for the toxicity API |
Prices
- $0.50 for 1,000 text units. A text unit is each started 1,000 characters of a text. Most comments are 1 unit.
- Lower prices for Apify Bronze, Silver and Gold plans.
- The first call after an idle period of 60 seconds can take 10 to 30 seconds (cold start).
Remote connection (optional)
You can also connect your MCP client directly to the toxicity API. This connection does not use server.py.
| Item | Value |
|---|---|
| Transport | Streamable HTTP |
| URL | https://koyourmoon--perspective-api-alternative.apify.actor/mcp |
| Authentication | Authorization: Bearer <APIFY_TOKEN> |
Files
| File | Content |
|---|---|
server.py | The MCP server |
Dockerfile | The container image for the server |
glama.json | The maintainer data for Glama |
server.json | The entry for the official MCP Registry |
Links
- Apify Store page: https://apify.com/koyourmoon/perspective-api-alternative
- Batch Actor for large jobs: https://apify.com/koyourmoon/toxicity-detector
License
MIT. This project is not affiliated with Google or Jigsaw. "Perspective API" is a trademark of Google LLC.
Frequently asked questions
What is Perspective API Alternative (Toxicity Detection) MCP Server?
Toxicity scores (0-1) for text before an agent posts it. Perspective API compatible. No LLM.
How do I install Perspective API Alternative (Toxicity Detection) MCP Server in Claude Desktop, Cursor, or VS Code?
Pick your client in the Install section on this page and copy the generated config into the client's config file. Step-by-step guides: Claude Desktop, Cursor, and VS Code. Perspective API Alternative (Toxicity Detection) MCP Server connects to the remote endpoint https://koyourmoon--perspective-api-alternative.apify.actor/mcp, so there is nothing to install locally.
Is Perspective API Alternative (Toxicity Detection) MCP Server free and open source?
Yes. Perspective API Alternative (Toxicity Detection) MCP Server is released under the MIT license, an OSI-approved open-source license, so you can use, modify, and self-host it under those terms.
Does Perspective API Alternative (Toxicity Detection) MCP Server support remote (HTTP) connections?
Yes. Perspective API Alternative (Toxicity Detection) MCP Server offers a hosted endpoint over Streamable HTTP, so HTTP-capable clients can connect to it without running anything locally.
How is Perspective API Alternative (Toxicity Detection) MCP Server's trust score calculated?
Perspective API Alternative (Toxicity Detection) MCP Server scores 58 out of 100 (Fair). The score adds six capped public signals: registry status, maintenance, popularity, license, documentation, and security. Nobody can pay for points. Read the methodology for the full formula.
Reviews
No reviews yet—Be the first to review
No published reviews yet. Used it? Tell the next person how it went.
Sign inA verified email is required to review this server.
Add badge to your README
Paste either snippet into the repository README. The image links to this listing.