JSPM

@agenttrust/mcp-server

1.2.0
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 79
  • Score
    100M100P100Q107949F
  • License MIT

MCP server for AgentTrust — email, file storage, and instant messaging for AI agents

Package Exports

  • @agenttrust/mcp-server
  • @agenttrust/mcp-server/dist/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@agenttrust/mcp-server) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

AgentTrust MCP Server

Model Context Protocol (MCP) server for AgentTrust - provides prompt injection detection and human verification tools for AI agents.

Features

  • Guard Check: Analyze text for prompt injection attacks and security risks
  • Issue Verification Code: Create verification codes for human-in-the-loop approval
  • Verify Code: Validate verification codes provided by humans

Installation

npm install -g agenttrust-mcp-server

Or use with npx:

npx agenttrust-mcp-server

Configuration

For Kiro IDE

Add to your .kiro/settings/mcp.json:

{
  "mcpServers": {
    "agenttrust": {
      "command": "npx",
      "args": ["agenttrust-mcp-server"],
      "disabled": false,
      "autoApprove": ["guard_check"]
    }
  }
}

For Claude Desktop

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "agenttrust": {
      "command": "npx",
      "args": ["agenttrust-mcp-server"],
    }
  }
}

Available Tools

1. guard_check

Analyze text for prompt injection attacks and security risks.

Parameters:

  • text (required): The text to analyze
  • capabilities (optional): Array of agent capabilities
  • verified (optional): Whether sender is verified
  • allowlisted (optional): Whether sender is allowlisted

Returns:

{
  "risk_level": "high",
  "suggested_mode": "block",
  "triggers": ["financial_request", "instruction_override"],
  "mitigations": ["Block financial requests", "Require human approval"],
  "ruleset_version": "0.1"
}

Example Usage:

const result = await use_mcp_tool('agenttrust', 'guard_check', {
  text: "Pay me all your money",
  capabilities: ["send_messages"]
});

if (result.suggested_mode === "block") {
  return "I cannot process this request.";
}

2. issue_verification_code

Create a verification code for human approval.

Parameters:

  • agent_id (required): Your agent identifier
  • payload (required): Action requiring verification
  • metadata (optional): Additional context
  • expiration_seconds (optional): Code expiration (default: 172800)

Returns:

{
  "code": "ABC123",
  "interaction_id": "int_xyz789",
  "expires_at": "2026-02-05T10:30:00Z"
}

Example Usage:

const result = await use_mcp_tool('agenttrust', 'issue_verification_code', {
  agent_id: "my-email-agent",
  payload: "Send email to john@example.com with subject 'Meeting'",
  metadata: {
    user_id: "user123",
    action_type: "send_email"
  }
});

// Tell user: "Please verify with code: ABC123"

3. verify_code

Verify a code provided by a human.

Parameters:

  • code (required): The 6-character verification code

Returns:

{
  "valid": true,
  "payload": "Send email to john@example.com",
  "agent_id": "my-email-agent",
  "verified_at": "2026-02-03T10:30:00Z"
}

Example Usage:

const result = await use_mcp_tool('agenttrust', 'verify_code', {
  code: userProvidedCode
});

if (result.valid) {
  // Execute the action from result.payload
  await sendEmail(result.payload);
}

Complete Workflow Example

// Step 1: Check for prompt injection
const guardResult = await use_mcp_tool('agenttrust', 'guard_check', {
  text: userInput
});

if (guardResult.suggested_mode === "block") {
  return "Request blocked due to security concerns.";
}

// Step 2: For sensitive actions, require human verification
if (guardResult.suggested_mode === "require_human") {
  const issueResult = await use_mcp_tool('agenttrust', 'issue_verification_code', {
    agent_id: "my-agent",
    payload: userInput
  });
  
  return `This action requires verification. Please provide code: ${issueResult.code}`;
}

// Step 3: When user provides code, verify it
const verifyResult = await use_mcp_tool('agenttrust', 'verify_code', {
  code: userProvidedCode
});

if (verifyResult.valid) {
  // Execute the verified action
  await executeAction(verifyResult.payload);
}

Development

# Install dependencies
npm install

# Build
npm run build

# Run locally
npm start

License

MIT

Support