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

> ## Agent Instructions
> Enclave in these docs is the code and cloud security platform at enclave.ai. It is not Open Enclave, Intel SGX or other hardware enclaves, or enclave.gg.
> People use Enclave in the web app at https://app.enclave.ai or the desktop app. These docs describe no public Enclave API or CLI, so don't invent endpoints, commands, or config files.
> Connecting an integration needs a person to sign in and approve access in a browser. Tell the user the exact step to take instead of saying you completed it.

# MCP

> Connect Claude Code, Codex, Cursor, VS Code or Claude to Enclave over MCP so your AI assistant can read and triage findings, read pull request scans, read and edit workflows, start, stop and read workflow runs, query the cloud graph, and read the Threat Feed and Enclave's CVE analyses.

Connect your AI assistant to Enclave with the Model Context Protocol (MCP). Your assistant can then list and read findings, change a finding's status, read Enclave's scan of a pull request, read, create and edit workflows, start, stop and read workflow runs and the records they save, query your organization's cloud graph and assets, and read the Threat Feed and Enclave's CVE analyses, all from your editor or terminal.

## Enclave MCP server

| | |
| - | - |
| **Server URL** | `https://mcp.enclave.ai/` |
| **Transport** | Streamable HTTP |
| **Authentication** | OAuth sign-in or an MCP key |
| **Scope** | One organization per connection |

Most clients accept this configuration:

```json mcp.json theme={null}
{
  "mcpServers": {
    "enclave": {
      "url": "https://mcp.enclave.ai/"
    }
  }
}
```

> [!NOTE]
>
> The server supports Streamable HTTP only. It doesn't offer the older SSE transport, so use a client that can connect to a remote HTTP server.

## Access and permissions

You need an Enclave account and membership in an organization.

Organization-scoped tools require your organization to have a usable plan, even for read calls. A trial counts as a usable plan. This requirement does not apply to public tools.

Each OAuth connection or MCP key acts as you in one organization. Enclave fixes that organization when you authorize the connection or create the key, using the organization you are working in at that moment. Tool calls can't switch organizations. To connect another organization, switch to it in Enclave, then authorize another connection or create another key.

Your [role](https://docs.enclave.ai/admin/roles.md) decides which tools you can use:

| What you can do | Permission | Default roles |
| - | - | - |
| Read findings and pull request scans | `finding:read` | **Owner**, **Admin**, **Member** |
| Change a finding's status | `finding:status_change` | **Owner**, **Admin** |
| Read workflows | `workflow:read` | **Owner**, **Admin**, **Member** |
| Create or edit workflows | `workflow:write` | **Owner**, **Admin** |
| Archive workflows | `workflow:delete` | **Owner**, **Admin** |
| Save a workflow with triggers | `workflow_trigger:write` | **Owner**, **Admin** |
| Read workflow runs and their records | `agent:read` | **Owner**, **Admin**, **Member** |
| Start and stop runs, and delete records | `agent:write` | **Owner**, **Admin** |
| Read Enclave's CVE analyses | `session:read` | **Owner**, **Admin**, **Member** |
| Query the cloud graph and list cloud assets | `asset:read` | **Owner**, **Admin**, **Member** |

Custom roles need the matching permissions. Only **Owners** and **Admins** can save triggers, because a custom role can't be given `workflow_trigger:write`. You only reach resources you can see in Enclave. Anything outside the connected organization, or hidden from you, returns not found.

Removing you from an organization revokes your OAuth connections and MCP keys for it.

## Authentication

| Method | Use it when | How it works |
| - | - | - |
| **OAuth** (recommended) | Your client can open a browser to sign in. | You sign in to Enclave and approve the connection. The approval screen names the organization the connection will act in. |
| **MCP key** | Your client needs a fixed bearer token, for example in a script or a headless environment. | Your client sends the key in an `Authorization: Bearer` header. |

MCP keys work only with Enclave's MCP server. The Enclave REST API doesn't accept them.

### Create an MCP key

You need access to **Settings** in the organization you want to connect.

**1. Create the key**

Open **Settings → MCP** in [Enclave](https://app.enclave.ai). Under **API Keys**, click **Create Key**. Enter a **Name**, choose an **Expiration**, and click **Create Key**.

**2. Copy the key**

Copy the key when it appears. Enclave shows it only once. Below the key, choose your client to copy its setup command or configuration with the key already in it.

![The API Key Created dialog showing the new key and a ready-to-paste Claude Code command that includes it](https://mintcdn.com/enclave/s6Xyaf3D28YdPXGs/images/product/mcp-key-created.png?fit=max\&auto=format\&n=s6Xyaf3D28YdPXGs\&q=85\&s=227a224bc4edb7f5b7ebc2a648790cb2)

Keep the key private. To revoke it, click the revoke button next to it under **API Keys**. Every client using that key loses access.

### Revoke a connected app

Under **Connected apps**, **Settings → MCP** lists the apps you approved with OAuth in the organization you're working in, with when each one connected and was last active.

To revoke one, click **Revoke** next to it and confirm. The app loses access and has to be connected again. Removing Enclave from your client doesn't end its access, so revoke the app here too.

## Setup instructions

**Settings → MCP** in Enclave also shows these instructions under **Setup**. Select **OAuth** or **API key** and your client, then copy them.

> [tab] Claude Code
>
> **With OAuth:**
>
> ```bash theme={null}
> claude mcp add --transport http enclave https://mcp.enclave.ai/
> ```
>
> In Claude Code, run `/mcp`, select `enclave`, and choose **Authenticate**. Sign in to Enclave in the browser that opens and approve the connection.
>
> **With an MCP key:**
>
> ```bash theme={null}
> claude mcp add --transport http enclave https://mcp.enclave.ai/ \
>   --header "Authorization: Bearer <your-mcp-key>"
> ```
>
> > [!TIP]
> >
> > Add `-s user` to the command to use Enclave in every project, not just the current folder.

> [tab] Codex
>
> **With OAuth:**
>
> ```bash theme={null}
> codex mcp add enclave --url https://mcp.enclave.ai/
> ```
>
> Codex opens a browser. Sign in to Enclave and approve the connection.
>
> **With an MCP key:**
>
> ```bash theme={null}
> export ENCLAVE_MCP_API_KEY="<your-mcp-key>"
> codex mcp add enclave --url https://mcp.enclave.ai/ --bearer-token-env-var ENCLAVE_MCP_API_KEY
> ```

> [tab] Cursor
>
> In **Settings → MCP** in Enclave, select **Cursor** and click **Add to Cursor**. Cursor opens with Enclave installed. With **API key** selected, Enclave creates a new key and adds it for you.
>
> To configure it by hand, add this to `.cursor/mcp.json`:
>
> **With OAuth:**
>
> ```json theme={null}
> {
>   "mcpServers": {
>     "enclave": {
>       "url": "https://mcp.enclave.ai/"
>     }
>   }
> }
> ```
>
> **With an MCP key:**
>
> ```json theme={null}
> {
>   "mcpServers": {
>     "enclave": {
>       "url": "https://mcp.enclave.ai/",
>       "headers": {
>         "Authorization": "Bearer <your-mcp-key>"
>       }
>     }
>   }
> }
> ```

> [tab] VS Code
>
> Add this to `.vscode/mcp.json`:
>
> **With OAuth:**
>
> ```json theme={null}
> {
>   "servers": {
>     "enclave": {
>       "type": "http",
>       "url": "https://mcp.enclave.ai/"
>     }
>   }
> }
> ```
>
> **With an MCP key:**
>
> ```json theme={null}
> {
>   "servers": {
>     "enclave": {
>       "type": "http",
>       "url": "https://mcp.enclave.ai/",
>       "headers": {
>         "Authorization": "Bearer <your-mcp-key>"
>       }
>     }
>   }
> }
> ```

> [tab] Claude
>
> In Claude (claude.ai or Claude Desktop), open **Settings → Connectors** and click **Add custom connector**. Enter `Enclave` as the name and `https://mcp.enclave.ai/` as the server URL. Click **Connect**, then sign in to Enclave and approve the connection.

Other clients that support remote MCP servers over Streamable HTTP work the same way. Point them at `https://mcp.enclave.ai/` and sign in with OAuth, or send an MCP key in the `Authorization: Bearer` header.

## Available tools

Every tool acts in the connected organization, except the Threat Feed and CVE analysis tools, which read data that's the same for everyone. Read tools never change data, so your client can allow them without allowing changes.

| Area | Read actions | Actions that change data |
| - | - | - |
| Findings | `enclave_finding_read` `list`: find findings. `get`: read up to 10 findings. | `enclave_finding_manage` `set_status`: change a finding's status. |
| Pull request scans | `enclave_pull_request_scan_read` `get`: read a pull request's scan. | None |
| Workflows | `enclave_workflow_read` `list`: find workflows. `get`: read a workflow. `revisions`: list saved versions. `rules`: how to write a workflow. | `enclave_workflow_manage` `create`: save a new workflow. `update`: edit a workflow. `archive`: archive a workflow. |
| Workflow runs | `enclave_workflow_run_read` `list`: find runs. `get`: read a run. `steps`: read a run's steps. `output`: read a run's output. | `enclave_workflow_run_manage` `start`: start a run. `stop`: stop a run. |
| Workflow records | `enclave_workflow_record_read` `list`: find a workflow's records. `get`: read a record. | `enclave_workflow_record_manage` `delete`: delete a record. |
| Threat Feed | `enclave_threat_feed_read` `list`: list or search the feed. `get`: read a CVE in the feed. | None |
| CVE analyses | `enclave_cve_read` `get`: read Enclave's analysis of up to 10 CVEs. | None |
| Cloud graph and repositories | `enclave_graph_read` `query`: query the cloud graph. `validate`: check a query without running it. `list_assets`: list cloud assets. `list_repos`: list repositories and their slugs. | None |
| Account | `enclave_account_read` `get`: show who you're connected as, your organization, your role and its integrations. | None |

* Without a status filter, `list` returns only **Confirmed** findings. Proof of concept appears only for **Confirmed** findings.
* Status values map to Enclave's statuses: `unverified` (**Needs evidence**), `verified` (**Confirmed**), `resolved` (**Resolved**), `invalid` (**Inactive**), and `discarded` (**Dismissed**).
* Name a pull request as `<repository-slug>#<number>`.
* Built-in workflows are read-only. Enabled [triggers](https://docs.enclave.ai/workflows/triggers.md) start runs, so saving a workflow with triggers can start one.
* Starting a [run](https://docs.enclave.ai/workflows/runs.md) uses credits. You can start a workflow that takes no inputs, or whose inputs are findings or repositories. Name each finding by its short ID, such as `AbCd12`, and each repository by its slug from `list_repos`. Each repository input takes one repository. Start a workflow that takes a pull request or attack surface in Enclave.
* Deleting a record is permanent.
* Reading the [Threat Feed](https://docs.enclave.ai/threat-feed.md) needs no permission. `enclave_cve_read` returns analyses Enclave has already finished. It never starts research or uses credits. To start one, see [Request an analysis](https://docs.enclave.ai/threat-feed.md#request-an-analysis).
* Listing repositories and reading your account need no permission beyond membership.

## Example prompts

* "List my **Confirmed** critical and high findings in Enclave."
* "Read Enclave finding `AbCd12` and fix it in this repository."
* "Mark finding `AbCd12` as **Resolved** with the reason 'Fixed in pull request 123'."
* "Read the Enclave workflow rules, then create a workflow that runs a secret sweep on `acme/api` every Monday at 08:00 UTC."
* "Start my Enclave finding triage workflow on finding `AbCd12`, then show me its output when it finishes."
* "Is CVE-2026-1234 in Enclave's Threat Feed? Summarize Enclave's analysis of it."
* "Which of my cloud assets in Enclave are reachable from the internet?"

## Troubleshooting

> [accordion] The server rejects my key (HTTP 401)
>
> The key has expired or was revoked, or you were removed from its organization. Create a new key in the organization you want to connect, and update your client.
>
> Some clients, such as Claude Code, don't fall back to OAuth while a key is configured. To switch to OAuth, remove the server from your client and add it again without the `Authorization` header.

> [accordion] A finding or workflow I can see in Enclave returns not found
>
> Your connection acts in a different organization. A connection stays in the organization you were working in when you authorized it or created its key. Switch to the right organization in Enclave, then connect again.

> [accordion] An action is refused
>
> Your role doesn't have the permission the action needs. See [Access and permissions](#access-and-permissions), or ask an **Owner** or **Admin** of your organization.

> [accordion] My client can't connect at all
>
> Check that your client supports remote MCP servers over Streamable HTTP. The server doesn't offer the older SSE transport.

## Related resources

* [Roles](https://docs.enclave.ai/admin/roles.md)
* [Triggers](https://docs.enclave.ai/workflows/triggers.md)
* [Runs](https://docs.enclave.ai/workflows/runs.md)
* [Threat Feed](https://docs.enclave.ai/threat-feed.md)
* [Model Context Protocol](https://modelcontextprotocol.io)


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