🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@torknetwork/mcp-server

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@torknetwork/mcp-server

TORK MCP Server - Governance tools for AI agents

Source
npmnpm
Version
1.0.0
Version published
Weekly downloads
49
-15.52%
Maintainers
1
Weekly downloads
 
Created
Source

TORK MCP Server

Governance tools for AI agents via Model Context Protocol (MCP).

Part of the TORK Network - AI governance infrastructure for the agentic era.

Installation

npm install @torknetwork/mcp-server

Features

The TORK MCP Server provides 13 governance tools across three categories:

Core Governance Tools

ToolDescription
tork_scan_piiScan text for PII (SSN, credit cards, emails, phones, IP addresses, API keys) and optionally redact
tork_governed_passthroughExecute tool calls with full governance checks (validation + audit)
tork_check_policyCheck if an action is allowed by policy without executing it
tork_audit_statsGet audit statistics for governance events
tork_audit_logsQuery audit logs for governance events

Tool Call Governance

ToolDescription
tork_register_toolRegister a tool with governance policy (allowed agents, targets, blocked flags, rate limits, HITL requirements)
tork_validate_tool_callValidate a tool call BEFORE execution - checks registration, agent authorization, target restrictions, blocked flags, and rate limits
tork_tool_call_statsGet statistics on tool calls including allowed/blocked counts and rate limit hits

HITL (Human-in-the-Loop) Enforcement

ToolDescription
tork_request_approvalSubmit an action for human approval with velocity tracking for slicing attack detection
tork_approve_actionHuman approves a pending action (with fatigue detection and cool-down enforcement)
tork_reject_actionHuman rejects a pending action (rejections indicate vigilance, no cool-down penalty)
tork_check_approvalCheck the status of an approval request
tork_velocity_alertCheck for slicing attack patterns - many small requests aggregating to significant impact

Usage

With Claude Desktop

Add to your Claude Desktop configuration (~/Library/Application Support/Claude/claude_desktop_config.json):

{
  "mcpServers": {
    "tork": {
      "command": "npx",
      "args": ["@torknetwork/mcp-server"]
    }
  }
}

Programmatic Usage

import { spawn } from 'child_process';

const server = spawn('npx', ['@torknetwork/mcp-server'], {
  stdio: ['pipe', 'pipe', 'inherit']
});

// Send MCP requests via stdin, receive responses via stdout

Example: Register a Tool with Governance

{
  "tool": "tork_register_tool",
  "arguments": {
    "tool_name": "database_write",
    "allowed_agents": ["agent-prod-1", "agent-prod-2"],
    "allowed_targets": ["staging", "dev"],
    "blocked_flags": ["--drop-table", "--truncate"],
    "max_calls_per_minute": 10,
    "requires_hitl": true
  }
}

Example: Validate Before Execution

{
  "tool": "tork_validate_tool_call",
  "arguments": {
    "agent_id": "agent-prod-1",
    "tool_name": "database_write",
    "target_environment": "staging",
    "parameters": {
      "query": "INSERT INTO users (name) VALUES ('test')"
    }
  }
}

Security Features

  • PII Detection: Automatically scans for and redacts sensitive data
  • Blocked Flags: Prevents dangerous flags like --force, --no-confirm, --delete-all
  • Rate Limiting: Configurable per-tool rate limits
  • Agent Authorization: Control which agents can call which tools
  • Target Restrictions: Prevent production access from unauthorized contexts
  • HITL Enforcement: Require human approval for sensitive operations
  • Fatigue Detection: Lock reviewers who approve too many requests too quickly
  • Slicing Attack Detection: Detect patterns of many small requests aggregating to significant impact

Configuration

HITL enforcement uses these defaults (configurable in code):

const HITL_CONFIG = {
  max_approvals_per_minute: 5,      // Triggers cool-down after this many approvals
  cool_down_minutes: 15,            // Duration of reviewer lock-out
  velocity_window_minutes: 10,      // Window for detecting slicing attacks
  velocity_threshold_count: 10,     // Max requests before velocity alert
  velocity_threshold_amount: 10000, // Max cumulative amount before velocity alert
  approval_expiry_minutes: 30,      // Approvals expire if not reviewed
};

License

MIT - see LICENSE

Keywords

mcp

FAQs

Package last updated on 14 Jan 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts