# MCP server for AI agents

Veqen runs a remote [Model Context Protocol](https://modelcontextprotocol.io) server. Any MCP client can call the same checks as the REST API, using the same credits.

**Server URL:** `https://veqen-app.com/mcp` (streamable HTTP)

## Connect with OAuth (Claude, ChatGPT and other apps)

1. In your client, add a **custom connector** (or "remote MCP server") with the URL above.
2. When asked, sign in to Veqen and click **Allow access**.
3. Done. No key is copied anywhere. You can disconnect it later in **Settings → Connected apps**.

The server supports OAuth 2.1 with dynamic client registration and PKCE, as the MCP spec requires. Discovery documents live at `/.well-known/oauth-protected-resource/mcp` and `/.well-known/oauth-authorization-server`.

## Connect with an API key (Claude Code, Cursor, scripts)

Send your API key as a Bearer token.

```bash [Claude Code]
claude mcp add --transport http veqen https://veqen-app.com/mcp \
  --header "Authorization: Bearer $VEQEN_API_KEY"
```

```json [Cursor]
{
  "mcpServers": {
    "veqen": {
      "url": "https://veqen-app.com/mcp",
      "headers": { "Authorization": "Bearer vq_live_..." }
    }
  }
}
```

```json [Other clients]
{
  "mcpServers": {
    "veqen": {
      "type": "http",
      "url": "https://veqen-app.com/mcp",
      "headers": { "Authorization": "Bearer vq_live_..." }
    }
  }
}
```

## Tools

| Tool | Use it when | Credits |
|---|---|---|
| `check_email_address` | Someone gives an email and you need to know if it's real, throwaway or a typo. Optional `verify_mailbox`. | 1 (+5) |
| `check_ip_address` | You have a visitor's IP and need location, network owner, or datacenter/VPN/Tor status. | 1 |
| `check_phone_number` | You need to validate or format a number, or know if it's mobile, VoIP or toll-free. | 1 |
| `check_domain_name` | You need to know if a company domain exists, receives mail, and how old it is. | 1 |
| `check_signup_risk` | You're deciding whether to accept a signup or lead and have several details about the person. | 3 (+5) |
| `get_balance` | You want to know how many credits are left. | 0 |

Check tools spend account credits, so they are marked as metered operations rather than read-only. `get_balance` is read-only. Agents cannot change account settings, buy credit packs or see API keys. Results are the same JSON as the REST API, plus a `credits` object with what was charged and what remains. If you enable auto top-up, spending credits can trigger the automatic payment you configured.

## Example prompts

- "Check these 20 new signups from today's export and list the ones you'd refuse, with reasons."
- "Before you add this lead to the CRM, check that the email and company domain are real."
- "Is +44 56 1234 5678 a mobile number? Format it for our SMS provider."

## Errors

Tool errors come back as MCP tool errors with the same `type` as the REST API, for example `insufficient_credits: This call needs 3 credits and you have 0.` Agents can read them and tell you what to do.
