# Cursor IDE

### What you'll build

Get Opsera Agents running directly in Cursor IDE to automate DevSecOps workflows while you code.

**You'll be able to:**

* Run security scans from the Cursor chat
* Generate CI/CD pipelines without leaving your editor
* Analyze architecture while reviewing code
* Audit compliance in real-time

⏱️ **Time:** 5 minutes

***

### What you need

* **Cursor IDE** - [Download](https://cursor.sh)
* **Terminal** - macOS, Linux, or WSL
* **Node.js 18+** - Check with `node --version`

***

## Setup (choose your method)

### Option 1: Install via Marketplace (Private Marketplace)

Install the **Opsera DevSecOps Agent** in Cursor via **Settings → Marketplace → Add Plugin**, then start using it through chat prompts.

It scans your codebase for security, compliance, SQL, and architecture issues, providing severity breakdowns, file-level findings, and actionable fixes.

[Learn more on the installation procedure here.](/marketplace/marketplace/cursor-plugin.md)

### Option 2: Manual Configuration

#### Step 1: Open MCP config

Locate your Cursor MCP configuration file:

**macOS/Linux:**

bash

```bash
~/.cursor/mcp.json
```

**Windows:**

bash

```bash
%USERPROFILE%\.cursor\mcp.json
```

**Project-specific (optional):**

bash

```bash
.cursor/mcp.json
```

***

#### Step 2: Add Opsera configuration

Open the file and add:

json

```json
{
  "mcpServers": {
    "opsera": {
      "type": "streamable-http",
      "url": "https://agent.opsera.ai/mcp"
    }
  }
}
```

Save the file.

***

#### Step 3: Enable in Cursor

1. Open Cursor **Settings** (⌘/Ctrl + ,)
2. Navigate to **Cursor Settings** → **Tools and MCP**
3. **Enable** the Opsera MCP server
4. **Restart** Cursor

***

### Verify

Open Cursor and check:

1. **Settings** → **Cursor Settings** → **Tools and MCP**
2. Look for **Opsera MCP** with a **green indicator**

If you see green, you're ready! 🎉

<figure><img src="https://2796924801-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F86ukVuM3VfSjENMaWBPn%2Fuploads%2FlFgeBvI2i5ff9sS6R2Mz%2Funknown.png?alt=media&#x26;token=81583d9f-97eb-4afc-a56a-d95a470de123" alt="" width="563"><figcaption></figcaption></figure>

### Try it

Open Cursor's chat (⌘/Ctrl + L) and try:

**Run a security scan:**

```
"Scan this repository for security vulnerabilities and show critical issues"
```

**Analyze architecture:**

```
"Analyze the architecture of this codebase and generate a diagram"
```

**Generate Kubernetes manifests:**

```
"Create Kubernetes deployment manifests for this microservice"
```

### Troubleshooting

**MCP server not showing?**

* Check the config file saved correctly
* Restart Cursor completely
* Verify Node.js: `node --version`

**Green indicator not appearing?**

* Go to Settings → Cursor Settings → Tools and MCP
* Toggle MCP enable/disable
* Restart Cursor

**Agents not responding in chat?**

* Ensure internet connection
* Check MCP server is enabled (green indicator)
* Try closing and reopening the chat panel


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.agents.opsera.ai/terminal-setup/cursor-ide.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
