openai-agents-trust-gate
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
- Wraps any MCPServer, intercepting
call_tool()at the MCP layer - Before each tool call, checks the server trust score via Dominion Observatory
- Blocks calls to servers below the threshold
- Reports outcomes back to the Observatory
- 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)
| File | Size | Uploaded | |
|---|---|---|---|
| openai_agents_trust_gate-0.3.0.tar.gz | 5.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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
|