# Connect an AI agent with the MCP server

> Give Claude, Cursor, VS Code or any MCP client the phone lookups with one API key.

Phone-Check.app runs a hosted [MCP](https://modelcontextprotocol.io) server, so AI agents can validate numbers with the same credits and answers as the REST API.

| | |
| --- | --- |
| Endpoint | `https://mcp.phone-check.app/mcp` |
| Transport | Streamable HTTP, JSON-RPC 2.0 |
| Auth | Your API key in the `x-api-key` header |

## Connect your client

**Claude Code**

```bash
claude mcp add --transport http phone-check-app https://mcp.phone-check.app/mcp --header "x-api-key: <your-api-key>"
```

Add `--scope user` to use it in every project.

**Cursor** (`.cursor/mcp.json`), **Windsurf** (`~/.codeium/windsurf/mcp_config.json`, with `serverUrl` in place of `url`) and most other clients:

```json
{
  "mcpServers": {
    "phone-check-app": {
      "url": "https://mcp.phone-check.app/mcp",
      "headers": { "x-api-key": "<your-api-key>" }
    }
  }
}
```

**VS Code** (`.vscode/mcp.json`) uses a `servers` key with `"type": "http"`. The [Developers page](https://phone-check.app/developers#mcp) has a ready snippet for each client, including Claude Desktop.

## Tools

| Tool | What it does | Credits |
| --- | --- | --- |
| `phone_validate` | The standard lookup (`GET /phone/details`) | 1 |
| `phone_lookup_npa_nxx` | The extended lookup with carrier context (`GET /phone/extra-details`) | 3, or 1 outside the NPA-NXX registry |
| `phone_lookup_full_details` | The full-data lookup with the exchange mix (`GET /phone/full-details`) | 6, or 1 outside the NPA-NXX registry |
| `account_whoami` | The workspace and key the agent runs as, with the credits left | Free |
| `account_usage` | Credits used per day and service | Free |

## Check it works

Ask your agent to run `account_whoami` first: it costs nothing and confirms the key and the credit balance. A `402` from a lookup tool means the workspace is out of credits, not that the number is invalid.

More detail: [MCP server guide](https://phone-check.app/guides/mcp-server).
