🔌 RCA MCP Server Setup

✅ Status: Built and Ready!
API Home | Swagger Docs

📱 Choose Your Client: This MCP server works with both Claude Code CLI (terminal-based) and Claude Desktop (desktop app). Setup instructions differ for each.

Option 1: Claude Code CLI (Recommended)

Step 1: Add MCP Server via CLI

Open a terminal and run this command (replace the path with your actual repository location):

macOS/Linux:

claude mcp add rca-api-localhost \
  -e RCA_API_URL=http://localhost:24147 \
  -- dotnet run --project /path/to/oc-internal-rca-api/src/MCP.Server/MCP.Server.csproj

Windows (use forward slashes):

claude mcp add rca-api-localhost -e RCA_API_URL=http://localhost:24147 -- dotnet run --project C:/path/to/oc-internal-rca-api/src/MCP.Server/MCP.Server.csproj

Example (Windows):

claude mcp add rca-api-localhost -e RCA_API_URL=http://localhost:24147 -- dotnet run --project C:/claude/oc-internal-rca-api/src/MCP.Server/MCP.Server.csproj

⚠️ Windows Users: Use forward slashes (/) instead of backslashes (\) in the path. The claude mcp add command does not properly escape backslashes when writing to the JSON config file, causing paths like C:\path to become C:path (invalid). Windows fully supports forward slashes in file paths.

Step 2: Restart Claude Code

Completely close and restart Claude Code for the changes to take effect.

Step 3: Verify

Run claude mcp list to see your configured MCP servers. You should see ✓ Connected next to rca-api-localhost.

If you see "Failed to connect", check the Troubleshooting section below.

Alternative: Manual Configuration (Claude Code CLI)

If the CLI command doesn't work, manually edit your project config file:

  1. Locate your config file: C:\Users\<YourUsername>\.claude.json
  2. Find your project section (e.g., "C:/claude")
  3. Add under "mcpServers" key:
"rca-api-localhost": {
  "type": "stdio",
  "command": "dotnet",
  "args": [
    "run",
    "--project",
    "C:\\claude\\oc-internal-rca-api\\src\\MCP.Server\\MCP.Server.csproj"
  ],
  "env": {
    "RCA_API_URL": "http://localhost:24147"
  }
}

Important: Use double backslashes (\\) in JSON files!

  • Save the file and restart Claude Code
  • Option 2: Claude Desktop (Desktop App)

    Step 1: Locate Config File

    Find and open your Claude Desktop configuration file:

    Windows: %APPDATA%\Claude\claude_desktop_config.json

    macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

    Linux: ~/.config/Claude/claude_desktop_config.json

    Tip: Press Win+R, type %APPDATA%\Claude and press Enter (Windows)

    Step 2: Add MCP Server Configuration

    Add this to your config file (replace the path with your actual repository location):

    Windows:

    {
      "mcpServers": {
        "rca-api-localhost": {
          "command": "dotnet",
          "args": ["run", "--project", "C:\\path\\to\\oc-internal-rca-api\\src\\MCP.Server\\MCP.Server.csproj"],
          "env": {"RCA_API_URL": "http://localhost:24147"}
        }
      }
    }

    macOS/Linux:

    {
      "mcpServers": {
        "rca-api-localhost": {
          "command": "dotnet",
          "args": ["run", "--project", "/path/to/oc-internal-rca-api/src/MCP.Server/MCP.Server.csproj"],
          "env": {"RCA_API_URL": "http://localhost:24147"}
        }
      }
    }

    ⚠️ Important: Use double backslashes (\\) in Windows paths for JSON!

    Step 3: Restart Claude Desktop

    Completely quit Claude Desktop (File → Quit) and restart it. Open a new conversation to use the MCP server.

    ✅ Verify Connection

    In Claude, ask: What tools do you have available?

    You should see 5 RCA tools:

    🎯 Recommended: Enable Seamless RCA Workflow

    Update Claude's Memory (Highly Recommended)

    To make Claude automatically use the RCA MCP tools without you having to ask each time, add this to your MEMORY.md file:

    For Claude Code CLI: Edit C:\Users\<username>\.claude\projects\<project-path>\memory\MEMORY.md

    Copy and paste this snippet:

    ## RCA (Root Cause Analysis) Workflow
    
    ### Default RCA Creation Method
    - **ALWAYS use the RCA MCP server** for creating, searching, and managing RCAs
    - The MCP server is configured as `rca-api-localhost` and provides 5 tools:
      - `create_rca` - Create new RCA documents
      - `search_rcas` - Search for existing RCAs
      - `get_rca` - Get RCA details by ID
      - `list_by_service` - Find RCAs by service name
      - `get_statistics` - Get aggregate RCA statistics
    - **When user asks to create an RCA**, use `create_rca` tool first (not manual file creation)
    - **MCP Server Location**: `C:/claude/oc-internal-rca-api/src/MCP.Server`
    - **API Endpoint**: http://localhost:24147
    
    ### RCA Severity Levels
    - **Sev0** - Total outage (High severity)
    - **Sev1** - Partial outage (High severity)
    - **Sev2** - Medium severity
    - **Sev3** - Low severity
    - **Sev4** - Proactive (no outage, lessons learned)
    - **Sev5** - Informational (no incident)

    Why this matters: Without this memory update, you would need to explicitly ask Claude to "use the RCA MCP server" each time. With this update, Claude will automatically use the RCA tools when you ask about RCAs.

    💡 Tip: After adding this to MEMORY.md, restart Claude Code for the memory changes to take effect.

    💬 Natural Language Examples

    Once configured, you can use RCAs conversationally:

    Search & Discovery:
    Show me all high severity (Sev0 and Sev1) RCAs from last week
    What RCAs affected the payments service?
    Find all incomplete RCAs that need action items
    List all database-related incidents this quarter
    Creating RCAs:
    Create a new RCA for yesterday's database outage
    Create a Sev1 RCA for the API timeout that happened on March 5th at 2pm
    Start an RCA for the deployment rollback this morning
    Statistics & Reporting:
    Get statistics on RCA completion rates
    What's the breakdown of RCAs by severity?
    Show me incident trends for the last 6 months

    📖 User Guide: Working with RCAs

    Creating an RCA

    You can create RCAs using natural language. Claude will guide you through providing the required information.

    Example 1: Simple Creation
    Create an RCA for the payment processing outage that happened yesterday

    Claude will ask you for:

    Severity Levels:

    Example 2: Detailed Creation
    Create a Sev0 RCA for the total database outage on March 5th, 2026 at 14:30 UTC.
    Owner: john.doe@company.com
    Overview: Primary database crashed due to memory leak in query optimizer causing total outage.
    Affected 5000 customers across all regions.

    Claude will create the RCA with all provided details and return the RCA ID.

    Searching for RCAs

    By Severity
    Show me all Sev0 RCAs from the last 30 days
    Show me all high severity RCAs (Sev0 and Sev1)
    List proactive RCAs (Sev4) from this quarter
    By Service
    Find all RCAs related to the payment processing service
    By Status
    List all incomplete RCAs that need action items

    Viewing RCA Details

    Get Full Details
    Show me the complete details for RCA abc123

    Returns: incident timeline, root cause analysis, action items, affected services, and more.

    Adding Information to Existing RCAs

    Add Timeline Event
    Add a timeline event to RCA abc123:
    Time: 14:35 UTC - Database stopped responding to health checks
    Add Action Item
    Add an action item to RCA abc123:
    Action: Implement query timeout limits in database configuration
    Owner: db-team@company.com
    Due: March 15, 2026
    Add Resource
    Add a link to RCA abc123:
    URL: https://grafana.company.com/dashboard/incident-123
    Description: Monitoring dashboard showing CPU spike

    Getting Statistics

    Overall Stats
    What are the current RCA statistics?

    Returns: total count, breakdown by severity, completion rates, affected customers.

    🔧 Troubleshooting

    Connection Fails on Windows (Claude Code CLI)

    Symptom: Running claude mcp list shows "✗ Failed to connect" for rca-api-localhost

    Diagnosis:

    1. Run: claude mcp list and look at the displayed command path
    2. If you see a path without proper slashes (e.g., C:claudeoc-internal-rca-api...), the path is invalid

    Fix Option 1 - Re-add with forward slashes:

    1. Remove the server: claude mcp remove rca-api-localhost
    2. Re-add using forward slashes:
      claude mcp add rca-api-localhost -e RCA_API_URL=http://localhost:24147 -- dotnet run --project C:/claude/oc-internal-rca-api/src/MCP.Server/MCP.Server.csproj
    3. Restart Claude Code

    Fix Option 2 - Manual config edit:

    1. Edit C:\Users\<username>\.claude.json
    2. Find the rca-api-localhost section and fix the path to use double backslashes (\\)
    3. Save and restart Claude Code

    Verify MCP Server Works Independently

    Test if the server can start on its own:

    cd C:\claude\oc-internal-rca-api\src\MCP.Server
    set RCA_API_URL=http://localhost:24147
    dotnet run

    You should see: RCA MCP Server started. Listening on stdin...

    If this works but claude mcp list shows "Failed to connect", the issue is with the path configuration in your config file.

    General Troubleshooting

    🎉 Ready to connect to your RCA database!