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

# Connect an agent with the MCP server

Connect your coding agent to the Sourcery MCP server at `https://mcp.sourcery.ai/mcp` so it can request reviews and fix Sourcery's review comments and security findings.

## Connect


    <TabItem label="Claude Code">
        ```bash
        claude mcp add --transport http -s user sourcery https://mcp.sourcery.ai/mcp
        ```

        Then run `/mcp` in Claude Code, select `sourcery` and choose **Authenticate**. Your client opens Sourcery in the browser to sign in.
    </TabItem>
    <TabItem label="Codex">
        ```bash
        codex mcp add sourcery --url https://mcp.sourcery.ai/mcp
        codex mcp login sourcery
        ```

        Your client opens Sourcery in the browser to sign in.
    </TabItem>
    <TabItem label="Cursor">
        [Install in Cursor](cursor://anysphere.cursor-deeplink/mcp/install?name=sourcery&config=eyJ1cmwiOiJodHRwczovL21jcC5zb3VyY2VyeS5haS9tY3AifQ==), or add this to `~/.cursor/mcp.json`:

        ```json
        {
          "mcpServers": {
            "sourcery": {
              "url": "https://mcp.sourcery.ai/mcp"
            }
          }
        }
        ```

        Your client opens Sourcery in the browser to sign in.
    </TabItem>
    <TabItem label="VS Code">
        [Install in VS Code](vscode:mcp/install?%7B%22name%22%3A%22sourcery%22%2C%22type%22%3A%22http%22%2C%22url%22%3A%22https%3A%2F%2Fmcp.sourcery.ai%2Fmcp%22%7D), or add this to `.vscode/mcp.json`:

        ```json
        {
          "servers": {
            "sourcery": {
              "type": "http",
              "url": "https://mcp.sourcery.ai/mcp"
            }
          }
        }
        ```

        Your client opens Sourcery in the browser to sign in.
    </TabItem>
    <TabItem label="Others">
        Any client that supports remote MCP servers with OAuth can connect to `https://mcp.sourcery.ai/mcp`. Most read a config like this:

        ```json
        {
          "mcpServers": {
            "sourcery": {
              "url": "https://mcp.sourcery.ai/mcp"
            }
          }
        }
        ```

        Your client opens Sourcery in the browser to sign in.
    </TabItem>



## Try it

Ask your agent:

- _Request a Sourcery review of this pull request._
- _Get Sourcery's review of this pull request and fix the comments that are still open._
- _Fix the critical and high security issues Sourcery found in this repository._

Every endpoint in the [API reference](https://api.sourcery.ai/api) is also a tool. The security tools need security scanning on the account.

## What's next
