// ai agents and mcp
Via APICursor email verification with pingutil
Cursor's agent writes form validation and data scripts quickly, but it has no way to know whether a given address is deliverable or a throwaway, so the code it writes stops at a regex. With pingutil in mcp.json, the agent can call real verification and classification while it works and build your checks against the actual response fields.
Where it connects: Cursor mcp.json remote server (url plus headers, in .cursor/mcp.json or ~/.cursor/mcp.json)
What goes wrong without it
- The agent keeps suggesting a hardcoded list of ten temp-mail domains for our signup form.
- I want to try the verification API on real addresses without writing a test script first.
- Our seed data is full of fake addresses and I cannot tell which ones are safe to send to in staging.
What you can do with Cursor and pingutil
Build signup validation in the editor
Ask the agent to call lookup_email with fast: true on a disposable, a free webmail and a company address, then implement the check in your signup handler against /v1/lookup using verdict.is_spam and category.
Check seed and test data
Have the agent verify the addresses in your seed file with verify_emails and replace invalid ones with example.com placeholders before anyone runs a staging email job.
Classify domains in a pull request
When a change adds a domain allow list or block list, ask the agent to classify each domain with lookup_email and comment on any that are free webmail or disposable.
Set it up
- 1
Create an API key in the pingutil dashboard and set it as PINGUTIL_API_KEY in the environment Cursor starts from.
- 2
Create ~/.cursor/mcp.json for all projects, or .cursor/mcp.json in one project, with a pingutil entry under mcpServers.
- 3
Set url to https://pingutil.com/mcp and an Authorization header of Bearer ${env:PINGUTIL_API_KEY}; Cursor resolves ${env:...} in url and headers.
- 4
Open Cursor Settings, find the MCP section and check that pingutil is enabled and lists three tools.
- 5
In the agent chat, ask for a check by name, for example "verify these addresses with pingutil".
{
"mcpServers": {
"pingutil": {
"url": "https://pingutil.com/mcp",
"headers": {
"Authorization": "Bearer ${env:PINGUTIL_API_KEY}"
}
}
}
}What to do with each result
| pingutil result | Action in Cursor |
|---|---|
| lookup_email: verdict.is_spam true | Use it as the failing case in the signup test the agent writes. |
| lookup_email: category company | Have the agent route the address to the team onboarding path in your code. |
| verify_emails: status invalid | Replace the address in seed data with a placeholder. |
| status risky or unknown | Leave the address but note it; the agent should not treat catch-all domains as invalid. |
Limits to plan for
- Cursor resolves ${env:NAME} from the environment it was started in; if the variable is not set there, the header is sent without a key and pingutil answers 401.
- A mailbox check can take seconds on slow mail servers (up to about 25 s). Your own application code should call /v1/lookup with skip_enrichment: true for fast checks and give /v1/verify a short timeout that fails open.
- Tool calls count toward the key's Free plan limits: 300 verifications a day and 3,000 a month, 2,000 lookups a day and 30,000 a month, 50 new company profiles a day and 500 a month. No OAuth.
Cursor documentation
Cursor is a trademark of its owner. This integration uses Cursor's documented extension points; it is not an official Cursor app.
Common questions
- Should I commit .cursor/mcp.json?
- Yes if it only contains ${env:PINGUTIL_API_KEY}, so each developer uses their own key. Never commit a file with the key itself written in.
- Does the agent see my API key?
- Cursor adds the header when it calls pingutil; the agent sees tool results. If you paste the key into a project file, though, the agent can read it like any other file.
- Can the agent call pingutil from the code it writes?
- The MCP tools are for the agent while it works. Code that runs in your app calls the REST API (/v1/verify, /v1/verify/batch, /v1/lookup) with the same key type, which the agent can write for you.
Stop bad addresses in Cursor today
Sign in with your email, create an API key and paste it into the step above. Test on a few real addresses first: the live demo shows exactly what your Cursor setup will receive.