> ## Documentation Index
> Fetch the complete documentation index at: https://docs.formal.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# What is Formal?

> Formal is a network security and privileged access platform that enforces least privilege for people and AI agents

## Introduction

Formal is a modern network security and privileged access management platform built from the ground up to enforce least privilege for both humans and AI agents.

The core of Formal is two proxies. The first is the [Connector](https://docs.formal.ai/docs/glossary/index.md#connector), a protocol-aware reverse proxy that you deploy within your own network. You can think of it as a super powerful bastion host. With the Connector, security teams can control access to [resources](https://docs.formal.ai/docs/glossary/index.md#resource).

The second is the [Endpoint](https://docs.formal.ai/docs/guides/client-apps/desktop-app.md), a protocol-aware egress proxy that runs on the host (macOS, Linux, and Windows). It transparently intercepts TCP and UDP flows and terminates TLS. This gives security teams visibility and control over the traffic of their AI agents.

Using the [Control Plane](https://docs.formal.ai/docs/glossary/index.md#control-plane), you gain visibility into the requests, responses, and [sessions](https://docs.formal.ai/docs/glossary/index.md#session) going through the Connector and the Endpoint. You can then write [policies](https://docs.formal.ai/docs/glossary/index.md#policy) that are evaluated against the traffic going through the Connector or the Endpoint to perform actions ([masking](https://docs.formal.ai/docs/glossary/index.md#masking), blocking, filtering) against requests, responses, and sessions.

## Use cases

Each card links to a guide or policy example for that use case.

### Control AI agents

> [card] [Block agent Git pushes](https://docs.formal.ai/docs/guides/example-use-cases/block-agent-git-pushes.md)
>
> Stop coding agents from pushing to sensitive repositories over SSH and HTTPS

> [card] [Prevent cloud agents from auto-merging PRs](https://docs.formal.ai/docs/guides/example-use-cases/formal-endpoint-cloud-agents.md)
>
> Run the Endpoint on Cursor and Devin cloud agents and block GitHub auto-merge

> [card] [Restrict Codex Desktop to LLM and MCP](https://docs.formal.ai/docs/guides/example-use-cases/restrict-codex-desktop-egress.md)
>
> Allow only LLM and approved MCP egress from Codex Desktop and its child processes

> [card] [Install the Endpoint on Grok Bot](https://docs.formal.ai/docs/guides/example-use-cases/formal-endpoint-grok-bot.md)
>
> Cover Grok Bot computers and block Gmail with a network rule and policy

> [card] [Protect Git tokens in command lines](https://docs.formal.ai/docs/guides/example-use-cases/protect-git-tokens-in-command-lines.md)
>
> Block agents from putting Git tokens on a command line, and encrypt them in logs

> [card] [Block malicious package downloads](https://docs.formal.ai/docs/guides/example-use-cases/block-malicious-package-downloads.md)
>
> Block npm, PyPI, and other packages that Socket flags

### Keep credentials out of reach

> [card] [Keep Stripe API keys off laptops](https://docs.formal.ai/docs/guides/example-use-cases/keep-stripe-api-keys-off-laptops.md)
>
> Store the key on the Connector and inject it into Stripe API calls

> [card] [Keep API keys out of cloud agent sandboxes](https://docs.formal.ai/docs/guides/example-use-cases/cloud-agent-credential-forwarding.md)
>
> Forward Cursor and Devin API calls to a Connector that injects the credential

> [card] [Keep API keys out of Daytona sandboxes](https://docs.formal.ai/docs/guides/example-use-cases/sandbox-credential-injection/daytona.md)
>
> Inject API keys from a Connector, outside the agent's sandbox

> [card] [Keep API keys out of E2B sandboxes](https://docs.formal.ai/docs/guides/example-use-cases/sandbox-credential-injection/e2b.md)
>
> Run the Endpoint in an E2B sandbox and inject keys from a Connector

> [card] [Keep API keys out of Modal sandboxes](https://docs.formal.ai/docs/guides/example-use-cases/sandbox-credential-injection/modal.md)
>
> Run the Endpoint in a Modal Sidecar with Modal OIDC

### Seal tokens and restrict sign-ins

> [card] [Encrypt MCP OAuth tokens](https://docs.formal.ai/docs/guides/example-use-cases/encrypt-mcp-oauth-tokens.md)
>
> Encrypt Notion MCP OAuth tokens on the Endpoint or Connector

> [card] [Seal Claude Code OAuth tokens](https://docs.formal.ai/docs/guides/example-use-cases/seal-claude-code-oauth-tokens.md)
>
> Let users sign in with their own account while tokens stay encrypted on the device

> [card] [Seal Claude Desktop session cookies](https://docs.formal.ai/docs/guides/example-use-cases/seal-claude-desktop-session-cookies.md)
>
> Replace session cookies with sealed values that don't work directly against Claude

> [card] [Restrict Anthropic sign-ins to one org](https://docs.formal.ai/docs/guides/example-use-cases/restrict-anthropic-sign-ins.md)
>
> Inject tenant restrictions so users can only sign in to your organization

### Give agents database access

> [card] [Give Devin just-in-time database access](https://docs.formal.ai/docs/guides/example-use-cases/devin-database-access-oidc.md)
>
> Let Devin query a database with OIDC after a human approves in Slack

> [card] [Give AgentCore agents database access](https://docs.formal.ai/docs/guides/example-use-cases/agentcore-harness-database-access.md)
>
> Let an Amazon Bedrock AgentCore Harness query a database with its AWS identity

### Control access to infrastructure

> [card] [Block writes to production](https://docs.formal.ai/docs/guides/policies/examples.md#block-writes-to-production)
>
> Let engineers read production databases while blocking changes

> [card] [Block specific MCP tools](https://docs.formal.ai/docs/guides/core-concepts/resources/mcp.md#example-block-a-specific-tool)
>
> Block MCP tool calls by name, such as GitHub `list_pull_requests`

> [card] [Rate limit access](https://docs.formal.ai/docs/guides/policies/examples.md#rate-limiting-access)
>
> Block users who access a resource too often per minute or hour

> [card] [Monitor sessions](https://docs.formal.ai/docs/guides/observability/sessions.md)
>
> Review user connections, queries, and activity in real time

### Govern AI usage

> [card] [Publish approved MCP servers and skills](https://docs.formal.ai/docs/guides/ai-governance/catalog.md)
>
> Keep a Catalog of what your organization approves, and let employees request access

> [card] [Review shadow AI](https://docs.formal.ai/docs/guides/ai-governance/shadow-ai.md)
>
> Find MCP servers and skills used outside your Catalog, then allow or block them

> [card] [Set guardrails for unknown MCPs and skills](https://docs.formal.ai/docs/guides/ai-governance/guardrails.md)
>
> Choose whether unknown MCP servers and skills are monitored or blocked

> [card] [Monitor AI usage](https://docs.formal.ai/docs/guides/ai-governance/usage.md)
>
> Chart which AI clients, models, MCP servers, and skills people use

> [card] [Control LLM spend](https://docs.formal.ai/docs/guides/ai-governance/spend.md)
>
> Price LLM tokens and cap what each user spends

> [card] [Route MCP servers through the MCP Gateway](https://docs.formal.ai/docs/guides/core-concepts/connectors/mcp-gateway.md)
>
> Make every MCP client sign in to remote MCP servers with Formal

### Protect data

> [card] [Mask PII and secrets](https://docs.formal.ai/docs/guides/policies/mask-pii.md)
>
> Mask labeled columns and redact SSNs in LLM requests

> [card] [Discover and classify data](https://docs.formal.ai/docs/guides/core-concepts/data-inventory.md)
>
> Label sensitive data with built-in and custom data labels

> [card] [Explore the Access Graph](https://docs.formal.ai/docs/guides/observability/access-graph.md)
>
> See which people, agents, and machines reach which Resources

> [!TIP]
>
> [Recipes](https://docs.formal.ai/docs/guides/getting-started/recipes.md) set up many of these use cases for you in a few clicks.

## Get started

> [card] [Use our API for full control](https://docs.formal.ai/docs/api/introduction.md)
>
> Automate everything with Terraform, Pulumi, or direct API access

> [card] [Add a Resource](https://docs.formal.ai/docs/guides/core-concepts/resources/introduction.md)
>
> Connect your first database to Formal in less than five minutes


## Related topics

- [Formal Documentation](https://docs.formal.ai/docs/guides/getting-started/index.md)
- [Govern Claude with Formal](https://docs.formal.ai/docs/guides/ai-governance/tools/claude.md)
- [Govern Cursor with Formal](https://docs.formal.ai/docs/guides/ai-governance/tools/cursor.md)
- [Connect Formal MCP](https://docs.formal.ai/docs/api/mcp-server.md)
- [Govern ChatGPT and Codex with Formal](https://docs.formal.ai/docs/guides/ai-governance/tools/chatgpt.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.