Metadata-Version: 2.4
Name: openai-agents-trust-gate
Version: 0.3.0
Summary: Trust-gated MCP server wrapper for OpenAI Agents SDK via Dominion Observatory
Author-email: Dinesh Kumar <vdineshk@users.noreply.github.com>
License: MIT
Project-URL: Homepage, https://github.com/vdineshk/daee-engine
Project-URL: Repository, https://github.com/vdineshk/daee-engine/tree/main/packages/openai-agents-trust-gate
Keywords: openai,agents,mcp,trust,security,dominion-observatory
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Security
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: openai-agents>=0.1.0
Requires-Dist: httpx>=0.24.0
Dynamic: license-file

# openai-agents-trust-gate

[![PyPI](https://img.shields.io/pypi/v/openai-agents-trust-gate)](https://pypi.org/project/openai-agents-trust-gate/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

Trust-gated MCP server wrapper for OpenAI Agents SDK. Wraps any MCPServer to check behavioral trust scores via [Dominion Observatory](https://github.com/vdineshk/daee-engine) before every tool call.

## Install

```bash
pip install openai-agents-trust-gate
```

## Quick Start

```python
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

```python
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
