Back to MCP directory
publicPublicdnsLocal runtime

perspective-mcp-server

一个基于Perspective API的MCP服务器,提供文本毒性分析和多语言支持。

article

README

🚀 视角 MCP 服务器

视角 MCP 服务器是一个基于 Model Context Protocol (MCP) 的服务器,它提供了与 Perspective API 交互的工具,能帮助用户进行文本分析等操作。

🚀 快速开始

要使用视角 MCP 服务器,您需要完成以下两个步骤:

  1. 获取您的 Perspective API 密钥。
  2. 将服务器添加到您的 MCP 设置文件中,示例如下:
{
  "mcpServers": {
    "perspective": {
      "command": "npx",
      "args": [
        "-y",
        "@mtane0412/perspective-mcp-server"
        ],
      "env": {
        "PERSPECTIVE_API_KEY": "your-api-key"
      }
    }
  }
}

✨ 主要特性

  • 文本毒性分析:可对文本的毒性进行分析。
  • 得分建议:为分析结果提供得分建议。
  • 多属性支持:支持 TOXICITY、SEVERE_TOXICITY、IDENTITY_ATTACK、INSULT、PROFANITY、THREAT 等多种属性。
  • 多语言支持:能处理多种语言的文本。

💻 使用示例

基础用法

将服务器添加到 MCP 设置文件的示例代码:

{
  "mcpServers": {
    "perspective": {
      "command": "npx",
      "args": [
        "-y",
        "@mtane0412/perspective-mcp-server"
        ],
      "env": {
        "PERSPECTIVE_API_KEY": "your-api-key"
      }
    }
  }
}

🔧 技术细节

由于 MCP 服务器通过标准输入输出进行通信,调试可能具有挑战性。我们建议使用 MCP Inspector,该工具作为包脚本提供,使用命令如下:

npm run inspect

Inspector 将为您提供一个访问浏览器中的调试工具的 URL。

📄 许可证

本项目采用 MIT License 进行许可。

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client