MCPolice🔒
国际人工智能合规监测系统,用于跟踪人工智能工具违反国际法的行为。
概述
MCPolice是一个时尚的网络应用程序,专为国际机构(国际刑警组织、国际原子能机构、联合国等)设计,用于监测和跟踪人工智能工具通过MCP(模型上下文协议)协议报告的违反国际法的行为。
快速开始
# Install dependencies
npm install
# Start the web server with server
npm run dev
# The web dashboard will be available at http://localhost:5173
# The MCP server will be available at http://localhost:5173/mcp
# MCP endpoints: /tools/list and /tools/callMCP集成
MCPolice实施 模型上下文协议 通过HTTP传输。
MCP端点:
GET /tools/list-列出可用的MCP工具POST /tools/call-执行MCP工具调用
可用的MCP工具:
report_violation-举报违反国际法的行为list_statutes-获取可用的国际法法规get_violation_stats-获取违规统计数据list_violations-使用筛选列出最近的违规行为
测试MCP工具:
# List available tools
curl http://localhost:5173/mcp/tools/list
# Get available statutes
curl -X POST http://localhost:5173/mcp/tools/call \
-H "Content-Type: application/json" \
-d '{"name": "list_statutes", "arguments": {}}'
# Report a violation
curl -X POST http://localhost:5173/mcp/tools/call \
-H "Content-Type: application/json" \
-d '{
"name": "report_violation",
"arguments": {
"statute": "Rome Statute Article 7",
"responsible_organization": "TestAI",
"offending_content": "Test violation content"
}
}'生产部署
# Create KV namespaces (first time only)
npx wrangler kv:namespace create "VIOLATIONS_KV"
npx wrangler kv:namespace create "VIOLATIONS_KV" --preview
# Update wrangler.jsonc with the returned namespace IDs
# Build and deploy
npm run deploy建筑
MCPolice由两个主要部分组成:
- MCP服务器 (
src/mcp-server.ts)-通过MCP协议处理违规报告 - Web仪表板 (
src/index.tsx)-为机构提供监控界面
