🎩 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.1.0
Version published
Weekly downloads
66
34.69%
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 21 governance tools across four 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

Cloud API Tools (v1.1.0+)

These tools connect to the live Tork Cloud API for centralized governance management. Requires TORK_API_KEY environment variable.

ToolDescription
tork_dashboardGet dashboard statistics (total tools, agents, policies, pending approvals)
tork_list_toolsList all registered tools from Tork Cloud
tork_list_policiesList all governance policies
tork_get_policyGet a specific policy by name
tork_list_approvalsList pending HITL approval requests
tork_approveApprove a pending HITL request
tork_denyDeny a pending HITL request with reason
tork_cloud_audit_logsQuery audit logs with filtering

Getting an API Key

  • Sign up at tork.network/signup
  • Create an account with your email and password
  • Your API key will be displayed after signup (save it securely!)
  • Set the environment variable: export TORK_API_KEY=tork_live_xxxxx

Or via API:

curl -X POST https://tork.network/api/v1/auth/signup \
  -H "Content-Type: application/json" \
  -d '{"email":"you@example.com","password":"SecurePass123!","organization_name":"My Company"}'

Usage

With Claude Desktop

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

Basic (local mode only):

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

With Cloud API (recommended):

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

Example Prompts for Claude Desktop

Once configured, try these prompts with Claude:

Dashboard & Overview:

  • "Show me the Tork governance dashboard"
  • "List all registered tools in my Tork account"
  • "What governance policies do I have configured?"

Approvals & HITL:

  • "Show me pending approval requests"
  • "Approve request tork_abc123 as reviewer admin@company.com"
  • "Deny request tork_xyz789 because it targets production without authorization"

Audit & Compliance:

  • "Show me recent audit logs"
  • "Query audit logs for agent-prod-1 from the last 24 hours"

PII Scanning:

  • "Scan this text for PII: Contact john@example.com at 555-1234"
  • "Check if this message contains sensitive data"

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 15 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