Skip to main content

Trust-gated MCP server wrapper for OpenAI Agents SDK via Dominion Observatory

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

openai_agents_trust_gate-0.3.0.tar.gz (5.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

openai_agents_trust_gate-0.3.0-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file openai_agents_trust_gate-0.3.0.tar.gz.

File metadata

File hashes

Hashes for openai_agents_trust_gate-0.3.0.tar.gz
Algorithm Hash digest
SHA256 95a98c09b68a602d7d56fa1a213ceeb000fd4e2e7702a5667b61557099677fb9
MD5 a5e986ec0ed1fd6b426861643ebad9f9
BLAKE2b-256 c8883f58d60660df6700ece70189c34ef0e85d54b0ff1f369aaaec2d827c66d5

See more details on using hashes here.

File details

Details for the file openai_agents_trust_gate-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for openai_agents_trust_gate-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 72b3835ef4d4c9607787767829b0c9ab88fff642e7bd06ca804938f99f75adfa
MD5 22d50b342cbbf1503fc7b46a5b3bef92
BLAKE2b-256 9dac23d55eee3f25a2aeeb57e62d657f129a19117266d947b3c11fc356f0a14a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page