# Agentfox

> Agentfox is an open-source MCP server for agent sandbox. Open-source control plane that limits and audits what AI agents can do with tools. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, API, Linux, macOS, Windows, Self-hosted
- **Repository:** https://github.com/architsharm/agentfox
- **MCP Registry name:** io.github.architsharm/agentfox
- **Categories:** [agent sandbox](https://ai-powered.com/categories/agent-sandbox)
- **Listing updated:** 2026-11-23

## About

AgentFox sits between an AI agent and the tools it calls. It scans a codebase without running it, maps the agents and the tools each one can reach, and then restricts those calls so an agent only receives the tools and argument values its own code declares. Calls that fall outside that scope are refused or held for a person to approve.

Checks run on model and tool calls at runtime, covering prompt injection, instructions hidden in documents or tool results, and personal data or secrets appearing in replies. Every decision is written to a tamper-evident audit trail that can be verified independently. The project begins in watch mode, recording what it would have stopped, and blocking is switched on one library at a time.

It suits developers who run agents built with frameworks such as LangGraph, CrewAI or the OpenAI Agents SDK and want to test them with simulated tools and review what got through. The core is Apache-2.0 licensed and installs from PyPI; some detectors require an optional extra and model weights.

## Features

- **Repository agent discovery:** Reads project code without running it to list agents, their tools and the MCP servers they load.
- **Tool call scoping:** Limits each agent to the tools its code declares, with caps on the values it may pass.
- **Runtime injection checks:** Screens model and tool calls for prompt injection, hidden instructions and leaked personal data or secrets.
- **Simulated attack testing:** Runs attacks against an agent with its tools faked and reports which ones got through.
- **Tamper-evident audit trail:** Records every enforcement decision in a log that can be checked without trusting the vendor.
- **Watch mode rollout:** Logs what would be blocked before enforcement is turned on for each library.

## Good for

- Finding every agent and tool exposed in a codebase before a security review
- Refusing payment or transfer tool calls whose recipient came from untrusted content
- Attack-testing a LangGraph or CrewAI agent with simulated tools before release
- Adding a tool-call guard to pull requests with the GitHub Action
- Exposing read-only governance queries to an MCP-capable AI client

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
claude mcp add agentfox -- uvx agentfox
```

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

### Claude Code: Or share it with your project (.mcp.json)

```json
{
  "mcpServers": {
    "agentfox": {
      "command": "uvx",
      "args": [
        "agentfox"
      ]
    }
  }
}
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "agentfox": {
      "command": "uvx",
      "args": [
        "agentfox"
      ]
    }
  }
}
```

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "agentfox": {
      "command": "uvx",
      "args": [
        "agentfox"
      ]
    }
  }
}
```

Use .cursor/mcp.json in a project to share it with the project.

### VS Code (~/.copilot/mcp-config.json)

```json
{
  "mcpServers": {
    "agentfox": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "agentfox"
      ]
    }
  }
}
```

Or put the same entry in .mcp.json at your workspace root to share it.

### Codex: Add with the CLI (Terminal)

```sh
codex mcp add agentfox -- uvx agentfox
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```toml
[mcp_servers.agentfox]
command = "uvx"
args = ["agentfox"]
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

```json
{
  "mcpServers": {
    "agentfox": {
      "command": "uvx",
      "args": [
        "agentfox"
      ]
    }
  }
}
```

Or run: gemini mcp add -s user agentfox uvx -- agentfox

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

```json
{
  "mcpServers": {
    "agentfox": {
      "command": "uvx",
      "args": [
        "agentfox"
      ]
    }
  }
}
```

Use .agents/mcp_config.json to add it to one workspace only.

### Devin Desktop (~/.config/devin/mcp_config.json)

```json
{
  "mcpServers": {
    "agentfox": {
      "command": "uvx",
      "args": [
        "agentfox"
      ]
    }
  }
}
```

On Windows the file is %APPDATA%\\devin\\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

### Cline (cline_mcp_settings.json)

```json
{
  "mcpServers": {
    "agentfox": {
      "command": "uvx",
      "args": [
        "agentfox"
      ]
    }
  }
}
```

Open it from the MCP Servers icon → Configure → Configure MCP Servers.

### Zed (Zed settings.json)

```json
{
  "context_servers": {
    "agentfox": {
      "command": "uvx",
      "args": [
        "agentfox"
      ]
    }
  }
}
```

Open it with zed: open settings file. Merge context_servers into the settings you already have.

### JetBrains AI Assistant and Junie: AI Assistant (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

```json
{
  "mcpServers": {
    "agentfox": {
      "command": "uvx",
      "args": [
        "agentfox"
      ]
    }
  }
}
```

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

```json
{
  "mcpServers": {
    "agentfox": {
      "command": "uvx",
      "args": [
        "agentfox"
      ]
    }
  }
}
```

Use .junie/mcp/mcp.json to share it with a project.

### Kiro (~/.kiro/settings/mcp.json)

```json
{
  "mcpServers": {
    "agentfox": {
      "command": "uvx",
      "args": [
        "agentfox"
      ]
    }
  }
}
```

Use .kiro/settings/mcp.json to add it to one workspace only.

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "agentfox": {
      "command": "uvx",
      "args": [
        "agentfox"
      ]
    }
  }
}
```

## FAQ

### Is AgentFox free to use?

The open core is licensed under Apache-2.0 with no licence key and no agent limit. A separate Enterprise edition is source-available under the Business Source License and is included on AgentFox Cloud.

### How do I install Agentfox?

Install from PyPI with pip install agentfox, then run agentfox scan in your repository. Python 3.11 or newer is required.

### Does Agentfox block calls by default?

No. It starts in watch mode, recording what it would have stopped, and blocking must be enabled per library with agentfox policy enforce.

### Which frameworks does Agentfox work with?

The README lists the OpenAI Agents SDK, LangGraph, LangChain, CrewAI, AutoGen, OpenAI, Anthropic, LiteLLM, MCP servers, Claude Code and Codex.

### How do I add Agentfox to Claude Code?

Run this command in your terminal: claude mcp add agentfox -- uvx agentfox

### What are the best alternatives to Agentfox?

The closest alternatives to Agentfox are Agent Runtime Guard and Aegis — AI Agent Governance.

## Where this comes from

- Description: written from the project's README and its MCP Registry entry.
- Install steps: from the official MCP Registry entry.

## Alternatives

- [Agent Runtime Guard](https://ai-powered.com/mcp/agent-runtime-guard): Agent Runtime Guard is an open-source MCP server for security.
- [Aegis — AI Agent Governance](https://ai-powered.com/mcp/aegis-ai-agent-governance): Aegis — AI Agent Governance is an open-source MCP server for agent sandbox.

---
Source: https://ai-powered.com/mcp/agentfox
