A bridge server connecting Claude Desktop with the chakoshi moderation API for content safety.
MCPクライアントアプリケーションと、chakoshi API を連携するMCP (Model Context Protocol) サーバーです。
Claude Desktop などからchakoshiを利用して日本語テキストのモデレーション(有害性チェック)を実行できます。
chakoshiとは、NTT ドコモビジネスが提供するLLM向けのガードレールです。詳細は以下をご覧ください。
chakoshi-mcp-server/
├── main.py # エントリポイント
├── chakoshi_server/
│ ├── __init__.py
│ ├── config.py # 環境変数の管理
│ └── server.py # MCP サーバーの実装部分
├── pyproject.toml # プロジェクト設定
└── .env # 環境変数(要作成)
テキストコンテンツの有害性をチェックするツールです。
入力パラメータ:
text
(string, 必須): チェックしたいテキスト出力:
使用プロンプト例:
chakoshi を使ってこのテキストをチェックしてください: "問題のあるコンテンツの例"
chakoshiのプレイグラウンドにアクセスし、画面に従って新規登録フローを進めてください。
新規登録、およびログイン完了後、プレイグラウンドの設定をクリックします。
その後、設定画面からAPIキーを新規に発行します。
プレイグラウンドにアクセスし、「新しいカスタム検知項目の追加」をクリックし、検知項目名とカスタム検知項目の定義を入力します。
別名で保存を選択し、新しくカスタム検知項目セットを保存します。
保存後、「選択中の検知項目セットIDをコピー」の項目からカテゴリセットIDをコピーします。
Python 3.10 以上
chakoshi のユーザ登録、および、APIキー
MCPクライアントアプリケーション (Claude Desktopなど)
git clone https://github.com/nttcom/chakoshi-mcp-server.git
cd chakoshi-mcp-server
# uvのインストール
curl -LsSfhttps://astral.sh/uv/install.sh | sh
# PATHの設定
source $HOME/.local/bin/env
# uv を使用する場合(推奨)
uv sync
# pip を使用する場合
pip install -e .
.env
ファイルを作成し、以下の環境変数を設定してください:
CHAKOSHI_API_KEY=your_chakoshi_api_key
CHAKOSHI_API_URL=https://api.beta.chakoshi.ntt.com/v1/judge/text
CHAKOSHI_MODEL_ID=chakoshi-moderation-241223
CHAKOSHI_CATEGORY_SET_ID=your_category_set_id
CHAKOSHI_TIMEOUT_SEC=5
注意: 実際の APIキーとカテゴリセットID はchakoshiプレイグラウンドの管理画面から取得してください。
uv run main.py
Claude Desktop の設定ファイル(claude_desktop_config.json
)に以下を追加:
{
"mcpServers": {
"command": "/PATH_to_uv/uv",
"args": [
"--directory",
"/PATH_to_chakoshi/chakoshi-mcp-server",
"run",
"main.py"
],
"env": {
"CHAKOSHI_API_KEY": "YOUR_CHAKOSHI_API_KEY"
}
}
}
その後、Claude Desktop 内で以下のように使用できます:
chakoshiを使ってこのテキストをチェックしてください:「問題のあるコンテンツの例」
Claude が自動的に moderate_text
ツールを使用してモデレーション結果を返します。
{
"category1": {
"score": 0.05,
"threshold": 0.5,
"result": "safe"
},
"category2": {
"score": 0.02,
"threshold": 0.3,
"result": "safe"
}
}
chakoshi API は現在ベータ版です。本番環境などでは使用しないでください。
APIキーは適切に管理し、決して公開しないでください。
APIキーのレート制限などについては公式ドキュメントを参照してください。
MIT
Interact with the Ghost blogging platform using the Model Context Protocol (MCP) with Server-Sent Events (SSE) support.
The official ElevenLabs MCP server
MCP server acting as an interface to the Facebook Ads, enabling programmatic access to Facebook Ads data and management features.
A bridge between AI assistants and VRChat using MCP and OSC, enabling AI-driven avatar control and interactions in virtual reality.
Allows AI agents to search Gmail threads, learn your writing style, and draft emails.
An MCP server application that sends various types of messages to the WeCom group robot.
An email processing server that uses MongoDB for semantic search and SQLite for efficient storage and retrieval.
Send notifications to Slack channels using webhook URLs.
A server for interacting with LinkedIn, including authentication and posting capabilities.
A Node.js service for interacting with the LnExchange API for spot trading.