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.2.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.2.0-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for openai_agents_trust_gate-0.2.0.tar.gz
Algorithm Hash digest
SHA256 e1fd4d9748ba0ebf87dccee87e6e9da81fcf66b8f87c688a4426fdd9790e8ed2
MD5 0a7e37e5c827f514d36c3b6f77eb4159
BLAKE2b-256 f4caa48ed971e90bf9094b607f79266b7fd4d1787b537c4cff53f75ba9bee28f

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for openai_agents_trust_gate-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2bd4bc5b17bcf75178ec6decb859f69b3f52a26a7a8585185eacb0d6befc2a1f
MD5 890f7d0d8033056116d5434c9c8aeceb
BLAKE2b-256 1ac3cc9f98f0bdbbb3373a7f3886eb6d890f3543497d012925174c16a871ad0a

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