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

# MCP Server

> Run Reach as an MCP server for Claude, Cursor, VS Code, and other MCP-compatible clients.

The `lqt` binary includes a built-in MCP (Model Context Protocol) server that exposes Loqate verification as tools that AI agents can call directly. This means your agent can verify addresses, emails, and phone numbers without shelling out to the CLI — the MCP client handles tool invocation natively.

## Two modes

| Mode      | Command                | Best for                                                                                      |
| :-------- | :--------------------- | :-------------------------------------------------------------------------------------------- |
| **Stdio** | `lqt mcp`              | Local agents — Claude Code, Cursor, VS Code. Communicates over stdin/stdout.                  |
| **HTTP**  | `lqt mcp --http :8080` | Hosted deployments. Includes per-IP rate limiting, request logging, and a `/health` endpoint. |

## Setup by client

<Tabs>
  <Tab title="Claude Code">
    Add Reach as a local MCP server:

    ```bash theme={null}
    claude mcp add loqate -- lqt mcp
    ```

    Set your API key as an environment variable in your shell profile, or pass it in the MCP config:

    ```json .claude/settings.json theme={null}
    {
      "mcpServers": {
        "loqate": {
          "command": "lqt",
          "args": ["mcp"],
          "env": {
            "LOQATE_API_KEY": "your-key-here"
          }
        }
      }
    }
    ```

    Verify the connection:

    ```bash theme={null}
    claude mcp list
    ```
  </Tab>

  <Tab title="Claude Desktop">
    Add to your Claude Desktop MCP configuration file:

    <Tabs>
      <Tab title="macOS">
        Edit `~/Library/Application Support/Claude/claude_desktop_config.json`:
      </Tab>

      <Tab title="Windows">
        Edit `%APPDATA%\Claude\claude_desktop_config.json`:
      </Tab>
    </Tabs>

    ```json theme={null}
    {
      "mcpServers": {
        "loqate": {
          "command": "lqt",
          "args": ["mcp"],
          "env": {
            "LOQATE_API_KEY": "your-key-here"
          }
        }
      }
    }
    ```
  </Tab>

  <Tab title="Cursor">
    Add to `.cursor/mcp.json` in your project root (or `~/.cursor/mcp.json` for global config):

    ```json .cursor/mcp.json theme={null}
    {
      "mcpServers": {
        "loqate": {
          "type": "stdio",
          "command": "lqt",
          "args": ["mcp"],
          "env": {
            "LOQATE_API_KEY": "your-key-here"
          }
        }
      }
    }
    ```

    Restart Cursor, then ask: "What Loqate tools do you have available?"
  </Tab>

  <Tab title="VS Code">
    Create `.vscode/mcp.json` in your project:

    ```json theme={null}
    {
      "servers": {
        "loqate": {
          "type": "stdio",
          "command": "lqt",
          "args": ["mcp"],
          "env": {
            "LOQATE_API_KEY": "your-key-here"
          }
        }
      }
    }
    ```
  </Tab>
</Tabs>

## Remote MCP server

If you prefer not to install the CLI, you can connect to the hosted MCP endpoint:

```
https://reach.prod.fabric.gbgplatforms.com/mcp
```

<Tabs>
  <Tab title="Claude Code">
    ```bash theme={null}
    claude mcp add --transport http loqate-reach https://reach.prod.fabric.gbgplatforms.com/mcp
    ```
  </Tab>

  <Tab title="Cursor">
    ```json theme={null}
    {
      "mcpServers": {
        "loqate-reach": {
          "url": "https://reach.prod.fabric.gbgplatforms.com/mcp"
        }
      }
    }
    ```
  </Tab>
</Tabs>

<Warning>
  The remote MCP server (HTTP mode) exposes 6 of the 9 tools. `parse_address`, `set_policy`, and `recommend_policy` are only available in stdio mode. See [Available Tools](/ai-agents/mcp/tools#tool-availability-by-mode) for the full breakdown.
</Warning>

<Note>
  When using the remote MCP server, your API key can be configured at the organization level (Claude Desktop, Claude Code, Cursor) or passed per-session. See [Configuration](/ai-agents/reference/configuration) for details.
</Note>

## HTTP mode

For hosted or shared deployments, run the MCP server in HTTP mode:

```bash theme={null}
lqt mcp --http :8080
```

HTTP mode adds:

* Per-IP rate limiting
* Request logging
* `/health` endpoint for load balancers and monitoring
