OpenAI builds and deploys advanced AI models like GPT-4o for autonomous agents and workflows.
Context Fence
About Context Fence
Context Fence acts as a local proxy between AI coding agents and their MCP tools, enforcing policy checks before any action occurs. It runs entirely on the user’s machine with no cloud routing, ensuring no data leaves the system. Every MCP request is validated against a local YAML policy file using a schema check that completes in under 10 milliseconds. The tool supports secret stripping to redact sensitive values like API keys or environment variables from agent reads, and includes prompt-injection detection to flag malicious instructions in tool output. All decisions are logged locally in a SQLite database for post-incident review. The proxy operates without requiring an account or cloud dependency, uninstalling cleanly without leaving residual services. A future hosted control plane is planned for policy synchronization and audit aggregation across multiple enforcement nodes.
Key features
- YAML-based policy engine for allow/deny rules
- Secret stripping for API keys, env vars, and JWTs
- Prompt-injection detection in tool output
- Local SQLite audit logging with rule references
- Per-client or per-session policy enforcement
- Default-deny policy for risky operations
- CSV export and Slack alerting in free tier
- Public template registry for common policies
Use cases
- Preventing accidental exposure of production secrets by AI agents
- Enforcing per-repository policies on shared development machines
- Securing MCP endpoints exposed to internal tools
Pros
- Local execution with zero cloud routing
- Sub-10ms schema-based policy checks
- Secret stripping for sensitive data redaction
- Prompt-injection detection in tool output
- Local SQLite audit logging for incident review
Cons
- Limited to 3 enforcement nodes in free tier
- 7-day audit retention in free tier
- No live customers or public case studies
- Planned hosted console not yet available
Frequently asked questions about Context Fence
What does Context Fence do?
Context Fence acts as a local proxy between AI coding agents and their MCP tools, enforcing policy checks before any action occurs. It runs entirely on the user’s machine with no cloud routing, ensuring no data leaves the system.
Who is Context Fence designed for?
It is designed for developers and teams using AI coding agents with MCP tools, particularly those handling sensitive data like API keys or environment variables. It is useful for solo developers, agencies, and teams managing multiple repositories or MCP endpoints.
How does Context Fence enforce policies?
It validates every MCP request against a local YAML policy file using a schema check that completes in under 10 milliseconds. Policies are defined in YAML and include allow- and deny-lists, secret stripping, and prompt-injection detection.
Does Context Fence require an internet connection to work?
No, Context Fence runs entirely offline on the user’s machine and does not require an internet connection. All policy checks and logging occur locally without routing data through external servers.
Can Context Fence redact sensitive data like API keys?
Yes, Context Fence includes secret stripping to redact sensitive values such as API keys, environment variables, or JWTs from agent reads before they reach the model. It identifies and removes these values based on pattern matching.
How do I get started with Context Fence?
Download and install Context Fence on your local machine. Configure the YAML policy file to define rules for allow- and deny-lists, secret stripping, and other checks. The proxy will then enforce these policies for all MCP requests made by your AI coding agents.