# Connect a coding agent

> Add Corfedo to your coding agent over MCP, sign in and let the agent search your repositories.

Source: https://docs.corfedo.ai/get-started/connect-a-coding-agent/

You add Corfedo as an MCP server to your coding agent, sign in once in the browser and let the agent search your repositories.

## Before you begin

- At least one repository shows **Searchable**, from [Add repositories](https://docs.corfedo.ai/get-started/add-repositories/).
- Claude Code, Cursor, VS Code or Codex. [MCP clients](https://docs.corfedo.ai/connect/mcp/clients/) covers Claude, Antigravity, Copilot CLI, Kiro, Goose and other MCP clients.

The workspace's **Connect** page in the sidebar shows the same setup with your address filled in.

## Connect

### Add Corfedo

Corfedo's MCP address is your workspace address followed by `/mcp`, here `https://corfedo.localhost/mcp`.

**Claude Code**

Run in the project where you use Claude Code:

```sh
claude mcp add --transport http corfedo https://corfedo.localhost/mcp
```

**Corfedo runs on corfedo.localhost**

Claude Code runs on Node.js, which does not read the certificates your system trusts. Start it from a shell that points Node.js at the local certificate:

```sh
export NODE_EXTRA_CA_CERTS="$HOME/corfedo/generated/caddy-root.crt"
```

**Cursor**

Add to `.cursor/mcp.json` in the project, or to `~/.cursor/mcp.json` for every project. Keep the `auth` block. Cursor cannot sign in without it.

```json title=".cursor/mcp.json"
{
  "mcpServers": {
    "corfedo": {
      "url": "https://corfedo.localhost/mcp",
      "auth": {
        "CLIENT_ID": "https://cursor.com/oauth/mcp-client.json"
      }
    }
  }
}
```

**VS Code**

Add to `.vscode/mcp.json` in the workspace, then start the server from the MCP view.

```json title=".vscode/mcp.json"
{
  "servers": {
    "corfedo": {
      "type": "http",
      "url": "https://corfedo.localhost/mcp"
    }
  }
}
```

**Codex**

Add to your Codex configuration:

```toml title="~/.codex/config.toml"
[mcp_servers.corfedo]
url = "https://corfedo.localhost/mcp"
```

### Sign in

In Claude Code, run `/mcp`, select `corfedo` and choose Authenticate. Other agents open a browser window the first time they call Corfedo. Sign in to your workspace and approve access for it.

### Ask your agent

Ask your agent: "Use Corfedo to list my repositories." Then ask it to find something in your code, for example "Use Corfedo to find where the retry policy is configured."

## Check the result

The agent calls Corfedo's `list_repositories` tool and names the repositories you indexed. For the second question it calls `search_code` and cites files from your repository.

If the agent cannot connect, [MCP troubleshooting](https://docs.corfedo.ai/connect/mcp/troubleshooting/) lists what it reports and what to do.

## Next step

Connect more tools from [Connect](https://docs.corfedo.ai/connect/), or set Corfedo up for your team in [Administer a workspace](https://docs.corfedo.ai/workspace/).
