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

# MCP Server for IDEs

> Install the Steadwing MCP server to run root cause analysis and investigate code issues directly from Cursor, Claude Desktop, Smithery, or any MCP-compatible client without switching to a browser.

## What is the Steadwing MCP server?

The Steadwing MCP server brings AI-powered root cause analysis directly into your IDE. Ask your AI assistant to investigate a production error, and Steadwing returns the root cause with a suggested fix, no context switching or browser tabs required.

<CardGroup cols={2}>
  <Card title="Root Cause Analysis" icon="search">
    Trigger full RCA on errors, alerts, or stack traces from your IDE
  </Card>

  <Card title="Context-Aware" icon="brain">
    Leverages your connected integrations for deeper insights
  </Card>

  <Card title="File Analysis" icon="code">
    Pass relevant source files for more accurate results
  </Card>

  <Card title="Zero Context Switch" icon="monitor">
    Stay in your editor while Steadwing investigates
  </Card>
</CardGroup>

## Setup

Get your API key from [app.steadwing.com/organization](https://app.steadwing.com/organization).

## Installation

<Tabs>
  <Tab title="Cursor">
    Add to your project's `.cursor/mcp.json`:

    ```json theme={null}
    {
      "mcpServers": {
        "steadwing": {
          "command": "npx",
          "args": ["-y", "@steadwing/mcp-server"],
          "env": {
            "STEADWING_API_KEY": "your_api_key_here"
          }
        }
      }
    }
    ```

    Or install via the [Cursor Marketplace](https://cursor.com/plugins) (search "Steadwing").
  </Tab>

  <Tab title="Smithery">
    ```bash theme={null}
    npx @smithery/cli install @steadwing/mcp-server --client claude
    ```

    Or with pre-configured API key:

    ```bash theme={null}
    npx @smithery/cli install @steadwing/mcp-server --client claude --config '{"Steadwing API Key":"your_api_key_here"}'
    ```
  </Tab>

  <Tab title="Claude Desktop">
    Add to your Claude Desktop config:

    * macOS: `~/Library/Application Support/Claude/claude_desktop_config.json`
    * Windows: `%APPDATA%\Claude\claude_desktop_config.json`

    ```json theme={null}
    {
      "mcpServers": {
        "steadwing": {
          "command": "npx",
          "args": ["-y", "@steadwing/mcp-server"],
          "env": {
            "STEADWING_API_KEY": "your_api_key_here"
          }
        }
      }
    }
    ```

    Restart Claude Desktop after updating config.
  </Tab>

  <Tab title="Any MCP Client">
    This server uses stdio transport. Run it with:

    ```bash theme={null}
    STEADWING_API_KEY=your_key npx -y @steadwing/mcp-server
    ```
  </Tab>
</Tabs>

## Tool: `run_rca`

The MCP server exposes a single tool `run_rca` that analyzes errors with AI-powered root cause analysis.

**Input:**

| Parameter | Required | Description                                                     |
| --------- | -------- | --------------------------------------------------------------- |
| `error`   | Yes      | Error message, stack trace, or incident description             |
| `files`   | No       | Array of `{ name, content }` for relevant source files (max 20) |

**Output:** A URL to the incident on Steadwing where you can view the full analysis.

<Note>
  Including relevant source files is strongly recommended for more accurate analysis. Start with files mentioned in the stack trace, then add related imports and configuration files.
</Note>

## How do I use the MCP server for debugging?

### Investigating a Production Error

You're debugging an issue and have a stack trace. Instead of manually searching logs and code:

```text theme={null}
"Hey, investigate this error: ConnectionTimeout in PaymentService.processOrder()"
```

Steadwing automatically:

* Searches your connected observability tools for related errors
* Correlates with recent code changes in GitHub
* Identifies the likely root cause
* Suggests a fix

### Analyzing Suspicious Code

You're reviewing code and something looks off:

```text theme={null}
"Investigate why this function might be causing memory leaks"
```

Steadwing examines the code pattern, checks for similar issues in your codebase, and explains potential problems with actionable recommendations.

### Understanding an Alert

An alert fires and you want quick context:

```text theme={null}
"What's causing the high latency alerts on the checkout service?"
```

Steadwing pulls metrics, recent deployments, and error patterns to give you a complete picture without leaving your editor.

## How do integrations enhance MCP server results?

The MCP server works best when your Steadwing account has integrations connected:

| Integration           | What It Adds                                           |
| --------------------- | ------------------------------------------------------ |
| **GitHub**            | Repository context, recent commits, deployment history |
| **Datadog / Grafana** | Metrics, monitors, and APM data                        |
| **Sentry**            | Error tracking and stack traces                        |
| **AWS / GCP**         | Cloud resource and service insights                    |

Connect integrations at [app.steadwing.com/settings](https://app.steadwing.com/integrations) to unlock full investigation capabilities.

## FAQs

<AccordionGroup>
  <Accordion title="Do I need a Steadwing account?">
    Yes, authentication is required. The MCP server connects to your Steadwing account to access your organization's integrations and provide accurate analysis. Sign up at [app.steadwing.com](https://app.steadwing.com) if you don't have an account.
  </Accordion>

  <Accordion title="What can I investigate with MCP?">
    You can trigger root cause analysis on errors, stack traces, or alerts. Pass relevant source files alongside the error for more accurate results.
  </Accordion>

  <Accordion title="Does it work without integrations connected?">
    The MCP server requires authentication and works best with integrations. Without integrations, investigation capabilities are limited to local code analysis.
  </Accordion>

  <Accordion title="Which IDE should I use?">
    Cursor and Claude Desktop have the best MCP support. Any MCP-compatible client will work, check [Smithery](https://smithery.ai/server/@steadwing/mcp) for the latest compatibility.
  </Accordion>

  <Accordion title="Is my code sent to Steadwing?">
    Only relevant file snippets you explicitly pass (via the `files` parameter) are sent for analysis. Review our privacy policy at steadwing.com for details.
  </Accordion>
</AccordionGroup>

Need help? Contact us at [hello@steadwing.com](mailto:hello@steadwing.com)
