Nuevo: Aprobación de agentes, red teaming y análisis de modelos. Ver cómo
MITRITY
Docs / Primeros pasos / Quickstart

Quickstart

Get your first AI agent governed by MITRITY in under five minutes. By the end of this guide, you will have a Mitrity Gateway deployed alongside your agent, connected to the MITRITY control plane, and streaming governance events in real-time.

Prerequisites

Before you begin, make sure you have:

  • A MITRITY account -- sign up here if you have not already
  • At least one AI agent running in your environment (any framework: LangChain, CrewAI, AutoGen, MCP, or custom)
  • A 64-bit Linux host (amd64 or arm64) where the agent runs -- the gateway binary and image are Linux-only. On macOS or Windows, use Mitrity MCP Sidecar instead
  • oras and cosign to pull and verify the binary, or Docker if you prefer the container image
  • Your Agent Key — generated when you register an agent in the MITRITY dashboard

Step 1: Create your workspace

Log in to the MITRITY dashboard and navigate to Agents > Register Agent. Register your first agent:

  • Name: sales-bot
  • Mission scope: "Read CRM contacts, send follow-up emails, update deal stages"

MITRITY will generate an Agent ID and a one-time Agent Key (ak_...). Save the Agent Key — it cannot be retrieved later.

Step 2: Install Mitrity Gateway

Create a config file (mitrity-gateway.yaml) that defines your upstream MCP servers:

agent_id: "your-agent-id"
api_key: "ak_your-agent-key"
control_plane:
  base_url: "https://api.mitrity.com"

upstreams:
  - name: "filesystem"
    command: "/usr/local/bin/mcp-filesystem"
    args: ["--root", "/data"]

Mitrity Gateway is an MCP server that speaks stdio. Your agent's MCP client launches it as a child process and talks to it over stdin/stdout — it is not a network service you start once and dial. So install it where the agent runs.

Standalone binary

Binaries are published to GitHub Packages as signed OCI artifacts. Pull, verify, install:

VERSION=v0.20.0   # raw-binary artifacts ship from v0.20.0; earlier releases are images only

oras pull --platform linux/amd64 \
  ghcr.io/mitrity-io/binaries/mitrity-mcp-gateway:$VERSION

cosign verify \
  --certificate-identity-regexp '^https://github.com/mitrity-io/iag-sentinel/' \
  --certificate-oidc-issuer https://token.actions.githubusercontent.com \
  ghcr.io/mitrity-io/binaries/mitrity-mcp-gateway:$VERSION

sha256sum --ignore-missing -c checksums.txt
chmod +x mitrity-mcp-gateway-linux-amd64
sudo mv mitrity-mcp-gateway-linux-amd64 /usr/local/bin/mitrity-mcp-gateway

On macOS, where sha256sum is not installed by default, use shasum -a 256 --ignore-missing -c checksums.txt. --ignore-missing matters on either platform: checksums.txt covers every platform of the release, and you downloaded one binary.

Container image

If your agent runs in a container, put the gateway in the same container or pod so the agent's MCP client can spawn it:

ghcr.io/mitrity-io/mitrity-mcp-gateway:v0.19.0

For container layouts, the sidecar, and why a detached gateway service is not a supported topology, see the deployment guide.

Step 3: Point your agent at the gateway

Configure your MCP client to launch Mitrity Gateway as its MCP server:

{
  "mcpServers": {
    "mitrity-gateway": {
      "command": "/usr/local/bin/mitrity-mcp-gateway",
      "args": ["--config", "mitrity-gateway.yaml"]
    }
  }
}

There are now two paths out of your agent, and only one of them is governed:

  • Tools the gateway serves are governed. Every tools/call is evaluated — policy, DLP, injection, threat-intel — before it reaches the upstream. No proxy environment variables or certificate configuration needed.
  • Tools your agent framework has built in are not. A framework's own shell, code interpreter, or file writer never produces an MCP call, so no MITRITY binary sees it. Disable them, or treat them as ungoverned:
FrameworkWhat to turn off
Claude Code / Claude Agent SDKpermissions.deny with Bash(...) rules; sandbox.enabled: true with allowUnsandboxedCommands: false; limit allowedMcpServers to the gateway
LangChain / LangGraphOmit ShellTool, PythonREPLTool and FileManagementToolkit from the agent's tool list
OpenAI Agents SDKOmit LocalShellTool. Hosted tools run in OpenAI's cloud and cannot be governed by any local edge
CrewAILeave allow_code_execution at its default False; omit CodeInterpreterTool

Read Governance Coverage for the full statement of what is and is not governed, the complete per-framework table, and the checklist for making the gateway the only execution path.

Alternative: Mitrity MCP Sidecar. For simple, single-server setups, you can use the Mitrity MCP Sidecar instead. The sidecar wraps a single upstream MCP server via stdio, is the lightest possible deployment option, and is the only one of the two that runs on macOS and Windows.

Step 4: See your first governed event

Trigger an action from your agent. Within seconds, you will see events flowing in the Audit Log in the dashboard. Each event shows:

  • The agent that performed the action
  • The action type and parameters
  • The policy decision (allow, deny, alert, or hold)
  • The latency of the governance decision (typically <0.5ms)

You are now governing your first agent. From here, explore: