Skip to main content

openai-agents-trust-gate

PyPI License: MIT

Trust-gated MCP server wrapper for OpenAI Agents SDK. Wraps any MCPServer to check behavioral trust scores via Dominion Observatory before every tool call.

Install

pip install openai-agents-trust-gate

Quick Start

from agents.mcp import MCPServerStreamableHttp
from openai_agents_trust_gate import TrustGatedMCPServer

raw_server = MCPServerStreamableHttp(url="https://example.com/mcp")
server = TrustGatedMCPServer(raw_server, min_score=70)

agent = Agent(
    name="my-agent",
    mcp_servers=[server],  # Trust-gated automatically
)

How It Works

  1. Wraps any MCPServer, intercepting call_tool() at the MCP layer
  2. Before each tool call, checks the server trust score via Dominion Observatory
  3. Blocks calls to servers below the threshold
  4. Reports outcomes back to the Observatory
  5. Scores are cached (5-minute TTL) for performance

Configuration

TrustGatedMCPServer(
    inner_server,
    min_score=70,           # Minimum trust score (0-100)
    cache_ttl=300.0,        # Cache TTL in seconds
    block_on_error=False,   # Fail-open if Observatory unreachable
    report_outcomes=True,   # Report call outcomes back
)

License

MIT

Metadata

Release files for openai-agents-trust-gate 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for openai-agents-trust-gate 0.3.0
File Size Uploaded
openai_agents_trust_gate-0.3.0.tar.gz 5.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for openai-agents-trust-gate 0.3.0
File Interpreter ABI Platform
openai_agents_trust_gate-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 11.0 kB

Release files / openai_agents_trust_gate-0.3.0.tar.gz

Download URL openai_agents_trust_gate-0.3.0.tar.gz
Size 5.0 kB
Tags Source
SHA-256 checksum
How to use checksums
95a98c09b68a602d7d56fa1a213ceeb000fd4e2e7702a5667b61557099677fb9
BLAKE2b-256 checksum
How to use checksums
c8883f58d60660df6700ece70189c34ef0e85d54b0ff1f369aaaec2d827c66d5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.2

Release files / openai_agents_trust_gate-0.3.0-py3-none-any.whl

Download URL openai_agents_trust_gate-0.3.0-py3-none-any.whl
Size 6.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
72b3835ef4d4c9607787767829b0c9ab88fff642e7bd06ca804938f99f75adfa
BLAKE2b-256 checksum
How to use checksums
9dac23d55eee3f25a2aeeb57e62d657f129a19117266d947b3c11fc356f0a14a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.2

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page