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

# Oplane MCP server and Claude Code plugin

> Use Oplane in your IDE via the Model Context Protocol (MCP) server or Claude Code plugin to get threat modeling and security guidance while you code.

Use Oplane directly in your dev environment through the Model Context Protocol (MCP) or the Claude Code plugin. Get security recommendations and threat modeling assistance while you code.

## Getting started

To connect Oplane MCP to your dev environment, visit your Oplane dashboard and follow the setup instructions for your specific environment. The setup process takes just a few minutes.

Once connected, simply prompt your AI assistant with "Use Oplane" to get started. If you choose to create a new threat model, the entire workflow below runs automatically — from identifying use cases and threats to providing implementation advice and assessing your code.

## Supported environments

Oplane works with any environment that supports the Model Context Protocol:

<Tabs>
  <Tab title="Any MCP-compatible tool">
    Add the following to your `mcp.json` configuration file:

    ```json theme={null}
    {
      "mcpServers": {
        "Oplane": {
          "url": "https://gravity.oplane.io/mcp/"
        }
      }
    }
    ```
  </Tab>

  <Tab title="Cursor">
    Connect Oplane MCP directly in Cursor's MCP settings.

    [Add Oplane to Cursor →](https://cursor.com/en-US/install-mcp?name=Oplane\&config=eyJ1cmwiOiJodHRwczovL2dyYXZpdHkub3BsYW5lLmlvL21jcC8ifQ==)
  </Tab>

  <Tab title="Claude Code">
    Install the Oplane plugin (`oplane/oplane-plugin`) or configure as an MCP server manually.
  </Tab>

  <Tab title="GitHub Copilot CLI">
    Install the Oplane plugin from a local clone of `oplane/oplane-plugin`:

    ```bash theme={null}
    copilot plugin install /path/to/oplane-plugin
    ```

    Verify the plugin is loaded with `copilot plugin list` (or `/plugin list` in an interactive session). Re-run `copilot plugin install` after pulling plugin updates.

    The plugin exposes the `analyze` and `analyze-pr` skills plus the `security-analyzer` subagent, which Copilot CLI can invoke automatically when security analysis is needed. See GitHub's [plugins guide](https://docs.github.com/en/copilot/how-tos/copilot-cli/customize-copilot/plugins-creating) for details on how Copilot CLI loads plugins.
  </Tab>
</Tabs>

## Recommended Setup: CLAUDE.md / AGENTS.md

For the highest-value use of Oplane, your agent should threat-model security-relevant changes *before* they are committed or pushed — not after a PR comment flags them. To make this a standing habit rather than a reaction, paste the block below into your project's `CLAUDE.md` or `AGENTS.md` (whichever file your agent reads on startup).

Once it's there, your agent will see this instruction on every session and will reach for Oplane MCP automatically whenever it's about to commit a change that touches authentication, access control, data handling, untrusted input, new endpoints, secrets, or infrastructure.

```text CLAUDE.md / AGENTS.md theme={null}
For changes that could affect security, you MUST threat-model the change using Oplane MCP
before committing. Threat-model the actual diff (e.g. the PR threat model), not a written
summary of it - a model built from your own description only re-tests risks you already
considered. Explicitly consider untrusted-input-inbound (log/audit/template/SQL injection
from external data), not only outward data leakage.
```

Why each line matters:

* **Threat-model before committing** — catches risks while the change is still cheap to fix, instead of after review.
* **Model the actual diff, not a summary** — a model built from the agent's own description only re-tests risks the agent already thought of. Feeding the real diff (or the PR threat model) surfaces blind spots.
* **Untrusted-input-inbound** — explicitly nudges the agent to consider injection-style risks (log, audit, template, SQL) from external data, not only outward data leakage.

This is the same standing instruction Oplane MCP sends to Claude Code, Cursor, and GitHub Copilot on connect, and the same block embedded in Oplane's PR review comments — pasting it into `CLAUDE.md` / `AGENTS.md` gives you the same behavior across every session, including ones that don't start from a PR.

## What You Can Do

Once connected, just tell your AI assistant what you want to do. Here are the workflows available:

| Workflow                                                         | Example prompt                                       |
| ---------------------------------------------------------------- | ---------------------------------------------------- |
| Guided walkthrough of threat modeling tools and workflows        | `Get started with Oplane`                            |
| Analyse your codebase and suggest what to threat model           | `Suggest what to threat model with Oplane`           |
| Run a full automated threat modeling workflow end-to-end         | `Threat model my authentication changes with Oplane` |
| Threat model a pull request by analysing the diff                | `Threat model this PR with Oplane`                   |
| Get guidance for writing threat model descriptions               | `Help me describe my changes for Oplane`             |
| Security review of your AI coding agent's permissions and access | `Review my agent setup with Oplane`                  |
| Analyse recent commits for security-relevant updates             | `Analyse my recent changes with Oplane`              |
| Analyse changes since a specific commit or tag                   | `Analyse changes since last release with Oplane`     |

## Tool reference

These are the MCP tools available to your AI assistant. You don't need to call them directly — they run automatically as part of the workflows above.

| Tool                            | Description                                                                                                              |
| ------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
| `new_threatmodel`               | Create a new threat model with security requirements for your described changes.                                         |
| `my_recent_threatmodels`        | List your recent threat models to review or continue working on them.                                                    |
| `get_threatmodel`               | Fetch the full content of a threat model by ID.                                                                          |
| `get_requirement`               | Fetch the full details of a single security requirement by ID.                                                           |
| `request_implementation_advice` | Get specific implementation guidance for a security requirement.                                                         |
| `update_implementation_state`   | Record your assessment of a requirement as implemented, not implemented, accepted risk, out of scope, or not applicable. |
| `update_requirement_severity`   | Adjust the severity of a security requirement with justification.                                                        |
| `add_threatmodel_comment`       | Add context to a threat model to refine or regenerate its requirements.                                                  |
| `search_workspaces`             | Search your workspaces by name to find where to create or view threat models.                                            |
| `create_workspace`              | Create a new workspace in your organisation for organising threat models.                                                |
| `create_security_rule`          | Create a keyword-matched security rule for your organisation.                                                            |
| `list_security_rules`           | List security rules for your organisation.                                                                               |
| `get_security_rule`             | Fetch a specific security rule by ID.                                                                                    |
| `update_security_rule`          | Update an existing security rule.                                                                                        |
| `delete_security_rule`          | Delete a security rule.                                                                                                  |

<Tip>
  You can start by asking "Use Oplane to suggest threat modeling scopes" if you're not sure where to begin.
</Tip>

## Choosing a workspace

By default, threat models you create via MCP go to your personal workspace. To target a specific workspace, just mention it by name in your prompt:

* "Use Oplane to threat model my auth changes in the **workspace name** workspace"

The agent will search your workspaces by name, find the match, and create the threat model there. You never need to look up workspace IDs manually.

<Tip>
  If you're not sure which workspaces you have, ask "Search my Oplane workspaces" to see a list.
</Tip>

You can find your workspaces in the Oplane dashboard. Your personal workspace is marked with a **Yours** badge.

<Frame>
  <img src="https://mintcdn.com/oplane-6a173d70/jwR0xubu7PkQElvJ/images/mcp/workspaces-overview.webp?fit=max&auto=format&n=jwR0xubu7PkQElvJ&q=85&s=2be0617e9fad1bf2552c7d28ae62b49e" alt="Oplane workspaces overview" width="3246" height="1866" data-path="images/mcp/workspaces-overview.webp" />
</Frame>

<Frame caption="Your personal workspace is marked with a Yours badge">
  <img src="https://mintcdn.com/oplane-6a173d70/jwR0xubu7PkQElvJ/images/mcp/workspaces-personal-zoom.webp?fit=max&auto=format&n=jwR0xubu7PkQElvJ&q=85&s=e379b09e41237c8d97d9c4d1dba4c40e" alt="Personal workspace with Yours badge" width="1157" height="536" data-path="images/mcp/workspaces-personal-zoom.webp" />
</Frame>

<Card title="Learn about workspaces" icon="folder" href="/docs/workspaces">
  Understand workspace types and how to create them.
</Card>
