# MCP server

The Model Context Protocol (MCP) lets AI assistants call tools. Our remote MCP server gives any compatible client the same phone, email and IP checks as the API, so an assistant can verify the addresses in a CSV you are working on, validate phone numbers in test fixtures, or look up the IP addresses in a log.

| Setting | Value |
|---|---|
| Endpoint | `https://mcp.qelka.com/mcp` |
| Transport | Streamable HTTP |
| Authentication | `Authorization: Bearer sk_live_...` header, or an `sk_test_` key for simulated answers |
| Billing | Each tool call costs the same credits as the matching API call |

## Tools

| Tool | Arguments | What it does | Matching endpoint | Credits |
|---|---|---|---|---|
| `validate_phone` | `phone`, optional `country` and `level` | Validates and describes a phone number, at the basic or live level | [POST /phone](/docs/api-reference/phone) | 1 basic, 3 live |
| `verify_email` | `email`, optional `mode` | Verifies an email address, with or without the mailbox check | [POST /email](/docs/api-reference/email) | 1 |
| `lookup_ip` | `ip` | Locates an IP address and reads its network and risk flags | [POST /ip](/docs/api-reference/ip) | 1 |
| `get_account` | none | Reads the plan, credit balance, expiring credits, limits and key mode | [GET /account](/docs/api-reference/account) | 0 |

The arguments have the same meaning and defaults as the fields of the matching endpoint, and each tool returns the same JSON result, so the reference pages describe them exactly. When the API refuses a call, the tool result is marked as an error and carries the API's message and error type.

## Authentication

The server authenticates with your API key, sent as a bearer token in the `Authorization` header, exactly like the API. Your client must be able to send a custom header to a remote MCP server. A missing or malformed key gets an HTTP `401`.

A test key works too: the tools then return the simulated answers described in [Test mode](/docs/test-mode) and never spend credits, which is a good way to try a client before you give it a live key.

OAuth is not supported yet. Clients that only connect to MCP servers through OAuth cannot connect yet.

Create a dedicated key for your assistant in the dashboard, named after the client, such as `cursor-laptop`. If you stop using the client or the key ends up somewhere it should not, revoke that key alone: it stops working within 60 seconds and nothing else breaks.

## Set up your client

Many clients that support remote servers take a JSON configuration with the URL and the header:

```json
{
  "mcpServers": {
    "validation": {
      "url": "https://mcp.qelka.com/mcp",
      "headers": {
        "Authorization": "Bearer sk_live_your_key"
      }
    }
  }
}
```

Where that configuration lives, and the exact key names, depend on the client. Step-by-step instructions:

- [Claude](/mcp/claude): Claude Code and Claude Desktop.
- [Cursor](/mcp/cursor): a few lines of `mcp.json`.
- [ChatGPT](/mcp/chatgpt): what works today, and what needs OAuth first.

With Claude Code, one command adds the server:

```bash
claude mcp add --transport http validation https://mcp.qelka.com/mcp --header "Authorization: Bearer $API_KEY"
```

## Credits and limits

Each tool call is forwarded to the API with your key, so it is authenticated, rate limited, cached and billed exactly like a REST call: same credits, same balance, same [rate limits](/docs/rate-limits). An assistant can call a tool many times in one conversation, for example once per row of a file it is reading. Before you ask it to check a long list, check the size of the job, or ask it to call `get_account` first.

For thousands of values, a [bulk job](/docs/api-reference/bulk) is the better tool: it runs in the background and returns one result file.

## Data

Values your assistant checks through the MCP server are processed like any other API call: the same cache, the same retention, the same providers. See [Data and privacy](/docs/data-and-privacy). The conversation itself stays with your assistant's provider; the MCP server only receives the tool calls.

## Troubleshooting

| Symptom | Likely cause |
|---|---|
| The client cannot connect, or asks you to sign in | It only supports OAuth connections, which the server does not offer yet |
| The connection is refused with HTTP `401` | The `Authorization` header is missing, or does not carry a key in the `Bearer sk_live_...` form |
| Tool results report `invalid_api_key` | The key was revoked or mistyped |
| Tool results report `insufficient_credits` | Your balance is empty; `get_account` shows it |
| Tool results report `rate_limited` | The assistant is calling tools faster than your rate limits allow; the message says how long to wait |
