The Model Context Protocol (MCP) provides a standard interface for Large Language Models to discover and invoke tools, query external databases, and interact with APIs. However, leaving tool execution decisions to the language model itself creates severe security vulnerabilities: prompt injection, indirect jailbreaks, and confused-deputy attacks can trick an LLM into calling destructive tools without human oversight. TRUSTIVAN places a deterministic, policy-enforcing authorization proxy outside the LLM context window.

Why the Model Is Never the Boundary

When an agent runtime invokes a tool, TRUSTIVAN verifies:
  1. Identity & Lifecycle: Is the calling agent active and free of security quarantine?
  2. Credential Integrity: Is the runtime token valid and bound to this agent?
  3. Explicit Tool Entitlement: Does this specific agent have explicit permission to execute this tool?
  4. Action Classification: Is the tool read-only, mutating (write), or administrative?
  5. Resource Blast Radius: Is the target resource classified as high-impact or critical?
  6. Autonomy & Oversight: Does the agent’s declared autonomy level permit unsupervised execution?
If any check fails, TRUSTIVAN answers with challenge or deny—preventing unauthorized execution regardless of what the prompt instructed.

Connecting an MCP Tool Server

The MCP connector inspects an MCP server using the standard protocol handshake (initialize followed by tools/list). It collects published tools, their descriptions, and publisher hints. Register an MCP server via the API:

Authentication Modes

  • bearer (Recommended): Uses a token registered in your deployment configuration. The connector only requires permissions to list tools—never to execute them.
  • none: Used only for unauthenticated, internal development servers.

Declaring Action Classes & Tool Effects

MCP tools declare annotations such as readOnlyHint. However, because third-party MCP servers cannot be blindly trusted, TRUSTIVAN requires explicit administrator classification: Set or update a tool’s effect:

Granting Tool Entitlements

By default, an agent has zero tool entitlements (tool_not_entitled denies all invocations). An administrator must explicitly map which agent identities may invoke each tool:

Runtime Mediation in Action

When your AI agent runtime receives a tool call from the LLM, call POST /api/v1/mediation:

Handling the Mediation Response

If the decision is allow, the agent runtime proceeds to forward the call to the MCP server. If the decision is challenge: The runtime pauses execution and requests a human approval grant (POST /api/v1/access-grants). Once an Organization Admin approves, the next check allows the operation. If the decision is deny: The runtime immediately stops and reports the refusal to the user without calling the tool.

Reporting Execution Outcomes

To maintain a tamper-evident audit history of real executions, report the outcome once completed:

Best Practices for MCP Security

  1. Never pass unrestricted credentials to MCP servers: Agents should never receive raw API keys or database passwords. Use ephemeral, scoped credentials managed by TRUSTIVAN.
  2. Classify destructive tools as administrative: Any tool capable of deletion, credential issuance, or privilege escalation must require dual-approval access grants.
  3. Log replay-safe request IDs: Always supply requestId to prevent network retry duplication.
  4. Isolate MCP network endpoints: Deploy MCP servers in isolated VPCs or internal subnets accessible only via the TRUSTIVAN mediation proxy.