scorton-mcp
MCP server for behavioral cybersecurity and AI risk scoring in financial workflows, deployed on Cloudflare Workers.
README
scorton-mcp
Cloudflare Workers MCP server for behavioral cybersecurity and AI risk in financial workflows.
Built with the universal @modelcontextprotocol/sdk and Cloudflare's agents McpAgent runtime.
What this server provides
MCP tools
score_human_riskscore_ai_riskscore_workflow_riskrun_ai_eval_summarygenerate_audit_snapshothealth_check
MCP resources
scorton://policy-profile— active scoring policy and thresholds.
All tool inputs are validated with Zod and outputs are machine-oriented JSON.
Architecture
src/
config/ # app metadata + scoring thresholds
mcp/ # ScortonMCP agent (tools + resources)
schemas/ # Zod input/output schemas
services/ # pure business logic / scoring
utils/ # logger + structured errors
tests/ # node:test unit tests
Runtime
- Framework:
@modelcontextprotocol/sdk+agents/mcp - Hosting: Cloudflare Workers + Durable Objects
- Endpoint:
https://<worker>.workers.dev/mcp
Quick start
Prerequisites
- Node.js 18+
- Cloudflare account with Workers enabled
wrangler login
Local development
npm install
npm run dev
Server runs at http://localhost:8788/mcp.
Test with MCP Inspector:
npx @modelcontextprotocol/inspector@latest
# Open http://localhost:5173 and connect to http://localhost:8788/mcp
Deploy to Cloudflare
- Update
wrangler.jsoncvars:MCP_URL→ your worker URL (e.g.https://scorton-mcp.scortonlabs.workers.dev)TEAM_DOMAIN→ your Access team (e.g.https://scortonlabs.cloudflareaccess.com)POLICY_AUD→ AUD tag from Zero Trust → Access → your application
- Deploy:
npm run deploy
- Connect clients to
https://scorton-mcp.scortonlabs.workers.dev/mcp.
Cloudflare Access (required for protected workers)
If the worker is behind a self-hosted Access application, set TEAM_DOMAIN and POLICY_AUD in wrangler.jsonc (or Worker dashboard vars). The worker validates the Cf-Access-Jwt-Assertion header on /mcp requests.
Find the AUD tag: Zero Trust → Access → Applications → your app → AUD tag.
Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"scorton": {
"command": "npx",
"args": ["mcp-remote", "https://scorton-mcp.<your-subdomain>.workers.dev/mcp"]
}
}
}
Cursor — add as a remote MCP server with the same URL.
Configuration
Scoring thresholds are set via Worker vars in wrangler.jsonc:
| Variable | Default | Purpose |
|---|---|---|
RISK_HUMAN_BASELINE_THRESHOLD |
0.2 |
Human baseline deviation flag threshold |
RISK_AI_FAILURE_WEIGHT |
0.5 |
Weight of eval failures in AI risk score |
RISK_WORKFLOW_HIGH_VALUE_THRESHOLD |
100000 |
USD threshold for high-value workflow flag |
Scripts
npm run dev # wrangler dev (local Worker)
npm run deploy # deploy to Cloudflare
npm run typecheck # TypeScript checks
npm run test # unit tests (services layer)
npm run cf-typegen # regenerate worker Env types
Example tool payloads
score_human_risk
{
"actorId": "user-42",
"baselineDeviation": 0.61,
"velocityAnomalyScore": 0.88,
"navigationAnomalyScore": 0.74,
"repeatedEditsCount": 7,
"sourceChannel": "new-device",
"workflowContext": "wire-transfer-approval"
}
score_ai_risk
{
"modelId": "llm-payments-v3",
"evalFailureRate": 0.31,
"useCaseCriticality": "mission-critical",
"complianceCategory": "aml",
"productionExposure": "full",
"recentIncidents": 2
}
score_workflow_risk
{
"workflowId": "ap-invoice-2026-0009",
"sequenceAnomalyScore": 0.67,
"actorRole": "approver",
"transactionValueUsd": 240000,
"vendorOrPaymentChangeSignal": true,
"changeWindowMinutes": 22
}
Optional: Cloudflare Access MCP portal
Register this server in Cloudflare Access AI controls to add OAuth governance and a managed portal for your team.
Migration from v1 (mcp-use / Dokploy)
v1 used mcp-use on Node.js + Docker. v2 runs on Cloudflare Workers with the standard MCP SDK. Tool names, schemas, and scoring logic are unchanged — only the transport/runtime changed.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。