Can AI agents read your website? Check it from Claude Code, Cursor or curl
When someone asks ChatGPT, Claude or Perplexity for "a good plumber in Austin" or "a tool that does X", the assistant often goes and reads websites right then, with its own crawler. If that crawler can't read your site,
When someone asks ChatGPT, Claude or Perplexity for "a good plumber in Austin" or "a tool that does X", the assistant often goes and reads websites right then, with its own crawler. If that crawler can't read your site, you are not in the answer, and nothing in your analytics tells you why.
The causes are usually boring:
-
robots.txt blocks the AI crawlers, often by accident: a template rule, a plugin, or a blanket
Disallowwritten years ago. - A firewall or bot wall turns them away. Cloudflare, Sucuri or a hosting provider's bot protection answers the crawler with a challenge page instead of your content.
-
The content only exists after JavaScript runs. Many crawlers read the raw HTML. If your page is an empty
<div id="root">, that is what they see. - No sitemap, no structured data. Crawlers miss pages, and assistants have to guess your name, address and hours.
Check it in one request
I work on Mented, and we made the check we use ourselves free: one read-only tool, no account, no API key. It is an MCP server, but it also answers a plain HTTP request, so you can try it with curl:
curl -s https://app.trymented.com/mcp \
-H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"check_site","arguments":{"url":"example.com"}}}'
The answer starts like this:
# example.com: 30/100 (Hard for agents to use)
2 checks pass, 13 to fix.
## What to fix, most important first
1. **Your site has a robots.txt file** (missing, high impact)
- Found: There is no robots.txt file.
...
result.structuredContent has the same thing as fields (score, grade, blocked, fixes, reportUrl), plus instructions: every fix as step-by-step Markdown you can hand to a coding agent. A new site takes about 20 seconds; a site checked in the last 30 minutes answers at once.
There is also a web version at trymented.com/agent-ready.
Let your coding agent run it and fix things
The more useful setup is to let the agent that already has your site's code run the check and make the changes.
As an MCP server (Streamable HTTP, no auth): https://app.trymented.com/mcp
# Claude Code
claude mcp add --transport http mented https://app.trymented.com/mcp
// Cursor: .cursor/mcp.json
{ "mcpServers": { "mented": { "url": "https://app.trymented.com/mcp" } } }
// VS Code: .vscode/mcp.json
{ "servers": { "mented": { "type": "http", "url": "https://app.trymented.com/mcp" } } }
As an agent skill for Claude Code, Cursor, Codex and other agents that read SKILL.md:
npx skills add skillseedorg/mented-mcp
The skill works even without the MCP server connected. When you ask something like "why doesn't ChatGPT show our site?", it runs the check, explains the top fixes, and offers to make them in the repo (robots.txt, sitemap, llms.txt, a schema.org block built from what the site already says), then checks again after you deploy. The source is on GitHub.
Or check the usual suspects yourself
You don't need any tool for a first look.
1. Read your robots.txt the way a crawler does.
curl -s https://yoursite.com/robots.txt
Look for groups that name AI crawlers, and for a User-agent: * group with Disallow: /. The main AI user agents today include GPTBot and OAI-SearchBot (OpenAI), ClaudeBot and Claude-SearchBot (Anthropic), and PerplexityBot (Perplexity). Each company documents what its bots are for; the search bots are the ones that decide whether you can show up in answers, and you can allow those while keeping training bots out:
User-agent: OAI-SearchBot
Allow: /
User-agent: Claude-SearchBot
Allow: /
User-agent: PerplexityBot
Allow: /
User-agent: GPTBot
Disallow: /
Sitemap: https://yoursite.com/sitemap.xml
Only keep the Disallow for training bots if that is a choice you actually want to make.
2. See whether a bot wall answers instead of your site.
curl -s -o /dev/null -w "%{http_code}\n" -A "OAI-SearchBot" https://yoursite.com/
A 403, a 503, or a 200 whose body is a "checking your browser" page means crawlers are likely being turned away. Firewalls treat real crawlers differently from a spoofed user agent, so treat this as a hint and check your firewall's bot settings.
3. Look at the page without JavaScript.
curl -s https://yoursite.com/ | sed 's/<[^>]*>//g' | tr -s ' \n' | head -c 1500
If your headline, services and contact details aren't in there, many crawlers won't see them either. Server-side rendering or prerendering fixes this.
4. Add the small files. A sitemap.xml that robots.txt points to, an llms.txt with a short plain-text summary of the site and links to its key pages, and a schema.org Organization or LocalBusiness block with your real name, address, phone and hours.
What a check can't tell you
A site that AI can read is the starting point, not a guarantee. Whether an assistant recommends you also depends on what the rest of the web says: reviews, directory listings, articles that mention you. Nobody can promise placement in an AI answer, and you should be wary of anyone who does.
But "the crawler was blocked" is a common, silent and fixable reason for being left out, and it takes a minute to rule out.
If you try the check on your site, I'd like to hear what it gets wrong. The issues on the GitHub repo are open.
Originally published by Dev.to AI. Aggregated on AIWithGhost for educational purposes β full credit and traffic to the original publisher.