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

# MCP Server

> Use DepFixer tools directly in Claude Code, Cursor, and Windsurf

## Overview

The DepFixer MCP (Model Context Protocol) server lets AI coding assistants analyze your dependencies, check compatibility, and plan migrations -- all from within your IDE.

## Setup

### Claude Code

Add to your project's `.claude/settings.json` or global settings:

```json theme={null}
{
  "mcpServers": {
    "depfixer": {
      "command": "npx",
      "args": ["@depfixer/mcp-server"],
      "env": {
        "DEPFIXER_API_KEY": "dfx_live_YOUR_KEY"
      }
    }
  }
}
```

### Cursor

Add to `.cursor/mcp.json` in your project root:

```json theme={null}
{
  "mcpServers": {
    "depfixer": {
      "command": "npx",
      "args": ["@depfixer/mcp-server"],
      "env": {
        "DEPFIXER_API_KEY": "dfx_live_YOUR_KEY"
      }
    }
  }
}
```

### Windsurf

Add to your Windsurf MCP configuration:

```json theme={null}
{
  "mcpServers": {
    "depfixer": {
      "command": "npx",
      "args": ["@depfixer/mcp-server"],
      "env": {
        "DEPFIXER_API_KEY": "dfx_live_YOUR_KEY"
      }
    }
  }
}
```

<Note>
  The API key is optional. Without it, you get audit-mode analysis (issues found but no fix recommendations). With an API key, you get full analysis + migration planning.

  Get your API key at [app.depfixer.com/dashboard/api-keys](https://app.depfixer.com/dashboard/api-keys).
</Note>

## Available Tools

### depfixer\_analyze

Analyze a package.json for dependency conflicts and health issues.

**Input:**

* `packageJson` (string): The raw contents of a package.json file

**Output:** Health score, issue summary, conflict details, and fix commands.

**Example prompt:** "Analyze my package.json for dependency issues"

### depfixer\_check\_compatibility

Check if a specific package version is compatible with your framework.

**Input:**

* `packageName` (string): The npm package name
* `packageVersion` (string): The version to check
* `framework` (string): Framework name (angular, react)
* `frameworkVersion` (string): Your framework version

**Output:** Compatible/not compatible, reason, and recommended version.

**Example prompt:** "Is @angular/material 17.0.0 compatible with Angular 16?"

### depfixer\_migrate

Plan a framework migration with health score projections.

**Input:**

* `packageJson` (string): The raw contents of a package.json file
* `targetFramework` (string): Target framework name
* `targetVersion` (string): Target version

**Output:** Before/after health scores, packages to update, breaking changes, and commands.

**Example prompt:** "Plan a migration from Angular 16 to Angular 18"

<Warning>
  The migrate tool requires an API key. Without one, it will return an error with instructions to set up authentication.
</Warning>

## Environment Variables

| Variable           | Description           | Default                           |
| ------------------ | --------------------- | --------------------------------- |
| `DEPFIXER_API_URL` | API endpoint URL      | `https://api.depfixer.com/api/v1` |
| `DEPFIXER_API_KEY` | Your DepFixer API key | --- (optional)                    |

## Local Development

To test with a local DepFixer server:

```json theme={null}
{
  "mcpServers": {
    "depfixer": {
      "command": "npx",
      "args": ["@depfixer/mcp-server"],
      "env": {
        "DEPFIXER_API_URL": "http://localhost:3000/api/v1",
        "DEPFIXER_API_KEY": "dfx_live_YOUR_KEY"
      }
    }
  }
}
```

## Troubleshooting

### "API key required"

Some tools (migrate) require an API key. Add `DEPFIXER_API_KEY` to your MCP config env.

### Tools not appearing

Restart your IDE after changing MCP configuration. Check that `npx @depfixer/mcp-server` runs without errors.

### Connection timeout

The analysis may take 10-30 seconds for large projects. If timeouts persist, check your network connection.
